From 68234d892f56132c82c4803fdb6e32a48333e281 Mon Sep 17 00:00:00 2001 From: Andres Morey Date: Tue, 22 Oct 2024 01:33:44 +0300 Subject: [PATCH] Cleans up directory names and improves GitHub actions workflow (#127) - Changed backend/ => modules/ - Changed frontend/ => dashboard-ui/ - Added GitHub action for releasing CLI - Split up GitHub actions for server and agent --- .dockerignore | 4 +- .github/workflows/ci.yml | 248 +- .github/workflows/release-agent.yml | 99 + .github/workflows/release-cli.yml | 65 + .github/workflows/release-server.yml | 99 + .github/workflows/release.yml | 179 -- .gitignore | 22 +- Makefile | 30 +- backend/common/agentpb/agentpb.go | 3 - backend/common/testpb/testpb.go | 3 - build/package/Dockerfile.agent | 26 +- build/package/Dockerfile.server | 38 +- {frontend => dashboard-ui}/.eslintrc.cjs | 0 {frontend => dashboard-ui}/README.md | 0 {frontend => dashboard-ui}/codegen.ts | 0 {frontend => dashboard-ui}/index.html | 0 {frontend => dashboard-ui}/package.json | 2 +- {frontend => dashboard-ui}/pnpm-lock.yaml | 0 {frontend => dashboard-ui}/postcss.config.js | 0 {frontend => dashboard-ui}/public/favicon.ico | Bin {frontend => dashboard-ui}/public/favicon.svg | 0 .../public/graphiql.html | 0 .../src/apollo-client.ts | 0 {frontend => dashboard-ui}/src/app-config.ts | 0 {frontend => dashboard-ui}/src/app-env.d.ts | 0 .../src/assets/k8s-icons/cronjob.svg | 0 .../src/assets/k8s-icons/daemonset.svg | 0 .../src/assets/k8s-icons/deployment.svg | 0 .../src/assets/k8s-icons/job.svg | 0 .../src/assets/k8s-icons/pod.svg | 0 .../src/assets/k8s-icons/replicaset.svg | 0 .../src/assets/k8s-icons/statefulset.svg | 0 .../src/assets/logo.svg | 0 .../src/components/elements/Modal.tsx | 0 .../src/components/layouts/AppLayout.tsx | 0 .../src/components/layouts/ModalLayout.tsx | 0 .../components/utils/AuthRequired.test.tsx | 0 .../src/components/utils/AuthRequired.tsx | 0 .../src/components/utils/LoadingPage.test.tsx | 0 .../src/components/utils/LoadingPage.tsx | 0 .../__snapshots__/LoadingPage.test.tsx.snap | 0 .../components/widgets/DateRangeDropdown.tsx | 0 .../src/components/widgets/Footer.tsx | 0 .../widgets/ProfilePicDropdown.test.tsx | 0 .../components/widgets/ProfilePicDropdown.tsx | 0 .../src/components/widgets/ServerStatus.tsx | 0 .../components/widgets/SourcePickerModal.tsx | 0 {frontend => dashboard-ui}/src/error-page.tsx | 0 {frontend => dashboard-ui}/src/index.css | 0 {frontend => dashboard-ui}/src/lib/auth.tsx | 0 .../src/lib/console/helpers.tsx | 0 .../src/lib/console/logfeed.tsx | 0 .../src/lib/console/logging-resources.tsx | 0 .../src/lib/graphql/__generated__/gql.ts | 0 .../src/lib/graphql/__generated__/graphql.ts | 0 .../src/lib/graphql/__generated__/index.ts | 0 .../__generated__/introspection-result.json | 0 .../src/lib/graphql/fragments.ts | 0 .../src/lib/graphql/ops.ts | 0 .../src/lib/helpers.tsx | 0 {frontend => dashboard-ui}/src/lib/hooks.ts | 0 .../src/lib/server-status.ts | 0 {frontend => dashboard-ui}/src/lib/theme.tsx | 0 {frontend => dashboard-ui}/src/lib/utils.ts | 0 .../src/lib/workload.ts | 0 {frontend => dashboard-ui}/src/main.tsx | 0 .../src/mocks/console.ts | 0 {frontend => dashboard-ui}/src/mocks/home.ts | 0 .../src/pages/_root.tsx | 0 .../src/pages/auth/login.test.tsx | 0 .../src/pages/auth/login.tsx | 0 .../src/pages/auth/logout.test.tsx | 0 .../src/pages/auth/logout.tsx | 0 .../src/pages/console.test.tsx | 0 .../src/pages/console.tsx | 0 .../src/pages/home.test.tsx | 0 {frontend => dashboard-ui}/src/pages/home.tsx | 0 .../src/routes.test.tsx | 0 {frontend => dashboard-ui}/src/routes.tsx | 0 {frontend => dashboard-ui}/src/test-utils.tsx | 0 {frontend => dashboard-ui}/src/vite-env.d.ts | 0 {frontend => dashboard-ui}/tailwind.config.js | 0 {frontend => dashboard-ui}/tsconfig.json | 0 {frontend => dashboard-ui}/tsconfig.node.json | 0 {frontend => dashboard-ui}/vite.config.ts | 0 {frontend => dashboard-ui}/vitest.setup.ts | 0 {backend => modules}/README.md | 0 {backend => modules}/agent/README.md | 0 {backend => modules}/agent/cmd/main.go | 10 +- {backend => modules}/agent/go.mod | 6 +- {backend => modules}/agent/go.sum | 0 .../agent/internal/debounce/debounce.go | 0 .../agent/internal/debounce/debounce_test.go | 0 .../agent/internal/helpers/helpers.go | 0 .../agent/internal/server/server.go | 4 +- .../agent/internal/server/server_test.go | 6 +- .../agent/internal/server/testutils_test.go | 4 +- .../internal/services/logmetadata/helpers.go | 2 +- .../services/logmetadata/helpers_test.go | 0 .../services/logmetadata/logmetadata.go | 8 +- .../services/logmetadata/logmetadata_test.go | 4 +- .../services/logmetadata/testutils_test.go | 8 +- {backend => modules}/cli/cmd/root.go | 0 {backend => modules}/cli/cmd/serve.go | 6 +- {backend => modules}/cli/go.mod | 10 +- {backend => modules}/cli/go.sum | 0 .../cli/internal/tunnel/tunnel.go | 4 +- {backend => modules}/cli/main.go | 2 +- {backend => modules}/common/README.md | 3 +- .../common/agentpb/agent.pb.go | 162 +- .../common/agentpb/agent_grpc.pb.go | 71 +- modules/common/agentpb/agentpb.go | 3 + {backend => modules}/common/config/config.go | 0 .../common/config/config_test.go | 0 {backend => modules}/common/go.mod | 2 +- {backend => modules}/common/go.sum | 0 .../common/grpchelpers/grpchelpers.go | 2 +- .../common/k8shelpers/k8shelpers.go | 2 +- {backend => modules}/common/testpb/test.pb.go | 52 +- .../common/testpb/test_grpc.pb.go | 27 +- modules/common/testpb/testpb.go | 3 + {backend => modules}/go.work | 0 {backend => modules}/go.work.sum | 106 + {backend => modules}/server/README.md | 0 {backend => modules}/server/cmd/main.go | 4 +- {backend => modules}/server/embed.go | 0 {backend => modules}/server/go.mod | 6 +- {backend => modules}/server/go.sum | 0 {backend => modules}/server/gqlgen.yml | 24 +- .../server/graph/directives.go | 2 +- {backend => modules}/server/graph/errors.go | 0 .../server/graph/generated.go | 2816 +++++++++++++---- {backend => modules}/server/graph/handler.go | 0 {backend => modules}/server/graph/helpers.go | 2 +- .../server/graph/helpers_test.go | 0 .../server/graph/lib/errors.go | 0 .../server/graph/model/models_custom.go | 2 +- .../server/graph/model/models_gen.go | 0 {backend => modules}/server/graph/resolver.go | 0 .../server/graph/resolver_test.go | 0 .../server/graph/schema.graphqls | 0 .../server/graph/schema.resolvers.go | 7 +- .../server/graph/schema.resolvers_test.go | 0 .../server/graph_test/query_resolver_test.go | 0 .../graph_test/subscription_resolver_test.go | 0 .../server/graph_test/testutils_test.go | 2 +- .../server/internal/formerrors/formerrors.go | 0 .../server/internal/k8shelpers/interface.go | 0 .../server/internal/k8shelpers/k8shelpers.go | 0 .../internal/k8shelpers/mock/service.go | 0 .../server/pkg/ginapp/auth.go | 4 +- .../server/pkg/ginapp/auth_test.go | 4 +- .../server/pkg/ginapp/ginapp.go | 6 +- .../server/pkg/ginapp/ginapp_test.go | 4 +- .../server/pkg/ginapp/graphql.go | 2 +- .../server/pkg/ginapp/graphql_test.go | 2 +- .../server/pkg/ginapp/helpers.go | 6 +- .../server/pkg/ginapp/middleware.go | 6 +- .../server/pkg/ginapp/middleware_test.go | 2 +- .../server/pkg/ginapp/testutils_test.go | 2 +- .../server/pkg/ginapp/website.go | 2 +- .../server/pkg/ginapp/website_test.go | 0 .../server/templates/index.tmpl | 0 {backend => modules}/server/tools.go | 0 {backend => modules}/server/website/.gitkeep | 0 165 files changed, 2945 insertions(+), 1285 deletions(-) create mode 100644 .github/workflows/release-agent.yml create mode 100644 .github/workflows/release-cli.yml create mode 100644 .github/workflows/release-server.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 backend/common/agentpb/agentpb.go delete mode 100644 backend/common/testpb/testpb.go rename {frontend => dashboard-ui}/.eslintrc.cjs (100%) rename {frontend => dashboard-ui}/README.md (100%) rename {frontend => dashboard-ui}/codegen.ts (100%) rename {frontend => dashboard-ui}/index.html (100%) rename {frontend => dashboard-ui}/package.json (93%) rename {frontend => dashboard-ui}/pnpm-lock.yaml (100%) rename {frontend => dashboard-ui}/postcss.config.js (100%) rename {frontend => dashboard-ui}/public/favicon.ico (100%) rename {frontend => dashboard-ui}/public/favicon.svg (100%) rename {frontend => dashboard-ui}/public/graphiql.html (100%) rename {frontend => dashboard-ui}/src/apollo-client.ts (100%) rename {frontend => dashboard-ui}/src/app-config.ts (100%) rename {frontend => dashboard-ui}/src/app-env.d.ts (100%) rename {frontend => dashboard-ui}/src/assets/k8s-icons/cronjob.svg (100%) rename {frontend => dashboard-ui}/src/assets/k8s-icons/daemonset.svg (100%) rename {frontend => dashboard-ui}/src/assets/k8s-icons/deployment.svg (100%) rename {frontend => dashboard-ui}/src/assets/k8s-icons/job.svg (100%) rename {frontend => dashboard-ui}/src/assets/k8s-icons/pod.svg (100%) rename {frontend => dashboard-ui}/src/assets/k8s-icons/replicaset.svg (100%) rename {frontend => dashboard-ui}/src/assets/k8s-icons/statefulset.svg (100%) rename {frontend => dashboard-ui}/src/assets/logo.svg (100%) rename {frontend => dashboard-ui}/src/components/elements/Modal.tsx (100%) rename {frontend => dashboard-ui}/src/components/layouts/AppLayout.tsx (100%) rename {frontend => dashboard-ui}/src/components/layouts/ModalLayout.tsx (100%) rename {frontend => dashboard-ui}/src/components/utils/AuthRequired.test.tsx (100%) rename {frontend => dashboard-ui}/src/components/utils/AuthRequired.tsx (100%) rename {frontend => dashboard-ui}/src/components/utils/LoadingPage.test.tsx (100%) rename {frontend => dashboard-ui}/src/components/utils/LoadingPage.tsx (100%) rename {frontend => dashboard-ui}/src/components/utils/__snapshots__/LoadingPage.test.tsx.snap (100%) rename {frontend => dashboard-ui}/src/components/widgets/DateRangeDropdown.tsx (100%) rename {frontend => dashboard-ui}/src/components/widgets/Footer.tsx (100%) rename {frontend => dashboard-ui}/src/components/widgets/ProfilePicDropdown.test.tsx (100%) rename {frontend => dashboard-ui}/src/components/widgets/ProfilePicDropdown.tsx (100%) rename {frontend => dashboard-ui}/src/components/widgets/ServerStatus.tsx (100%) rename {frontend => dashboard-ui}/src/components/widgets/SourcePickerModal.tsx (100%) rename {frontend => dashboard-ui}/src/error-page.tsx (100%) rename {frontend => dashboard-ui}/src/index.css (100%) rename {frontend => dashboard-ui}/src/lib/auth.tsx (100%) rename {frontend => dashboard-ui}/src/lib/console/helpers.tsx (100%) rename {frontend => dashboard-ui}/src/lib/console/logfeed.tsx (100%) rename {frontend => dashboard-ui}/src/lib/console/logging-resources.tsx (100%) rename {frontend => dashboard-ui}/src/lib/graphql/__generated__/gql.ts (100%) rename {frontend => dashboard-ui}/src/lib/graphql/__generated__/graphql.ts (100%) rename {frontend => dashboard-ui}/src/lib/graphql/__generated__/index.ts (100%) rename {frontend => dashboard-ui}/src/lib/graphql/__generated__/introspection-result.json (100%) rename {frontend => dashboard-ui}/src/lib/graphql/fragments.ts (100%) rename {frontend => dashboard-ui}/src/lib/graphql/ops.ts (100%) rename {frontend => dashboard-ui}/src/lib/helpers.tsx (100%) rename {frontend => dashboard-ui}/src/lib/hooks.ts (100%) rename {frontend => dashboard-ui}/src/lib/server-status.ts (100%) rename {frontend => dashboard-ui}/src/lib/theme.tsx (100%) rename {frontend => dashboard-ui}/src/lib/utils.ts (100%) rename {frontend => dashboard-ui}/src/lib/workload.ts (100%) rename {frontend => dashboard-ui}/src/main.tsx (100%) rename {frontend => dashboard-ui}/src/mocks/console.ts (100%) rename {frontend => dashboard-ui}/src/mocks/home.ts (100%) rename {frontend => dashboard-ui}/src/pages/_root.tsx (100%) rename {frontend => dashboard-ui}/src/pages/auth/login.test.tsx (100%) rename {frontend => dashboard-ui}/src/pages/auth/login.tsx (100%) rename {frontend => dashboard-ui}/src/pages/auth/logout.test.tsx (100%) rename {frontend => dashboard-ui}/src/pages/auth/logout.tsx (100%) rename {frontend => dashboard-ui}/src/pages/console.test.tsx (100%) rename {frontend => dashboard-ui}/src/pages/console.tsx (100%) rename {frontend => dashboard-ui}/src/pages/home.test.tsx (100%) rename {frontend => dashboard-ui}/src/pages/home.tsx (100%) rename {frontend => dashboard-ui}/src/routes.test.tsx (100%) rename {frontend => dashboard-ui}/src/routes.tsx (100%) rename {frontend => dashboard-ui}/src/test-utils.tsx (100%) rename {frontend => dashboard-ui}/src/vite-env.d.ts (100%) rename {frontend => dashboard-ui}/tailwind.config.js (100%) rename {frontend => dashboard-ui}/tsconfig.json (100%) rename {frontend => dashboard-ui}/tsconfig.node.json (100%) rename {frontend => dashboard-ui}/vite.config.ts (100%) rename {frontend => dashboard-ui}/vitest.setup.ts (100%) rename {backend => modules}/README.md (100%) rename {backend => modules}/agent/README.md (100%) rename {backend => modules}/agent/cmd/main.go (93%) rename {backend => modules}/agent/go.mod (95%) rename {backend => modules}/agent/go.sum (100%) rename {backend => modules}/agent/internal/debounce/debounce.go (100%) rename {backend => modules}/agent/internal/debounce/debounce_test.go (100%) rename {backend => modules}/agent/internal/helpers/helpers.go (100%) rename {backend => modules}/agent/internal/server/server.go (90%) rename {backend => modules}/agent/internal/server/server_test.go (94%) rename {backend => modules}/agent/internal/server/testutils_test.go (95%) rename {backend => modules}/agent/internal/services/logmetadata/helpers.go (99%) rename {backend => modules}/agent/internal/services/logmetadata/helpers_test.go (100%) rename {backend => modules}/agent/internal/services/logmetadata/logmetadata.go (95%) rename {backend => modules}/agent/internal/services/logmetadata/logmetadata_test.go (98%) rename {backend => modules}/agent/internal/services/logmetadata/testutils_test.go (94%) rename {backend => modules}/cli/cmd/root.go (100%) rename {backend => modules}/cli/cmd/serve.go (97%) rename {backend => modules}/cli/go.mod (95%) rename {backend => modules}/cli/go.sum (100%) rename {backend => modules}/cli/internal/tunnel/tunnel.go (96%) rename {backend => modules}/cli/main.go (91%) rename {backend => modules}/common/README.md (65%) rename {backend => modules}/common/agentpb/agent.pb.go (84%) rename {backend => modules}/common/agentpb/agent_grpc.pb.go (73%) create mode 100644 modules/common/agentpb/agentpb.go rename {backend => modules}/common/config/config.go (100%) rename {backend => modules}/common/config/config_test.go (100%) rename {backend => modules}/common/go.mod (98%) rename {backend => modules}/common/go.sum (100%) rename {backend => modules}/common/grpchelpers/grpchelpers.go (97%) rename {backend => modules}/common/k8shelpers/k8shelpers.go (98%) rename {backend => modules}/common/testpb/test.pb.go (84%) rename {backend => modules}/common/testpb/test_grpc.pb.go (81%) create mode 100644 modules/common/testpb/testpb.go rename {backend => modules}/go.work (100%) rename {backend => modules}/go.work.sum (83%) rename {backend => modules}/server/README.md (100%) rename {backend => modules}/server/cmd/main.go (96%) rename {backend => modules}/server/embed.go (100%) rename {backend => modules}/server/go.mod (96%) rename {backend => modules}/server/go.sum (100%) rename {backend => modules}/server/gqlgen.yml (93%) rename {backend => modules}/server/graph/directives.go (94%) rename {backend => modules}/server/graph/errors.go (100%) rename {backend => modules}/server/graph/generated.go (92%) rename {backend => modules}/server/graph/handler.go (100%) rename {backend => modules}/server/graph/helpers.go (99%) rename {backend => modules}/server/graph/helpers_test.go (100%) rename {backend => modules}/server/graph/lib/errors.go (100%) rename {backend => modules}/server/graph/model/models_custom.go (97%) rename {backend => modules}/server/graph/model/models_gen.go (100%) rename {backend => modules}/server/graph/resolver.go (100%) rename {backend => modules}/server/graph/resolver_test.go (100%) rename {backend => modules}/server/graph/schema.graphqls (100%) rename {backend => modules}/server/graph/schema.resolvers.go (99%) rename {backend => modules}/server/graph/schema.resolvers_test.go (100%) rename {backend => modules}/server/graph_test/query_resolver_test.go (100%) rename {backend => modules}/server/graph_test/subscription_resolver_test.go (100%) rename {backend => modules}/server/graph_test/testutils_test.go (99%) rename {backend => modules}/server/internal/formerrors/formerrors.go (100%) rename {backend => modules}/server/internal/k8shelpers/interface.go (100%) rename {backend => modules}/server/internal/k8shelpers/k8shelpers.go (100%) rename {backend => modules}/server/internal/k8shelpers/mock/service.go (100%) rename {backend => modules}/server/pkg/ginapp/auth.go (95%) rename {backend => modules}/server/pkg/ginapp/auth_test.go (97%) rename {backend => modules}/server/pkg/ginapp/ginapp.go (97%) rename {backend => modules}/server/pkg/ginapp/ginapp_test.go (98%) rename {backend => modules}/server/pkg/ginapp/graphql.go (98%) rename {backend => modules}/server/pkg/ginapp/graphql_test.go (98%) rename {backend => modules}/server/pkg/ginapp/helpers.go (93%) rename {backend => modules}/server/pkg/ginapp/middleware.go (95%) rename {backend => modules}/server/pkg/ginapp/middleware_test.go (98%) rename {backend => modules}/server/pkg/ginapp/testutils_test.go (99%) rename {backend => modules}/server/pkg/ginapp/website.go (97%) rename {backend => modules}/server/pkg/ginapp/website_test.go (100%) rename {backend => modules}/server/templates/index.tmpl (100%) rename {backend => modules}/server/tools.go (100%) rename {backend => modules}/server/website/.gitkeep (100%) diff --git a/.dockerignore b/.dockerignore index c72b979b..832cd95b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,4 @@ node_modules .git -/backend/website -/frontend/.env*.local +/modules/server/website +/dashboard-ui/.env*.local diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a7e64ca..7d5daa1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: - '**' jobs: - backend-lint: + modules-lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -15,11 +15,11 @@ jobs: go-version: '1.22.7' cache: false - name: Run linter - working-directory: ./backend + working-directory: ./modules run: | test -z $(gofmt -l .) - backend-test: + modules-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -28,11 +28,11 @@ jobs: go-version: '1.22.7' cache: false - name: Run tests - working-directory: ./backend + working-directory: ./modules run: | - go test -race github.com/kubetail-org/kubetail/backend/... + go test -race github.com/kubetail-org/kubetail/modules/... - backend-vet: + modules-vet: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -41,11 +41,11 @@ jobs: go-version: '1.22.7' cache: false - name: Run code vetter - working-directory: ./backend + working-directory: ./modules run: | - go vet github.com/kubetail-org/kubetail/backend/... + go vet github.com/kubetail-org/kubetail/modules/... - frontend-lint: + dashboard-ui-lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -56,12 +56,12 @@ jobs: with: version: 9 - name: Set up and run linter - working-directory: ./frontend + working-directory: ./dashboard-ui run: | pnpm install pnpm lint - frontend-test: + dashboard-ui-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -72,12 +72,12 @@ jobs: with: version: 9 - name: Set up and run tests - working-directory: ./frontend + working-directory: ./dashboard-ui run: | pnpm install pnpm test run - frontend-build: + dashboard-ui-build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -88,19 +88,19 @@ jobs: with: version: 9 - name: Set up and run build script - working-directory: ./frontend + working-directory: ./dashboard-ui run: | pnpm install pnpm build - build-amd64-server: + build-server-amd64: needs: - - backend-lint - - backend-test - - backend-vet - - frontend-lint - - frontend-test - - frontend-build + - modules-lint + - modules-test + - modules-vet + - dashboard-ui-lint + - dashboard-ui-test + - dashboard-ui-build runs-on: ubuntu-latest steps: - name: Checkout @@ -113,15 +113,15 @@ jobs: push: false tags: kubetail-server:latest - build-amd64-agent: + build-server-arm64: needs: - - backend-lint - - backend-test - - backend-vet - - frontend-lint - - frontend-test - - frontend-build - runs-on: ubuntu-latest + - modules-lint + - modules-test + - modules-vet + - dashboard-ui-lint + - dashboard-ui-test + - dashboard-ui-build + runs-on: arm64-ubuntu-22 steps: - name: Checkout uses: actions/checkout@v4 @@ -129,19 +129,19 @@ jobs: uses: docker/build-push-action@v5 with: context: . - file: build/package/Dockerfile.agent + file: build/package/Dockerfile.server push: false - tags: kubetail-agent:latest - - build-arm64-sever: + tags: kubetail-server:latest + + build-agent-amd64: needs: - - backend-lint - - backend-test - - backend-vet - - frontend-lint - - frontend-test - - frontend-build - runs-on: arm64-ubuntu-22 + - modules-lint + - modules-test + - modules-vet + - dashboard-ui-lint + - dashboard-ui-test + - dashboard-ui-build + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -149,18 +149,18 @@ jobs: uses: docker/build-push-action@v5 with: context: . - file: build/package/Dockerfile.server + file: build/package/Dockerfile.agent push: false - tags: kubetail-server:latest + tags: kubetail-agent:latest - build-arm64-agent: + build-agent-arm64: needs: - - backend-lint - - backend-test - - backend-vet - - frontend-lint - - frontend-test - - frontend-build + - modules-lint + - modules-test + - modules-vet + - dashboard-ui-lint + - dashboard-ui-test + - dashboard-ui-build runs-on: arm64-ubuntu-22 steps: - name: Checkout @@ -172,3 +172,153 @@ jobs: file: build/package/Dockerfile.agent push: false tags: kubetail-agent:latest + + build-cli-linux-amd64: + needs: + - modules-lint + - modules-test + - modules-vet + - dashboard-ui-lint + - dashboard-ui-test + - dashboard-ui-build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - uses: pnpm/action-setup@v3 + with: + version: 9 + - uses: actions/setup-go@v5 + with: + go-version: '1.22.7' + cache: false + - name: Run build script + working-directory: ./ + run: make build + + build-cli-linux-arm64: + needs: + - modules-lint + - modules-test + - modules-vet + - dashboard-ui-lint + - dashboard-ui-test + - dashboard-ui-build + runs-on: arm64-ubuntu-22 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - uses: pnpm/action-setup@v3 + with: + version: 9 + - uses: actions/setup-go@v5 + with: + go-version: '1.22.7' + cache: false + - name: Run build script + working-directory: ./ + run: make build + + build-cli-macos-15: + needs: + - modules-lint + - modules-test + - modules-vet + - dashboard-ui-lint + - dashboard-ui-test + - dashboard-ui-build + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - uses: pnpm/action-setup@v3 + with: + version: 9 + - uses: actions/setup-go@v5 + with: + go-version: '1.22.7' + cache: false + - name: Run build script + working-directory: ./ + run: make build + + build-cli-macos-14: + needs: + - modules-lint + - modules-test + - modules-vet + - dashboard-ui-lint + - dashboard-ui-test + - dashboard-ui-build + runs-on: macos-14 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - uses: pnpm/action-setup@v3 + with: + version: 9 + - uses: actions/setup-go@v5 + with: + go-version: '1.22.7' + cache: false + - name: Run build script + working-directory: ./ + run: make build + + build-cli-macos-13: + needs: + - modules-lint + - modules-test + - modules-vet + - dashboard-ui-lint + - dashboard-ui-test + - dashboard-ui-build + runs-on: macos-13 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - uses: pnpm/action-setup@v3 + with: + version: 9 + - uses: actions/setup-go@v5 + with: + go-version: '1.22.7' + cache: false + - name: Run build script + working-directory: ./ + run: make build + + build-cli-windows: + needs: + - modules-lint + - modules-test + - modules-vet + - dashboard-ui-lint + - dashboard-ui-test + - dashboard-ui-build + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - uses: pnpm/action-setup@v3 + with: + version: 9 + - uses: actions/setup-go@v5 + with: + go-version: '1.22.7' + cache: false + - name: Run build script + working-directory: ./ + run: make build diff --git a/.github/workflows/release-agent.yml b/.github/workflows/release-agent.yml new file mode 100644 index 00000000..2308380f --- /dev/null +++ b/.github/workflows/release-agent.yml @@ -0,0 +1,99 @@ +name: publish + +on: + push: + tags: + - 'agent/v*' + +jobs: + build-and-publish-amd64: + runs-on: ubuntu-latest + steps: + - name: Get tag name + uses: olegtarasov/get-tag@2.1.3 + id: tagName + with: + tagRegex: "agent/v(.*)" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: build/package/Dockerfile.agent + push: true + tags: kubetail/kubetail-agent:${{ steps.tagName.outputs.tag }}-amd64 + + build-and-publish-arm64: + runs-on: arm64-ubuntu-22 + steps: + - name: Get tag name + uses: olegtarasov/get-tag@2.1.3 + id: tagName + with: + tagRegex: "agent/v(.*)" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: build/package/Dockerfile.agent + push: true + tags: kubetail/kubetail-agent:${{ steps.tagName.outputs.tag }}-arm64 + + create-and-publish-manifest: + runs-on: ubuntu-latest + needs: [build-and-publish-amd64, build-and-publish-arm64] + steps: + - name: Get tag name + uses: olegtarasov/get-tag@2.1.3 + id: tagName + with: + tagRegex: "agent/v(.*)" + - name: 'Setup jq' + uses: dcarbone/install-jq-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Create and push manifest + run: | + docker buildx imagetools create -t kubetail/kubetail-agent:${{ steps.tagName.outputs.tag }} \ + kubetail/kubetail-agent:${{ steps.tagName.outputs.tag }}-amd64 \ + kubetail/kubetail-agent:${{ steps.tagName.outputs.tag }}-arm64 + - name: Fetch docker token + run: | + TOKEN=$(curl -X POST "https://hub.docker.com/v2/users/login" -H "Content-Type: application/json" -d '{"username": "${{ secrets.DOCKERHUB_USERNAME }}", "password": "${{ secrets.DOCKERHUB_TOKEN }}"}' | jq -r '.token') + echo "TOKEN=$TOKEN" >> $GITHUB_ENV + - name: Delete extra arch manifests + run: | + declare -a archs=("amd64" "arm64") + for arch in "${archs[@]}" + do + RESPONSE=$(curl -s -w "%{http_code}" \ + -X DELETE \ + -H "Authorization: Bearer $TOKEN" \ + "https://hub.docker.com/v2/repositories/kubetail/kubetail-agent/tags/${{ steps.tagName.outputs.tag }}-$arch") + if [ "$RESPONSE" -ne 204 ]; then + echo "DELETE for $arch failed with status $RESPONSE" + exit 1 + fi + done diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml new file mode 100644 index 00000000..d7b66aa4 --- /dev/null +++ b/.github/workflows/release-cli.yml @@ -0,0 +1,65 @@ +name: publish + +on: + push: + tags: + - 'cli/v*' + +jobs: + build: + name: Build binaries + strategy: + matrix: + os: [ubuntu-latest, arm64-ubuntu-22, macos-latest, macos-13, windows-latest] + include: + - os: ubuntu-latest + GOOS: linux + GOARCH: amd64 + - os: arm64-ubuntu-22 + GOOS: linux + GOARCH: arm64 + - os: macos-latest + GOOS: darwin + GOARCH: arm64 + - os: macos-13 + GOOS: darwin + GOARCH: amd64 + - os: windows-latest + GOOS: windows + GOARCH: amd64 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - uses: pnpm/action-setup@v3 + with: + version: 9 + - uses: actions/setup-go@v5 + with: + go-version: '1.22.7' + cache: false + - name: Run build script + working-directory: ./ + run: make build + - name: Append os/arch to binary file name + run: mv bin/kubetail bin/kubetail-${{ matrix.GOOS }}-${{ matrix.GOARCH }} + - name: Calculate sha256 checksum + shell: bash + run: | + FILE=bin/kubetail-${{ matrix.GOOS }}-${{ matrix.GOARCH }} + OUTPUT_FILE=${FILE}.sha256 + + if [ "$RUNNER_OS" == "Linux" ]; then + sha256sum "$FILE" | cut -d " " -f 1 > "$OUTPUT_FILE" + elif [ "$RUNNER_OS" == "Windows" ]; then + certutil -hashfile "$FILE" SHA256 | awk 'NR==2' > "$OUTPUT_FILE" + elif [ "$RUNNER_OS" == "macOS" ]; then + shasum -a 256 "$FILE" | cut -d " " -f 1 > "$OUTPUT_FILE" + fi + - name: Attach files to gh release + uses: softprops/action-gh-release@v2 + with: + files: bin/* + draft: true diff --git a/.github/workflows/release-server.yml b/.github/workflows/release-server.yml new file mode 100644 index 00000000..3023ed85 --- /dev/null +++ b/.github/workflows/release-server.yml @@ -0,0 +1,99 @@ +name: publish + +on: + push: + tags: + - 'server/v*' + +jobs: + build-and-publish-amd64: + runs-on: ubuntu-latest + steps: + - name: Get tag name + uses: olegtarasov/get-tag@2.1.3 + id: tagName + with: + tagRegex: "server/v(.*)" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: build/package/Dockerfile.server + push: true + tags: kubetail/kubetail-server:${{ steps.tagName.outputs.tag }}-amd64 + + build-and-publish-arm64: + runs-on: arm64-ubuntu-22 + steps: + - name: Get tag name + uses: olegtarasov/get-tag@2.1.3 + id: tagName + with: + tagRegex: "server/v(.*)" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: build/package/Dockerfile.server + push: true + tags: kubetail/kubetail-server:${{ steps.tagName.outputs.tag }}-arm64 + + create-and-publish-manifest: + runs-on: ubuntu-latest + needs: [build-and-publish-amd64, build-and-publish-arm64] + steps: + - name: Get tag name + uses: olegtarasov/get-tag@2.1.3 + id: tagName + with: + tagRegex: "server/v(.*)" + - name: 'Setup jq' + uses: dcarbone/install-jq-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Create and push manifest + run: | + docker buildx imagetools create -t kubetail/kubetail-server:${{ steps.tagName.outputs.tag }} \ + kubetail/kubetail-server:${{ steps.tagName.outputs.tag }}-amd64 \ + kubetail/kubetail-server:${{ steps.tagName.outputs.tag }}-arm64 + - name: Fetch docker token + run: | + TOKEN=$(curl -X POST "https://hub.docker.com/v2/users/login" -H "Content-Type: application/json" -d '{"username": "${{ secrets.DOCKERHUB_USERNAME }}", "password": "${{ secrets.DOCKERHUB_TOKEN }}"}' | jq -r '.token') + echo "TOKEN=$TOKEN" >> $GITHUB_ENV + - name: Delete extra arch manifests + run: | + declare -a archs=("amd64" "arm64") + for arch in "${archs[@]}" + do + RESPONSE=$(curl -s -w "%{http_code}" \ + -X DELETE \ + -H "Authorization: Bearer $TOKEN" \ + "https://hub.docker.com/v2/repositories/kubetail/kubetail-server/tags/${{ steps.tagName.outputs.tag }}-$arch") + if [ "$RESPONSE" -ne 204 ]; then + echo "DELETE for $arch failed with status $RESPONSE" + exit 1 + fi + done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 49326217..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,179 +0,0 @@ -name: publish - -on: - push: - tags: - - '**' - -jobs: - build-and-publish-amd64-server: - runs-on: ubuntu-latest - steps: - - name: Get tag name - uses: olegtarasov/get-tag@2.1.3 - id: tagName - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - file: build/package/Dockerfile.server - push: true - tags: kubetail/kubetail-server:${{ steps.tagName.outputs.tag }}-amd64 - - build-and-publish-amd64-agent: - runs-on: ubuntu-latest - steps: - - name: Get tag name - uses: olegtarasov/get-tag@2.1.3 - id: tagName - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - file: build/package/Dockerfile.agent - push: true - tags: kubetail/kubetail-agent:${{ steps.tagName.outputs.tag }}-amd64 - - build-and-publish-arm64-server: - runs-on: arm64-ubuntu-22 - steps: - - name: Get tag name - uses: olegtarasov/get-tag@2.1.3 - id: tagName - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - file: build/package/Dockerfile.server - push: true - tags: kubetail/kubetail-server:${{ steps.tagName.outputs.tag }}-arm64 - - build-and-publish-arm64-agent: - runs-on: arm64-ubuntu-22 - steps: - - name: Get tag name - uses: olegtarasov/get-tag@2.1.3 - id: tagName - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - file: build/package/Dockerfile.agent - push: true - tags: kubetail/kubetail-agent:${{ steps.tagName.outputs.tag }}-arm64 - - create-and-publish-manifest-server: - runs-on: ubuntu-latest - needs: [build-and-publish-amd64-server, build-and-publish-arm64-server] - steps: - - name: Get tag name - uses: olegtarasov/get-tag@2.1.3 - id: tagName - - name: 'Setup jq' - uses: dcarbone/install-jq-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Create and push manifest - run: | - docker buildx imagetools create -t kubetail/kubetail-server:${{ steps.tagName.outputs.tag }} \ - kubetail/kubetail-server:${{ steps.tagName.outputs.tag }}-amd64 \ - kubetail/kubetail-server:${{ steps.tagName.outputs.tag }}-arm64 - - name: Fetch docker token - run: | - TOKEN=$(curl -X POST "https://hub.docker.com/v2/users/login" -H "Content-Type: application/json" -d '{"username": "${{ secrets.DOCKERHUB_USERNAME }}", "password": "${{ secrets.DOCKERHUB_TOKEN }}"}' | jq -r '.token') - echo "TOKEN=$TOKEN" >> $GITHUB_ENV - - name: Delete extra arch manifests - run: | - declare -a archs=("amd64" "arm64") - for arch in "${archs[@]}" - do - RESPONSE=$(curl -s -w "%{http_code}" \ - -X DELETE \ - -H "Authorization: Bearer $TOKEN" \ - "https://hub.docker.com/v2/repositories/kubetail/kubetail-server/tags/${{ steps.tagName.outputs.tag }}-$arch") - if [ "$RESPONSE" -ne 204 ]; then - echo "DELETE for $arch failed with status $RESPONSE" - exit 1 - fi - done - - create-and-publish-manifest-agent: - runs-on: ubuntu-latest - needs: [build-and-publish-amd64-agent, build-and-publish-arm64-agent] - steps: - - name: Get tag name - uses: olegtarasov/get-tag@2.1.3 - id: tagName - - name: 'Setup jq' - uses: dcarbone/install-jq-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Create and push manifest - run: | - docker buildx imagetools create -t kubetail/kubetail-agent:${{ steps.tagName.outputs.tag }} \ - kubetail/kubetail-agent:${{ steps.tagName.outputs.tag }}-amd64 \ - kubetail/kubetail-agent:${{ steps.tagName.outputs.tag }}-arm64 - - name: Fetch docker token - run: | - TOKEN=$(curl -X POST "https://hub.docker.com/v2/users/login" -H "Content-Type: application/json" -d '{"username": "${{ secrets.DOCKERHUB_USERNAME }}", "password": "${{ secrets.DOCKERHUB_TOKEN }}"}' | jq -r '.token') - echo "TOKEN=$TOKEN" >> $GITHUB_ENV - - name: Delete extra arch manifests - run: | - declare -a archs=("amd64" "arm64") - for arch in "${archs[@]}" - do - RESPONSE=$(curl -s -w "%{http_code}" \ - -X DELETE \ - -H "Authorization: Bearer $TOKEN" \ - "https://hub.docker.com/v2/repositories/kubetail/kubetail-agent/tags/${{ steps.tagName.outputs.tag }}-$arch") - if [ "$RESPONSE" -ne 204 ]; then - echo "DELETE for $arch failed with status $RESPONSE" - exit 1 - fi - done diff --git a/.gitignore b/.gitignore index b3bfad69..9c0b0056 100644 --- a/.gitignore +++ b/.gitignore @@ -10,31 +10,31 @@ pnpm-debug.log* lerna-debug.log* # dependencies -/frontend/node_modules -/frontend/.pnp -/frontend/.pnp.js +/dashboard-ui/node_modules +/dashboard-ui/.pnp +/dashboard-ui/.pnp.js # dev -/frontend/*.local +/dashboard-ui/*.local # testing -/frontend/coverage +/dashboard-ui/coverage # build /bin -/frontend/dist -/frontend/dist-ssr +/dashboard-ui/dist +/dashboard-ui/dist-ssr # build artifacts -/backend/server/website/* -!/backend/server/website/ -!/backend/server/website/.gitkeep +/modules/server/website/* +!/modules/server/website/ +!/modules/server/website/.gitkeep # tilt (custom) .tilt # misc -/frontend/stats.html +/dashboard-ui/stats.html # Editor directories and files .vscode/* diff --git a/Makefile b/Makefile index b6595695..e4484d9c 100644 --- a/Makefile +++ b/Makefile @@ -1,35 +1,31 @@ # Define variables -CLI_DIR := ./backend/cli +CLI_DIR := ./modules/cli OUTPUT_DIR := ./bin CLI_BINARY := kubetail -DASHBOARD_UI_DIR := ./frontend -DASHBOARD_SERVER_DIR := ./backend/server +DASHBOARD_UI_DIR := ./dashboard-ui +DASHBOARD_SERVER_DIR := ./modules/server # Detect the operating system OS := $(shell uname -s | tr '[:upper:]' '[:lower:]') ARCH := $(shell uname -m) +# Translate the OS to Go's format +ifeq ($(findstring _nt,$(OS)),_nt) + GOOS := windows +else + GOOS := $(OS) +endif + # Translate the architecture to Go's format ifeq ($(ARCH),x86_64) GOARCH := amd64 -else ifeq ($(ARCH),arm64) +else ifeq ($(ARCH),aarch64) GOARCH := arm64 else GOARCH := $(ARCH) endif -# Translate the OS to Go's format -ifeq ($(OS),darwin) - GOOS := darwin -else ifeq ($(OS),linux) - GOOS := linux -else ifeq ($(OS),windows) - GOOS := windows -else - GOOS := $(OS) -endif - # Default target all: build @@ -48,12 +44,12 @@ build-dashboard-ui: @echo "Dashboard UI built and copied successfully." # Build CLI binary for host platform -build-cli: +build-cli: build-dashboard-ui @echo "Building kubetail CLI binary..." @cd $(CLI_DIR) && GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o ../../$(OUTPUT_DIR)/$(CLI_BINARY) ./main.go # Build all the CLI binaries -build-cli-all: +build-cli-all: build-dashboard-ui @echo "Building kubetail CLI binaries..." @cd $(CLI_DIR) && GOOS=darwin GOARCH=amd64 go build -o ../../$(OUTPUT_DIR)/$(CLI_BINARY)-darwin-amd64 ./main.go @echo "Built kubetail for darwin-amd64." diff --git a/backend/common/agentpb/agentpb.go b/backend/common/agentpb/agentpb.go deleted file mode 100644 index c6f8fe03..00000000 --- a/backend/common/agentpb/agentpb.go +++ /dev/null @@ -1,3 +0,0 @@ -package agentpb - -//go:generate protoc --proto_path=../../proto --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ../../proto/agent.proto diff --git a/backend/common/testpb/testpb.go b/backend/common/testpb/testpb.go deleted file mode 100644 index a4ed82c1..00000000 --- a/backend/common/testpb/testpb.go +++ /dev/null @@ -1,3 +0,0 @@ -package testpb - -//go:generate protoc --proto_path=../../proto --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ../../proto/test.proto diff --git a/build/package/Dockerfile.agent b/build/package/Dockerfile.agent index df71bd10..dd49fd0c 100644 --- a/build/package/Dockerfile.agent +++ b/build/package/Dockerfile.agent @@ -14,27 +14,21 @@ FROM golang:1.22.7 AS builder -WORKDIR /backend +WORKDIR /work # install dependencies (for cache) -COPY backend/go.work . -COPY backend/go.work.sum . -COPY backend/cli/go.mod ./cli/go.mod -COPY backend/cli/go.sum ./cli/go.sum -COPY backend/common/go.mod ./common/go.mod -COPY backend/common/go.sum ./common/go.sum -COPY backend/agent/go.mod ./agent/go.mod -COPY backend/agent/go.sum ./agent/go.sum -COPY backend/server/go.mod ./server/go.mod -COPY backend/server/go.sum ./server/go.sum -RUN go mod download +COPY modules/common/go.mod ./common/go.mod +COPY modules/common/go.sum ./common/go.sum +COPY modules/agent/go.mod ./agent/go.mod +COPY modules/agent/go.sum ./agent/go.sum +RUN cd agent && go mod download all # copy code -COPY backend/common ./common -COPY backend/agent ./agent +COPY modules/common ./common +COPY modules/agent ./agent # build agent -RUN CGO_ENABLED=0 go build -o bin/agent ./agent/cmd/main.go +RUN cd agent && CGO_ENABLED=0 go build -o ../bin/agent ./cmd/main.go ENTRYPOINT ["./bin/agent"] CMD [] @@ -46,7 +40,7 @@ FROM scratch AS final WORKDIR /agent # copy agent -COPY --from=builder /backend/bin/agent /agent/agent +COPY --from=builder /work/bin/agent /agent/agent ENTRYPOINT ["./agent"] CMD [] diff --git a/build/package/Dockerfile.server b/build/package/Dockerfile.server index 31bb1965..6d5d9d98 100644 --- a/build/package/Dockerfile.server +++ b/build/package/Dockerfile.server @@ -15,7 +15,7 @@ # ----------------------------------------------------------- FROM node:20.13.1-alpine3.19 AS frontend-builder -WORKDIR /frontend +WORKDIR /dashboard-ui # enable pnpm RUN corepack enable @@ -26,12 +26,12 @@ RUN apk add git openssh-client RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts # fetch dependencies -COPY frontend/package.json ./ -COPY frontend/pnpm-lock.yaml ./ +COPY dashboard-ui/package.json ./ +COPY dashboard-ui/pnpm-lock.yaml ./ RUN pnpm install # copy code -COPY frontend/ . +COPY dashboard-ui/ . # build RUN pnpm build @@ -43,30 +43,24 @@ CMD [] FROM golang:1.22.7 AS server-builder -WORKDIR /backend +WORKDIR /work # install dependencies (for cache) -COPY backend/go.work . -COPY backend/go.work.sum . -COPY backend/cli/go.mod ./cli/go.mod -COPY backend/cli/go.sum ./cli/go.sum -COPY backend/common/go.mod ./common/go.mod -COPY backend/common/go.sum ./common/go.sum -COPY backend/agent/go.mod ./agent/go.mod -COPY backend/agent/go.sum ./agent/go.sum -COPY backend/server/go.mod ./server/go.mod -COPY backend/server/go.sum ./server/go.sum -RUN go mod download +COPY modules/common/go.mod ./common/go.mod +COPY modules/common/go.sum ./common/go.sum +COPY modules/server/go.mod ./server/go.mod +COPY modules/server/go.sum ./server/go.sum +RUN cd server && go mod download all # copy code -COPY backend/common ./common -COPY backend/server ./server +COPY modules/common ./common +COPY modules/server ./server # copy frontend -COPY --from=frontend-builder /frontend/dist /server/website +COPY --from=frontend-builder /dashboard-ui/dist ./server/website # build server -RUN CGO_ENABLED=0 go build -o bin/server ./server/cmd/main.go +RUN cd server && CGO_ENABLED=0 go build -o ../bin/server ./cmd/main.go ENTRYPOINT ["./server"] CMD [] @@ -81,7 +75,7 @@ WORKDIR /server COPY --from=server-builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ # copy server -COPY --from=server-builder /backend/bin/server /server/server +COPY --from=server-builder /work/bin/server /server/server ENTRYPOINT ["./server"] CMD [] @@ -96,7 +90,7 @@ WORKDIR /server COPY --from=server-builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ # copy server -COPY --from=server-builder /backend/bin/server /server/server +COPY --from=server-builder /work/bin/server /server/server ENTRYPOINT ["./server"] CMD [] diff --git a/frontend/.eslintrc.cjs b/dashboard-ui/.eslintrc.cjs similarity index 100% rename from frontend/.eslintrc.cjs rename to dashboard-ui/.eslintrc.cjs diff --git a/frontend/README.md b/dashboard-ui/README.md similarity index 100% rename from frontend/README.md rename to dashboard-ui/README.md diff --git a/frontend/codegen.ts b/dashboard-ui/codegen.ts similarity index 100% rename from frontend/codegen.ts rename to dashboard-ui/codegen.ts diff --git a/frontend/index.html b/dashboard-ui/index.html similarity index 100% rename from frontend/index.html rename to dashboard-ui/index.html diff --git a/frontend/package.json b/dashboard-ui/package.json similarity index 93% rename from frontend/package.json rename to dashboard-ui/package.json index 797df26d..8e5d4bf5 100644 --- a/frontend/package.json +++ b/dashboard-ui/package.json @@ -79,5 +79,5 @@ "vite-tsconfig-paths": "^4.3.2", "vitest": "^1.6.0" }, - "packageManager": "pnpm@9.10.0+sha256.355a8ab8dbb6ad41befbef39bc4fd6b5df85e12761d2724bd01f13e878de4b13" + "packageManager": "pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228" } diff --git a/frontend/pnpm-lock.yaml b/dashboard-ui/pnpm-lock.yaml similarity index 100% rename from frontend/pnpm-lock.yaml rename to dashboard-ui/pnpm-lock.yaml diff --git a/frontend/postcss.config.js b/dashboard-ui/postcss.config.js similarity index 100% rename from frontend/postcss.config.js rename to dashboard-ui/postcss.config.js diff --git a/frontend/public/favicon.ico b/dashboard-ui/public/favicon.ico similarity index 100% rename from frontend/public/favicon.ico rename to dashboard-ui/public/favicon.ico diff --git a/frontend/public/favicon.svg b/dashboard-ui/public/favicon.svg similarity index 100% rename from frontend/public/favicon.svg rename to dashboard-ui/public/favicon.svg diff --git a/frontend/public/graphiql.html b/dashboard-ui/public/graphiql.html similarity index 100% rename from frontend/public/graphiql.html rename to dashboard-ui/public/graphiql.html diff --git a/frontend/src/apollo-client.ts b/dashboard-ui/src/apollo-client.ts similarity index 100% rename from frontend/src/apollo-client.ts rename to dashboard-ui/src/apollo-client.ts diff --git a/frontend/src/app-config.ts b/dashboard-ui/src/app-config.ts similarity index 100% rename from frontend/src/app-config.ts rename to dashboard-ui/src/app-config.ts diff --git a/frontend/src/app-env.d.ts b/dashboard-ui/src/app-env.d.ts similarity index 100% rename from frontend/src/app-env.d.ts rename to dashboard-ui/src/app-env.d.ts diff --git a/frontend/src/assets/k8s-icons/cronjob.svg b/dashboard-ui/src/assets/k8s-icons/cronjob.svg similarity index 100% rename from frontend/src/assets/k8s-icons/cronjob.svg rename to dashboard-ui/src/assets/k8s-icons/cronjob.svg diff --git a/frontend/src/assets/k8s-icons/daemonset.svg b/dashboard-ui/src/assets/k8s-icons/daemonset.svg similarity index 100% rename from frontend/src/assets/k8s-icons/daemonset.svg rename to dashboard-ui/src/assets/k8s-icons/daemonset.svg diff --git a/frontend/src/assets/k8s-icons/deployment.svg b/dashboard-ui/src/assets/k8s-icons/deployment.svg similarity index 100% rename from frontend/src/assets/k8s-icons/deployment.svg rename to dashboard-ui/src/assets/k8s-icons/deployment.svg diff --git a/frontend/src/assets/k8s-icons/job.svg b/dashboard-ui/src/assets/k8s-icons/job.svg similarity index 100% rename from frontend/src/assets/k8s-icons/job.svg rename to dashboard-ui/src/assets/k8s-icons/job.svg diff --git a/frontend/src/assets/k8s-icons/pod.svg b/dashboard-ui/src/assets/k8s-icons/pod.svg similarity index 100% rename from frontend/src/assets/k8s-icons/pod.svg rename to dashboard-ui/src/assets/k8s-icons/pod.svg diff --git a/frontend/src/assets/k8s-icons/replicaset.svg b/dashboard-ui/src/assets/k8s-icons/replicaset.svg similarity index 100% rename from frontend/src/assets/k8s-icons/replicaset.svg rename to dashboard-ui/src/assets/k8s-icons/replicaset.svg diff --git a/frontend/src/assets/k8s-icons/statefulset.svg b/dashboard-ui/src/assets/k8s-icons/statefulset.svg similarity index 100% rename from frontend/src/assets/k8s-icons/statefulset.svg rename to dashboard-ui/src/assets/k8s-icons/statefulset.svg diff --git a/frontend/src/assets/logo.svg b/dashboard-ui/src/assets/logo.svg similarity index 100% rename from frontend/src/assets/logo.svg rename to dashboard-ui/src/assets/logo.svg diff --git a/frontend/src/components/elements/Modal.tsx b/dashboard-ui/src/components/elements/Modal.tsx similarity index 100% rename from frontend/src/components/elements/Modal.tsx rename to dashboard-ui/src/components/elements/Modal.tsx diff --git a/frontend/src/components/layouts/AppLayout.tsx b/dashboard-ui/src/components/layouts/AppLayout.tsx similarity index 100% rename from frontend/src/components/layouts/AppLayout.tsx rename to dashboard-ui/src/components/layouts/AppLayout.tsx diff --git a/frontend/src/components/layouts/ModalLayout.tsx b/dashboard-ui/src/components/layouts/ModalLayout.tsx similarity index 100% rename from frontend/src/components/layouts/ModalLayout.tsx rename to dashboard-ui/src/components/layouts/ModalLayout.tsx diff --git a/frontend/src/components/utils/AuthRequired.test.tsx b/dashboard-ui/src/components/utils/AuthRequired.test.tsx similarity index 100% rename from frontend/src/components/utils/AuthRequired.test.tsx rename to dashboard-ui/src/components/utils/AuthRequired.test.tsx diff --git a/frontend/src/components/utils/AuthRequired.tsx b/dashboard-ui/src/components/utils/AuthRequired.tsx similarity index 100% rename from frontend/src/components/utils/AuthRequired.tsx rename to dashboard-ui/src/components/utils/AuthRequired.tsx diff --git a/frontend/src/components/utils/LoadingPage.test.tsx b/dashboard-ui/src/components/utils/LoadingPage.test.tsx similarity index 100% rename from frontend/src/components/utils/LoadingPage.test.tsx rename to dashboard-ui/src/components/utils/LoadingPage.test.tsx diff --git a/frontend/src/components/utils/LoadingPage.tsx b/dashboard-ui/src/components/utils/LoadingPage.tsx similarity index 100% rename from frontend/src/components/utils/LoadingPage.tsx rename to dashboard-ui/src/components/utils/LoadingPage.tsx diff --git a/frontend/src/components/utils/__snapshots__/LoadingPage.test.tsx.snap b/dashboard-ui/src/components/utils/__snapshots__/LoadingPage.test.tsx.snap similarity index 100% rename from frontend/src/components/utils/__snapshots__/LoadingPage.test.tsx.snap rename to dashboard-ui/src/components/utils/__snapshots__/LoadingPage.test.tsx.snap diff --git a/frontend/src/components/widgets/DateRangeDropdown.tsx b/dashboard-ui/src/components/widgets/DateRangeDropdown.tsx similarity index 100% rename from frontend/src/components/widgets/DateRangeDropdown.tsx rename to dashboard-ui/src/components/widgets/DateRangeDropdown.tsx diff --git a/frontend/src/components/widgets/Footer.tsx b/dashboard-ui/src/components/widgets/Footer.tsx similarity index 100% rename from frontend/src/components/widgets/Footer.tsx rename to dashboard-ui/src/components/widgets/Footer.tsx diff --git a/frontend/src/components/widgets/ProfilePicDropdown.test.tsx b/dashboard-ui/src/components/widgets/ProfilePicDropdown.test.tsx similarity index 100% rename from frontend/src/components/widgets/ProfilePicDropdown.test.tsx rename to dashboard-ui/src/components/widgets/ProfilePicDropdown.test.tsx diff --git a/frontend/src/components/widgets/ProfilePicDropdown.tsx b/dashboard-ui/src/components/widgets/ProfilePicDropdown.tsx similarity index 100% rename from frontend/src/components/widgets/ProfilePicDropdown.tsx rename to dashboard-ui/src/components/widgets/ProfilePicDropdown.tsx diff --git a/frontend/src/components/widgets/ServerStatus.tsx b/dashboard-ui/src/components/widgets/ServerStatus.tsx similarity index 100% rename from frontend/src/components/widgets/ServerStatus.tsx rename to dashboard-ui/src/components/widgets/ServerStatus.tsx diff --git a/frontend/src/components/widgets/SourcePickerModal.tsx b/dashboard-ui/src/components/widgets/SourcePickerModal.tsx similarity index 100% rename from frontend/src/components/widgets/SourcePickerModal.tsx rename to dashboard-ui/src/components/widgets/SourcePickerModal.tsx diff --git a/frontend/src/error-page.tsx b/dashboard-ui/src/error-page.tsx similarity index 100% rename from frontend/src/error-page.tsx rename to dashboard-ui/src/error-page.tsx diff --git a/frontend/src/index.css b/dashboard-ui/src/index.css similarity index 100% rename from frontend/src/index.css rename to dashboard-ui/src/index.css diff --git a/frontend/src/lib/auth.tsx b/dashboard-ui/src/lib/auth.tsx similarity index 100% rename from frontend/src/lib/auth.tsx rename to dashboard-ui/src/lib/auth.tsx diff --git a/frontend/src/lib/console/helpers.tsx b/dashboard-ui/src/lib/console/helpers.tsx similarity index 100% rename from frontend/src/lib/console/helpers.tsx rename to dashboard-ui/src/lib/console/helpers.tsx diff --git a/frontend/src/lib/console/logfeed.tsx b/dashboard-ui/src/lib/console/logfeed.tsx similarity index 100% rename from frontend/src/lib/console/logfeed.tsx rename to dashboard-ui/src/lib/console/logfeed.tsx diff --git a/frontend/src/lib/console/logging-resources.tsx b/dashboard-ui/src/lib/console/logging-resources.tsx similarity index 100% rename from frontend/src/lib/console/logging-resources.tsx rename to dashboard-ui/src/lib/console/logging-resources.tsx diff --git a/frontend/src/lib/graphql/__generated__/gql.ts b/dashboard-ui/src/lib/graphql/__generated__/gql.ts similarity index 100% rename from frontend/src/lib/graphql/__generated__/gql.ts rename to dashboard-ui/src/lib/graphql/__generated__/gql.ts diff --git a/frontend/src/lib/graphql/__generated__/graphql.ts b/dashboard-ui/src/lib/graphql/__generated__/graphql.ts similarity index 100% rename from frontend/src/lib/graphql/__generated__/graphql.ts rename to dashboard-ui/src/lib/graphql/__generated__/graphql.ts diff --git a/frontend/src/lib/graphql/__generated__/index.ts b/dashboard-ui/src/lib/graphql/__generated__/index.ts similarity index 100% rename from frontend/src/lib/graphql/__generated__/index.ts rename to dashboard-ui/src/lib/graphql/__generated__/index.ts diff --git a/frontend/src/lib/graphql/__generated__/introspection-result.json b/dashboard-ui/src/lib/graphql/__generated__/introspection-result.json similarity index 100% rename from frontend/src/lib/graphql/__generated__/introspection-result.json rename to dashboard-ui/src/lib/graphql/__generated__/introspection-result.json diff --git a/frontend/src/lib/graphql/fragments.ts b/dashboard-ui/src/lib/graphql/fragments.ts similarity index 100% rename from frontend/src/lib/graphql/fragments.ts rename to dashboard-ui/src/lib/graphql/fragments.ts diff --git a/frontend/src/lib/graphql/ops.ts b/dashboard-ui/src/lib/graphql/ops.ts similarity index 100% rename from frontend/src/lib/graphql/ops.ts rename to dashboard-ui/src/lib/graphql/ops.ts diff --git a/frontend/src/lib/helpers.tsx b/dashboard-ui/src/lib/helpers.tsx similarity index 100% rename from frontend/src/lib/helpers.tsx rename to dashboard-ui/src/lib/helpers.tsx diff --git a/frontend/src/lib/hooks.ts b/dashboard-ui/src/lib/hooks.ts similarity index 100% rename from frontend/src/lib/hooks.ts rename to dashboard-ui/src/lib/hooks.ts diff --git a/frontend/src/lib/server-status.ts b/dashboard-ui/src/lib/server-status.ts similarity index 100% rename from frontend/src/lib/server-status.ts rename to dashboard-ui/src/lib/server-status.ts diff --git a/frontend/src/lib/theme.tsx b/dashboard-ui/src/lib/theme.tsx similarity index 100% rename from frontend/src/lib/theme.tsx rename to dashboard-ui/src/lib/theme.tsx diff --git a/frontend/src/lib/utils.ts b/dashboard-ui/src/lib/utils.ts similarity index 100% rename from frontend/src/lib/utils.ts rename to dashboard-ui/src/lib/utils.ts diff --git a/frontend/src/lib/workload.ts b/dashboard-ui/src/lib/workload.ts similarity index 100% rename from frontend/src/lib/workload.ts rename to dashboard-ui/src/lib/workload.ts diff --git a/frontend/src/main.tsx b/dashboard-ui/src/main.tsx similarity index 100% rename from frontend/src/main.tsx rename to dashboard-ui/src/main.tsx diff --git a/frontend/src/mocks/console.ts b/dashboard-ui/src/mocks/console.ts similarity index 100% rename from frontend/src/mocks/console.ts rename to dashboard-ui/src/mocks/console.ts diff --git a/frontend/src/mocks/home.ts b/dashboard-ui/src/mocks/home.ts similarity index 100% rename from frontend/src/mocks/home.ts rename to dashboard-ui/src/mocks/home.ts diff --git a/frontend/src/pages/_root.tsx b/dashboard-ui/src/pages/_root.tsx similarity index 100% rename from frontend/src/pages/_root.tsx rename to dashboard-ui/src/pages/_root.tsx diff --git a/frontend/src/pages/auth/login.test.tsx b/dashboard-ui/src/pages/auth/login.test.tsx similarity index 100% rename from frontend/src/pages/auth/login.test.tsx rename to dashboard-ui/src/pages/auth/login.test.tsx diff --git a/frontend/src/pages/auth/login.tsx b/dashboard-ui/src/pages/auth/login.tsx similarity index 100% rename from frontend/src/pages/auth/login.tsx rename to dashboard-ui/src/pages/auth/login.tsx diff --git a/frontend/src/pages/auth/logout.test.tsx b/dashboard-ui/src/pages/auth/logout.test.tsx similarity index 100% rename from frontend/src/pages/auth/logout.test.tsx rename to dashboard-ui/src/pages/auth/logout.test.tsx diff --git a/frontend/src/pages/auth/logout.tsx b/dashboard-ui/src/pages/auth/logout.tsx similarity index 100% rename from frontend/src/pages/auth/logout.tsx rename to dashboard-ui/src/pages/auth/logout.tsx diff --git a/frontend/src/pages/console.test.tsx b/dashboard-ui/src/pages/console.test.tsx similarity index 100% rename from frontend/src/pages/console.test.tsx rename to dashboard-ui/src/pages/console.test.tsx diff --git a/frontend/src/pages/console.tsx b/dashboard-ui/src/pages/console.tsx similarity index 100% rename from frontend/src/pages/console.tsx rename to dashboard-ui/src/pages/console.tsx diff --git a/frontend/src/pages/home.test.tsx b/dashboard-ui/src/pages/home.test.tsx similarity index 100% rename from frontend/src/pages/home.test.tsx rename to dashboard-ui/src/pages/home.test.tsx diff --git a/frontend/src/pages/home.tsx b/dashboard-ui/src/pages/home.tsx similarity index 100% rename from frontend/src/pages/home.tsx rename to dashboard-ui/src/pages/home.tsx diff --git a/frontend/src/routes.test.tsx b/dashboard-ui/src/routes.test.tsx similarity index 100% rename from frontend/src/routes.test.tsx rename to dashboard-ui/src/routes.test.tsx diff --git a/frontend/src/routes.tsx b/dashboard-ui/src/routes.tsx similarity index 100% rename from frontend/src/routes.tsx rename to dashboard-ui/src/routes.tsx diff --git a/frontend/src/test-utils.tsx b/dashboard-ui/src/test-utils.tsx similarity index 100% rename from frontend/src/test-utils.tsx rename to dashboard-ui/src/test-utils.tsx diff --git a/frontend/src/vite-env.d.ts b/dashboard-ui/src/vite-env.d.ts similarity index 100% rename from frontend/src/vite-env.d.ts rename to dashboard-ui/src/vite-env.d.ts diff --git a/frontend/tailwind.config.js b/dashboard-ui/tailwind.config.js similarity index 100% rename from frontend/tailwind.config.js rename to dashboard-ui/tailwind.config.js diff --git a/frontend/tsconfig.json b/dashboard-ui/tsconfig.json similarity index 100% rename from frontend/tsconfig.json rename to dashboard-ui/tsconfig.json diff --git a/frontend/tsconfig.node.json b/dashboard-ui/tsconfig.node.json similarity index 100% rename from frontend/tsconfig.node.json rename to dashboard-ui/tsconfig.node.json diff --git a/frontend/vite.config.ts b/dashboard-ui/vite.config.ts similarity index 100% rename from frontend/vite.config.ts rename to dashboard-ui/vite.config.ts diff --git a/frontend/vitest.setup.ts b/dashboard-ui/vitest.setup.ts similarity index 100% rename from frontend/vitest.setup.ts rename to dashboard-ui/vitest.setup.ts diff --git a/backend/README.md b/modules/README.md similarity index 100% rename from backend/README.md rename to modules/README.md diff --git a/backend/agent/README.md b/modules/agent/README.md similarity index 100% rename from backend/agent/README.md rename to modules/agent/README.md diff --git a/backend/agent/cmd/main.go b/modules/agent/cmd/main.go similarity index 93% rename from backend/agent/cmd/main.go rename to modules/agent/cmd/main.go index c44f42cf..77371f45 100644 --- a/backend/agent/cmd/main.go +++ b/modules/agent/cmd/main.go @@ -30,11 +30,11 @@ import ( "google.golang.org/grpc/health" "google.golang.org/grpc/health/grpc_health_v1" - "github.com/kubetail-org/kubetail/backend/agent/internal/server" - "github.com/kubetail-org/kubetail/backend/agent/internal/services/logmetadata" - "github.com/kubetail-org/kubetail/backend/common/agentpb" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/common/k8shelpers" + "github.com/kubetail-org/kubetail/modules/agent/internal/server" + "github.com/kubetail-org/kubetail/modules/agent/internal/services/logmetadata" + "github.com/kubetail-org/kubetail/modules/common/agentpb" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/common/k8shelpers" ) type CLI struct { diff --git a/backend/agent/go.mod b/modules/agent/go.mod similarity index 95% rename from backend/agent/go.mod rename to modules/agent/go.mod index 15c44e28..c28e9bc8 100644 --- a/backend/agent/go.mod +++ b/modules/agent/go.mod @@ -1,16 +1,16 @@ -module github.com/kubetail-org/kubetail/backend/agent +module github.com/kubetail-org/kubetail/modules/agent go 1.22.0 toolchain go1.22.7 -replace github.com/kubetail-org/kubetail/backend/common => ../common +replace github.com/kubetail-org/kubetail/modules/common => ../common require ( github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef github.com/fsnotify/fsnotify v1.7.0 github.com/go-playground/validator/v10 v10.22.1 - github.com/kubetail-org/kubetail/backend/common v0.0.0-00010101000000-000000000000 + github.com/kubetail-org/kubetail/modules/common v0.0.0-00010101000000-000000000000 github.com/rs/zerolog v1.33.0 github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.19.0 diff --git a/backend/agent/go.sum b/modules/agent/go.sum similarity index 100% rename from backend/agent/go.sum rename to modules/agent/go.sum diff --git a/backend/agent/internal/debounce/debounce.go b/modules/agent/internal/debounce/debounce.go similarity index 100% rename from backend/agent/internal/debounce/debounce.go rename to modules/agent/internal/debounce/debounce.go diff --git a/backend/agent/internal/debounce/debounce_test.go b/modules/agent/internal/debounce/debounce_test.go similarity index 100% rename from backend/agent/internal/debounce/debounce_test.go rename to modules/agent/internal/debounce/debounce_test.go diff --git a/backend/agent/internal/helpers/helpers.go b/modules/agent/internal/helpers/helpers.go similarity index 100% rename from backend/agent/internal/helpers/helpers.go rename to modules/agent/internal/helpers/helpers.go diff --git a/backend/agent/internal/server/server.go b/modules/agent/internal/server/server.go similarity index 90% rename from backend/agent/internal/server/server.go rename to modules/agent/internal/server/server.go index deb62bb5..d5d0f060 100644 --- a/backend/agent/internal/server/server.go +++ b/modules/agent/internal/server/server.go @@ -18,8 +18,8 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/common/grpchelpers" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/common/grpchelpers" ) func NewServer(cfg *config.Config) (*grpc.Server, error) { diff --git a/backend/agent/internal/server/server_test.go b/modules/agent/internal/server/server_test.go similarity index 94% rename from backend/agent/internal/server/server_test.go rename to modules/agent/internal/server/server_test.go index 63793304..21fc9542 100644 --- a/backend/agent/internal/server/server_test.go +++ b/modules/agent/internal/server/server_test.go @@ -23,9 +23,9 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/common/grpchelpers" - "github.com/kubetail-org/kubetail/backend/common/testpb" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/common/grpchelpers" + "github.com/kubetail-org/kubetail/modules/common/testpb" ) func TestAuthModeNotToken(t *testing.T) { diff --git a/backend/agent/internal/server/testutils_test.go b/modules/agent/internal/server/testutils_test.go similarity index 95% rename from backend/agent/internal/server/testutils_test.go rename to modules/agent/internal/server/testutils_test.go index 94f16532..7575797d 100644 --- a/backend/agent/internal/server/testutils_test.go +++ b/modules/agent/internal/server/testutils_test.go @@ -22,8 +22,8 @@ import ( "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/test/bufconn" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/common/testpb" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/common/testpb" ) type TestService struct { diff --git a/backend/agent/internal/services/logmetadata/helpers.go b/modules/agent/internal/services/logmetadata/helpers.go similarity index 99% rename from backend/agent/internal/services/logmetadata/helpers.go rename to modules/agent/internal/services/logmetadata/helpers.go index 6a5072f0..aeb9c169 100644 --- a/backend/agent/internal/services/logmetadata/helpers.go +++ b/modules/agent/internal/services/logmetadata/helpers.go @@ -26,7 +26,7 @@ import ( "sync" "github.com/fsnotify/fsnotify" - "github.com/kubetail-org/kubetail/backend/common/agentpb" + "github.com/kubetail-org/kubetail/modules/common/agentpb" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/backend/agent/internal/services/logmetadata/helpers_test.go b/modules/agent/internal/services/logmetadata/helpers_test.go similarity index 100% rename from backend/agent/internal/services/logmetadata/helpers_test.go rename to modules/agent/internal/services/logmetadata/helpers_test.go diff --git a/backend/agent/internal/services/logmetadata/logmetadata.go b/modules/agent/internal/services/logmetadata/logmetadata.go similarity index 95% rename from backend/agent/internal/services/logmetadata/logmetadata.go rename to modules/agent/internal/services/logmetadata/logmetadata.go index 503e986d..f63148dd 100644 --- a/backend/agent/internal/services/logmetadata/logmetadata.go +++ b/modules/agent/internal/services/logmetadata/logmetadata.go @@ -29,10 +29,10 @@ import ( "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/rest" - "github.com/kubetail-org/kubetail/backend/agent/internal/debounce" - "github.com/kubetail-org/kubetail/backend/agent/internal/helpers" - "github.com/kubetail-org/kubetail/backend/common/agentpb" - "github.com/kubetail-org/kubetail/backend/common/grpchelpers" + "github.com/kubetail-org/kubetail/modules/agent/internal/debounce" + "github.com/kubetail-org/kubetail/modules/agent/internal/helpers" + "github.com/kubetail-org/kubetail/modules/common/agentpb" + "github.com/kubetail-org/kubetail/modules/common/grpchelpers" ) // event bus for test events diff --git a/backend/agent/internal/services/logmetadata/logmetadata_test.go b/modules/agent/internal/services/logmetadata/logmetadata_test.go similarity index 98% rename from backend/agent/internal/services/logmetadata/logmetadata_test.go rename to modules/agent/internal/services/logmetadata/logmetadata_test.go index 9133572b..f97c49e7 100644 --- a/backend/agent/internal/services/logmetadata/logmetadata_test.go +++ b/modules/agent/internal/services/logmetadata/logmetadata_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/suite" - "github.com/kubetail-org/kubetail/backend/common/agentpb" - "github.com/kubetail-org/kubetail/backend/common/config" + "github.com/kubetail-org/kubetail/modules/common/agentpb" + "github.com/kubetail-org/kubetail/modules/common/config" ) type LogMetadataTestSuite struct { diff --git a/backend/agent/internal/services/logmetadata/testutils_test.go b/modules/agent/internal/services/logmetadata/testutils_test.go similarity index 94% rename from backend/agent/internal/services/logmetadata/testutils_test.go rename to modules/agent/internal/services/logmetadata/testutils_test.go index d14598b8..f94d3183 100644 --- a/backend/agent/internal/services/logmetadata/testutils_test.go +++ b/modules/agent/internal/services/logmetadata/testutils_test.go @@ -27,10 +27,10 @@ import ( "k8s.io/client-go/kubernetes/fake" k8stesting "k8s.io/client-go/testing" - "github.com/kubetail-org/kubetail/backend/agent/internal/server" - "github.com/kubetail-org/kubetail/backend/common/agentpb" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/common/grpchelpers" + "github.com/kubetail-org/kubetail/modules/agent/internal/server" + "github.com/kubetail-org/kubetail/modules/common/agentpb" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/common/grpchelpers" ) // Test client diff --git a/backend/cli/cmd/root.go b/modules/cli/cmd/root.go similarity index 100% rename from backend/cli/cmd/root.go rename to modules/cli/cmd/root.go diff --git a/backend/cli/cmd/serve.go b/modules/cli/cmd/serve.go similarity index 97% rename from backend/cli/cmd/serve.go rename to modules/cli/cmd/serve.go index fe63bc6d..5b4431e8 100644 --- a/backend/cli/cmd/serve.go +++ b/modules/cli/cmd/serve.go @@ -31,10 +31,10 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/server/pkg/ginapp" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/server/pkg/ginapp" - "github.com/kubetail-org/kubetail/backend/cli/internal/tunnel" + "github.com/kubetail-org/kubetail/modules/cli/internal/tunnel" ) // serveCmd represents the serve command diff --git a/backend/cli/go.mod b/modules/cli/go.mod similarity index 95% rename from backend/cli/go.mod rename to modules/cli/go.mod index cccf2b3a..a0836c78 100644 --- a/backend/cli/go.mod +++ b/modules/cli/go.mod @@ -1,15 +1,15 @@ -module github.com/kubetail-org/kubetail/backend/cli +module github.com/kubetail-org/kubetail/modules/cli go 1.22.7 -replace github.com/kubetail-org/kubetail/backend/server => ../server +replace github.com/kubetail-org/kubetail/modules/server => ../server -replace github.com/kubetail-org/kubetail/backend/common => ../common +replace github.com/kubetail-org/kubetail/modules/common => ../common require ( github.com/gin-gonic/gin v1.10.0 - github.com/kubetail-org/kubetail/backend/common v0.0.0-00010101000000-000000000000 - github.com/kubetail-org/kubetail/backend/server v0.0.0-00010101000000-000000000000 + github.com/kubetail-org/kubetail/modules/common v0.0.0-00010101000000-000000000000 + github.com/kubetail-org/kubetail/modules/server v0.0.0-00010101000000-000000000000 github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c github.com/rs/zerolog v1.33.0 github.com/spf13/cobra v1.8.1 diff --git a/backend/cli/go.sum b/modules/cli/go.sum similarity index 100% rename from backend/cli/go.sum rename to modules/cli/go.sum diff --git a/backend/cli/internal/tunnel/tunnel.go b/modules/cli/internal/tunnel/tunnel.go similarity index 96% rename from backend/cli/internal/tunnel/tunnel.go rename to modules/cli/internal/tunnel/tunnel.go index 9c359a5d..079d8836 100644 --- a/backend/cli/internal/tunnel/tunnel.go +++ b/modules/cli/internal/tunnel/tunnel.go @@ -27,8 +27,8 @@ import ( "k8s.io/client-go/tools/portforward" "k8s.io/client-go/transport/spdy" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/common/k8shelpers" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/common/k8shelpers" ) // Represents local tunnel to remote service diff --git a/backend/cli/main.go b/modules/cli/main.go similarity index 91% rename from backend/cli/main.go rename to modules/cli/main.go index aaf30114..37fd55d4 100644 --- a/backend/cli/main.go +++ b/modules/cli/main.go @@ -14,7 +14,7 @@ package main -import "github.com/kubetail-org/kubetail/backend/cli/cmd" +import "github.com/kubetail-org/kubetail/modules/cli/cmd" func main() { cmd.Execute() diff --git a/backend/common/README.md b/modules/common/README.md similarity index 65% rename from backend/common/README.md rename to modules/common/README.md index adc707de..6326735d 100644 --- a/backend/common/README.md +++ b/modules/common/README.md @@ -5,8 +5,7 @@ Go module containing shared backend libraries ## Dependencies ```console -go install google.golang.org/protobuf/cmd/protoc-gen-go -go install google.golang.org/grpc/cmd/protoc-gen-go-grpc +brew install protobuf protoc-gen-go protoc-gen-go-grpc ``` ## gRPC diff --git a/backend/common/agentpb/agent.pb.go b/modules/common/agentpb/agent.pb.go similarity index 84% rename from backend/common/agentpb/agent.pb.go rename to modules/common/agentpb/agent.pb.go index a57551a9..d7664717 100644 --- a/backend/common/agentpb/agent.pb.go +++ b/modules/common/agentpb/agent.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: agent.proto package agentpb @@ -47,11 +47,9 @@ type LogMetadata struct { func (x *LogMetadata) Reset() { *x = LogMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_agent_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_agent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogMetadata) String() string { @@ -62,7 +60,7 @@ func (*LogMetadata) ProtoMessage() {} func (x *LogMetadata) ProtoReflect() protoreflect.Message { mi := &file_agent_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type LogMetadataFileInfo struct { func (x *LogMetadataFileInfo) Reset() { *x = LogMetadataFileInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_agent_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_agent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogMetadataFileInfo) String() string { @@ -124,7 +120,7 @@ func (*LogMetadataFileInfo) ProtoMessage() {} func (x *LogMetadataFileInfo) ProtoReflect() protoreflect.Message { mi := &file_agent_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,11 +163,9 @@ type LogMetadataSpec struct { func (x *LogMetadataSpec) Reset() { *x = LogMetadataSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_agent_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_agent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogMetadataSpec) String() string { @@ -182,7 +176,7 @@ func (*LogMetadataSpec) ProtoMessage() {} func (x *LogMetadataSpec) ProtoReflect() protoreflect.Message { mi := &file_agent_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +236,9 @@ type LogMetadataList struct { func (x *LogMetadataList) Reset() { *x = LogMetadataList{} - if protoimpl.UnsafeEnabled { - mi := &file_agent_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_agent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogMetadataList) String() string { @@ -257,7 +249,7 @@ func (*LogMetadataList) ProtoMessage() {} func (x *LogMetadataList) ProtoReflect() protoreflect.Message { mi := &file_agent_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,11 +281,9 @@ type LogMetadataListRequest struct { func (x *LogMetadataListRequest) Reset() { *x = LogMetadataListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_agent_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_agent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogMetadataListRequest) String() string { @@ -304,7 +294,7 @@ func (*LogMetadataListRequest) ProtoMessage() {} func (x *LogMetadataListRequest) ProtoReflect() protoreflect.Message { mi := &file_agent_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +326,9 @@ type LogMetadataWatchRequest struct { func (x *LogMetadataWatchRequest) Reset() { *x = LogMetadataWatchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_agent_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_agent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogMetadataWatchRequest) String() string { @@ -351,7 +339,7 @@ func (*LogMetadataWatchRequest) ProtoMessage() {} func (x *LogMetadataWatchRequest) ProtoReflect() protoreflect.Message { mi := &file_agent_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +372,9 @@ type LogMetadataWatchEvent struct { func (x *LogMetadataWatchEvent) Reset() { *x = LogMetadataWatchEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_agent_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_agent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogMetadataWatchEvent) String() string { @@ -399,7 +385,7 @@ func (*LogMetadataWatchEvent) ProtoMessage() {} func (x *LogMetadataWatchEvent) ProtoReflect() protoreflect.Message { mi := &file_agent_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,7 +492,7 @@ func file_agent_proto_rawDescGZIP() []byte { } var file_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_agent_proto_goTypes = []interface{}{ +var file_agent_proto_goTypes = []any{ (*LogMetadata)(nil), // 0: agentpb.LogMetadata (*LogMetadataFileInfo)(nil), // 1: agentpb.LogMetadataFileInfo (*LogMetadataSpec)(nil), // 2: agentpb.LogMetadataSpec @@ -538,92 +524,6 @@ func file_agent_proto_init() { if File_agent_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_agent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogMetadataFileInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agent_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogMetadataSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agent_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogMetadataList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agent_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogMetadataListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agent_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogMetadataWatchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agent_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogMetadataWatchEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/backend/common/agentpb/agent_grpc.pb.go b/modules/common/agentpb/agent_grpc.pb.go similarity index 73% rename from backend/common/agentpb/agent_grpc.pb.go rename to modules/common/agentpb/agent_grpc.pb.go index 3ddfdfd9..53dc5b98 100644 --- a/backend/common/agentpb/agent_grpc.pb.go +++ b/modules/common/agentpb/agent_grpc.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v5.27.3 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.2 // source: agent.proto package agentpb @@ -29,8 +29,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( LogMetadataService_List_FullMethodName = "/agentpb.LogMetadataService/List" @@ -42,7 +42,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type LogMetadataServiceClient interface { List(ctx context.Context, in *LogMetadataListRequest, opts ...grpc.CallOption) (*LogMetadataList, error) - Watch(ctx context.Context, in *LogMetadataWatchRequest, opts ...grpc.CallOption) (LogMetadataService_WatchClient, error) + Watch(ctx context.Context, in *LogMetadataWatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogMetadataWatchEvent], error) } type logMetadataServiceClient struct { @@ -63,13 +63,13 @@ func (c *logMetadataServiceClient) List(ctx context.Context, in *LogMetadataList return out, nil } -func (c *logMetadataServiceClient) Watch(ctx context.Context, in *LogMetadataWatchRequest, opts ...grpc.CallOption) (LogMetadataService_WatchClient, error) { +func (c *logMetadataServiceClient) Watch(ctx context.Context, in *LogMetadataWatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogMetadataWatchEvent], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &LogMetadataService_ServiceDesc.Streams[0], LogMetadataService_Watch_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &logMetadataServiceWatchClient{ClientStream: stream} + x := &grpc.GenericClientStream[LogMetadataWatchRequest, LogMetadataWatchEvent]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -79,43 +79,33 @@ func (c *logMetadataServiceClient) Watch(ctx context.Context, in *LogMetadataWat return x, nil } -type LogMetadataService_WatchClient interface { - Recv() (*LogMetadataWatchEvent, error) - grpc.ClientStream -} - -type logMetadataServiceWatchClient struct { - grpc.ClientStream -} - -func (x *logMetadataServiceWatchClient) Recv() (*LogMetadataWatchEvent, error) { - m := new(LogMetadataWatchEvent) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type LogMetadataService_WatchClient = grpc.ServerStreamingClient[LogMetadataWatchEvent] // LogMetadataServiceServer is the server API for LogMetadataService service. // All implementations must embed UnimplementedLogMetadataServiceServer -// for forward compatibility +// for forward compatibility. type LogMetadataServiceServer interface { List(context.Context, *LogMetadataListRequest) (*LogMetadataList, error) - Watch(*LogMetadataWatchRequest, LogMetadataService_WatchServer) error + Watch(*LogMetadataWatchRequest, grpc.ServerStreamingServer[LogMetadataWatchEvent]) error mustEmbedUnimplementedLogMetadataServiceServer() } -// UnimplementedLogMetadataServiceServer must be embedded to have forward compatible implementations. -type UnimplementedLogMetadataServiceServer struct { -} +// UnimplementedLogMetadataServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedLogMetadataServiceServer struct{} func (UnimplementedLogMetadataServiceServer) List(context.Context, *LogMetadataListRequest) (*LogMetadataList, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } -func (UnimplementedLogMetadataServiceServer) Watch(*LogMetadataWatchRequest, LogMetadataService_WatchServer) error { +func (UnimplementedLogMetadataServiceServer) Watch(*LogMetadataWatchRequest, grpc.ServerStreamingServer[LogMetadataWatchEvent]) error { return status.Errorf(codes.Unimplemented, "method Watch not implemented") } func (UnimplementedLogMetadataServiceServer) mustEmbedUnimplementedLogMetadataServiceServer() {} +func (UnimplementedLogMetadataServiceServer) testEmbeddedByValue() {} // UnsafeLogMetadataServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to LogMetadataServiceServer will @@ -125,6 +115,13 @@ type UnsafeLogMetadataServiceServer interface { } func RegisterLogMetadataServiceServer(s grpc.ServiceRegistrar, srv LogMetadataServiceServer) { + // If the following call pancis, it indicates UnimplementedLogMetadataServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&LogMetadataService_ServiceDesc, srv) } @@ -151,21 +148,11 @@ func _LogMetadataService_Watch_Handler(srv interface{}, stream grpc.ServerStream if err := stream.RecvMsg(m); err != nil { return err } - return srv.(LogMetadataServiceServer).Watch(m, &logMetadataServiceWatchServer{ServerStream: stream}) -} - -type LogMetadataService_WatchServer interface { - Send(*LogMetadataWatchEvent) error - grpc.ServerStream + return srv.(LogMetadataServiceServer).Watch(m, &grpc.GenericServerStream[LogMetadataWatchRequest, LogMetadataWatchEvent]{ServerStream: stream}) } -type logMetadataServiceWatchServer struct { - grpc.ServerStream -} - -func (x *logMetadataServiceWatchServer) Send(m *LogMetadataWatchEvent) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type LogMetadataService_WatchServer = grpc.ServerStreamingServer[LogMetadataWatchEvent] // LogMetadataService_ServiceDesc is the grpc.ServiceDesc for LogMetadataService service. // It's only intended for direct use with grpc.RegisterService, diff --git a/modules/common/agentpb/agentpb.go b/modules/common/agentpb/agentpb.go new file mode 100644 index 00000000..0b46e91a --- /dev/null +++ b/modules/common/agentpb/agentpb.go @@ -0,0 +1,3 @@ +package agentpb + +//go:generate protoc --proto_path=../../../proto --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ../../../proto/agent.proto diff --git a/backend/common/config/config.go b/modules/common/config/config.go similarity index 100% rename from backend/common/config/config.go rename to modules/common/config/config.go diff --git a/backend/common/config/config_test.go b/modules/common/config/config_test.go similarity index 100% rename from backend/common/config/config_test.go rename to modules/common/config/config_test.go diff --git a/backend/common/go.mod b/modules/common/go.mod similarity index 98% rename from backend/common/go.mod rename to modules/common/go.mod index 2c796300..d4950da3 100644 --- a/backend/common/go.mod +++ b/modules/common/go.mod @@ -1,4 +1,4 @@ -module github.com/kubetail-org/kubetail/backend/common +module github.com/kubetail-org/kubetail/modules/common go 1.22.0 diff --git a/backend/common/go.sum b/modules/common/go.sum similarity index 100% rename from backend/common/go.sum rename to modules/common/go.sum diff --git a/backend/common/grpchelpers/grpchelpers.go b/modules/common/grpchelpers/grpchelpers.go similarity index 97% rename from backend/common/grpchelpers/grpchelpers.go rename to modules/common/grpchelpers/grpchelpers.go index d834636e..ae86445b 100644 --- a/backend/common/grpchelpers/grpchelpers.go +++ b/modules/common/grpchelpers/grpchelpers.go @@ -22,7 +22,7 @@ import ( "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" - "github.com/kubetail-org/kubetail/backend/common/config" + "github.com/kubetail-org/kubetail/modules/common/config" ) type ctxKey int diff --git a/backend/common/k8shelpers/k8shelpers.go b/modules/common/k8shelpers/k8shelpers.go similarity index 98% rename from backend/common/k8shelpers/k8shelpers.go rename to modules/common/k8shelpers/k8shelpers.go index ec000eed..9ed4cff3 100644 --- a/backend/common/k8shelpers/k8shelpers.go +++ b/modules/common/k8shelpers/k8shelpers.go @@ -28,7 +28,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" - "github.com/kubetail-org/kubetail/backend/common/config" + "github.com/kubetail-org/kubetail/modules/common/config" ) type Options struct { diff --git a/backend/common/testpb/test.pb.go b/modules/common/testpb/test.pb.go similarity index 84% rename from backend/common/testpb/test.pb.go rename to modules/common/testpb/test.pb.go index 70ac8e0e..8957b8da 100644 --- a/backend/common/testpb/test.pb.go +++ b/modules/common/testpb/test.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: test.proto package testpb @@ -44,11 +44,9 @@ type EchoRequest struct { func (x *EchoRequest) Reset() { *x = EchoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_test_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_test_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EchoRequest) String() string { @@ -59,7 +57,7 @@ func (*EchoRequest) ProtoMessage() {} func (x *EchoRequest) ProtoReflect() protoreflect.Message { mi := &file_test_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91,11 +89,9 @@ type EchoResponse struct { func (x *EchoResponse) Reset() { *x = EchoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_test_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_test_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EchoResponse) String() string { @@ -106,7 +102,7 @@ func (*EchoResponse) ProtoMessage() {} func (x *EchoResponse) ProtoReflect() protoreflect.Message { mi := &file_test_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,7 +155,7 @@ func file_test_proto_rawDescGZIP() []byte { } var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_test_proto_goTypes = []interface{}{ +var file_test_proto_goTypes = []any{ (*EchoRequest)(nil), // 0: testpb.EchoRequest (*EchoResponse)(nil), // 1: testpb.EchoResponse } @@ -178,32 +174,6 @@ func file_test_proto_init() { if File_test_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EchoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EchoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/backend/common/testpb/test_grpc.pb.go b/modules/common/testpb/test_grpc.pb.go similarity index 81% rename from backend/common/testpb/test_grpc.pb.go rename to modules/common/testpb/test_grpc.pb.go index 94b7b253..f5c93d01 100644 --- a/backend/common/testpb/test_grpc.pb.go +++ b/modules/common/testpb/test_grpc.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v5.27.3 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.2 // source: test.proto package testpb @@ -29,8 +29,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( TestService_Echo_FullMethodName = "/testpb.TestService/Echo" @@ -63,20 +63,24 @@ func (c *testServiceClient) Echo(ctx context.Context, in *EchoRequest, opts ...g // TestServiceServer is the server API for TestService service. // All implementations must embed UnimplementedTestServiceServer -// for forward compatibility +// for forward compatibility. type TestServiceServer interface { Echo(context.Context, *EchoRequest) (*EchoResponse, error) mustEmbedUnimplementedTestServiceServer() } -// UnimplementedTestServiceServer must be embedded to have forward compatible implementations. -type UnimplementedTestServiceServer struct { -} +// UnimplementedTestServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedTestServiceServer struct{} func (UnimplementedTestServiceServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") } func (UnimplementedTestServiceServer) mustEmbedUnimplementedTestServiceServer() {} +func (UnimplementedTestServiceServer) testEmbeddedByValue() {} // UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TestServiceServer will @@ -86,6 +90,13 @@ type UnsafeTestServiceServer interface { } func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) { + // If the following call pancis, it indicates UnimplementedTestServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&TestService_ServiceDesc, srv) } diff --git a/modules/common/testpb/testpb.go b/modules/common/testpb/testpb.go new file mode 100644 index 00000000..d3b0ba0b --- /dev/null +++ b/modules/common/testpb/testpb.go @@ -0,0 +1,3 @@ +package testpb + +//go:generate protoc --proto_path=../../../proto --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ../../../proto/test.proto diff --git a/backend/go.work b/modules/go.work similarity index 100% rename from backend/go.work rename to modules/go.work diff --git a/backend/go.work.sum b/modules/go.work.sum similarity index 83% rename from backend/go.work.sum rename to modules/go.work.sum index f1a5b047..5e8b3182 100644 --- a/backend/go.work.sum +++ b/modules/go.work.sum @@ -1,7 +1,9 @@ +cel.dev/expr v0.16.0 h1:yloc84fytn4zmJX2GU3TkXGsaieaV7dQ057Qs4sIG2Y= cel.dev/expr v0.16.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/accessapproval v1.7.5/go.mod h1:g88i1ok5dvQ9XJsxpUInWWvUBrIZhyPDPbk4T01OoJ0= cloud.google.com/go/accesscontextmanager v1.8.5/go.mod h1:TInEhcZ7V9jptGNqN3EzZ5XMhT6ijWxTGjzyETwmL0Q= @@ -28,10 +30,12 @@ cloud.google.com/go/cloudbuild v1.15.1/go.mod h1:gIofXZSu+XD2Uy+qkOrGKEx45zd7s28 cloud.google.com/go/clouddms v1.7.4/go.mod h1:RdrVqoFG9RWI5AvZ81SxJ/xvxPdtcRhFotwdE79DieY= cloud.google.com/go/cloudtasks v1.12.6/go.mod h1:b7c7fe4+TJsFZfDyzO51F7cjq7HLUlRi/KZQLQjDsaY= cloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/contactcenterinsights v1.13.0/go.mod h1:ieq5d5EtHsu8vhe2y3amtZ+BE+AQwX5qAy7cpo0POsI= cloud.google.com/go/container v1.31.0/go.mod h1:7yABn5s3Iv3lmw7oMmyGbeV6tQj86njcTijkkGuvdZA= @@ -58,6 +62,7 @@ cloud.google.com/go/essentialcontacts v1.6.6/go.mod h1:XbqHJGaiH0v2UvtuucfOzFXN+ cloud.google.com/go/eventarc v1.13.4/go.mod h1:zV5sFVoAa9orc/52Q+OuYUG9xL2IIZTbbuTHC6JSY8s= cloud.google.com/go/filestore v1.8.1/go.mod h1:MbN9KcaM47DRTIuLfQhJEsjaocVebNtNQhSLhKCF5GM= cloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ= +cloud.google.com/go/firestore v1.15.0 h1:/k8ppuWOtNuDHt2tsRV42yI21uaGnKDEQnRFeBpbFF8= cloud.google.com/go/firestore v1.15.0/go.mod h1:GWOxFXcv8GZUtYpWHw/w6IuYNux/BtmeVTMmjrm4yhk= cloud.google.com/go/functions v1.16.0/go.mod h1:nbNpfAG7SG7Duw/o1iZ6ohvL7mc6MapWQVpqtM29n8k= cloud.google.com/go/gkebackup v1.3.5/go.mod h1:KJ77KkNN7Wm1LdMopOelV6OodM01pMuK2/5Zt1t4Tvc= @@ -66,6 +71,7 @@ cloud.google.com/go/gkehub v0.14.5/go.mod h1:6bzqxM+a+vEH/h8W8ec4OJl4r36laxTs3A/ cloud.google.com/go/gkemulticloud v1.1.1/go.mod h1:C+a4vcHlWeEIf45IB5FFR5XGjTeYhF83+AYIpTy4i2Q= cloud.google.com/go/grafeas v0.3.4/go.mod h1:A5m316hcG+AulafjAbPKXBO/+I5itU4LOdKO2R/uDIc= cloud.google.com/go/gsuiteaddons v1.6.5/go.mod h1:Lo4P2IvO8uZ9W+RaC6s1JVxo42vgy+TX5a6hfBZ0ubs= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/iap v1.9.4/go.mod h1:vO4mSq0xNf/Pu6E5paORLASBwEmphXEjgCFg7aeNu1w= @@ -75,6 +81,7 @@ cloud.google.com/go/kms v1.15.7/go.mod h1:ub54lbsa6tDkUwnu4W7Yt1aAIFLnspgh0kPGTo cloud.google.com/go/language v1.12.3/go.mod h1:evFX9wECX6mksEva8RbRnr/4wi/vKGYnAJrTRXU8+f8= cloud.google.com/go/lifesciences v0.9.5/go.mod h1:OdBm0n7C0Osh5yZB7j9BXyrMnTRGBJIZonUMxo5CzPw= cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= +cloud.google.com/go/longrunning v0.5.5 h1:GOE6pZFdSrTb4KAiKnXsJBtlE6mEyaW44oKyMILWnOg= cloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDnoTk0yawPBB7s= cloud.google.com/go/managedidentities v1.6.5/go.mod h1:fkFI2PwwyRQbjLxlm5bQ8SjtObFMW3ChBGNqaMcgZjI= cloud.google.com/go/maps v1.6.4/go.mod h1:rhjqRy8NWmDJ53saCfsXQ0LKwBHfi6OSh5wkq6BaMhI= @@ -112,6 +119,7 @@ cloud.google.com/go/servicedirectory v1.11.4/go.mod h1:Bz2T9t+/Ehg6x+Y7Ycq5xiShY cloud.google.com/go/shell v1.7.5/go.mod h1:hL2++7F47/IfpfTO53KYf1EC+F56k3ThfNEXd4zcuiE= cloud.google.com/go/spanner v1.56.0/go.mod h1:DndqtUKQAt3VLuV2Le+9Y3WTnq5cNKrnLb/Piqcj+h0= cloud.google.com/go/speech v1.21.1/go.mod h1:E5GHZXYQlkqWQwY5xRSLHw2ci5NMQNG52FfMU1aZrIA= +cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cloud.google.com/go/storagetransfer v1.10.4/go.mod h1:vef30rZKu5HSEf/x1tK3WfWrL0XVoUQN/EPDRGPzjZs= @@ -129,38 +137,58 @@ cloud.google.com/go/vpcaccess v1.7.5/go.mod h1:slc5ZRvvjP78c2dnL7m4l4R9GwL3wDLcp cloud.google.com/go/webrisk v1.9.5/go.mod h1:aako0Fzep1Q714cPEM5E+mtYX8/jsfegAuS8aivxy3U= cloud.google.com/go/websecurityscanner v1.6.5/go.mod h1:QR+DWaxAz2pWooylsBF854/Ijvuoa3FCyS1zBa1rAVQ= cloud.google.com/go/workflows v1.12.4/go.mod h1:yQ7HUqOkdJK4duVtMeBCAOPiN1ZF1E9pAMX51vpwB/w= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk= +github.com/PuerkitoBio/goquery v1.9.3 h1:mpJr/ikUA9/GNJB/DBZcGeFDXUtosHRyRrwh7KGdTG0= github.com/PuerkitoBio/goquery v1.9.3/go.mod h1:1ndLHPdTz+DyQPICCWYlYQMPl0oXZj0G6D4LCYA6u4U= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY= github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss= github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= +github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= +github.com/antonlindstrom/pgstore v0.0.0-20220421113606-e3a6e3fed12a h1:dIdcLbck6W67B5JFMewU5Dba1yKZA3MsT67i4No/zh0= github.com/antonlindstrom/pgstore v0.0.0-20220421113606-e3a6e3fed12a/go.mod h1:Sdr/tmSOLEnncCuXS5TwZRxuk7deH1WXVY8cve3eVBM= github.com/apache/arrow/go/v14 v14.0.2/go.mod h1:u3fgh3EdgN/YQ8cVQRguVW3R+seMybFg8QBQ5LU+eBY= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff h1:RmdPFa+slIr4SCBg4st/l/vZWVe9QJKMXGO60Bxbe04= github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff/go.mod h1:+RTT1BOk5P97fT2CiHkbFQwkK3mjsFAP6zCYV2aXtjw= +github.com/bos-hieu/mongostore v0.0.3 h1:wla8pz4VQU8JOcbo+sBbuvFVBBHt3yRelVSi6YInC48= github.com/bos-hieu/mongostore v0.0.3/go.mod h1:8AbbVmDEb0yqJsBrWxZIAZOxIfv/tsP8CDtdHduZHGg= +github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 h1:N7oVaKyGp8bttX0bfZGmcGkjz7DLQXhAn3DNd3T0ous= github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874/go.mod h1:r5xuitiExdLAJ09PR7vBVENGvp4ZuTBeWTGtxuX3K+c= +github.com/bradleypeabody/gorilla-sessions-memcache v0.0.0-20181103040241-659414f458e1 h1:4QHxgr7hM4gVD8uOwrk8T1fjkKRLwaLjmTkU0ibhZKU= github.com/bradleypeabody/gorilla-sessions-memcache v0.0.0-20181103040241-659414f458e1/go.mod h1:dkChI7Tbtx7H1Tj7TqGSZMOeGpMP5gLHtjroHd4agiI= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= +github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20 h1:N+3sFI5GUjRKBi+i0TxYVST9h4Ie192jJWpHvthBBgg= github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -170,21 +198,28 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.13.0 h1:HzkeUz1Knt+3bK+8LG1bxOO/jzWZmdxpwC51i202les= github.com/envoyproxy/go-control-plane v0.13.0/go.mod h1:GRaKG3dwvFoTg4nj7aXdZnvMg4d7nvT/wl9WgVXn3Q8= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM= github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= @@ -194,9 +229,12 @@ github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -213,9 +251,12 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= @@ -228,90 +269,142 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.12.1/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720 h1:zC34cGQu69FG7qzJ3WiKW244WfhDC3xxYMeNOX2gtUQ= github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8= github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kevinmbeaulieu/eq-go v1.0.0 h1:AQgYHURDOmnVJ62jnEk0W/7yFKEn+Lv8RHN6t7mB0Zo= github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= +github.com/kidstuff/mongostore v0.0.0-20181113001930-e650cd85ee4b h1:TLCm7HR+P9HM2NXaAJaIiHerOUMedtFJeAfaYwZ8YhY= github.com/kidstuff/mongostore v0.0.0-20181113001930-e650cd85ee4b/go.mod h1:g2nVr8KZVXJSS97Jo8pJ0jgq29P6H7dG0oplUA86MQw= +github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= +github.com/knz/go-libedit v1.10.1 h1:0pHpWtx9vcvC0xGZqEQlQdfSQs7WRlAjuPvk3fOZDCo= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= +github.com/logrusorgru/aurora/v4 v4.0.0 h1:sRjfPpun/63iADiSvGGjgA1cAYegEWMPCJdUpJYn9JA= github.com/logrusorgru/aurora/v4 v4.0.0/go.mod h1:lP0iIa2nrnT/qoFXcOZSrZQpJ1o6n2CUf/hyHi2Q4ZQ= github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= github.com/matryer/moq v0.3.4/go.mod h1:wqm9QObyoMuUtH81zFfs3EK6mXEcByy+TjvSROOXJ2U= +github.com/matryer/moq v0.4.0 h1:HsZIdEsj8+9nE940WW7FFxMgrgSxGfMkNXhVTHUhfMU= github.com/matryer/moq v0.4.0/go.mod h1:kUfalaLk7TcyXhrhonBYQ2Ewun63+/xGbZ7/MzzzC4Y= +github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/memcachier/mc v2.0.1+incompatible h1:s8EDz0xrJLP8goitwZOoq1vA/sm0fPS4X3KAF0nyhWQ= github.com/memcachier/mc v2.0.1+incompatible/go.mod h1:7bkvFE61leUBvXz+yxsOnGBQSZpBSPIMUQSmmSHvuXc= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/nats.go v1.34.0 h1:fnxnPCNiwIG5w08rlMcEKTUw4AV/nKyGCOJE8TdhSPk= github.com/nats-io/nats.go v1.34.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= +github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo= github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b h1:aUNXCGgukb4gtY99imuIeoh8Vr0GSwAlYxPAhqZrpFc= github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b/go.mod h1:wTPjTepVu7uJBYgZ0SdWHQlIas582j6cn2jgk4DDdlg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= +github.com/sagikazarmark/crypt v0.19.0 h1:WMyLTjHBo64UvNcWqpzY3pbZTYgnemZU8FBZigKc42E= github.com/sagikazarmark/crypt v0.19.0/go.mod h1:c6vimRziqqERhtSe0MhIvzE1w54FrCHtrXb5NH/ja78= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/wader/gormstore/v2 v2.0.3 h1:/29GWPauY8xZkpLnB8hsp+dZfP3ivA9fiDw1YVNTp6U= github.com/wader/gormstore/v2 v2.0.3/go.mod h1:sr3N3a8F1+PBc3fHoKaphFqDXLRJ9Oe6Yow0HxKFbbg= +github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= +github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= +github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a h1:fZHgsYlfvtyqToslyjUt3VOPF4J7aK/3MPcK7xp3PDk= github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/R083muKhosV54bj5niojjWZvU8xrevuH4= +github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.einride.tech/aip v0.66.0/go.mod h1:qAhMsfT7plxBX+Oy7Huol6YUvZ0ZzdUz26yZsQwfl1M= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= +go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0/go.mod h1:tIKj3DbO8N9Y2xo52og3irLsPI4GW02DSMtrVgNMgxg= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA= @@ -319,7 +412,9 @@ go.opentelemetry.io/otel v1.23.0/go.mod h1:YCycw9ZeKhcJFrb34iVSkyT0iczq/zYDtZYFu go.opentelemetry.io/otel/metric v1.23.0/go.mod h1:MqUW2X2a6Q8RN96E2/nqNoT+z9BSms20Jb7Bbp+HiTo= go.opentelemetry.io/otel/trace v1.23.0/go.mod h1:GSGTbIClEsuZrGIzoEHqsVfxgn5UkggkflQwDScNUsk= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -398,6 +493,7 @@ golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -424,14 +520,17 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.166.0/go.mod h1:4FcBc686KFi7QI/U51/2GKKevfZMpM17sCdibqe/bSA= google.golang.org/api v0.167.0/go.mod h1:4FcBc686KFi7QI/U51/2GKKevfZMpM17sCdibqe/bSA= google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= +google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU= google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= @@ -485,17 +584,24 @@ google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHh google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/sqlite v1.4.4 h1:gIufGoR0dQzjkyqDyYSCvsYR6fba1Gw5YKDqKeChxFc= gorm.io/driver/sqlite v1.4.4/go.mod h1:0Aq3iPO+v9ZKbcdiz8gLWRw5VOPcBOPUQJFLq5e2ecI= +gorm.io/gorm v1.25.8 h1:WAGEZ/aEcznN4D03laj8DKnehe1e9gYQAjW8xyPRdeo= gorm.io/gorm v1.25.8/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7 h1:cErOOTkQ3JW19o4lo91fFurouhP8NcoBvb7CkvhZZpk= k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kms v0.30.1/go.mod h1:GrMurD0qk3G4yNgGcsCEmepqf9KyyIrTXYR2lyUOJC4= +k8s.io/kms v0.31.1 h1:cGLyV3cIwb0ovpP/jtyIe2mEuQ/MkbhmeBF2IYCA9Io= k8s.io/kms v0.31.1/go.mod h1:OZKwl1fan3n3N5FFxnW5C4V3ygrah/3YXeJWS3O6+94= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +nullprogram.com/x/optparse v1.0.0 h1:xGFgVi5ZaWOnYdac2foDT3vg0ZZC9ErXFV57mr4OHrI= +rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/backend/server/README.md b/modules/server/README.md similarity index 100% rename from backend/server/README.md rename to modules/server/README.md diff --git a/backend/server/cmd/main.go b/modules/server/cmd/main.go similarity index 96% rename from backend/server/cmd/main.go rename to modules/server/cmd/main.go index d33f6a2f..328e4b27 100644 --- a/backend/server/cmd/main.go +++ b/modules/server/cmd/main.go @@ -15,8 +15,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/server/pkg/ginapp" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/server/pkg/ginapp" ) type CLI struct { diff --git a/backend/server/embed.go b/modules/server/embed.go similarity index 100% rename from backend/server/embed.go rename to modules/server/embed.go diff --git a/backend/server/go.mod b/modules/server/go.mod similarity index 96% rename from backend/server/go.mod rename to modules/server/go.mod index dcb40e8c..b682bdb3 100644 --- a/backend/server/go.mod +++ b/modules/server/go.mod @@ -1,8 +1,8 @@ -module github.com/kubetail-org/kubetail/backend/server +module github.com/kubetail-org/kubetail/modules/server go 1.22.5 -replace github.com/kubetail-org/kubetail/backend/common => ../common +replace github.com/kubetail-org/kubetail/modules/common => ../common require ( github.com/99designs/gqlgen v0.17.55 @@ -17,7 +17,7 @@ require ( github.com/gwatts/gin-adapter v1.0.0 github.com/hasura/go-graphql-client v0.10.0 github.com/kubetail-org/grpc-dispatcher-go v0.0.2 - github.com/kubetail-org/kubetail/backend/common v0.0.0-00010101000000-000000000000 + github.com/kubetail-org/kubetail/modules/common v0.0.0-00010101000000-000000000000 github.com/mitchellh/mapstructure v1.5.0 github.com/rs/zerolog v1.33.0 github.com/sosodev/duration v1.3.1 diff --git a/backend/server/go.sum b/modules/server/go.sum similarity index 100% rename from backend/server/go.sum rename to modules/server/go.sum diff --git a/backend/server/gqlgen.yml b/modules/server/gqlgen.yml similarity index 93% rename from backend/server/gqlgen.yml rename to modules/server/gqlgen.yml index 1d44c8c1..0909b6c7 100644 --- a/backend/server/gqlgen.yml +++ b/modules/server/gqlgen.yml @@ -80,7 +80,7 @@ resolvers_always_return_pointers: false # gqlgen will search for any type names in the schema in these go packages # if they match it will use them, otherwise it will generate them. autobind: -# - "github.com/kubetail-org/kubetail/backend/server/graph/model" +# - "github.com/kubetail-org/kubetail/modules/server/graph/model" # This section declares type mapping between the GraphQL and go type systems # @@ -90,10 +90,10 @@ autobind: models: # --- Interfaces --- List: - model: github.com/kubetail-org/kubetail/backend/server/graph/model.List + model: github.com/kubetail-org/kubetail/modules/server/graph/model.List Object: - model: github.com/kubetail-org/kubetail/backend/server/graph/model.Object + model: github.com/kubetail-org/kubetail/modules/server/graph/model.Object # --- AppsV1 --- AppsV1DaemonSet: @@ -368,19 +368,19 @@ models: # --- LogMetadata --- LogMetadata: - model: github.com/kubetail-org/kubetail/backend/common/agentpb.LogMetadata + model: github.com/kubetail-org/kubetail/modules/common/agentpb.LogMetadata LogMetadataFileInfo: - model: github.com/kubetail-org/kubetail/backend/common/agentpb.LogMetadataFileInfo + model: github.com/kubetail-org/kubetail/modules/common/agentpb.LogMetadataFileInfo LogMetadataList: - model: github.com/kubetail-org/kubetail/backend/common/agentpb.LogMetadataList + model: github.com/kubetail-org/kubetail/modules/common/agentpb.LogMetadataList LogMetadataSpec: - model: github.com/kubetail-org/kubetail/backend/common/agentpb.LogMetadataSpec + model: github.com/kubetail-org/kubetail/modules/common/agentpb.LogMetadataSpec LogMetadataWatchEvent: - model: github.com/kubetail-org/kubetail/backend/common/agentpb.LogMetadataWatchEvent + model: github.com/kubetail-org/kubetail/modules/common/agentpb.LogMetadataWatchEvent # --- MetaV1 --- MetaV1GetOptions: @@ -416,18 +416,18 @@ models: # --- custom scalars --- Int64: - model: github.com/kubetail-org/kubetail/backend/server/graph/model.Int64 + model: github.com/kubetail-org/kubetail/modules/server/graph/model.Int64 MetaV1Time: model: - - github.com/kubetail-org/kubetail/backend/server/graph/model.MetaV1Time + - github.com/kubetail-org/kubetail/modules/server/graph/model.MetaV1Time StringMap: - model: github.com/kubetail-org/kubetail/backend/server/graph/model.StringMap + model: github.com/kubetail-org/kubetail/modules/server/graph/model.StringMap TimestampPBTimestamp: model: - - github.com/kubetail-org/kubetail/backend/server/graph/model.TimestampPBTimestamp + - github.com/kubetail-org/kubetail/modules/server/graph/model.TimestampPBTimestamp # --- gqlgen --- ID: diff --git a/backend/server/graph/directives.go b/modules/server/graph/directives.go similarity index 94% rename from backend/server/graph/directives.go rename to modules/server/graph/directives.go index 591fd1ed..ee7e3dd4 100644 --- a/backend/server/graph/directives.go +++ b/modules/server/graph/directives.go @@ -7,7 +7,7 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/go-playground/validator/v10" - "github.com/kubetail-org/kubetail/backend/server/graph/lib" + "github.com/kubetail-org/kubetail/modules/server/graph/lib" ) var validate *validator.Validate diff --git a/backend/server/graph/errors.go b/modules/server/graph/errors.go similarity index 100% rename from backend/server/graph/errors.go rename to modules/server/graph/errors.go diff --git a/backend/server/graph/generated.go b/modules/server/graph/generated.go similarity index 92% rename from backend/server/graph/generated.go rename to modules/server/graph/generated.go index fb06c917..8c8ffe57 100644 --- a/backend/server/graph/generated.go +++ b/modules/server/graph/generated.go @@ -16,8 +16,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/kubetail-org/kubetail/backend/common/agentpb" - "github.com/kubetail-org/kubetail/backend/server/graph/model" + "github.com/kubetail-org/kubetail/modules/common/agentpb" + "github.com/kubetail-org/kubetail/modules/server/graph/model" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" "google.golang.org/protobuf/types/known/timestamppb" @@ -2870,1002 +2870,2466 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...) func (ec *executionContext) dir_validate_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["rule"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rule")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.dir_validate_argsRule(ctx, rawArgs) + if err != nil { + return nil, err } args["rule"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["message"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.dir_validate_argsMessage(ctx, rawArgs) + if err != nil { + return nil, err } args["message"] = arg1 return args, nil } +func (ec *executionContext) dir_validate_argsRule( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["rule"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("rule")) + if tmp, ok := rawArgs["rule"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) dir_validate_argsMessage( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["message"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) + if tmp, ok := rawArgs["message"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query___type_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query___type_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_appsV1DaemonSetsGet_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_appsV1DaemonSetsGet_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_appsV1DaemonSetsGet_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg1 - var arg2 *v1.GetOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg2, err = ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_appsV1DaemonSetsGet_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg2 return args, nil } +func (ec *executionContext) field_Query_appsV1DaemonSetsGet_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1DaemonSetsGet_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1DaemonSetsGet_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.GetOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.GetOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) + } + + var zeroVal *v1.GetOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_appsV1DaemonSetsList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_appsV1DaemonSetsList_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_appsV1DaemonSetsList_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg1 return args, nil } +func (ec *executionContext) field_Query_appsV1DaemonSetsList_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1DaemonSetsList_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_appsV1DeploymentsGet_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_appsV1DeploymentsGet_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_appsV1DeploymentsGet_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg1 - var arg2 *v1.GetOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg2, err = ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_appsV1DeploymentsGet_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg2 return args, nil } +func (ec *executionContext) field_Query_appsV1DeploymentsGet_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1DeploymentsGet_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1DeploymentsGet_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.GetOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.GetOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) + } + + var zeroVal *v1.GetOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_appsV1DeploymentsList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_appsV1DeploymentsList_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_appsV1DeploymentsList_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg1 return args, nil } +func (ec *executionContext) field_Query_appsV1DeploymentsList_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1DeploymentsList_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_appsV1ReplicaSetsGet_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_appsV1ReplicaSetsGet_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_appsV1ReplicaSetsGet_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg1 - var arg2 *v1.GetOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg2, err = ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_appsV1ReplicaSetsGet_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg2 return args, nil } +func (ec *executionContext) field_Query_appsV1ReplicaSetsGet_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1ReplicaSetsGet_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1ReplicaSetsGet_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.GetOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.GetOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) + } + + var zeroVal *v1.GetOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_appsV1ReplicaSetsList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_appsV1ReplicaSetsList_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_appsV1ReplicaSetsList_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg1 return args, nil } +func (ec *executionContext) field_Query_appsV1ReplicaSetsList_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1ReplicaSetsList_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_appsV1StatefulSetsGet_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_appsV1StatefulSetsGet_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_appsV1StatefulSetsGet_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg1 - var arg2 *v1.GetOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg2, err = ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_appsV1StatefulSetsGet_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg2 return args, nil } +func (ec *executionContext) field_Query_appsV1StatefulSetsGet_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1StatefulSetsGet_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1StatefulSetsGet_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.GetOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.GetOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) + } + + var zeroVal *v1.GetOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_appsV1StatefulSetsList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_appsV1StatefulSetsList_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_appsV1StatefulSetsList_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg1 return args, nil } +func (ec *executionContext) field_Query_appsV1StatefulSetsList_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } -func (ec *executionContext) field_Query_batchV1CronJobsGet_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_appsV1StatefulSetsList_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} + +func (ec *executionContext) field_Query_batchV1CronJobsGet_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_batchV1CronJobsGet_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_batchV1CronJobsGet_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg1 - var arg2 *v1.GetOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg2, err = ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_batchV1CronJobsGet_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg2 return args, nil } +func (ec *executionContext) field_Query_batchV1CronJobsGet_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_batchV1CronJobsGet_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_batchV1CronJobsGet_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.GetOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.GetOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) + } + + var zeroVal *v1.GetOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_batchV1CronJobsList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_batchV1CronJobsList_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_batchV1CronJobsList_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg1 return args, nil } +func (ec *executionContext) field_Query_batchV1CronJobsList_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_batchV1CronJobsList_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_batchV1JobsGet_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_batchV1JobsGet_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_batchV1JobsGet_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg1 - var arg2 *v1.GetOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg2, err = ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_batchV1JobsGet_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg2 return args, nil } +func (ec *executionContext) field_Query_batchV1JobsGet_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_batchV1JobsGet_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_batchV1JobsGet_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.GetOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.GetOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) + } + + var zeroVal *v1.GetOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_batchV1JobsList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_batchV1JobsList_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_batchV1JobsList_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg1 return args, nil } +func (ec *executionContext) field_Query_batchV1JobsList_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_batchV1JobsList_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_coreV1NamespacesList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg0, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_coreV1NamespacesList_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg0 return args, nil } +func (ec *executionContext) field_Query_coreV1NamespacesList_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_coreV1NodesList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg0, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_coreV1NodesList_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg0 return args, nil } +func (ec *executionContext) field_Query_coreV1NodesList_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_coreV1PodsGetLogs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_coreV1PodsGetLogs_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_coreV1PodsGetLogs_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 - var arg2 *v11.PodLogOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg2, err = ec.unmarshalOCoreV1PodLogOptions2ᚖk8sᚗioᚋapiᚋcoreᚋv1ᚐPodLogOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_coreV1PodsGetLogs_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg2 return args, nil } +func (ec *executionContext) field_Query_coreV1PodsGetLogs_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_coreV1PodsGetLogs_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_coreV1PodsGetLogs_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v11.PodLogOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v11.PodLogOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOCoreV1PodLogOptions2ᚖk8sᚗioᚋapiᚋcoreᚋv1ᚐPodLogOptions(ctx, tmp) + } + + var zeroVal *v11.PodLogOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_coreV1PodsGet_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_coreV1PodsGet_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_coreV1PodsGet_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 - var arg2 *v1.GetOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg2, err = ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_coreV1PodsGet_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg2 return args, nil } +func (ec *executionContext) field_Query_coreV1PodsGet_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_coreV1PodsGet_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_coreV1PodsGet_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.GetOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.GetOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1GetOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐGetOptions(ctx, tmp) + } + + var zeroVal *v1.GetOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_coreV1PodsList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_coreV1PodsList_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_coreV1PodsList_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg1 return args, nil } +func (ec *executionContext) field_Query_coreV1PodsList_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_coreV1PodsList_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} func (ec *executionContext) field_Query_logMetadataList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_logMetadataList_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 return args, nil } +func (ec *executionContext) field_Query_logMetadataList_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} func (ec *executionContext) field_Query_podLogHead_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_podLogHead_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_podLogHead_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 - var arg2 *string - if tmp, ok := rawArgs["container"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("container")) - arg2, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_podLogHead_argsContainer(ctx, rawArgs) + if err != nil { + return nil, err } args["container"] = arg2 - var arg3 *string - if tmp, ok := rawArgs["after"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - arg3, err = ec.unmarshalOID2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg3, err := ec.field_Query_podLogHead_argsAfter(ctx, rawArgs) + if err != nil { + return nil, err } args["after"] = arg3 - var arg4 *string - if tmp, ok := rawArgs["since"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("since")) - arg4, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg4, err := ec.field_Query_podLogHead_argsSince(ctx, rawArgs) + if err != nil { + return nil, err } args["since"] = arg4 - var arg5 *int - if tmp, ok := rawArgs["first"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) - directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) } - directive1 := func(ctx context.Context) (interface{}, error) { - rule, err := ec.unmarshalNString2string(ctx, "gte=0") - if err != nil { - return nil, err - } - message, err := ec.unmarshalOString2ᚖstring(ctx, "Value must be >= 0") - if err != nil { - return nil, err - } - if ec.directives.Validate == nil { - return nil, errors.New("directive validate is not implemented") - } - return ec.directives.Validate(ctx, rawArgs, directive0, rule, message) + arg5, err := ec.field_Query_podLogHead_argsFirst(ctx, rawArgs) + if err != nil { + return nil, err + } + args["first"] = arg5 + return args, nil +} +func (ec *executionContext) field_Query_podLogHead_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_podLogHead_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_podLogHead_argsContainer( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["container"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("container")) + if tmp, ok := rawArgs["container"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_podLogHead_argsAfter( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["after"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) + if tmp, ok := rawArgs["after"]; ok { + return ec.unmarshalOID2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_podLogHead_argsSince( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["since"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("since")) + if tmp, ok := rawArgs["since"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_podLogHead_argsFirst( + ctx context.Context, + rawArgs map[string]interface{}, +) (*int, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["first"] + if !ok { + var zeroVal *int + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) + directive0 := func(ctx context.Context) (interface{}, error) { + tmp, ok := rawArgs["first"] + if !ok { + var zeroVal *int + return zeroVal, nil } + return ec.unmarshalOInt2ᚖint(ctx, tmp) + } - tmp, err = directive1(ctx) + directive1 := func(ctx context.Context) (interface{}, error) { + rule, err := ec.unmarshalNString2string(ctx, "gte=0") if err != nil { - return nil, graphql.ErrorOnPath(ctx, err) + var zeroVal *int + return zeroVal, err } - if data, ok := tmp.(*int); ok { - arg5 = data - } else if tmp == nil { - arg5 = nil - } else { - return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) + message, err := ec.unmarshalOString2ᚖstring(ctx, "Value must be >= 0") + if err != nil { + var zeroVal *int + return zeroVal, err } + if ec.directives.Validate == nil { + var zeroVal *int + return zeroVal, errors.New("directive validate is not implemented") + } + return ec.directives.Validate(ctx, rawArgs, directive0, rule, message) + } + + tmp, err := directive1(ctx) + if err != nil { + var zeroVal *int + return zeroVal, graphql.ErrorOnPath(ctx, err) + } + if data, ok := tmp.(*int); ok { + return data, nil + } else if tmp == nil { + var zeroVal *int + return zeroVal, nil + } else { + var zeroVal *int + return zeroVal, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) } - args["first"] = arg5 - return args, nil } func (ec *executionContext) field_Query_podLogTail_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_podLogTail_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_podLogTail_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 - var arg2 *string - if tmp, ok := rawArgs["container"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("container")) - arg2, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_podLogTail_argsContainer(ctx, rawArgs) + if err != nil { + return nil, err } args["container"] = arg2 - var arg3 *string - if tmp, ok := rawArgs["before"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) - arg3, err = ec.unmarshalOID2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg3, err := ec.field_Query_podLogTail_argsBefore(ctx, rawArgs) + if err != nil { + return nil, err } args["before"] = arg3 - var arg4 *int - if tmp, ok := rawArgs["last"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) - directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) } - directive1 := func(ctx context.Context) (interface{}, error) { - rule, err := ec.unmarshalNString2string(ctx, "gt=0") - if err != nil { - return nil, err - } - message, err := ec.unmarshalOString2ᚖstring(ctx, "Value must be > 0") - if err != nil { - return nil, err - } - if ec.directives.Validate == nil { - return nil, errors.New("directive validate is not implemented") - } - return ec.directives.Validate(ctx, rawArgs, directive0, rule, message) + arg4, err := ec.field_Query_podLogTail_argsLast(ctx, rawArgs) + if err != nil { + return nil, err + } + args["last"] = arg4 + return args, nil +} +func (ec *executionContext) field_Query_podLogTail_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_podLogTail_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_podLogTail_argsContainer( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["container"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("container")) + if tmp, ok := rawArgs["container"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_podLogTail_argsBefore( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["before"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) + if tmp, ok := rawArgs["before"]; ok { + return ec.unmarshalOID2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_podLogTail_argsLast( + ctx context.Context, + rawArgs map[string]interface{}, +) (*int, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["last"] + if !ok { + var zeroVal *int + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) + directive0 := func(ctx context.Context) (interface{}, error) { + tmp, ok := rawArgs["last"] + if !ok { + var zeroVal *int + return zeroVal, nil } + return ec.unmarshalOInt2ᚖint(ctx, tmp) + } - tmp, err = directive1(ctx) + directive1 := func(ctx context.Context) (interface{}, error) { + rule, err := ec.unmarshalNString2string(ctx, "gt=0") if err != nil { - return nil, graphql.ErrorOnPath(ctx, err) + var zeroVal *int + return zeroVal, err } - if data, ok := tmp.(*int); ok { - arg4 = data - } else if tmp == nil { - arg4 = nil - } else { - return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) + message, err := ec.unmarshalOString2ᚖstring(ctx, "Value must be > 0") + if err != nil { + var zeroVal *int + return zeroVal, err } + if ec.directives.Validate == nil { + var zeroVal *int + return zeroVal, errors.New("directive validate is not implemented") + } + return ec.directives.Validate(ctx, rawArgs, directive0, rule, message) + } + + tmp, err := directive1(ctx) + if err != nil { + var zeroVal *int + return zeroVal, graphql.ErrorOnPath(ctx, err) + } + if data, ok := tmp.(*int); ok { + return data, nil + } else if tmp == nil { + var zeroVal *int + return zeroVal, nil + } else { + var zeroVal *int + return zeroVal, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) } - args["last"] = arg4 - return args, nil } func (ec *executionContext) field_Subscription_appsV1DaemonSetsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string + arg0, err := ec.field_Subscription_appsV1DaemonSetsWatch_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err + } + args["namespace"] = arg0 + arg1, err := ec.field_Subscription_appsV1DaemonSetsWatch_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err + } + args["options"] = arg1 + return args, nil +} +func (ec *executionContext) field_Subscription_appsV1DaemonSetsWatch_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_appsV1DaemonSetsWatch_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_appsV1DeploymentsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + arg0, err := ec.field_Subscription_appsV1DeploymentsWatch_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 *v1.ListOptions + arg1, err := ec.field_Subscription_appsV1DeploymentsWatch_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err + } + args["options"] = arg1 + return args, nil +} +func (ec *executionContext) field_Subscription_appsV1DeploymentsWatch_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_appsV1DeploymentsWatch_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_appsV1ReplicaSetsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + arg0, err := ec.field_Subscription_appsV1ReplicaSetsWatch_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err + } + args["namespace"] = arg0 + arg1, err := ec.field_Subscription_appsV1ReplicaSetsWatch_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err + } + args["options"] = arg1 + return args, nil +} +func (ec *executionContext) field_Subscription_appsV1ReplicaSetsWatch_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_appsV1ReplicaSetsWatch_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_appsV1StatefulSetsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + arg0, err := ec.field_Subscription_appsV1StatefulSetsWatch_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err + } + args["namespace"] = arg0 + arg1, err := ec.field_Subscription_appsV1StatefulSetsWatch_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg1 return args, nil } +func (ec *executionContext) field_Subscription_appsV1StatefulSetsWatch_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } -func (ec *executionContext) field_Subscription_appsV1DeploymentsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 *string + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalOString2ᚖstring(ctx, tmp) } - args["namespace"] = arg0 - var arg1 *v1.ListOptions + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_appsV1StatefulSetsWatch_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) } - args["options"] = arg1 - return args, nil + + var zeroVal *v1.ListOptions + return zeroVal, nil } -func (ec *executionContext) field_Subscription_appsV1ReplicaSetsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { +func (ec *executionContext) field_Subscription_batchV1CronJobsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Subscription_batchV1CronJobsWatch_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Subscription_batchV1CronJobsWatch_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg1 return args, nil } +func (ec *executionContext) field_Subscription_batchV1CronJobsWatch_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } -func (ec *executionContext) field_Subscription_appsV1StatefulSetsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 *string + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalOString2ᚖstring(ctx, tmp) } - args["namespace"] = arg0 - var arg1 *v1.ListOptions + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_batchV1CronJobsWatch_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) } - args["options"] = arg1 - return args, nil + + var zeroVal *v1.ListOptions + return zeroVal, nil } -func (ec *executionContext) field_Subscription_batchV1CronJobsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { +func (ec *executionContext) field_Subscription_batchV1JobsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Subscription_batchV1JobsWatch_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Subscription_batchV1JobsWatch_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg1 return args, nil } +func (ec *executionContext) field_Subscription_batchV1JobsWatch_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } -func (ec *executionContext) field_Subscription_batchV1JobsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 *string + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalOString2ᚖstring(ctx, tmp) } - args["namespace"] = arg0 - var arg1 *v1.ListOptions + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_batchV1JobsWatch_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) } - args["options"] = arg1 - return args, nil + + var zeroVal *v1.ListOptions + return zeroVal, nil } func (ec *executionContext) field_Subscription_coreV1NamespacesWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg0, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Subscription_coreV1NamespacesWatch_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg0 return args, nil } +func (ec *executionContext) field_Subscription_coreV1NamespacesWatch_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} func (ec *executionContext) field_Subscription_coreV1NodesWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg0, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Subscription_coreV1NodesWatch_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg0 return args, nil } +func (ec *executionContext) field_Subscription_coreV1NodesWatch_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} func (ec *executionContext) field_Subscription_coreV1PodLogTail_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Subscription_coreV1PodLogTail_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Subscription_coreV1PodLogTail_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 - var arg2 *v11.PodLogOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg2, err = ec.unmarshalOCoreV1PodLogOptions2ᚖk8sᚗioᚋapiᚋcoreᚋv1ᚐPodLogOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Subscription_coreV1PodLogTail_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg2 return args, nil } +func (ec *executionContext) field_Subscription_coreV1PodLogTail_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_coreV1PodLogTail_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_coreV1PodLogTail_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v11.PodLogOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v11.PodLogOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOCoreV1PodLogOptions2ᚖk8sᚗioᚋapiᚋcoreᚋv1ᚐPodLogOptions(ctx, tmp) + } + + var zeroVal *v11.PodLogOptions + return zeroVal, nil +} func (ec *executionContext) field_Subscription_coreV1PodsWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Subscription_coreV1PodsWatch_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 *v1.ListOptions - if tmp, ok := rawArgs["options"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) - arg1, err = ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Subscription_coreV1PodsWatch_argsOptions(ctx, rawArgs) + if err != nil { + return nil, err } args["options"] = arg1 return args, nil } +func (ec *executionContext) field_Subscription_coreV1PodsWatch_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_coreV1PodsWatch_argsOptions( + ctx context.Context, + rawArgs map[string]interface{}, +) (*v1.ListOptions, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["options"] + if !ok { + var zeroVal *v1.ListOptions + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("options")) + if tmp, ok := rawArgs["options"]; ok { + return ec.unmarshalOMetaV1ListOptions2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐListOptions(ctx, tmp) + } + + var zeroVal *v1.ListOptions + return zeroVal, nil +} func (ec *executionContext) field_Subscription_logMetadataWatch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Subscription_logMetadataWatch_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 return args, nil } +func (ec *executionContext) field_Subscription_logMetadataWatch_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} func (ec *executionContext) field_Subscription_podLogFollow_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["namespace"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Subscription_podLogFollow_argsNamespace(ctx, rawArgs) + if err != nil { + return nil, err } args["namespace"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Subscription_podLogFollow_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 - var arg2 *string - if tmp, ok := rawArgs["container"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("container")) - arg2, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Subscription_podLogFollow_argsContainer(ctx, rawArgs) + if err != nil { + return nil, err } args["container"] = arg2 - var arg3 *string - if tmp, ok := rawArgs["after"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - arg3, err = ec.unmarshalOID2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg3, err := ec.field_Subscription_podLogFollow_argsAfter(ctx, rawArgs) + if err != nil { + return nil, err } args["after"] = arg3 - var arg4 *string - if tmp, ok := rawArgs["since"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("since")) - arg4, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg4, err := ec.field_Subscription_podLogFollow_argsSince(ctx, rawArgs) + if err != nil { + return nil, err } args["since"] = arg4 return args, nil } +func (ec *executionContext) field_Subscription_podLogFollow_argsNamespace( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["namespace"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + if tmp, ok := rawArgs["namespace"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_podLogFollow_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_podLogFollow_argsContainer( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["container"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("container")) + if tmp, ok := rawArgs["container"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_podLogFollow_argsAfter( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["after"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) + if tmp, ok := rawArgs["after"]; ok { + return ec.unmarshalOID2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Subscription_podLogFollow_argsSince( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["since"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("since")) + if tmp, ok := rawArgs["since"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 bool - if tmp, ok := rawArgs["includeDeprecated"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field___Type_enumValues_argsIncludeDeprecated(ctx, rawArgs) + if err != nil { + return nil, err } args["includeDeprecated"] = arg0 return args, nil } +func (ec *executionContext) field___Type_enumValues_argsIncludeDeprecated( + ctx context.Context, + rawArgs map[string]interface{}, +) (bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["includeDeprecated"] + if !ok { + var zeroVal bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + if tmp, ok := rawArgs["includeDeprecated"]; ok { + return ec.unmarshalOBoolean2bool(ctx, tmp) + } + + var zeroVal bool + return zeroVal, nil +} func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 bool - if tmp, ok := rawArgs["includeDeprecated"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field___Type_fields_argsIncludeDeprecated(ctx, rawArgs) + if err != nil { + return nil, err } args["includeDeprecated"] = arg0 return args, nil } +func (ec *executionContext) field___Type_fields_argsIncludeDeprecated( + ctx context.Context, + rawArgs map[string]interface{}, +) (bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["includeDeprecated"] + if !ok { + var zeroVal bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + if tmp, ok := rawArgs["includeDeprecated"]; ok { + return ec.unmarshalOBoolean2bool(ctx, tmp) + } + + var zeroVal bool + return zeroVal, nil +} // endregion ***************************** args.gotpl ***************************** @@ -13209,7 +14673,7 @@ func (ec *executionContext) _HealthCheckResponse_status(ctx context.Context, fie } res := resTmp.(model.HealthCheckStatus) fc.Result = res - return ec.marshalNHealthCheckStatus2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐHealthCheckStatus(ctx, field.Selections, res) + return ec.marshalNHealthCheckStatus2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐHealthCheckStatus(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_HealthCheckResponse_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13382,7 +14846,7 @@ func (ec *executionContext) _LogMetadata_spec(ctx context.Context, field graphql } res := resTmp.(*agentpb.LogMetadataSpec) fc.Result = res - return ec.marshalNLogMetadataSpec2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadataSpec(ctx, field.Selections, res) + return ec.marshalNLogMetadataSpec2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadataSpec(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_LogMetadata_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13438,7 +14902,7 @@ func (ec *executionContext) _LogMetadata_fileInfo(ctx context.Context, field gra } res := resTmp.(*agentpb.LogMetadataFileInfo) fc.Result = res - return ec.marshalNLogMetadataFileInfo2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadataFileInfo(ctx, field.Selections, res) + return ec.marshalNLogMetadataFileInfo2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadataFileInfo(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_LogMetadata_fileInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13573,7 +15037,7 @@ func (ec *executionContext) _LogMetadataList_items(ctx context.Context, field gr } res := resTmp.([]*agentpb.LogMetadata) fc.Result = res - return ec.marshalNLogMetadata2ᚕᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadataᚄ(ctx, field.Selections, res) + return ec.marshalNLogMetadata2ᚕᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadataᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_LogMetadataList_items(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13886,7 +15350,7 @@ func (ec *executionContext) _LogMetadataWatchEvent_object(ctx context.Context, f } res := resTmp.(*agentpb.LogMetadata) fc.Result = res - return ec.marshalOLogMetadata2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadata(ctx, field.Selections, res) + return ec.marshalOLogMetadata2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadata(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_LogMetadataWatchEvent_object(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -15166,7 +16630,7 @@ func (ec *executionContext) _PodLogQueryResponse_results(ctx context.Context, fi } res := resTmp.([]model.LogRecord) fc.Result = res - return ec.marshalNLogRecord2ᚕgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐLogRecordᚄ(ctx, field.Selections, res) + return ec.marshalNLogRecord2ᚕgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐLogRecordᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_PodLogQueryResponse_results(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -15216,7 +16680,7 @@ func (ec *executionContext) _PodLogQueryResponse_pageInfo(ctx context.Context, f } res := resTmp.(model.PageInfo) fc.Result = res - return ec.marshalNPageInfo2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_PodLogQueryResponse_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -16285,7 +17749,7 @@ func (ec *executionContext) _Query_coreV1PodsGetLogs(ctx context.Context, field } res := resTmp.([]model.LogRecord) fc.Result = res - return ec.marshalOLogRecord2ᚕgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐLogRecordᚄ(ctx, field.Selections, res) + return ec.marshalOLogRecord2ᚕgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐLogRecordᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_coreV1PodsGetLogs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -16343,7 +17807,7 @@ func (ec *executionContext) _Query_logMetadataList(ctx context.Context, field gr } res := resTmp.(*agentpb.LogMetadataList) fc.Result = res - return ec.marshalOLogMetadataList2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadataList(ctx, field.Selections, res) + return ec.marshalOLogMetadataList2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadataList(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_logMetadataList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -16391,9 +17855,11 @@ func (ec *executionContext) _Query_podLogHead(ctx context.Context, field graphql ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().PodLogHead(rctx, fc.Args["namespace"].(*string), fc.Args["name"].(string), fc.Args["container"].(*string), fc.Args["after"].(*string), fc.Args["since"].(*string), fc.Args["first"].(*int)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.NullIfValidationFailed == nil { - return nil, errors.New("directive nullIfValidationFailed is not implemented") + var zeroVal *model.PodLogQueryResponse + return zeroVal, errors.New("directive nullIfValidationFailed is not implemented") } return ec.directives.NullIfValidationFailed(ctx, nil, directive0) } @@ -16408,7 +17874,7 @@ func (ec *executionContext) _Query_podLogHead(ctx context.Context, field graphql if data, ok := tmp.(*model.PodLogQueryResponse); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kubetail-org/kubetail/backend/server/graph/model.PodLogQueryResponse`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kubetail-org/kubetail/modules/server/graph/model.PodLogQueryResponse`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -16419,7 +17885,7 @@ func (ec *executionContext) _Query_podLogHead(ctx context.Context, field graphql } res := resTmp.(*model.PodLogQueryResponse) fc.Result = res - return ec.marshalOPodLogQueryResponse2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐPodLogQueryResponse(ctx, field.Selections, res) + return ec.marshalOPodLogQueryResponse2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐPodLogQueryResponse(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_podLogHead(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -16469,9 +17935,11 @@ func (ec *executionContext) _Query_podLogTail(ctx context.Context, field graphql ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().PodLogTail(rctx, fc.Args["namespace"].(*string), fc.Args["name"].(string), fc.Args["container"].(*string), fc.Args["before"].(*string), fc.Args["last"].(*int)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.NullIfValidationFailed == nil { - return nil, errors.New("directive nullIfValidationFailed is not implemented") + var zeroVal *model.PodLogQueryResponse + return zeroVal, errors.New("directive nullIfValidationFailed is not implemented") } return ec.directives.NullIfValidationFailed(ctx, nil, directive0) } @@ -16486,7 +17954,7 @@ func (ec *executionContext) _Query_podLogTail(ctx context.Context, field graphql if data, ok := tmp.(*model.PodLogQueryResponse); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kubetail-org/kubetail/backend/server/graph/model.PodLogQueryResponse`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kubetail-org/kubetail/modules/server/graph/model.PodLogQueryResponse`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -16497,7 +17965,7 @@ func (ec *executionContext) _Query_podLogTail(ctx context.Context, field graphql } res := resTmp.(*model.PodLogQueryResponse) fc.Result = res - return ec.marshalOPodLogQueryResponse2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐPodLogQueryResponse(ctx, field.Selections, res) + return ec.marshalOPodLogQueryResponse2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐPodLogQueryResponse(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_podLogTail(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -16558,7 +18026,7 @@ func (ec *executionContext) _Query_livezGet(ctx context.Context, field graphql.C } res := resTmp.(model.HealthCheckResponse) fc.Result = res - return ec.marshalNHealthCheckResponse2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐHealthCheckResponse(ctx, field.Selections, res) + return ec.marshalNHealthCheckResponse2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐHealthCheckResponse(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_livezGet(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -16610,7 +18078,7 @@ func (ec *executionContext) _Query_readyzGet(ctx context.Context, field graphql. } res := resTmp.(model.HealthCheckResponse) fc.Result = res - return ec.marshalNHealthCheckResponse2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐHealthCheckResponse(ctx, field.Selections, res) + return ec.marshalNHealthCheckResponse2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐHealthCheckResponse(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_readyzGet(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -17444,7 +18912,7 @@ func (ec *executionContext) _Subscription_coreV1PodLogTail(ctx context.Context, w.Write([]byte{'{'}) graphql.MarshalString(field.Alias).MarshalGQL(w) w.Write([]byte{':'}) - ec.marshalOLogRecord2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐLogRecord(ctx, field.Selections, res).MarshalGQL(w) + ec.marshalOLogRecord2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐLogRecord(ctx, field.Selections, res).MarshalGQL(w) w.Write([]byte{'}'}) }) case <-ctx.Done(): @@ -17516,7 +18984,7 @@ func (ec *executionContext) _Subscription_logMetadataWatch(ctx context.Context, w.Write([]byte{'{'}) graphql.MarshalString(field.Alias).MarshalGQL(w) w.Write([]byte{':'}) - ec.marshalOLogMetadataWatchEvent2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadataWatchEvent(ctx, field.Selections, res).MarshalGQL(w) + ec.marshalOLogMetadataWatchEvent2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadataWatchEvent(ctx, field.Selections, res).MarshalGQL(w) w.Write([]byte{'}'}) }) case <-ctx.Done(): @@ -17572,9 +19040,11 @@ func (ec *executionContext) _Subscription_podLogFollow(ctx context.Context, fiel ctx = rctx // use context from middleware stack in children return ec.resolvers.Subscription().PodLogFollow(rctx, fc.Args["namespace"].(*string), fc.Args["name"].(string), fc.Args["container"].(*string), fc.Args["after"].(*string), fc.Args["since"].(*string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.NullIfValidationFailed == nil { - return nil, errors.New("directive nullIfValidationFailed is not implemented") + var zeroVal *model.LogRecord + return zeroVal, errors.New("directive nullIfValidationFailed is not implemented") } return ec.directives.NullIfValidationFailed(ctx, nil, directive0) } @@ -17589,7 +19059,7 @@ func (ec *executionContext) _Subscription_podLogFollow(ctx context.Context, fiel if data, ok := tmp.(<-chan *model.LogRecord); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/kubetail-org/kubetail/backend/server/graph/model.LogRecord`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/kubetail-org/kubetail/modules/server/graph/model.LogRecord`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -17608,7 +19078,7 @@ func (ec *executionContext) _Subscription_podLogFollow(ctx context.Context, fiel w.Write([]byte{'{'}) graphql.MarshalString(field.Alias).MarshalGQL(w) w.Write([]byte{':'}) - ec.marshalOLogRecord2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐLogRecord(ctx, field.Selections, res).MarshalGQL(w) + ec.marshalOLogRecord2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐLogRecord(ctx, field.Selections, res).MarshalGQL(w) w.Write([]byte{'}'}) }) case <-ctx.Done(): @@ -17683,7 +19153,7 @@ func (ec *executionContext) _Subscription_livezWatch(ctx context.Context, field w.Write([]byte{'{'}) graphql.MarshalString(field.Alias).MarshalGQL(w) w.Write([]byte{':'}) - ec.marshalNHealthCheckResponse2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐHealthCheckResponse(ctx, field.Selections, res).MarshalGQL(w) + ec.marshalNHealthCheckResponse2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐHealthCheckResponse(ctx, field.Selections, res).MarshalGQL(w) w.Write([]byte{'}'}) }) case <-ctx.Done(): @@ -17749,7 +19219,7 @@ func (ec *executionContext) _Subscription_readyzWatch(ctx context.Context, field w.Write([]byte{'{'}) graphql.MarshalString(field.Alias).MarshalGQL(w) w.Write([]byte{':'}) - ec.marshalNHealthCheckResponse2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐHealthCheckResponse(ctx, field.Selections, res).MarshalGQL(w) + ec.marshalNHealthCheckResponse2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐHealthCheckResponse(ctx, field.Selections, res).MarshalGQL(w) w.Write([]byte{'}'}) }) case <-ctx.Done(): @@ -25050,17 +26520,17 @@ func (ec *executionContext) marshalNCoreV1PodStatus2k8sᚗioᚋapiᚋcoreᚋv1 return ec._CoreV1PodStatus(ctx, sel, &v) } -func (ec *executionContext) marshalNHealthCheckResponse2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐHealthCheckResponse(ctx context.Context, sel ast.SelectionSet, v model.HealthCheckResponse) graphql.Marshaler { +func (ec *executionContext) marshalNHealthCheckResponse2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐHealthCheckResponse(ctx context.Context, sel ast.SelectionSet, v model.HealthCheckResponse) graphql.Marshaler { return ec._HealthCheckResponse(ctx, sel, &v) } -func (ec *executionContext) unmarshalNHealthCheckStatus2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐHealthCheckStatus(ctx context.Context, v interface{}) (model.HealthCheckStatus, error) { +func (ec *executionContext) unmarshalNHealthCheckStatus2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐHealthCheckStatus(ctx context.Context, v interface{}) (model.HealthCheckStatus, error) { var res model.HealthCheckStatus err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNHealthCheckStatus2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐHealthCheckStatus(ctx context.Context, sel ast.SelectionSet, v model.HealthCheckStatus) graphql.Marshaler { +func (ec *executionContext) marshalNHealthCheckStatus2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐHealthCheckStatus(ctx context.Context, sel ast.SelectionSet, v model.HealthCheckStatus) graphql.Marshaler { return v } @@ -25125,7 +26595,7 @@ func (ec *executionContext) marshalNInt642int64(ctx context.Context, sel ast.Sel return res } -func (ec *executionContext) marshalNLogMetadata2ᚕᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadataᚄ(ctx context.Context, sel ast.SelectionSet, v []*agentpb.LogMetadata) graphql.Marshaler { +func (ec *executionContext) marshalNLogMetadata2ᚕᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadataᚄ(ctx context.Context, sel ast.SelectionSet, v []*agentpb.LogMetadata) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -25149,7 +26619,7 @@ func (ec *executionContext) marshalNLogMetadata2ᚕᚖgithubᚗcomᚋkubetailᚑ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNLogMetadata2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadata(ctx, sel, v[i]) + ret[i] = ec.marshalNLogMetadata2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadata(ctx, sel, v[i]) } if isLen1 { f(i) @@ -25169,7 +26639,7 @@ func (ec *executionContext) marshalNLogMetadata2ᚕᚖgithubᚗcomᚋkubetailᚑ return ret } -func (ec *executionContext) marshalNLogMetadata2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadata(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadata) graphql.Marshaler { +func (ec *executionContext) marshalNLogMetadata2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadata(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadata) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -25179,7 +26649,7 @@ func (ec *executionContext) marshalNLogMetadata2ᚖgithubᚗcomᚋkubetailᚑorg return ec._LogMetadata(ctx, sel, v) } -func (ec *executionContext) marshalNLogMetadataFileInfo2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadataFileInfo(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadataFileInfo) graphql.Marshaler { +func (ec *executionContext) marshalNLogMetadataFileInfo2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadataFileInfo(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadataFileInfo) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -25189,7 +26659,7 @@ func (ec *executionContext) marshalNLogMetadataFileInfo2ᚖgithubᚗcomᚋkubeta return ec._LogMetadataFileInfo(ctx, sel, v) } -func (ec *executionContext) marshalNLogMetadataSpec2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadataSpec(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadataSpec) graphql.Marshaler { +func (ec *executionContext) marshalNLogMetadataSpec2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadataSpec(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadataSpec) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -25199,11 +26669,11 @@ func (ec *executionContext) marshalNLogMetadataSpec2ᚖgithubᚗcomᚋkubetail return ec._LogMetadataSpec(ctx, sel, v) } -func (ec *executionContext) marshalNLogRecord2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐLogRecord(ctx context.Context, sel ast.SelectionSet, v model.LogRecord) graphql.Marshaler { +func (ec *executionContext) marshalNLogRecord2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐLogRecord(ctx context.Context, sel ast.SelectionSet, v model.LogRecord) graphql.Marshaler { return ec._LogRecord(ctx, sel, &v) } -func (ec *executionContext) marshalNLogRecord2ᚕgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐLogRecordᚄ(ctx context.Context, sel ast.SelectionSet, v []model.LogRecord) graphql.Marshaler { +func (ec *executionContext) marshalNLogRecord2ᚕgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐLogRecordᚄ(ctx context.Context, sel ast.SelectionSet, v []model.LogRecord) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -25227,7 +26697,7 @@ func (ec *executionContext) marshalNLogRecord2ᚕgithubᚗcomᚋkubetailᚑorg if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNLogRecord2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐLogRecord(ctx, sel, v[i]) + ret[i] = ec.marshalNLogRecord2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐLogRecord(ctx, sel, v[i]) } if isLen1 { f(i) @@ -25382,7 +26852,7 @@ func (ec *executionContext) marshalNMetaV1Time2k8sᚗioᚋapimachineryᚋpkgᚋa return res } -func (ec *executionContext) marshalNPageInfo2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v model.PageInfo) graphql.Marshaler { +func (ec *executionContext) marshalNPageInfo2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v model.PageInfo) graphql.Marshaler { return ec._PageInfo(ctx, sel, &v) } @@ -26035,28 +27505,28 @@ func (ec *executionContext) marshalOInt642ᚖint64(ctx context.Context, sel ast. return res } -func (ec *executionContext) marshalOLogMetadata2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadata(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadata) graphql.Marshaler { +func (ec *executionContext) marshalOLogMetadata2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadata(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadata) graphql.Marshaler { if v == nil { return graphql.Null } return ec._LogMetadata(ctx, sel, v) } -func (ec *executionContext) marshalOLogMetadataList2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadataList(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadataList) graphql.Marshaler { +func (ec *executionContext) marshalOLogMetadataList2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadataList(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadataList) graphql.Marshaler { if v == nil { return graphql.Null } return ec._LogMetadataList(ctx, sel, v) } -func (ec *executionContext) marshalOLogMetadataWatchEvent2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋcommonᚋagentpbᚐLogMetadataWatchEvent(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadataWatchEvent) graphql.Marshaler { +func (ec *executionContext) marshalOLogMetadataWatchEvent2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋcommonᚋagentpbᚐLogMetadataWatchEvent(ctx context.Context, sel ast.SelectionSet, v *agentpb.LogMetadataWatchEvent) graphql.Marshaler { if v == nil { return graphql.Null } return ec._LogMetadataWatchEvent(ctx, sel, v) } -func (ec *executionContext) marshalOLogRecord2ᚕgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐLogRecordᚄ(ctx context.Context, sel ast.SelectionSet, v []model.LogRecord) graphql.Marshaler { +func (ec *executionContext) marshalOLogRecord2ᚕgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐLogRecordᚄ(ctx context.Context, sel ast.SelectionSet, v []model.LogRecord) graphql.Marshaler { if v == nil { return graphql.Null } @@ -26083,7 +27553,7 @@ func (ec *executionContext) marshalOLogRecord2ᚕgithubᚗcomᚋkubetailᚑorg if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNLogRecord2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐLogRecord(ctx, sel, v[i]) + ret[i] = ec.marshalNLogRecord2githubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐLogRecord(ctx, sel, v[i]) } if isLen1 { f(i) @@ -26103,7 +27573,7 @@ func (ec *executionContext) marshalOLogRecord2ᚕgithubᚗcomᚋkubetailᚑorg return ret } -func (ec *executionContext) marshalOLogRecord2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐLogRecord(ctx context.Context, sel ast.SelectionSet, v *model.LogRecord) graphql.Marshaler { +func (ec *executionContext) marshalOLogRecord2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐLogRecord(ctx context.Context, sel ast.SelectionSet, v *model.LogRecord) graphql.Marshaler { if v == nil { return graphql.Null } @@ -26160,7 +27630,7 @@ func (ec *executionContext) marshalOMetaV1Time2ᚖk8sᚗioᚋapimachineryᚋpkg return res } -func (ec *executionContext) marshalOPodLogQueryResponse2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋbackendᚋserverᚋgraphᚋmodelᚐPodLogQueryResponse(ctx context.Context, sel ast.SelectionSet, v *model.PodLogQueryResponse) graphql.Marshaler { +func (ec *executionContext) marshalOPodLogQueryResponse2ᚖgithubᚗcomᚋkubetailᚑorgᚋkubetailᚋmodulesᚋserverᚋgraphᚋmodelᚐPodLogQueryResponse(ctx context.Context, sel ast.SelectionSet, v *model.PodLogQueryResponse) graphql.Marshaler { if v == nil { return graphql.Null } diff --git a/backend/server/graph/handler.go b/modules/server/graph/handler.go similarity index 100% rename from backend/server/graph/handler.go rename to modules/server/graph/handler.go diff --git a/backend/server/graph/helpers.go b/modules/server/graph/helpers.go similarity index 99% rename from backend/server/graph/helpers.go rename to modules/server/graph/helpers.go index 12a2d74a..a77b1900 100644 --- a/backend/server/graph/helpers.go +++ b/modules/server/graph/helpers.go @@ -43,7 +43,7 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/utils/ptr" - "github.com/kubetail-org/kubetail/backend/server/graph/model" + "github.com/kubetail-org/kubetail/modules/server/graph/model" ) type Key int diff --git a/backend/server/graph/helpers_test.go b/modules/server/graph/helpers_test.go similarity index 100% rename from backend/server/graph/helpers_test.go rename to modules/server/graph/helpers_test.go diff --git a/backend/server/graph/lib/errors.go b/modules/server/graph/lib/errors.go similarity index 100% rename from backend/server/graph/lib/errors.go rename to modules/server/graph/lib/errors.go diff --git a/backend/server/graph/model/models_custom.go b/modules/server/graph/model/models_custom.go similarity index 97% rename from backend/server/graph/model/models_custom.go rename to modules/server/graph/model/models_custom.go index 649b7864..df554c59 100644 --- a/backend/server/graph/model/models_custom.go +++ b/modules/server/graph/model/models_custom.go @@ -25,7 +25,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/kubetail-org/kubetail/backend/server/graph/lib" + "github.com/kubetail-org/kubetail/modules/server/graph/lib" ) type List interface{} diff --git a/backend/server/graph/model/models_gen.go b/modules/server/graph/model/models_gen.go similarity index 100% rename from backend/server/graph/model/models_gen.go rename to modules/server/graph/model/models_gen.go diff --git a/backend/server/graph/resolver.go b/modules/server/graph/resolver.go similarity index 100% rename from backend/server/graph/resolver.go rename to modules/server/graph/resolver.go diff --git a/backend/server/graph/resolver_test.go b/modules/server/graph/resolver_test.go similarity index 100% rename from backend/server/graph/resolver_test.go rename to modules/server/graph/resolver_test.go diff --git a/backend/server/graph/schema.graphqls b/modules/server/graph/schema.graphqls similarity index 100% rename from backend/server/graph/schema.graphqls rename to modules/server/graph/schema.graphqls diff --git a/backend/server/graph/schema.resolvers.go b/modules/server/graph/schema.resolvers.go similarity index 99% rename from backend/server/graph/schema.resolvers.go rename to modules/server/graph/schema.resolvers.go index 073db2f2..6678cca7 100644 --- a/backend/server/graph/schema.resolvers.go +++ b/modules/server/graph/schema.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.46 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "bufio" @@ -14,6 +14,8 @@ import ( "sync" "github.com/99designs/gqlgen/graphql/handler/transport" + "github.com/kubetail-org/kubetail/modules/common/agentpb" + "github.com/kubetail-org/kubetail/modules/server/graph/model" zlog "github.com/rs/zerolog/log" "github.com/vektah/gqlparser/v2/gqlerror" "google.golang.org/grpc" @@ -25,9 +27,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" - - "github.com/kubetail-org/kubetail/backend/common/agentpb" - "github.com/kubetail-org/kubetail/backend/server/graph/model" ) // Object is the resolver for the object field. diff --git a/backend/server/graph/schema.resolvers_test.go b/modules/server/graph/schema.resolvers_test.go similarity index 100% rename from backend/server/graph/schema.resolvers_test.go rename to modules/server/graph/schema.resolvers_test.go diff --git a/backend/server/graph_test/query_resolver_test.go b/modules/server/graph_test/query_resolver_test.go similarity index 100% rename from backend/server/graph_test/query_resolver_test.go rename to modules/server/graph_test/query_resolver_test.go diff --git a/backend/server/graph_test/subscription_resolver_test.go b/modules/server/graph_test/subscription_resolver_test.go similarity index 100% rename from backend/server/graph_test/subscription_resolver_test.go rename to modules/server/graph_test/subscription_resolver_test.go diff --git a/backend/server/graph_test/testutils_test.go b/modules/server/graph_test/testutils_test.go similarity index 99% rename from backend/server/graph_test/testutils_test.go rename to modules/server/graph_test/testutils_test.go index ab1a06ae..584ae7c6 100644 --- a/backend/server/graph_test/testutils_test.go +++ b/modules/server/graph_test/testutils_test.go @@ -42,7 +42,7 @@ import ( dynamicFake "k8s.io/client-go/dynamic/fake" "k8s.io/client-go/kubernetes/fake" - "github.com/kubetail-org/kubetail/backend/server/graph" + "github.com/kubetail-org/kubetail/modules/server/graph" ) func init() { diff --git a/backend/server/internal/formerrors/formerrors.go b/modules/server/internal/formerrors/formerrors.go similarity index 100% rename from backend/server/internal/formerrors/formerrors.go rename to modules/server/internal/formerrors/formerrors.go diff --git a/backend/server/internal/k8shelpers/interface.go b/modules/server/internal/k8shelpers/interface.go similarity index 100% rename from backend/server/internal/k8shelpers/interface.go rename to modules/server/internal/k8shelpers/interface.go diff --git a/backend/server/internal/k8shelpers/k8shelpers.go b/modules/server/internal/k8shelpers/k8shelpers.go similarity index 100% rename from backend/server/internal/k8shelpers/k8shelpers.go rename to modules/server/internal/k8shelpers/k8shelpers.go diff --git a/backend/server/internal/k8shelpers/mock/service.go b/modules/server/internal/k8shelpers/mock/service.go similarity index 100% rename from backend/server/internal/k8shelpers/mock/service.go rename to modules/server/internal/k8shelpers/mock/service.go diff --git a/backend/server/pkg/ginapp/auth.go b/modules/server/pkg/ginapp/auth.go similarity index 95% rename from backend/server/pkg/ginapp/auth.go rename to modules/server/pkg/ginapp/auth.go index 9d591677..ffa3b56f 100644 --- a/backend/server/pkg/ginapp/auth.go +++ b/modules/server/pkg/ginapp/auth.go @@ -21,8 +21,8 @@ import ( "github.com/gin-contrib/sessions" "github.com/gin-gonic/gin" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/server/internal/formerrors" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/server/internal/formerrors" ) type LoginForm struct { diff --git a/backend/server/pkg/ginapp/auth_test.go b/modules/server/pkg/ginapp/auth_test.go similarity index 97% rename from backend/server/pkg/ginapp/auth_test.go rename to modules/server/pkg/ginapp/auth_test.go index 9adbde94..1b60e2a2 100644 --- a/backend/server/pkg/ginapp/auth_test.go +++ b/modules/server/pkg/ginapp/auth_test.go @@ -27,8 +27,8 @@ import ( "github.com/stretchr/testify/suite" "k8s.io/utils/pointer" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/server/internal/k8shelpers/mock" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/server/internal/k8shelpers/mock" ) type AuthTestSuite struct { diff --git a/backend/server/pkg/ginapp/ginapp.go b/modules/server/pkg/ginapp/ginapp.go similarity index 97% rename from backend/server/pkg/ginapp/ginapp.go rename to modules/server/pkg/ginapp/ginapp.go index 64cb4f7c..ba53b03e 100644 --- a/backend/server/pkg/ginapp/ginapp.go +++ b/modules/server/pkg/ginapp/ginapp.go @@ -31,9 +31,9 @@ import ( grpcdispatcher "github.com/kubetail-org/grpc-dispatcher-go" "k8s.io/client-go/rest" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/server" - "github.com/kubetail-org/kubetail/backend/server/internal/k8shelpers" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/server" + "github.com/kubetail-org/kubetail/modules/server/internal/k8shelpers" ) type GinApp struct { diff --git a/backend/server/pkg/ginapp/ginapp_test.go b/modules/server/pkg/ginapp/ginapp_test.go similarity index 98% rename from backend/server/pkg/ginapp/ginapp_test.go rename to modules/server/pkg/ginapp/ginapp_test.go index 51a83b48..aed0b716 100644 --- a/backend/server/pkg/ginapp/ginapp_test.go +++ b/modules/server/pkg/ginapp/ginapp_test.go @@ -27,8 +27,8 @@ import ( "github.com/gorilla/csrf" "github.com/stretchr/testify/assert" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/server/graph" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/server/graph" ) func TestRequestID(t *testing.T) { diff --git a/backend/server/pkg/ginapp/graphql.go b/modules/server/pkg/ginapp/graphql.go similarity index 98% rename from backend/server/pkg/ginapp/graphql.go rename to modules/server/pkg/ginapp/graphql.go index d34b68d4..6c528f55 100644 --- a/backend/server/pkg/ginapp/graphql.go +++ b/modules/server/pkg/ginapp/graphql.go @@ -26,7 +26,7 @@ import ( "k8s.io/client-go/rest" grpcdispatcher "github.com/kubetail-org/grpc-dispatcher-go" - "github.com/kubetail-org/kubetail/backend/server/graph" + "github.com/kubetail-org/kubetail/modules/server/graph" ) type key int diff --git a/backend/server/pkg/ginapp/graphql_test.go b/modules/server/pkg/ginapp/graphql_test.go similarity index 98% rename from backend/server/pkg/ginapp/graphql_test.go rename to modules/server/pkg/ginapp/graphql_test.go index b25ec142..cc873fa1 100644 --- a/backend/server/pkg/ginapp/graphql_test.go +++ b/modules/server/pkg/ginapp/graphql_test.go @@ -24,7 +24,7 @@ import ( "github.com/gorilla/websocket" "github.com/stretchr/testify/suite" - "github.com/kubetail-org/kubetail/backend/common/config" + "github.com/kubetail-org/kubetail/modules/common/config" ) type GraphQLTestSuite struct { diff --git a/backend/server/pkg/ginapp/helpers.go b/modules/server/pkg/ginapp/helpers.go similarity index 93% rename from backend/server/pkg/ginapp/helpers.go rename to modules/server/pkg/ginapp/helpers.go index 9a59752e..650f99e5 100644 --- a/backend/server/pkg/ginapp/helpers.go +++ b/modules/server/pkg/ginapp/helpers.go @@ -25,9 +25,9 @@ import ( "google.golang.org/grpc/credentials/insecure" "k8s.io/client-go/rest" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/common/grpchelpers" - "github.com/kubetail-org/kubetail/backend/server/internal/k8shelpers" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/common/grpchelpers" + "github.com/kubetail-org/kubetail/modules/server/internal/k8shelpers" ) const k8sTokenSessionKey = "k8sToken" diff --git a/backend/server/pkg/ginapp/middleware.go b/modules/server/pkg/ginapp/middleware.go similarity index 95% rename from backend/server/pkg/ginapp/middleware.go rename to modules/server/pkg/ginapp/middleware.go index 9108aa1c..0841595f 100644 --- a/backend/server/pkg/ginapp/middleware.go +++ b/modules/server/pkg/ginapp/middleware.go @@ -25,9 +25,9 @@ import ( "github.com/gin-gonic/gin" "github.com/rs/zerolog/log" - "github.com/kubetail-org/kubetail/backend/common/config" - "github.com/kubetail-org/kubetail/backend/common/grpchelpers" - "github.com/kubetail-org/kubetail/backend/server/graph" + "github.com/kubetail-org/kubetail/modules/common/config" + "github.com/kubetail-org/kubetail/modules/common/grpchelpers" + "github.com/kubetail-org/kubetail/modules/server/graph" ) // Add user to context if authenticated diff --git a/backend/server/pkg/ginapp/middleware_test.go b/modules/server/pkg/ginapp/middleware_test.go similarity index 98% rename from backend/server/pkg/ginapp/middleware_test.go rename to modules/server/pkg/ginapp/middleware_test.go index 051fb8a3..6b28ed0b 100644 --- a/backend/server/pkg/ginapp/middleware_test.go +++ b/modules/server/pkg/ginapp/middleware_test.go @@ -24,7 +24,7 @@ import ( "github.com/gin-gonic/gin" "github.com/stretchr/testify/assert" - "github.com/kubetail-org/kubetail/backend/common/config" + "github.com/kubetail-org/kubetail/modules/common/config" ) func TestAuthenticationMiddleware(t *testing.T) { diff --git a/backend/server/pkg/ginapp/testutils_test.go b/modules/server/pkg/ginapp/testutils_test.go similarity index 99% rename from backend/server/pkg/ginapp/testutils_test.go rename to modules/server/pkg/ginapp/testutils_test.go index feacb56c..7a24050a 100644 --- a/backend/server/pkg/ginapp/testutils_test.go +++ b/modules/server/pkg/ginapp/testutils_test.go @@ -28,7 +28,7 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/kubetail-org/kubetail/backend/common/config" + "github.com/kubetail-org/kubetail/modules/common/config" "github.com/stretchr/testify/suite" ) diff --git a/backend/server/pkg/ginapp/website.go b/modules/server/pkg/ginapp/website.go similarity index 97% rename from backend/server/pkg/ginapp/website.go rename to modules/server/pkg/ginapp/website.go index 51de31dc..f9b7eb0d 100644 --- a/backend/server/pkg/ginapp/website.go +++ b/modules/server/pkg/ginapp/website.go @@ -24,7 +24,7 @@ import ( "github.com/gin-gonic/gin" zlog "github.com/rs/zerolog/log" - "github.com/kubetail-org/kubetail/backend/common/config" + "github.com/kubetail-org/kubetail/modules/common/config" ) type WebsiteHandlers struct { diff --git a/backend/server/pkg/ginapp/website_test.go b/modules/server/pkg/ginapp/website_test.go similarity index 100% rename from backend/server/pkg/ginapp/website_test.go rename to modules/server/pkg/ginapp/website_test.go diff --git a/backend/server/templates/index.tmpl b/modules/server/templates/index.tmpl similarity index 100% rename from backend/server/templates/index.tmpl rename to modules/server/templates/index.tmpl diff --git a/backend/server/tools.go b/modules/server/tools.go similarity index 100% rename from backend/server/tools.go rename to modules/server/tools.go diff --git a/backend/server/website/.gitkeep b/modules/server/website/.gitkeep similarity index 100% rename from backend/server/website/.gitkeep rename to modules/server/website/.gitkeep