From 315890a47877a970c75b184afb040951cb91f93c Mon Sep 17 00:00:00 2001 From: nxtcoder36 Date: Tue, 3 Sep 2024 12:57:50 +0530 Subject: [PATCH 1/4] image registry webhook api for image creation and console graphql queries exposed for getting, deleting an image and list of images --- .../__http__/console/environments.graphql.yml | 4 +- .../console/registry-image.graphql.yml | 69 + apps/console/Taskfile.yml | 3 +- apps/console/internal/app/app.go | 32 + apps/console/internal/app/gqlgen.yml | 4 + .../app/graph/environment.resolvers.go | 9 +- .../internal/app/graph/generated/generated.go | 5434 +++++++++++++---- .../internal/app/graph/model/models_gen.go | 43 + .../app/graph/registryimage.resolvers.go | 34 + .../internal/app/graph/resolver-utils.go | 1 + .../internal/app/graph/schema.graphqls | 11 + .../internal/app/graph/schema.resolvers.go | 45 + .../struct-to-graphql/registryimage.graphqls | 30 + .../registryimagecredentials.graphqls | 27 + .../internal/app/process-resource-updates.go | 5 +- apps/console/internal/app/webhook-consumer.go | 52 + apps/console/internal/domain/api.go | 6 + apps/console/internal/domain/domain.go | 4 + .../console/internal/domain/registry-image.go | 144 + .../field-constants/generated_constants.go | 7 + .../internal/entities/registry-image.go | 32 + apps/console/internal/env/env.go | 2 + apps/iam/internal/app/action-role-binding.go | 3 + apps/iam/types/types.go | 3 + apps/webhook/Taskfile.yml | 4 +- apps/webhook/internal/app/app.go | 2 + apps/webhook/internal/app/image-hook.go | 124 + apps/webhook/internal/env/env.go | 2 + common/kafka-topic-name.go | 18 + .../container-registry.pb.go | 4 +- .../container-registry_grpc.pb.go | 2 +- grpc-interfaces/infra/infra.pb.go | 4 +- grpc-interfaces/infra/infra_grpc.pb.go | 2 +- .../kloudlite.io/rpc/accounts/accounts.pb.go | 4 +- .../rpc/accounts/accounts_grpc.pb.go | 2 +- .../kloudlite.io/rpc/agent/kubeagent.pb.go | 4 +- .../rpc/agent/kubeagent_grpc.pb.go | 2 +- .../kloudlite.io/rpc/auth/auth.pb.go | 4 +- .../kloudlite.io/rpc/auth/auth_grpc.pb.go | 2 +- grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go | 4 +- .../kloudlite.io/rpc/ci/ci_grpc.pb.go | 2 +- .../kloudlite.io/rpc/comms/comms.pb.go | 4 +- .../kloudlite.io/rpc/comms/comms_grpc.pb.go | 2 +- .../kloudlite.io/rpc/console/console.pb.go | 4 +- .../rpc/console/console_grpc.pb.go | 2 +- .../kloudlite.io/rpc/dns/dns.pb.go | 4 +- .../kloudlite.io/rpc/dns/dns_grpc.pb.go | 2 +- .../rpc/finance/finance-infra.pb.go | 4 +- .../rpc/finance/finance-infra_grpc.pb.go | 2 +- .../kloudlite.io/rpc/finance/finance.pb.go | 4 +- .../rpc/finance/finance_grpc.pb.go | 2 +- .../kloudlite.io/rpc/iam/iam.pb.go | 4 +- .../kloudlite.io/rpc/iam/iam_grpc.pb.go | 2 +- .../kloudlite.io/rpc/jseval/jseval.pb.go | 4 +- .../kloudlite.io/rpc/jseval/jseval_grpc.pb.go | 2 +- .../message-office-internal.pb.go | 4 +- .../message-office-internal_grpc.pb.go | 2 +- 57 files changed, 4860 insertions(+), 1378 deletions(-) create mode 100644 .tools/nvim/__http__/console/registry-image.graphql.yml create mode 100644 apps/console/internal/app/graph/registryimage.resolvers.go create mode 100644 apps/console/internal/app/graph/struct-to-graphql/registryimage.graphqls create mode 100644 apps/console/internal/app/graph/struct-to-graphql/registryimagecredentials.graphqls create mode 100644 apps/console/internal/app/webhook-consumer.go create mode 100644 apps/console/internal/domain/registry-image.go create mode 100644 apps/console/internal/entities/registry-image.go create mode 100644 apps/webhook/internal/app/image-hook.go diff --git a/.tools/nvim/__http__/console/environments.graphql.yml b/.tools/nvim/__http__/console/environments.graphql.yml index 22d3b3828..f59b734f7 100644 --- a/.tools/nvim/__http__/console/environments.graphql.yml +++ b/.tools/nvim/__http__/console/environments.graphql.yml @@ -7,7 +7,7 @@ global: label: List Environments query: |+ #graphql query Core_listEnvironments { - core_listEnvironments() { + core_listEnvironments { edges { cursor node { @@ -46,7 +46,7 @@ query: |+ #graphql pageInfo { endCursor hasNextPage - hasPreviousPage + hasPrevPage startCursor } totalCount diff --git a/.tools/nvim/__http__/console/registry-image.graphql.yml b/.tools/nvim/__http__/console/registry-image.graphql.yml new file mode 100644 index 000000000..88f206b7c --- /dev/null +++ b/.tools/nvim/__http__/console/registry-image.graphql.yml @@ -0,0 +1,69 @@ +--- +global: + image: "test-image:t1.0.0" +--- + +label: List Registry Images +query: |+ #graphql + query Core_listRegistryImages { + core_listRegistryImages { + edges { + cursor + node { + id + accountName + imageName + imageTag + meta + } + } + pageInfo { + endCursor + hasNextPage + hasPrevPage + startCursor + } + totalCount + } + } + +--- + +label: Get Registry Image +query: |+ + query Core_getRegistryImage($image: String!) { + core_getRegistryImage(image: $image) { + accountName + imageName + imageTag + meta + } + } +variables: + image: "{{.image}}" + +--- + +label: Delete Registry Image +query: |+ + mutation Core_deleteRegistryImage($image: String!) { + core_deleteRegistryImage(image: $image) + } +variables: + image: "{{.image}}" + +--- + +label: Get Registry Image URL +query: |+ + query Core_getRegistryImageURL($image: String!, $meta: Map!) { + core_getRegistryImageURL(image: $image, meta: $meta) + } +variables: + image: "{{.image}}" + meta: + registry: "github" + repository: "kloudlite/kloudlite-console" + tag: "latest" + +--- diff --git a/apps/console/Taskfile.yml b/apps/console/Taskfile.yml index 8063005a2..36e6c93fe 100644 --- a/apps/console/Taskfile.yml +++ b/apps/console/Taskfile.yml @@ -36,12 +36,13 @@ tasks: --struct github.com/kloudlite/api/apps/console/internal/entities.ClusterManagedService --struct github.com/kloudlite/api/apps/console/internal/entities.ImportedManagedResource --struct github.com/kloudlite/api/apps/console/internal/entities.ImagePullSecret + --struct github.com/kloudlite/api/apps/console/internal/entities.RegistryImage --struct github.com/kloudlite/api/pkg/repos.MatchFilter --struct github.com/kloudlite/api/pkg/repos.CursorPagination > ./internal/app/_struct-to-graphql/main.go - |+ pushd ./internal/app/_struct-to-graphql - go run main.go --dev --out-dir ../graph/struct-to-graphql --with-pagination Environment,App,ExternalApp,Secret,Config,Router,ManagedResource,ImportedManagedResource,ImagePullSecret,ClusterManagedService + go run main.go --dev --out-dir ../graph/struct-to-graphql --with-pagination Environment,App,ExternalApp,Secret,Config,Router,ManagedResource,ImportedManagedResource,ImagePullSecret,ClusterManagedService,RegistryImage popd - rm -rf ./internal/app/_struct-to-graphql diff --git a/apps/console/internal/app/app.go b/apps/console/internal/app/app.go index 9bf9d2fe4..4b1f846e4 100644 --- a/apps/console/internal/app/app.go +++ b/apps/console/internal/app/app.go @@ -73,6 +73,7 @@ var Module = fx.Module("app", repos.NewFxMongoRepo[*entities.ResourceMapping]("resource_mappings", "rmap", entities.ResourceMappingIndices), repos.NewFxMongoRepo[*entities.ServiceBinding]("service_bindings", "svcb", entities.ServiceBindingIndexes), repos.NewFxMongoRepo[*entities.ClusterManagedService]("cluster_managed_services", "cmsvc", entities.ClusterManagedServiceIndices), + repos.NewFxMongoRepo[*entities.RegistryImage]("registry_images", "reg_img", entities.RegistryImageIndexes), fx.Provide( func(conn IAMGrpcClient) iam.IAMClient { @@ -190,6 +191,37 @@ var Module = fx.Module("app", }) }), + fx.Provide(func(jc *nats.JetstreamClient, ev *env.Env, logger logging.Logger) (WebhookConsumer, error) { + topic := string(common.RegistryHookTopicName) + consumerName := "console:webhook" + return msg_nats.NewJetstreamConsumer(context.TODO(), jc, msg_nats.JetstreamConsumerArgs{ + Stream: ev.EventsNatsStream, + ConsumerConfig: msg_nats.ConsumerConfig{ + Name: consumerName, + Durable: consumerName, + Description: "this consumer reads message from a subject dedicated to console registry webhooks", + FilterSubjects: []string{topic}, + }, + }) + }), + + fx.Invoke(func(lf fx.Lifecycle, consumer WebhookConsumer, d domain.Domain, logger logging.Logger) { + lf.Append(fx.Hook{ + OnStart: func(context.Context) error { + go func() { + err := processWebhooks(consumer, d, logger) + if err != nil { + logger.Errorf(err, "could not process webhooks") + } + }() + return nil + }, + OnStop: func(ctx context.Context) error { + return consumer.Stop(ctx) + }, + }) + }), + fx.Provide(func(jc *nats.JetstreamClient, ev *env.Env, logger logging.Logger) (ResourceUpdateConsumer, error) { topic := common.ReceiveFromAgentSubjectName(common.ReceiveFromAgentArgs{AccountName: "*", ClusterName: "*"}, common.ConsoleReceiver, common.EventResourceUpdate) diff --git a/apps/console/internal/app/gqlgen.yml b/apps/console/internal/app/gqlgen.yml index d74bd8bef..cec924e7b 100644 --- a/apps/console/internal/app/gqlgen.yml +++ b/apps/console/internal/app/gqlgen.yml @@ -80,6 +80,10 @@ models: model: github.com/kloudlite/api/apps/console/internal/entities.Environment EnvironmentIn: *environment-model + RegistryImage: ®istry-image-model + model: github.com/kloudlite/api/apps/console/internal/entities.RegistryImage + RegistryImageIn: *registry-image-model + Secret: &secret-model model: github.com/kloudlite/api/apps/console/internal/entities.Secret SecretIn: *secret-model diff --git a/apps/console/internal/app/graph/environment.resolvers.go b/apps/console/internal/app/graph/environment.resolvers.go index 56fb103eb..87b483980 100644 --- a/apps/console/internal/app/graph/environment.resolvers.go +++ b/apps/console/internal/app/graph/environment.resolvers.go @@ -6,9 +6,8 @@ package graph import ( "context" - "time" - "github.com/kloudlite/api/pkg/errors" + "time" "github.com/kloudlite/api/apps/console/internal/app/graph/generated" "github.com/kloudlite/api/apps/console/internal/app/graph/model" @@ -75,7 +74,5 @@ func (r *Resolver) Environment() generated.EnvironmentResolver { return &environ // EnvironmentIn returns generated.EnvironmentInResolver implementation. func (r *Resolver) EnvironmentIn() generated.EnvironmentInResolver { return &environmentInResolver{r} } -type ( - environmentResolver struct{ *Resolver } - environmentInResolver struct{ *Resolver } -) +type environmentResolver struct{ *Resolver } +type environmentInResolver struct{ *Resolver } diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 90af2eebd..530a7af9a 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -65,6 +65,7 @@ type ResolverRoot interface { Metadata() MetadataResolver Mutation() MutationResolver Query() QueryResolver + RegistryImage() RegistryImageResolver Router() RouterResolver Secret() SecretResolver AppIn() AppInResolver @@ -753,6 +754,7 @@ type ComplexityRoot struct { CoreDeleteImagePullSecret func(childComplexity int, name string) int CoreDeleteImportedManagedResource func(childComplexity int, envName string, importName string) int CoreDeleteManagedResource func(childComplexity int, msvcName string, mresName string) int + CoreDeleteRegistryImage func(childComplexity int, image string) int CoreDeleteRouter func(childComplexity int, envName string, routerName string) int CoreDeleteSecret func(childComplexity int, envName string, secretName string) int CoreImportManagedResource func(childComplexity int, envName string, msvcName string, mresName string, importName string) int @@ -796,6 +798,8 @@ type ComplexityRoot struct { CoreGetManagedResouceOutputKeyValues func(childComplexity int, msvcName *string, envName *string, keyrefs []*domain.ManagedResourceKeyRef) int CoreGetManagedResouceOutputKeys func(childComplexity int, msvcName *string, envName *string, name string) int CoreGetManagedResource func(childComplexity int, msvcName *string, envName *string, name string) int + CoreGetRegistryImage func(childComplexity int, image string) int + CoreGetRegistryImageURL func(childComplexity int, image string, meta map[string]interface{}) int CoreGetRouter func(childComplexity int, envName string, name string) int CoreGetSecret func(childComplexity int, envName string, name string) int CoreGetSecretValues func(childComplexity int, envName string, queries []*domain.SecretKeyRef) int @@ -806,6 +810,7 @@ type ComplexityRoot struct { CoreListImagePullSecrets func(childComplexity int, search *model.SearchImagePullSecrets, pq *repos.CursorPagination) int CoreListImportedManagedResources func(childComplexity int, envName string, search *model.SearchImportedManagedResources, pq *repos.CursorPagination) int CoreListManagedResources func(childComplexity int, search *model.SearchManagedResources, pq *repos.CursorPagination) int + CoreListRegistryImages func(childComplexity int, pq *repos.CursorPagination) int CoreListRouters func(childComplexity int, envName string, search *model.SearchRouters, pq *repos.CursorPagination) int CoreListSecrets func(childComplexity int, envName string, search *model.SearchSecrets, pq *repos.CursorPagination) int CoreRestartApp func(childComplexity int, envName string, appName string) int @@ -823,6 +828,51 @@ type ComplexityRoot struct { __resolve_entities func(childComplexity int, representations []map[string]interface{}) int } + RegistryImage struct { + AccountName func(childComplexity int) int + CreationTime func(childComplexity int) int + Id func(childComplexity int) int + ImageName func(childComplexity int) int + ImageTag func(childComplexity int) int + MarkedForDeletion func(childComplexity int) int + Meta func(childComplexity int) int + RecordVersion func(childComplexity int) int + UpdateTime func(childComplexity int) int + } + + RegistryImageCredentials struct { + AccountName func(childComplexity int) int + CreatedBy func(childComplexity int) int + CreationTime func(childComplexity int) int + ID func(childComplexity int) int + MarkedForDeletion func(childComplexity int) int + Password func(childComplexity int) int + RecordVersion func(childComplexity int) int + UpdateTime func(childComplexity int) int + } + + RegistryImageCredentialsEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + RegistryImageCredentialsPaginatedRecords struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + TotalCount func(childComplexity int) int + } + + RegistryImageEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + RegistryImagePaginatedRecords struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + TotalCount func(childComplexity int) int + } + Router struct { APIVersion func(childComplexity int) int AccountName func(childComplexity int) int @@ -1008,6 +1058,7 @@ type MutationResolver interface { CoreCreateImagePullSecret(ctx context.Context, pullSecret entities.ImagePullSecret) (*entities.ImagePullSecret, error) CoreUpdateImagePullSecret(ctx context.Context, pullSecret entities.ImagePullSecret) (*entities.ImagePullSecret, error) CoreDeleteImagePullSecret(ctx context.Context, name string) (bool, error) + CoreDeleteRegistryImage(ctx context.Context, image string) (bool, error) CoreCreateApp(ctx context.Context, envName string, app entities.App) (*entities.App, error) CoreUpdateApp(ctx context.Context, envName string, app entities.App) (*entities.App, error) CoreDeleteApp(ctx context.Context, envName string, appName string) (bool, error) @@ -1044,6 +1095,9 @@ type QueryResolver interface { CoreListImagePullSecrets(ctx context.Context, search *model.SearchImagePullSecrets, pq *repos.CursorPagination) (*model.ImagePullSecretPaginatedRecords, error) CoreGetImagePullSecret(ctx context.Context, name string) (*entities.ImagePullSecret, error) CoreResyncImagePullSecret(ctx context.Context, name string) (bool, error) + CoreGetRegistryImageURL(ctx context.Context, image string, meta map[string]interface{}) (string, error) + CoreGetRegistryImage(ctx context.Context, image string) (*entities.RegistryImage, error) + CoreListRegistryImages(ctx context.Context, pq *repos.CursorPagination) (*model.RegistryImagePaginatedRecords, error) CoreListApps(ctx context.Context, envName string, search *model.SearchApps, pq *repos.CursorPagination) (*model.AppPaginatedRecords, error) CoreGetApp(ctx context.Context, envName string, name string) (*entities.App, error) CoreResyncApp(ctx context.Context, envName string, name string) (bool, error) @@ -1071,6 +1125,11 @@ type QueryResolver interface { CoreResyncManagedResource(ctx context.Context, msvcName string, name string) (bool, error) CoreListImportedManagedResources(ctx context.Context, envName string, search *model.SearchImportedManagedResources, pq *repos.CursorPagination) (*model.ImportedManagedResourcePaginatedRecords, error) } +type RegistryImageResolver interface { + CreationTime(ctx context.Context, obj *entities.RegistryImage) (string, error) + + UpdateTime(ctx context.Context, obj *entities.RegistryImage) (string, error) +} type RouterResolver interface { CreationTime(ctx context.Context, obj *entities.Router) (string, error) @@ -4220,6 +4279,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CoreDeleteManagedResource(childComplexity, args["msvcName"].(string), args["mresName"].(string)), true + case "Mutation.core_deleteRegistryImage": + if e.complexity.Mutation.CoreDeleteRegistryImage == nil { + break + } + + args, err := ec.field_Mutation_core_deleteRegistryImage_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.CoreDeleteRegistryImage(childComplexity, args["image"].(string)), true + case "Mutation.core_deleteRouter": if e.complexity.Mutation.CoreDeleteRouter == nil { break @@ -4598,6 +4669,30 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.CoreGetManagedResource(childComplexity, args["msvcName"].(*string), args["envName"].(*string), args["name"].(string)), true + case "Query.core_getRegistryImage": + if e.complexity.Query.CoreGetRegistryImage == nil { + break + } + + args, err := ec.field_Query_core_getRegistryImage_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.CoreGetRegistryImage(childComplexity, args["image"].(string)), true + + case "Query.core_getRegistryImageURL": + if e.complexity.Query.CoreGetRegistryImageURL == nil { + break + } + + args, err := ec.field_Query_core_getRegistryImageURL_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.CoreGetRegistryImageURL(childComplexity, args["image"].(string), args["meta"].(map[string]interface{})), true + case "Query.core_getRouter": if e.complexity.Query.CoreGetRouter == nil { break @@ -4718,6 +4813,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.CoreListManagedResources(childComplexity, args["search"].(*model.SearchManagedResources), args["pq"].(*repos.CursorPagination)), true + case "Query.core_listRegistryImages": + if e.complexity.Query.CoreListRegistryImages == nil { + break + } + + args, err := ec.field_Query_core_listRegistryImages_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.CoreListRegistryImages(childComplexity, args["pq"].(*repos.CursorPagination)), true + case "Query.core_listRouters": if e.complexity.Query.CoreListRouters == nil { break @@ -4893,6 +5000,195 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.__resolve_entities(childComplexity, args["representations"].([]map[string]interface{})), true + case "RegistryImage.accountName": + if e.complexity.RegistryImage.AccountName == nil { + break + } + + return e.complexity.RegistryImage.AccountName(childComplexity), true + + case "RegistryImage.creationTime": + if e.complexity.RegistryImage.CreationTime == nil { + break + } + + return e.complexity.RegistryImage.CreationTime(childComplexity), true + + case "RegistryImage.id": + if e.complexity.RegistryImage.Id == nil { + break + } + + return e.complexity.RegistryImage.Id(childComplexity), true + + case "RegistryImage.imageName": + if e.complexity.RegistryImage.ImageName == nil { + break + } + + return e.complexity.RegistryImage.ImageName(childComplexity), true + + case "RegistryImage.imageTag": + if e.complexity.RegistryImage.ImageTag == nil { + break + } + + return e.complexity.RegistryImage.ImageTag(childComplexity), true + + case "RegistryImage.markedForDeletion": + if e.complexity.RegistryImage.MarkedForDeletion == nil { + break + } + + return e.complexity.RegistryImage.MarkedForDeletion(childComplexity), true + + case "RegistryImage.meta": + if e.complexity.RegistryImage.Meta == nil { + break + } + + return e.complexity.RegistryImage.Meta(childComplexity), true + + case "RegistryImage.recordVersion": + if e.complexity.RegistryImage.RecordVersion == nil { + break + } + + return e.complexity.RegistryImage.RecordVersion(childComplexity), true + + case "RegistryImage.updateTime": + if e.complexity.RegistryImage.UpdateTime == nil { + break + } + + return e.complexity.RegistryImage.UpdateTime(childComplexity), true + + case "RegistryImageCredentials.accountName": + if e.complexity.RegistryImageCredentials.AccountName == nil { + break + } + + return e.complexity.RegistryImageCredentials.AccountName(childComplexity), true + + case "RegistryImageCredentials.createdBy": + if e.complexity.RegistryImageCredentials.CreatedBy == nil { + break + } + + return e.complexity.RegistryImageCredentials.CreatedBy(childComplexity), true + + case "RegistryImageCredentials.creationTime": + if e.complexity.RegistryImageCredentials.CreationTime == nil { + break + } + + return e.complexity.RegistryImageCredentials.CreationTime(childComplexity), true + + case "RegistryImageCredentials.id": + if e.complexity.RegistryImageCredentials.ID == nil { + break + } + + return e.complexity.RegistryImageCredentials.ID(childComplexity), true + + case "RegistryImageCredentials.markedForDeletion": + if e.complexity.RegistryImageCredentials.MarkedForDeletion == nil { + break + } + + return e.complexity.RegistryImageCredentials.MarkedForDeletion(childComplexity), true + + case "RegistryImageCredentials.password": + if e.complexity.RegistryImageCredentials.Password == nil { + break + } + + return e.complexity.RegistryImageCredentials.Password(childComplexity), true + + case "RegistryImageCredentials.recordVersion": + if e.complexity.RegistryImageCredentials.RecordVersion == nil { + break + } + + return e.complexity.RegistryImageCredentials.RecordVersion(childComplexity), true + + case "RegistryImageCredentials.updateTime": + if e.complexity.RegistryImageCredentials.UpdateTime == nil { + break + } + + return e.complexity.RegistryImageCredentials.UpdateTime(childComplexity), true + + case "RegistryImageCredentialsEdge.cursor": + if e.complexity.RegistryImageCredentialsEdge.Cursor == nil { + break + } + + return e.complexity.RegistryImageCredentialsEdge.Cursor(childComplexity), true + + case "RegistryImageCredentialsEdge.node": + if e.complexity.RegistryImageCredentialsEdge.Node == nil { + break + } + + return e.complexity.RegistryImageCredentialsEdge.Node(childComplexity), true + + case "RegistryImageCredentialsPaginatedRecords.edges": + if e.complexity.RegistryImageCredentialsPaginatedRecords.Edges == nil { + break + } + + return e.complexity.RegistryImageCredentialsPaginatedRecords.Edges(childComplexity), true + + case "RegistryImageCredentialsPaginatedRecords.pageInfo": + if e.complexity.RegistryImageCredentialsPaginatedRecords.PageInfo == nil { + break + } + + return e.complexity.RegistryImageCredentialsPaginatedRecords.PageInfo(childComplexity), true + + case "RegistryImageCredentialsPaginatedRecords.totalCount": + if e.complexity.RegistryImageCredentialsPaginatedRecords.TotalCount == nil { + break + } + + return e.complexity.RegistryImageCredentialsPaginatedRecords.TotalCount(childComplexity), true + + case "RegistryImageEdge.cursor": + if e.complexity.RegistryImageEdge.Cursor == nil { + break + } + + return e.complexity.RegistryImageEdge.Cursor(childComplexity), true + + case "RegistryImageEdge.node": + if e.complexity.RegistryImageEdge.Node == nil { + break + } + + return e.complexity.RegistryImageEdge.Node(childComplexity), true + + case "RegistryImagePaginatedRecords.edges": + if e.complexity.RegistryImagePaginatedRecords.Edges == nil { + break + } + + return e.complexity.RegistryImagePaginatedRecords.Edges(childComplexity), true + + case "RegistryImagePaginatedRecords.pageInfo": + if e.complexity.RegistryImagePaginatedRecords.PageInfo == nil { + break + } + + return e.complexity.RegistryImagePaginatedRecords.PageInfo(childComplexity), true + + case "RegistryImagePaginatedRecords.totalCount": + if e.complexity.RegistryImagePaginatedRecords.TotalCount == nil { + break + } + + return e.complexity.RegistryImagePaginatedRecords.TotalCount(childComplexity), true + case "Router.apiVersion": if e.complexity.Router.APIVersion == nil { break @@ -5332,6 +5628,8 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputMatchFilterIn, ec.unmarshalInputMetadataIn, ec.unmarshalInputPortIn, + ec.unmarshalInputRegistryImageCredentialsIn, + ec.unmarshalInputRegistryImageIn, ec.unmarshalInputRouterIn, ec.unmarshalInputSearchApps, ec.unmarshalInputSearchClusterManagedService, @@ -5343,6 +5641,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputSearchManagedResources, ec.unmarshalInputSearchProjectManagedService, ec.unmarshalInputSearchProjects, + ec.unmarshalInputSearchRegistryImages, ec.unmarshalInputSearchRouters, ec.unmarshalInputSearchSecrets, ec.unmarshalInputSecretIn, @@ -5458,6 +5757,7 @@ enum ConsoleResType { managed_resource imported_managed_resource environment + registry_image vpn_device } @@ -5484,6 +5784,10 @@ input SearchEnvironments { markedForDeletion: MatchFilterIn } +input SearchRegistryImages { + text: MatchFilterIn +} + input SearchApps { text: MatchFilterIn isReady: MatchFilterIn @@ -5558,6 +5862,10 @@ type Query { core_getImagePullSecret(name: String!): ImagePullSecret @isLoggedInAndVerified @hasAccount core_resyncImagePullSecret(name: String!): Boolean! @isLoggedInAndVerified @hasAccount + core_getRegistryImageURL(image: String!, meta: Map!): String! @isLoggedInAndVerified @hasAccount + core_getRegistryImage(image: String!,): RegistryImage @isLoggedInAndVerified @hasAccount + core_listRegistryImages(pq: CursorPaginationIn): RegistryImagePaginatedRecords @isLoggedInAndVerified @hasAccount + core_listApps(envName: String!, search: SearchApps, pq: CursorPaginationIn): AppPaginatedRecords @isLoggedInAndVerified @hasAccount core_getApp(envName: String!, name: String!): App @isLoggedInAndVerified @hasAccount core_resyncApp(envName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount @@ -5604,6 +5912,8 @@ type Mutation { core_updateImagePullSecret(pullSecret: ImagePullSecretIn!): ImagePullSecret @isLoggedInAndVerified @hasAccount core_deleteImagePullSecret(name: String!): Boolean! @isLoggedInAndVerified @hasAccount + core_deleteRegistryImage(image: String!): Boolean! @isLoggedInAndVerified @hasAccount + core_createApp(envName: String!, app: AppIn!): App @isLoggedInAndVerified @hasAccount core_updateApp(envName: String!, app: AppIn!): App @isLoggedInAndVerified @hasAccount core_deleteApp(envName: String!, appName: String!): Boolean! @isLoggedInAndVerified @hasAccount @@ -6856,6 +7166,65 @@ input PortIn { targetPort: Int } +`, BuiltIn: false}, + {Name: "../struct-to-graphql/registryimage.graphqls", Input: `type RegistryImage @shareable { + accountName: String! + creationTime: Date! + id: ID! + imageName: String! + imageTag: String! + markedForDeletion: Boolean + meta: Map! + recordVersion: Int! + updateTime: Date! +} + +type RegistryImageEdge @shareable { + cursor: String! + node: RegistryImage! +} + +type RegistryImagePaginatedRecords @shareable { + edges: [RegistryImageEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input RegistryImageIn { + accountName: String! + imageName: String! + imageTag: String! + meta: Map! +} + +`, BuiltIn: false}, + {Name: "../struct-to-graphql/registryimagecredentials.graphqls", Input: `type RegistryImageCredentials @shareable { + accountName: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + id: ID! + markedForDeletion: Boolean + password: String! + recordVersion: Int! + updateTime: Date! +} + +type RegistryImageCredentialsEdge @shareable { + cursor: String! + node: RegistryImageCredentials! +} + +type RegistryImageCredentialsPaginatedRecords @shareable { + edges: [RegistryImageCredentialsEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input RegistryImageCredentialsIn { + accountName: String! + password: String! +} + `, BuiltIn: false}, {Name: "../struct-to-graphql/router.graphqls", Input: `type Router @shareable { accountName: String! @@ -7440,6 +7809,21 @@ func (ec *executionContext) field_Mutation_core_deleteManagedResource_args(ctx c return args, nil } +func (ec *executionContext) field_Mutation_core_deleteRegistryImage_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["image"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("image")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["image"] = arg0 + return args, nil +} + func (ec *executionContext) field_Mutation_core_deleteRouter_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -8214,6 +8598,45 @@ func (ec *executionContext) field_Query_core_getManagedResource_args(ctx context return args, nil } +func (ec *executionContext) field_Query_core_getRegistryImageURL_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["image"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("image")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["image"] = arg0 + var arg1 map[string]interface{} + if tmp, ok := rawArgs["meta"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("meta")) + arg1, err = ec.unmarshalNMap2map(ctx, tmp) + if err != nil { + return nil, err + } + } + args["meta"] = arg1 + return args, nil +} + +func (ec *executionContext) field_Query_core_getRegistryImage_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["image"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("image")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["image"] = arg0 + return args, nil +} + func (ec *executionContext) field_Query_core_getRouter_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -8490,6 +8913,21 @@ func (ec *executionContext) field_Query_core_listManagedResources_args(ctx conte return args, nil } +func (ec *executionContext) field_Query_core_listRegistryImages_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *repos.CursorPagination + if tmp, ok := rawArgs["pq"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + arg0, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pq"] = arg0 + return args, nil +} + func (ec *executionContext) field_Query_core_listRouters_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -28380,6 +28818,87 @@ func (ec *executionContext) fieldContext_Mutation_core_deleteImagePullSecret(ctx return fc, nil } +func (ec *executionContext) _Mutation_core_deleteRegistryImage(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_deleteRegistryImage(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().CoreDeleteRegistryImage(rctx, fc.Args["image"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_core_deleteRegistryImage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_core_deleteRegistryImage_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + func (ec *executionContext) _Mutation_core_createApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Mutation_core_createApp(ctx, field) if err != nil { @@ -32026,8 +32545,8 @@ func (ec *executionContext) fieldContext_Query_core_resyncImagePullSecret(ctx co return fc, nil } -func (ec *executionContext) _Query_core_listApps(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_listApps(ctx, field) +func (ec *executionContext) _Query_core_getRegistryImageURL(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getRegistryImageURL(ctx, field) if err != nil { return graphql.Null } @@ -32041,7 +32560,7 @@ func (ec *executionContext) _Query_core_listApps(ctx context.Context, field grap resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreListApps(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchApps), fc.Args["pq"].(*repos.CursorPagination)) + return ec.resolvers.Query().CoreGetRegistryImageURL(rctx, fc.Args["image"].(string), fc.Args["meta"].(map[string]interface{})) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -32063,39 +32582,34 @@ func (ec *executionContext) _Query_core_listApps(ctx context.Context, field grap if tmp == nil { return nil, nil } - if data, ok := tmp.(*model.AppPaginatedRecords); ok { + if data, ok := tmp.(string); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.AppPaginatedRecords`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*model.AppPaginatedRecords) + res := resTmp.(string) fc.Result = res - return ec.marshalOAppPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐAppPaginatedRecords(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_listApps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_getRegistryImageURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_AppPaginatedRecords_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_AppPaginatedRecords_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_AppPaginatedRecords_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AppPaginatedRecords", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } defer func() { @@ -32105,15 +32619,15 @@ func (ec *executionContext) fieldContext_Query_core_listApps(ctx context.Context } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_listApps_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_getRegistryImageURL_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_getApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_getApp(ctx, field) +func (ec *executionContext) _Query_core_getRegistryImage(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getRegistryImage(ctx, field) if err != nil { return graphql.Null } @@ -32127,7 +32641,7 @@ func (ec *executionContext) _Query_core_getApp(ctx context.Context, field graphq resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreGetApp(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreGetRegistryImage(rctx, fc.Args["image"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -32149,10 +32663,10 @@ func (ec *executionContext) _Query_core_getApp(ctx context.Context, field graphq if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.App); ok { + if data, ok := tmp.(*entities.RegistryImage); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.App`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.RegistryImage`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -32161,12 +32675,12 @@ func (ec *executionContext) _Query_core_getApp(ctx context.Context, field graphq if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.App) + res := resTmp.(*entities.RegistryImage) fc.Result = res - return ec.marshalOApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐApp(ctx, field.Selections, res) + return ec.marshalORegistryImage2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRegistryImage(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_getApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_getRegistryImage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -32175,47 +32689,25 @@ func (ec *executionContext) fieldContext_Query_core_getApp(ctx context.Context, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_App_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_App_apiVersion(ctx, field) - case "ciBuildId": - return ec.fieldContext_App_ciBuildId(ctx, field) - case "createdBy": - return ec.fieldContext_App_createdBy(ctx, field) + return ec.fieldContext_RegistryImage_accountName(ctx, field) case "creationTime": - return ec.fieldContext_App_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_App_displayName(ctx, field) - case "enabled": - return ec.fieldContext_App_enabled(ctx, field) - case "environmentName": - return ec.fieldContext_App_environmentName(ctx, field) + return ec.fieldContext_RegistryImage_creationTime(ctx, field) case "id": - return ec.fieldContext_App_id(ctx, field) - case "kind": - return ec.fieldContext_App_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_App_lastUpdatedBy(ctx, field) + return ec.fieldContext_RegistryImage_id(ctx, field) + case "imageName": + return ec.fieldContext_RegistryImage_imageName(ctx, field) + case "imageTag": + return ec.fieldContext_RegistryImage_imageTag(ctx, field) case "markedForDeletion": - return ec.fieldContext_App_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_App_metadata(ctx, field) + return ec.fieldContext_RegistryImage_markedForDeletion(ctx, field) + case "meta": + return ec.fieldContext_RegistryImage_meta(ctx, field) case "recordVersion": - return ec.fieldContext_App_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_App_spec(ctx, field) - case "status": - return ec.fieldContext_App_status(ctx, field) - case "syncStatus": - return ec.fieldContext_App_syncStatus(ctx, field) + return ec.fieldContext_RegistryImage_recordVersion(ctx, field) case "updateTime": - return ec.fieldContext_App_updateTime(ctx, field) - case "build": - return ec.fieldContext_App_build(ctx, field) - case "serviceHost": - return ec.fieldContext_App_serviceHost(ctx, field) + return ec.fieldContext_RegistryImage_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type App", field.Name) + return nil, fmt.Errorf("no field named %q was found under type RegistryImage", field.Name) }, } defer func() { @@ -32225,15 +32717,15 @@ func (ec *executionContext) fieldContext_Query_core_getApp(ctx context.Context, } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_getApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_getRegistryImage_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_resyncApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_resyncApp(ctx, field) +func (ec *executionContext) _Query_core_listRegistryImages(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_listRegistryImages(ctx, field) if err != nil { return graphql.Null } @@ -32247,7 +32739,7 @@ func (ec *executionContext) _Query_core_resyncApp(ctx context.Context, field gra resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreResyncApp(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreListRegistryImages(rctx, fc.Args["pq"].(*repos.CursorPagination)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -32269,115 +32761,39 @@ func (ec *executionContext) _Query_core_resyncApp(ctx context.Context, field gra if tmp == nil { return nil, nil } - if data, ok := tmp.(bool); ok { + if data, ok := tmp.(*model.RegistryImagePaginatedRecords); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.RegistryImagePaginatedRecords`, tmp) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*model.RegistryImagePaginatedRecords) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalORegistryImagePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImagePaginatedRecords(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_resyncApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_listRegistryImages(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_resyncApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _Query_core_restartApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_restartApp(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - directive0 := func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreRestartApp(rctx, fc.Args["envName"].(string), fc.Args["appName"].(string)) - } - directive1 := func(ctx context.Context) (interface{}, error) { - if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") - } - return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) - } - directive2 := func(ctx context.Context) (interface{}, error) { - if ec.directives.HasAccount == nil { - return nil, errors.New("directive hasAccount is not implemented") + switch field.Name { + case "edges": + return ec.fieldContext_RegistryImagePaginatedRecords_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_RegistryImagePaginatedRecords_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_RegistryImagePaginatedRecords_totalCount(ctx, field) } - return ec.directives.HasAccount(ctx, nil, directive1) - } - - tmp, err := directive2(rctx) - if err != nil { - return nil, graphql.ErrorOnPath(ctx, err) - } - if tmp == nil { - return nil, nil - } - if data, ok := tmp.(bool); ok { - return data, nil - } - return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Query_core_restartApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Query", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, fmt.Errorf("no field named %q was found under type RegistryImagePaginatedRecords", field.Name) }, } defer func() { @@ -32387,15 +32803,15 @@ func (ec *executionContext) fieldContext_Query_core_restartApp(ctx context.Conte } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_restartApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_listRegistryImages_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_listExternalApps(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_listExternalApps(ctx, field) +func (ec *executionContext) _Query_core_listApps(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_listApps(ctx, field) if err != nil { return graphql.Null } @@ -32409,7 +32825,7 @@ func (ec *executionContext) _Query_core_listExternalApps(ctx context.Context, fi resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreListExternalApps(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchExternalApps), fc.Args["pq"].(*repos.CursorPagination)) + return ec.resolvers.Query().CoreListApps(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchApps), fc.Args["pq"].(*repos.CursorPagination)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -32431,10 +32847,10 @@ func (ec *executionContext) _Query_core_listExternalApps(ctx context.Context, fi if tmp == nil { return nil, nil } - if data, ok := tmp.(*model.ExternalAppPaginatedRecords); ok { + if data, ok := tmp.(*model.AppPaginatedRecords); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.ExternalAppPaginatedRecords`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.AppPaginatedRecords`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -32443,12 +32859,12 @@ func (ec *executionContext) _Query_core_listExternalApps(ctx context.Context, fi if resTmp == nil { return graphql.Null } - res := resTmp.(*model.ExternalAppPaginatedRecords) + res := resTmp.(*model.AppPaginatedRecords) fc.Result = res - return ec.marshalOExternalAppPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐExternalAppPaginatedRecords(ctx, field.Selections, res) + return ec.marshalOAppPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐAppPaginatedRecords(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_listExternalApps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_listApps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -32457,13 +32873,13 @@ func (ec *executionContext) fieldContext_Query_core_listExternalApps(ctx context Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "edges": - return ec.fieldContext_ExternalAppPaginatedRecords_edges(ctx, field) + return ec.fieldContext_AppPaginatedRecords_edges(ctx, field) case "pageInfo": - return ec.fieldContext_ExternalAppPaginatedRecords_pageInfo(ctx, field) + return ec.fieldContext_AppPaginatedRecords_pageInfo(ctx, field) case "totalCount": - return ec.fieldContext_ExternalAppPaginatedRecords_totalCount(ctx, field) + return ec.fieldContext_AppPaginatedRecords_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ExternalAppPaginatedRecords", field.Name) + return nil, fmt.Errorf("no field named %q was found under type AppPaginatedRecords", field.Name) }, } defer func() { @@ -32473,15 +32889,15 @@ func (ec *executionContext) fieldContext_Query_core_listExternalApps(ctx context } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_listExternalApps_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_listApps_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_getExternalApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_getExternalApp(ctx, field) +func (ec *executionContext) _Query_core_getApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getApp(ctx, field) if err != nil { return graphql.Null } @@ -32495,7 +32911,7 @@ func (ec *executionContext) _Query_core_getExternalApp(ctx context.Context, fiel resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreGetExternalApp(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreGetApp(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -32517,10 +32933,10 @@ func (ec *executionContext) _Query_core_getExternalApp(ctx context.Context, fiel if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.ExternalApp); ok { + if data, ok := tmp.(*entities.App); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.ExternalApp`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.App`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -32529,12 +32945,12 @@ func (ec *executionContext) _Query_core_getExternalApp(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.ExternalApp) + res := resTmp.(*entities.App) fc.Result = res - return ec.marshalOExternalApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐExternalApp(ctx, field.Selections, res) + return ec.marshalOApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐApp(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_getExternalApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_getApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -32543,39 +32959,47 @@ func (ec *executionContext) fieldContext_Query_core_getExternalApp(ctx context.C Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_ExternalApp_accountName(ctx, field) + return ec.fieldContext_App_accountName(ctx, field) case "apiVersion": - return ec.fieldContext_ExternalApp_apiVersion(ctx, field) + return ec.fieldContext_App_apiVersion(ctx, field) + case "ciBuildId": + return ec.fieldContext_App_ciBuildId(ctx, field) case "createdBy": - return ec.fieldContext_ExternalApp_createdBy(ctx, field) + return ec.fieldContext_App_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_ExternalApp_creationTime(ctx, field) + return ec.fieldContext_App_creationTime(ctx, field) case "displayName": - return ec.fieldContext_ExternalApp_displayName(ctx, field) + return ec.fieldContext_App_displayName(ctx, field) + case "enabled": + return ec.fieldContext_App_enabled(ctx, field) case "environmentName": - return ec.fieldContext_ExternalApp_environmentName(ctx, field) + return ec.fieldContext_App_environmentName(ctx, field) case "id": - return ec.fieldContext_ExternalApp_id(ctx, field) + return ec.fieldContext_App_id(ctx, field) case "kind": - return ec.fieldContext_ExternalApp_kind(ctx, field) + return ec.fieldContext_App_kind(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_ExternalApp_lastUpdatedBy(ctx, field) + return ec.fieldContext_App_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_ExternalApp_markedForDeletion(ctx, field) + return ec.fieldContext_App_markedForDeletion(ctx, field) case "metadata": - return ec.fieldContext_ExternalApp_metadata(ctx, field) + return ec.fieldContext_App_metadata(ctx, field) case "recordVersion": - return ec.fieldContext_ExternalApp_recordVersion(ctx, field) + return ec.fieldContext_App_recordVersion(ctx, field) case "spec": - return ec.fieldContext_ExternalApp_spec(ctx, field) + return ec.fieldContext_App_spec(ctx, field) case "status": - return ec.fieldContext_ExternalApp_status(ctx, field) + return ec.fieldContext_App_status(ctx, field) case "syncStatus": - return ec.fieldContext_ExternalApp_syncStatus(ctx, field) + return ec.fieldContext_App_syncStatus(ctx, field) case "updateTime": - return ec.fieldContext_ExternalApp_updateTime(ctx, field) + return ec.fieldContext_App_updateTime(ctx, field) + case "build": + return ec.fieldContext_App_build(ctx, field) + case "serviceHost": + return ec.fieldContext_App_serviceHost(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ExternalApp", field.Name) + return nil, fmt.Errorf("no field named %q was found under type App", field.Name) }, } defer func() { @@ -32585,15 +33009,15 @@ func (ec *executionContext) fieldContext_Query_core_getExternalApp(ctx context.C } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_getExternalApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_getApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_resyncExternalApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_resyncExternalApp(ctx, field) +func (ec *executionContext) _Query_core_resyncApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_resyncApp(ctx, field) if err != nil { return graphql.Null } @@ -32607,7 +33031,7 @@ func (ec *executionContext) _Query_core_resyncExternalApp(ctx context.Context, f resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreResyncExternalApp(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreResyncApp(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -32649,7 +33073,7 @@ func (ec *executionContext) _Query_core_resyncExternalApp(ctx context.Context, f return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_resyncExternalApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_resyncApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -32666,15 +33090,15 @@ func (ec *executionContext) fieldContext_Query_core_resyncExternalApp(ctx contex } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_resyncExternalApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_resyncApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_getConfigValues(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_getConfigValues(ctx, field) +func (ec *executionContext) _Query_core_restartApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_restartApp(ctx, field) if err != nil { return graphql.Null } @@ -32688,7 +33112,7 @@ func (ec *executionContext) _Query_core_getConfigValues(ctx context.Context, fie resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreGetConfigValues(rctx, fc.Args["envName"].(string), fc.Args["queries"].([]*domain.ConfigKeyRef)) + return ec.resolvers.Query().CoreRestartApp(rctx, fc.Args["envName"].(string), fc.Args["appName"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -32710,39 +33134,34 @@ func (ec *executionContext) _Query_core_getConfigValues(ctx context.Context, fie if tmp == nil { return nil, nil } - if data, ok := tmp.([]*domain.ConfigKeyValueRef); ok { + if data, ok := tmp.(bool); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/kloudlite/api/apps/console/internal/domain.ConfigKeyValueRef`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*domain.ConfigKeyValueRef) + res := resTmp.(bool) fc.Result = res - return ec.marshalOConfigKeyValueRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐConfigKeyValueRefᚄ(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_getConfigValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_restartApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "configName": - return ec.fieldContext_ConfigKeyValueRef_configName(ctx, field) - case "key": - return ec.fieldContext_ConfigKeyValueRef_key(ctx, field) - case "value": - return ec.fieldContext_ConfigKeyValueRef_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ConfigKeyValueRef", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } defer func() { @@ -32752,15 +33171,15 @@ func (ec *executionContext) fieldContext_Query_core_getConfigValues(ctx context. } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_getConfigValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_restartApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_listConfigs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_listConfigs(ctx, field) +func (ec *executionContext) _Query_core_listExternalApps(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_listExternalApps(ctx, field) if err != nil { return graphql.Null } @@ -32774,7 +33193,7 @@ func (ec *executionContext) _Query_core_listConfigs(ctx context.Context, field g resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreListConfigs(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchConfigs), fc.Args["pq"].(*repos.CursorPagination)) + return ec.resolvers.Query().CoreListExternalApps(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchExternalApps), fc.Args["pq"].(*repos.CursorPagination)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -32796,10 +33215,10 @@ func (ec *executionContext) _Query_core_listConfigs(ctx context.Context, field g if tmp == nil { return nil, nil } - if data, ok := tmp.(*model.ConfigPaginatedRecords); ok { + if data, ok := tmp.(*model.ExternalAppPaginatedRecords); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.ConfigPaginatedRecords`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.ExternalAppPaginatedRecords`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -32808,12 +33227,12 @@ func (ec *executionContext) _Query_core_listConfigs(ctx context.Context, field g if resTmp == nil { return graphql.Null } - res := resTmp.(*model.ConfigPaginatedRecords) + res := resTmp.(*model.ExternalAppPaginatedRecords) fc.Result = res - return ec.marshalOConfigPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConfigPaginatedRecords(ctx, field.Selections, res) + return ec.marshalOExternalAppPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐExternalAppPaginatedRecords(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_listConfigs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_listExternalApps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -32822,13 +33241,13 @@ func (ec *executionContext) fieldContext_Query_core_listConfigs(ctx context.Cont Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "edges": - return ec.fieldContext_ConfigPaginatedRecords_edges(ctx, field) + return ec.fieldContext_ExternalAppPaginatedRecords_edges(ctx, field) case "pageInfo": - return ec.fieldContext_ConfigPaginatedRecords_pageInfo(ctx, field) + return ec.fieldContext_ExternalAppPaginatedRecords_pageInfo(ctx, field) case "totalCount": - return ec.fieldContext_ConfigPaginatedRecords_totalCount(ctx, field) + return ec.fieldContext_ExternalAppPaginatedRecords_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ConfigPaginatedRecords", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ExternalAppPaginatedRecords", field.Name) }, } defer func() { @@ -32838,15 +33257,15 @@ func (ec *executionContext) fieldContext_Query_core_listConfigs(ctx context.Cont } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_listConfigs_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_listExternalApps_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_getConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_getConfig(ctx, field) +func (ec *executionContext) _Query_core_getExternalApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getExternalApp(ctx, field) if err != nil { return graphql.Null } @@ -32860,7 +33279,7 @@ func (ec *executionContext) _Query_core_getConfig(ctx context.Context, field gra resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreGetConfig(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreGetExternalApp(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -32882,10 +33301,10 @@ func (ec *executionContext) _Query_core_getConfig(ctx context.Context, field gra if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.Config); ok { + if data, ok := tmp.(*entities.ExternalApp); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.Config`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.ExternalApp`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -32894,12 +33313,12 @@ func (ec *executionContext) _Query_core_getConfig(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.Config) + res := resTmp.(*entities.ExternalApp) fc.Result = res - return ec.marshalOConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx, field.Selections, res) + return ec.marshalOExternalApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐExternalApp(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_getConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_getExternalApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -32908,41 +33327,39 @@ func (ec *executionContext) fieldContext_Query_core_getConfig(ctx context.Contex Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_Config_accountName(ctx, field) + return ec.fieldContext_ExternalApp_accountName(ctx, field) case "apiVersion": - return ec.fieldContext_Config_apiVersion(ctx, field) - case "binaryData": - return ec.fieldContext_Config_binaryData(ctx, field) + return ec.fieldContext_ExternalApp_apiVersion(ctx, field) case "createdBy": - return ec.fieldContext_Config_createdBy(ctx, field) + return ec.fieldContext_ExternalApp_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_Config_creationTime(ctx, field) - case "data": - return ec.fieldContext_Config_data(ctx, field) + return ec.fieldContext_ExternalApp_creationTime(ctx, field) case "displayName": - return ec.fieldContext_Config_displayName(ctx, field) + return ec.fieldContext_ExternalApp_displayName(ctx, field) case "environmentName": - return ec.fieldContext_Config_environmentName(ctx, field) + return ec.fieldContext_ExternalApp_environmentName(ctx, field) case "id": - return ec.fieldContext_Config_id(ctx, field) - case "immutable": - return ec.fieldContext_Config_immutable(ctx, field) + return ec.fieldContext_ExternalApp_id(ctx, field) case "kind": - return ec.fieldContext_Config_kind(ctx, field) + return ec.fieldContext_ExternalApp_kind(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_Config_lastUpdatedBy(ctx, field) + return ec.fieldContext_ExternalApp_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_Config_markedForDeletion(ctx, field) + return ec.fieldContext_ExternalApp_markedForDeletion(ctx, field) case "metadata": - return ec.fieldContext_Config_metadata(ctx, field) + return ec.fieldContext_ExternalApp_metadata(ctx, field) case "recordVersion": - return ec.fieldContext_Config_recordVersion(ctx, field) + return ec.fieldContext_ExternalApp_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_ExternalApp_spec(ctx, field) + case "status": + return ec.fieldContext_ExternalApp_status(ctx, field) case "syncStatus": - return ec.fieldContext_Config_syncStatus(ctx, field) + return ec.fieldContext_ExternalApp_syncStatus(ctx, field) case "updateTime": - return ec.fieldContext_Config_updateTime(ctx, field) + return ec.fieldContext_ExternalApp_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Config", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ExternalApp", field.Name) }, } defer func() { @@ -32952,15 +33369,15 @@ func (ec *executionContext) fieldContext_Query_core_getConfig(ctx context.Contex } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_getConfig_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_getExternalApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_resyncConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_resyncConfig(ctx, field) +func (ec *executionContext) _Query_core_resyncExternalApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_resyncExternalApp(ctx, field) if err != nil { return graphql.Null } @@ -32974,7 +33391,7 @@ func (ec *executionContext) _Query_core_resyncConfig(ctx context.Context, field resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreResyncConfig(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreResyncExternalApp(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -33016,7 +33433,7 @@ func (ec *executionContext) _Query_core_resyncConfig(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_resyncConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_resyncExternalApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -33033,15 +33450,15 @@ func (ec *executionContext) fieldContext_Query_core_resyncConfig(ctx context.Con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_resyncConfig_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_resyncExternalApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_getSecretValues(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_getSecretValues(ctx, field) +func (ec *executionContext) _Query_core_getConfigValues(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getConfigValues(ctx, field) if err != nil { return graphql.Null } @@ -33055,7 +33472,7 @@ func (ec *executionContext) _Query_core_getSecretValues(ctx context.Context, fie resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreGetSecretValues(rctx, fc.Args["envName"].(string), fc.Args["queries"].([]*domain.SecretKeyRef)) + return ec.resolvers.Query().CoreGetConfigValues(rctx, fc.Args["envName"].(string), fc.Args["queries"].([]*domain.ConfigKeyRef)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -33077,10 +33494,10 @@ func (ec *executionContext) _Query_core_getSecretValues(ctx context.Context, fie if tmp == nil { return nil, nil } - if data, ok := tmp.([]*domain.SecretKeyValueRef); ok { + if data, ok := tmp.([]*domain.ConfigKeyValueRef); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/kloudlite/api/apps/console/internal/domain.SecretKeyValueRef`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/kloudlite/api/apps/console/internal/domain.ConfigKeyValueRef`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -33089,12 +33506,12 @@ func (ec *executionContext) _Query_core_getSecretValues(ctx context.Context, fie if resTmp == nil { return graphql.Null } - res := resTmp.([]*domain.SecretKeyValueRef) + res := resTmp.([]*domain.ConfigKeyValueRef) fc.Result = res - return ec.marshalOSecretKeyValueRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐSecretKeyValueRefᚄ(ctx, field.Selections, res) + return ec.marshalOConfigKeyValueRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐConfigKeyValueRefᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_getSecretValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_getConfigValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -33102,14 +33519,14 @@ func (ec *executionContext) fieldContext_Query_core_getSecretValues(ctx context. IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { + case "configName": + return ec.fieldContext_ConfigKeyValueRef_configName(ctx, field) case "key": - return ec.fieldContext_SecretKeyValueRef_key(ctx, field) - case "secretName": - return ec.fieldContext_SecretKeyValueRef_secretName(ctx, field) + return ec.fieldContext_ConfigKeyValueRef_key(ctx, field) case "value": - return ec.fieldContext_SecretKeyValueRef_value(ctx, field) + return ec.fieldContext_ConfigKeyValueRef_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SecretKeyValueRef", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ConfigKeyValueRef", field.Name) }, } defer func() { @@ -33119,15 +33536,15 @@ func (ec *executionContext) fieldContext_Query_core_getSecretValues(ctx context. } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_getSecretValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_getConfigValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_listSecrets(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_listSecrets(ctx, field) +func (ec *executionContext) _Query_core_listConfigs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_listConfigs(ctx, field) if err != nil { return graphql.Null } @@ -33141,7 +33558,7 @@ func (ec *executionContext) _Query_core_listSecrets(ctx context.Context, field g resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreListSecrets(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchSecrets), fc.Args["pq"].(*repos.CursorPagination)) + return ec.resolvers.Query().CoreListConfigs(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchConfigs), fc.Args["pq"].(*repos.CursorPagination)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -33163,10 +33580,10 @@ func (ec *executionContext) _Query_core_listSecrets(ctx context.Context, field g if tmp == nil { return nil, nil } - if data, ok := tmp.(*model.SecretPaginatedRecords); ok { + if data, ok := tmp.(*model.ConfigPaginatedRecords); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.SecretPaginatedRecords`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.ConfigPaginatedRecords`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -33175,12 +33592,12 @@ func (ec *executionContext) _Query_core_listSecrets(ctx context.Context, field g if resTmp == nil { return graphql.Null } - res := resTmp.(*model.SecretPaginatedRecords) + res := resTmp.(*model.ConfigPaginatedRecords) fc.Result = res - return ec.marshalOSecretPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSecretPaginatedRecords(ctx, field.Selections, res) + return ec.marshalOConfigPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConfigPaginatedRecords(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_listSecrets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_listConfigs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -33189,13 +33606,13 @@ func (ec *executionContext) fieldContext_Query_core_listSecrets(ctx context.Cont Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "edges": - return ec.fieldContext_SecretPaginatedRecords_edges(ctx, field) + return ec.fieldContext_ConfigPaginatedRecords_edges(ctx, field) case "pageInfo": - return ec.fieldContext_SecretPaginatedRecords_pageInfo(ctx, field) + return ec.fieldContext_ConfigPaginatedRecords_pageInfo(ctx, field) case "totalCount": - return ec.fieldContext_SecretPaginatedRecords_totalCount(ctx, field) + return ec.fieldContext_ConfigPaginatedRecords_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SecretPaginatedRecords", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ConfigPaginatedRecords", field.Name) }, } defer func() { @@ -33205,15 +33622,15 @@ func (ec *executionContext) fieldContext_Query_core_listSecrets(ctx context.Cont } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_listSecrets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_listConfigs_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_getSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_getSecret(ctx, field) +func (ec *executionContext) _Query_core_getConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getConfig(ctx, field) if err != nil { return graphql.Null } @@ -33227,7 +33644,7 @@ func (ec *executionContext) _Query_core_getSecret(ctx context.Context, field gra resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreGetSecret(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreGetConfig(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -33249,10 +33666,10 @@ func (ec *executionContext) _Query_core_getSecret(ctx context.Context, field gra if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.Secret); ok { + if data, ok := tmp.(*entities.Config); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.Secret`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.Config`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -33261,12 +33678,12 @@ func (ec *executionContext) _Query_core_getSecret(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.Secret) + res := resTmp.(*entities.Config) fc.Result = res - return ec.marshalOSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐSecret(ctx, field.Selections, res) + return ec.marshalOConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_getSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_getConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -33275,47 +33692,41 @@ func (ec *executionContext) fieldContext_Query_core_getSecret(ctx context.Contex Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_Secret_accountName(ctx, field) + return ec.fieldContext_Config_accountName(ctx, field) case "apiVersion": - return ec.fieldContext_Secret_apiVersion(ctx, field) + return ec.fieldContext_Config_apiVersion(ctx, field) + case "binaryData": + return ec.fieldContext_Config_binaryData(ctx, field) case "createdBy": - return ec.fieldContext_Secret_createdBy(ctx, field) + return ec.fieldContext_Config_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_Secret_creationTime(ctx, field) + return ec.fieldContext_Config_creationTime(ctx, field) case "data": - return ec.fieldContext_Secret_data(ctx, field) + return ec.fieldContext_Config_data(ctx, field) case "displayName": - return ec.fieldContext_Secret_displayName(ctx, field) + return ec.fieldContext_Config_displayName(ctx, field) case "environmentName": - return ec.fieldContext_Secret_environmentName(ctx, field) - case "for": - return ec.fieldContext_Secret_for(ctx, field) + return ec.fieldContext_Config_environmentName(ctx, field) case "id": - return ec.fieldContext_Secret_id(ctx, field) + return ec.fieldContext_Config_id(ctx, field) case "immutable": - return ec.fieldContext_Secret_immutable(ctx, field) - case "isReadyOnly": - return ec.fieldContext_Secret_isReadyOnly(ctx, field) + return ec.fieldContext_Config_immutable(ctx, field) case "kind": - return ec.fieldContext_Secret_kind(ctx, field) + return ec.fieldContext_Config_kind(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_Secret_lastUpdatedBy(ctx, field) + return ec.fieldContext_Config_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_Secret_markedForDeletion(ctx, field) + return ec.fieldContext_Config_markedForDeletion(ctx, field) case "metadata": - return ec.fieldContext_Secret_metadata(ctx, field) + return ec.fieldContext_Config_metadata(ctx, field) case "recordVersion": - return ec.fieldContext_Secret_recordVersion(ctx, field) - case "stringData": - return ec.fieldContext_Secret_stringData(ctx, field) + return ec.fieldContext_Config_recordVersion(ctx, field) case "syncStatus": - return ec.fieldContext_Secret_syncStatus(ctx, field) - case "type": - return ec.fieldContext_Secret_type(ctx, field) + return ec.fieldContext_Config_syncStatus(ctx, field) case "updateTime": - return ec.fieldContext_Secret_updateTime(ctx, field) + return ec.fieldContext_Config_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Secret", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Config", field.Name) }, } defer func() { @@ -33325,15 +33736,15 @@ func (ec *executionContext) fieldContext_Query_core_getSecret(ctx context.Contex } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_getSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_getConfig_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_resyncSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_resyncSecret(ctx, field) +func (ec *executionContext) _Query_core_resyncConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_resyncConfig(ctx, field) if err != nil { return graphql.Null } @@ -33347,7 +33758,7 @@ func (ec *executionContext) _Query_core_resyncSecret(ctx context.Context, field resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreResyncSecret(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreResyncConfig(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -33389,7 +33800,7 @@ func (ec *executionContext) _Query_core_resyncSecret(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_resyncSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_resyncConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -33406,15 +33817,15 @@ func (ec *executionContext) fieldContext_Query_core_resyncSecret(ctx context.Con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_resyncSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_resyncConfig_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_listRouters(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_listRouters(ctx, field) +func (ec *executionContext) _Query_core_getSecretValues(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getSecretValues(ctx, field) if err != nil { return graphql.Null } @@ -33428,7 +33839,7 @@ func (ec *executionContext) _Query_core_listRouters(ctx context.Context, field g resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreListRouters(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchRouters), fc.Args["pq"].(*repos.CursorPagination)) + return ec.resolvers.Query().CoreGetSecretValues(rctx, fc.Args["envName"].(string), fc.Args["queries"].([]*domain.SecretKeyRef)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -33450,10 +33861,10 @@ func (ec *executionContext) _Query_core_listRouters(ctx context.Context, field g if tmp == nil { return nil, nil } - if data, ok := tmp.(*model.RouterPaginatedRecords); ok { + if data, ok := tmp.([]*domain.SecretKeyValueRef); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.RouterPaginatedRecords`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/kloudlite/api/apps/console/internal/domain.SecretKeyValueRef`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -33462,12 +33873,12 @@ func (ec *executionContext) _Query_core_listRouters(ctx context.Context, field g if resTmp == nil { return graphql.Null } - res := resTmp.(*model.RouterPaginatedRecords) + res := resTmp.([]*domain.SecretKeyValueRef) fc.Result = res - return ec.marshalORouterPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRouterPaginatedRecords(ctx, field.Selections, res) + return ec.marshalOSecretKeyValueRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐSecretKeyValueRefᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_listRouters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_getSecretValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -33475,14 +33886,14 @@ func (ec *executionContext) fieldContext_Query_core_listRouters(ctx context.Cont IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_RouterPaginatedRecords_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_RouterPaginatedRecords_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_RouterPaginatedRecords_totalCount(ctx, field) + case "key": + return ec.fieldContext_SecretKeyValueRef_key(ctx, field) + case "secretName": + return ec.fieldContext_SecretKeyValueRef_secretName(ctx, field) + case "value": + return ec.fieldContext_SecretKeyValueRef_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type RouterPaginatedRecords", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SecretKeyValueRef", field.Name) }, } defer func() { @@ -33492,15 +33903,15 @@ func (ec *executionContext) fieldContext_Query_core_listRouters(ctx context.Cont } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_listRouters_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_getSecretValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_getRouter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_getRouter(ctx, field) +func (ec *executionContext) _Query_core_listSecrets(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_listSecrets(ctx, field) if err != nil { return graphql.Null } @@ -33514,7 +33925,7 @@ func (ec *executionContext) _Query_core_getRouter(ctx context.Context, field gra resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreGetRouter(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreListSecrets(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchSecrets), fc.Args["pq"].(*repos.CursorPagination)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -33536,10 +33947,10 @@ func (ec *executionContext) _Query_core_getRouter(ctx context.Context, field gra if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.Router); ok { + if data, ok := tmp.(*model.SecretPaginatedRecords); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.Router`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.SecretPaginatedRecords`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -33548,12 +33959,12 @@ func (ec *executionContext) _Query_core_getRouter(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.Router) + res := resTmp.(*model.SecretPaginatedRecords) fc.Result = res - return ec.marshalORouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, field.Selections, res) + return ec.marshalOSecretPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSecretPaginatedRecords(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_getRouter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_listSecrets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -33561,42 +33972,14 @@ func (ec *executionContext) fieldContext_Query_core_getRouter(ctx context.Contex IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "accountName": - return ec.fieldContext_Router_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_Router_apiVersion(ctx, field) - case "createdBy": - return ec.fieldContext_Router_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_Router_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_Router_displayName(ctx, field) - case "enabled": - return ec.fieldContext_Router_enabled(ctx, field) - case "environmentName": - return ec.fieldContext_Router_environmentName(ctx, field) - case "id": - return ec.fieldContext_Router_id(ctx, field) - case "kind": - return ec.fieldContext_Router_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_Router_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_Router_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_Router_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_Router_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_Router_spec(ctx, field) - case "status": - return ec.fieldContext_Router_status(ctx, field) - case "syncStatus": - return ec.fieldContext_Router_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_Router_updateTime(ctx, field) + case "edges": + return ec.fieldContext_SecretPaginatedRecords_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_SecretPaginatedRecords_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_SecretPaginatedRecords_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Router", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SecretPaginatedRecords", field.Name) }, } defer func() { @@ -33606,15 +33989,15 @@ func (ec *executionContext) fieldContext_Query_core_getRouter(ctx context.Contex } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_getRouter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_listSecrets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_resyncRouter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_resyncRouter(ctx, field) +func (ec *executionContext) _Query_core_getSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getSecret(ctx, field) if err != nil { return graphql.Null } @@ -33628,7 +34011,7 @@ func (ec *executionContext) _Query_core_resyncRouter(ctx context.Context, field resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreResyncRouter(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreGetSecret(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -33650,34 +34033,73 @@ func (ec *executionContext) _Query_core_resyncRouter(ctx context.Context, field if tmp == nil { return nil, nil } - if data, ok := tmp.(bool); ok { + if data, ok := tmp.(*entities.Secret); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.Secret`, tmp) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*entities.Secret) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_resyncRouter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_getSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "accountName": + return ec.fieldContext_Secret_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_Secret_apiVersion(ctx, field) + case "createdBy": + return ec.fieldContext_Secret_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_Secret_creationTime(ctx, field) + case "data": + return ec.fieldContext_Secret_data(ctx, field) + case "displayName": + return ec.fieldContext_Secret_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_Secret_environmentName(ctx, field) + case "for": + return ec.fieldContext_Secret_for(ctx, field) + case "id": + return ec.fieldContext_Secret_id(ctx, field) + case "immutable": + return ec.fieldContext_Secret_immutable(ctx, field) + case "isReadyOnly": + return ec.fieldContext_Secret_isReadyOnly(ctx, field) + case "kind": + return ec.fieldContext_Secret_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_Secret_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_Secret_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_Secret_metadata(ctx, field) + case "recordVersion": + return ec.fieldContext_Secret_recordVersion(ctx, field) + case "stringData": + return ec.fieldContext_Secret_stringData(ctx, field) + case "syncStatus": + return ec.fieldContext_Secret_syncStatus(ctx, field) + case "type": + return ec.fieldContext_Secret_type(ctx, field) + case "updateTime": + return ec.fieldContext_Secret_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Secret", field.Name) }, } defer func() { @@ -33687,15 +34109,15 @@ func (ec *executionContext) fieldContext_Query_core_resyncRouter(ctx context.Con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_resyncRouter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_getSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_getManagedResouceOutputKeys(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_getManagedResouceOutputKeys(ctx, field) +func (ec *executionContext) _Query_core_resyncSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_resyncSecret(ctx, field) if err != nil { return graphql.Null } @@ -33709,7 +34131,7 @@ func (ec *executionContext) _Query_core_getManagedResouceOutputKeys(ctx context. resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreGetManagedResouceOutputKeys(rctx, fc.Args["msvcName"].(*string), fc.Args["envName"].(*string), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreResyncSecret(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -33731,10 +34153,10 @@ func (ec *executionContext) _Query_core_getManagedResouceOutputKeys(ctx context. if tmp == nil { return nil, nil } - if data, ok := tmp.([]string); ok { + if data, ok := tmp.(bool); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be []string`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -33746,19 +34168,19 @@ func (ec *executionContext) _Query_core_getManagedResouceOutputKeys(ctx context. } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(bool) fc.Result = res - return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_getManagedResouceOutputKeys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_resyncSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } defer func() { @@ -33768,15 +34190,15 @@ func (ec *executionContext) fieldContext_Query_core_getManagedResouceOutputKeys( } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_getManagedResouceOutputKeys_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_resyncSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_getManagedResouceOutputKeyValues(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_getManagedResouceOutputKeyValues(ctx, field) +func (ec *executionContext) _Query_core_listRouters(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_listRouters(ctx, field) if err != nil { return graphql.Null } @@ -33790,7 +34212,7 @@ func (ec *executionContext) _Query_core_getManagedResouceOutputKeyValues(ctx con resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreGetManagedResouceOutputKeyValues(rctx, fc.Args["msvcName"].(*string), fc.Args["envName"].(*string), fc.Args["keyrefs"].([]*domain.ManagedResourceKeyRef)) + return ec.resolvers.Query().CoreListRouters(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchRouters), fc.Args["pq"].(*repos.CursorPagination)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -33812,27 +34234,24 @@ func (ec *executionContext) _Query_core_getManagedResouceOutputKeyValues(ctx con if tmp == nil { return nil, nil } - if data, ok := tmp.([]*domain.ManagedResourceKeyValueRef); ok { + if data, ok := tmp.(*model.RouterPaginatedRecords); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/kloudlite/api/apps/console/internal/domain.ManagedResourceKeyValueRef`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.RouterPaginatedRecords`, tmp) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]*domain.ManagedResourceKeyValueRef) + res := resTmp.(*model.RouterPaginatedRecords) fc.Result = res - return ec.marshalNManagedResourceKeyValueRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐManagedResourceKeyValueRefᚄ(ctx, field.Selections, res) + return ec.marshalORouterPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRouterPaginatedRecords(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_getManagedResouceOutputKeyValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_listRouters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -33840,14 +34259,14 @@ func (ec *executionContext) fieldContext_Query_core_getManagedResouceOutputKeyVa IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "key": - return ec.fieldContext_ManagedResourceKeyValueRef_key(ctx, field) - case "mresName": - return ec.fieldContext_ManagedResourceKeyValueRef_mresName(ctx, field) - case "value": - return ec.fieldContext_ManagedResourceKeyValueRef_value(ctx, field) + case "edges": + return ec.fieldContext_RouterPaginatedRecords_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_RouterPaginatedRecords_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_RouterPaginatedRecords_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ManagedResourceKeyValueRef", field.Name) + return nil, fmt.Errorf("no field named %q was found under type RouterPaginatedRecords", field.Name) }, } defer func() { @@ -33857,15 +34276,15 @@ func (ec *executionContext) fieldContext_Query_core_getManagedResouceOutputKeyVa } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_getManagedResouceOutputKeyValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_listRouters_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_infra_listClusterManagedServices(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_infra_listClusterManagedServices(ctx, field) +func (ec *executionContext) _Query_core_getRouter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getRouter(ctx, field) if err != nil { return graphql.Null } @@ -33879,7 +34298,372 @@ func (ec *executionContext) _Query_infra_listClusterManagedServices(ctx context. resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().InfraListClusterManagedServices(rctx, fc.Args["search"].(*model.SearchClusterManagedService), fc.Args["pagination"].(*repos.CursorPagination)) + return ec.resolvers.Query().CoreGetRouter(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.Router); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.Router`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.Router) + fc.Result = res + return ec.marshalORouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_core_getRouter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_Router_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_Router_apiVersion(ctx, field) + case "createdBy": + return ec.fieldContext_Router_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_Router_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_Router_displayName(ctx, field) + case "enabled": + return ec.fieldContext_Router_enabled(ctx, field) + case "environmentName": + return ec.fieldContext_Router_environmentName(ctx, field) + case "id": + return ec.fieldContext_Router_id(ctx, field) + case "kind": + return ec.fieldContext_Router_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_Router_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_Router_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_Router_metadata(ctx, field) + case "recordVersion": + return ec.fieldContext_Router_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_Router_spec(ctx, field) + case "status": + return ec.fieldContext_Router_status(ctx, field) + case "syncStatus": + return ec.fieldContext_Router_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_Router_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Router", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_core_getRouter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_core_resyncRouter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_resyncRouter(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().CoreResyncRouter(rctx, fc.Args["envName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_core_resyncRouter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_core_resyncRouter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_core_getManagedResouceOutputKeys(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getManagedResouceOutputKeys(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().CoreGetManagedResouceOutputKeys(rctx, fc.Args["msvcName"].(*string), fc.Args["envName"].(*string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.([]string); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be []string`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_core_getManagedResouceOutputKeys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_core_getManagedResouceOutputKeys_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_core_getManagedResouceOutputKeyValues(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getManagedResouceOutputKeyValues(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().CoreGetManagedResouceOutputKeyValues(rctx, fc.Args["msvcName"].(*string), fc.Args["envName"].(*string), fc.Args["keyrefs"].([]*domain.ManagedResourceKeyRef)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.([]*domain.ManagedResourceKeyValueRef); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/kloudlite/api/apps/console/internal/domain.ManagedResourceKeyValueRef`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*domain.ManagedResourceKeyValueRef) + fc.Result = res + return ec.marshalNManagedResourceKeyValueRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐManagedResourceKeyValueRefᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_core_getManagedResouceOutputKeyValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_ManagedResourceKeyValueRef_key(ctx, field) + case "mresName": + return ec.fieldContext_ManagedResourceKeyValueRef_mresName(ctx, field) + case "value": + return ec.fieldContext_ManagedResourceKeyValueRef_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ManagedResourceKeyValueRef", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_core_getManagedResouceOutputKeyValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_infra_listClusterManagedServices(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_infra_listClusterManagedServices(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().InfraListClusterManagedServices(rctx, fc.Args["search"].(*model.SearchClusterManagedService), fc.Args["pagination"].(*repos.CursorPagination)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -34673,8 +35457,8 @@ func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field return fc, nil } -func (ec *executionContext) _Router_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_accountName(ctx, field) +func (ec *executionContext) _RegistryImage_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.RegistryImage) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImage_accountName(ctx, field) if err != nil { return graphql.Null } @@ -34704,9 +35488,9 @@ func (ec *executionContext) _Router_accountName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImage_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImage", Field: field, IsMethod: false, IsResolver: false, @@ -34717,8 +35501,8 @@ func (ec *executionContext) fieldContext_Router_accountName(_ context.Context, f return fc, nil } -func (ec *executionContext) _Router_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_apiVersion(ctx, field) +func (ec *executionContext) _RegistryImage_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.RegistryImage) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImage_creationTime(ctx, field) if err != nil { return graphql.Null } @@ -34731,35 +35515,38 @@ func (ec *executionContext) _Router_apiVersion(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.APIVersion, nil + return ec.resolvers.RegistryImage().CreationTime(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImage_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImage", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Date does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Router_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_createdBy(ctx, field) +func (ec *executionContext) _RegistryImage_id(ctx context.Context, field graphql.CollectedField, obj *entities.RegistryImage) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImage_id(ctx, field) if err != nil { return graphql.Null } @@ -34772,7 +35559,7 @@ func (ec *executionContext) _Router_createdBy(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedBy, nil + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -34784,34 +35571,26 @@ func (ec *executionContext) _Router_createdBy(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(common.CreatedOrUpdatedBy) + res := resTmp.(repos.ID) fc.Result = res - return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) + return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImage_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImage", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "userEmail": - return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) - case "userId": - return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) - case "userName": - return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Router_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_creationTime(ctx, field) +func (ec *executionContext) _RegistryImage_imageName(ctx context.Context, field graphql.CollectedField, obj *entities.RegistryImage) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImage_imageName(ctx, field) if err != nil { return graphql.Null } @@ -34824,7 +35603,7 @@ func (ec *executionContext) _Router_creationTime(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Router().CreationTime(rctx, obj) + return obj.ImageName, nil }) if err != nil { ec.Error(ctx, err) @@ -34838,24 +35617,24 @@ func (ec *executionContext) _Router_creationTime(ctx context.Context, field grap } res := resTmp.(string) fc.Result = res - return ec.marshalNDate2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImage_imageName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImage", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Date does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Router_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_displayName(ctx, field) +func (ec *executionContext) _RegistryImage_imageTag(ctx context.Context, field graphql.CollectedField, obj *entities.RegistryImage) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImage_imageTag(ctx, field) if err != nil { return graphql.Null } @@ -34868,7 +35647,7 @@ func (ec *executionContext) _Router_displayName(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DisplayName, nil + return obj.ImageTag, nil }) if err != nil { ec.Error(ctx, err) @@ -34885,9 +35664,9 @@ func (ec *executionContext) _Router_displayName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImage_imageTag(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImage", Field: field, IsMethod: false, IsResolver: false, @@ -34898,8 +35677,8 @@ func (ec *executionContext) fieldContext_Router_displayName(_ context.Context, f return fc, nil } -func (ec *executionContext) _Router_enabled(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_enabled(ctx, field) +func (ec *executionContext) _RegistryImage_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.RegistryImage) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImage_markedForDeletion(ctx, field) if err != nil { return graphql.Null } @@ -34912,7 +35691,7 @@ func (ec *executionContext) _Router_enabled(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Enabled, nil + return obj.MarkedForDeletion, nil }) if err != nil { ec.Error(ctx, err) @@ -34921,14 +35700,14 @@ func (ec *executionContext) _Router_enabled(ctx context.Context, field graphql.C if resTmp == nil { return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*bool) fc.Result = res - return ec.marshalOBoolean2bool(ctx, field.Selections, res) + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImage_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImage", Field: field, IsMethod: false, IsResolver: false, @@ -34939,8 +35718,8 @@ func (ec *executionContext) fieldContext_Router_enabled(_ context.Context, field return fc, nil } -func (ec *executionContext) _Router_environmentName(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_environmentName(ctx, field) +func (ec *executionContext) _RegistryImage_meta(ctx context.Context, field graphql.CollectedField, obj *entities.RegistryImage) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImage_meta(ctx, field) if err != nil { return graphql.Null } @@ -34953,7 +35732,7 @@ func (ec *executionContext) _Router_environmentName(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EnvironmentName, nil + return obj.Meta, nil }) if err != nil { ec.Error(ctx, err) @@ -34965,26 +35744,26 @@ func (ec *executionContext) _Router_environmentName(ctx context.Context, field g } return graphql.Null } - res := resTmp.(string) + res := resTmp.(map[string]any) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImage_meta(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImage", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Map does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Router_id(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_id(ctx, field) +func (ec *executionContext) _RegistryImage_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.RegistryImage) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImage_recordVersion(ctx, field) if err != nil { return graphql.Null } @@ -34997,7 +35776,7 @@ func (ec *executionContext) _Router_id(ctx context.Context, field graphql.Collec }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return obj.RecordVersion, nil }) if err != nil { ec.Error(ctx, err) @@ -35009,26 +35788,26 @@ func (ec *executionContext) _Router_id(ctx context.Context, field graphql.Collec } return graphql.Null } - res := resTmp.(repos.ID) + res := resTmp.(int) fc.Result = res - return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImage_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImage", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Router_kind(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_kind(ctx, field) +func (ec *executionContext) _RegistryImage_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.RegistryImage) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImage_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -35041,23 +35820,70 @@ func (ec *executionContext) _Router_kind(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Kind, nil + return ec.resolvers.RegistryImage().UpdateTime(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImage_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImage", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RegistryImageCredentials_accountName(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentials) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentials_accountName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AccountName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RegistryImageCredentials_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RegistryImageCredentials", Field: field, IsMethod: false, IsResolver: false, @@ -35068,8 +35894,8 @@ func (ec *executionContext) fieldContext_Router_kind(_ context.Context, field gr return fc, nil } -func (ec *executionContext) _Router_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_lastUpdatedBy(ctx, field) +func (ec *executionContext) _RegistryImageCredentials_createdBy(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentials) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentials_createdBy(ctx, field) if err != nil { return graphql.Null } @@ -35082,7 +35908,7 @@ func (ec *executionContext) _Router_lastUpdatedBy(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LastUpdatedBy, nil + return obj.CreatedBy, nil }) if err != nil { ec.Error(ctx, err) @@ -35094,14 +35920,14 @@ func (ec *executionContext) _Router_lastUpdatedBy(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(common.CreatedOrUpdatedBy) + res := resTmp.(*common.CreatedOrUpdatedBy) fc.Result = res - return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2ᚖgithubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageCredentials_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImageCredentials", Field: field, IsMethod: false, IsResolver: false, @@ -35120,8 +35946,96 @@ func (ec *executionContext) fieldContext_Router_lastUpdatedBy(_ context.Context, return fc, nil } -func (ec *executionContext) _Router_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_markedForDeletion(ctx, field) +func (ec *executionContext) _RegistryImageCredentials_creationTime(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentials) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentials_creationTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreationTime, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RegistryImageCredentials_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RegistryImageCredentials", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RegistryImageCredentials_id(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentials) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentials_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(repos.ID) + fc.Result = res + return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RegistryImageCredentials_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RegistryImageCredentials", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RegistryImageCredentials_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentials) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentials_markedForDeletion(ctx, field) if err != nil { return graphql.Null } @@ -35148,9 +36062,9 @@ func (ec *executionContext) _Router_markedForDeletion(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageCredentials_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImageCredentials", Field: field, IsMethod: false, IsResolver: false, @@ -35161,8 +36075,8 @@ func (ec *executionContext) fieldContext_Router_markedForDeletion(_ context.Cont return fc, nil } -func (ec *executionContext) _Router_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_metadata(ctx, field) +func (ec *executionContext) _RegistryImageCredentials_password(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentials) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentials_password(ctx, field) if err != nil { return graphql.Null } @@ -35175,51 +36089,38 @@ func (ec *executionContext) _Router_metadata(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ObjectMeta, nil + return obj.Password, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(v12.ObjectMeta) + res := resTmp.(string) fc.Result = res - return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageCredentials_password(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImageCredentials", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "annotations": - return ec.fieldContext_Metadata_annotations(ctx, field) - case "creationTimestamp": - return ec.fieldContext_Metadata_creationTimestamp(ctx, field) - case "deletionTimestamp": - return ec.fieldContext_Metadata_deletionTimestamp(ctx, field) - case "generation": - return ec.fieldContext_Metadata_generation(ctx, field) - case "labels": - return ec.fieldContext_Metadata_labels(ctx, field) - case "name": - return ec.fieldContext_Metadata_name(ctx, field) - case "namespace": - return ec.fieldContext_Metadata_namespace(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Metadata", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Router_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_recordVersion(ctx, field) +func (ec *executionContext) _RegistryImageCredentials_recordVersion(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentials) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentials_recordVersion(ctx, field) if err != nil { return graphql.Null } @@ -35249,9 +36150,9 @@ func (ec *executionContext) _Router_recordVersion(ctx context.Context, field gra return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageCredentials_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImageCredentials", Field: field, IsMethod: false, IsResolver: false, @@ -35262,8 +36163,8 @@ func (ec *executionContext) fieldContext_Router_recordVersion(_ context.Context, return fc, nil } -func (ec *executionContext) _Router_spec(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_spec(ctx, field) +func (ec *executionContext) _RegistryImageCredentials_updateTime(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentials) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentials_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -35276,7 +36177,7 @@ func (ec *executionContext) _Router_spec(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Router().Spec(rctx, obj) + return obj.UpdateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -35288,46 +36189,132 @@ func (ec *executionContext) _Router_spec(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1RouterSpec) + res := resTmp.(string) fc.Result = res - return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__RouterSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouterSpec(ctx, field.Selections, res) + return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageCredentials_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImageCredentials", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RegistryImageCredentialsEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentialsEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentialsEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RegistryImageCredentialsEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RegistryImageCredentialsEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RegistryImageCredentialsEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentialsEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentialsEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*model.RegistryImageCredentials) + fc.Result = res + return ec.marshalNRegistryImageCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageCredentials(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RegistryImageCredentialsEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RegistryImageCredentialsEdge", + Field: field, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "backendProtocol": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_backendProtocol(ctx, field) - case "basicAuth": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_basicAuth(ctx, field) - case "cors": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_cors(ctx, field) - case "domains": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_domains(ctx, field) - case "https": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_https(ctx, field) - case "ingressClass": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_ingressClass(ctx, field) - case "maxBodySizeInMB": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_maxBodySizeInMB(ctx, field) - case "rateLimit": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_rateLimit(ctx, field) - case "routes": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_routes(ctx, field) + case "accountName": + return ec.fieldContext_RegistryImageCredentials_accountName(ctx, field) + case "createdBy": + return ec.fieldContext_RegistryImageCredentials_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_RegistryImageCredentials_creationTime(ctx, field) + case "id": + return ec.fieldContext_RegistryImageCredentials_id(ctx, field) + case "markedForDeletion": + return ec.fieldContext_RegistryImageCredentials_markedForDeletion(ctx, field) + case "password": + return ec.fieldContext_RegistryImageCredentials_password(ctx, field) + case "recordVersion": + return ec.fieldContext_RegistryImageCredentials_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_RegistryImageCredentials_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__RouterSpec", field.Name) + return nil, fmt.Errorf("no field named %q was found under type RegistryImageCredentials", field.Name) }, } return fc, nil } -func (ec *executionContext) _Router_status(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_status(ctx, field) +func (ec *executionContext) _RegistryImageCredentialsPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentialsPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentialsPaginatedRecords_edges(ctx, field) if err != nil { return graphql.Null } @@ -35340,51 +36327,44 @@ func (ec *executionContext) _Router_status(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(operator.Status) + res := resTmp.([]*model.RegistryImageCredentialsEdge) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) + return ec.marshalNRegistryImageCredentialsEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageCredentialsEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageCredentialsPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImageCredentialsPaginatedRecords", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "checkList": - return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checkList(ctx, field) - case "checks": - return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checks(ctx, field) - case "isReady": - return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_isReady(ctx, field) - case "lastReadyGeneration": - return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReadyGeneration(ctx, field) - case "lastReconcileTime": - return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReconcileTime(ctx, field) - case "message": - return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_message(ctx, field) - case "resources": - return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_resources(ctx, field) + case "cursor": + return ec.fieldContext_RegistryImageCredentialsEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_RegistryImageCredentialsEdge_node(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___pkg___operator__Status", field.Name) + return nil, fmt.Errorf("no field named %q was found under type RegistryImageCredentialsEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _Router_syncStatus(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_syncStatus(ctx, field) +func (ec *executionContext) _RegistryImageCredentialsPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentialsPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentialsPaginatedRecords_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -35397,7 +36377,7 @@ func (ec *executionContext) _Router_syncStatus(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SyncStatus, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -35409,40 +36389,36 @@ func (ec *executionContext) _Router_syncStatus(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(types.SyncStatus) + res := resTmp.(*model.PageInfo) fc.Result = res - return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageCredentialsPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImageCredentialsPaginatedRecords", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "action": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_action(ctx, field) - case "error": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_error(ctx, field) - case "lastSyncedAt": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_lastSyncedAt(ctx, field) - case "recordVersion": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_recordVersion(ctx, field) - case "state": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_state(ctx, field) - case "syncScheduledAt": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_syncScheduledAt(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___pkg___types__SyncStatus", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Router_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Router_updateTime(ctx, field) +func (ec *executionContext) _RegistryImageCredentialsPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageCredentialsPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageCredentialsPaginatedRecords_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -35455,7 +36431,7 @@ func (ec *executionContext) _Router_updateTime(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Router().UpdateTime(rctx, obj) + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) @@ -35467,26 +36443,26 @@ func (ec *executionContext) _Router_updateTime(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNDate2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageCredentialsPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Router", + Object: "RegistryImageCredentialsPaginatedRecords", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Date does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _RouterEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.RouterEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RouterEdge_cursor(ctx, field) +func (ec *executionContext) _RegistryImageEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -35516,9 +36492,9 @@ func (ec *executionContext) _RouterEdge_cursor(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RouterEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RouterEdge", + Object: "RegistryImageEdge", Field: field, IsMethod: false, IsResolver: false, @@ -35529,8 +36505,8 @@ func (ec *executionContext) fieldContext_RouterEdge_cursor(_ context.Context, fi return fc, nil } -func (ec *executionContext) _RouterEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.RouterEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RouterEdge_node(ctx, field) +func (ec *executionContext) _RegistryImageEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -35555,62 +36531,46 @@ func (ec *executionContext) _RouterEdge_node(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(*entities.Router) + res := resTmp.(*entities.RegistryImage) fc.Result = res - return ec.marshalNRouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, field.Selections, res) + return ec.marshalNRegistryImage2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRegistryImage(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RouterEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RouterEdge", + Object: "RegistryImageEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_Router_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_Router_apiVersion(ctx, field) - case "createdBy": - return ec.fieldContext_Router_createdBy(ctx, field) + return ec.fieldContext_RegistryImage_accountName(ctx, field) case "creationTime": - return ec.fieldContext_Router_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_Router_displayName(ctx, field) - case "enabled": - return ec.fieldContext_Router_enabled(ctx, field) - case "environmentName": - return ec.fieldContext_Router_environmentName(ctx, field) + return ec.fieldContext_RegistryImage_creationTime(ctx, field) case "id": - return ec.fieldContext_Router_id(ctx, field) - case "kind": - return ec.fieldContext_Router_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_Router_lastUpdatedBy(ctx, field) + return ec.fieldContext_RegistryImage_id(ctx, field) + case "imageName": + return ec.fieldContext_RegistryImage_imageName(ctx, field) + case "imageTag": + return ec.fieldContext_RegistryImage_imageTag(ctx, field) case "markedForDeletion": - return ec.fieldContext_Router_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_Router_metadata(ctx, field) + return ec.fieldContext_RegistryImage_markedForDeletion(ctx, field) + case "meta": + return ec.fieldContext_RegistryImage_meta(ctx, field) case "recordVersion": - return ec.fieldContext_Router_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_Router_spec(ctx, field) - case "status": - return ec.fieldContext_Router_status(ctx, field) - case "syncStatus": - return ec.fieldContext_Router_syncStatus(ctx, field) + return ec.fieldContext_RegistryImage_recordVersion(ctx, field) case "updateTime": - return ec.fieldContext_Router_updateTime(ctx, field) + return ec.fieldContext_RegistryImage_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Router", field.Name) + return nil, fmt.Errorf("no field named %q was found under type RegistryImage", field.Name) }, } return fc, nil } -func (ec *executionContext) _RouterPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.RouterPaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RouterPaginatedRecords_edges(ctx, field) +func (ec *executionContext) _RegistryImagePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImagePaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImagePaginatedRecords_edges(ctx, field) if err != nil { return graphql.Null } @@ -35635,32 +36595,32 @@ func (ec *executionContext) _RouterPaginatedRecords_edges(ctx context.Context, f } return graphql.Null } - res := resTmp.([]*model.RouterEdge) + res := resTmp.([]*model.RegistryImageEdge) fc.Result = res - return ec.marshalNRouterEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRouterEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNRegistryImageEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RouterPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImagePaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RouterPaginatedRecords", + Object: "RegistryImagePaginatedRecords", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "cursor": - return ec.fieldContext_RouterEdge_cursor(ctx, field) + return ec.fieldContext_RegistryImageEdge_cursor(ctx, field) case "node": - return ec.fieldContext_RouterEdge_node(ctx, field) + return ec.fieldContext_RegistryImageEdge_node(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type RouterEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type RegistryImageEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _RouterPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.RouterPaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RouterPaginatedRecords_pageInfo(ctx, field) +func (ec *executionContext) _RegistryImagePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImagePaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImagePaginatedRecords_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -35690,9 +36650,9 @@ func (ec *executionContext) _RouterPaginatedRecords_pageInfo(ctx context.Context return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RouterPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImagePaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RouterPaginatedRecords", + Object: "RegistryImagePaginatedRecords", Field: field, IsMethod: false, IsResolver: false, @@ -35713,8 +36673,8 @@ func (ec *executionContext) fieldContext_RouterPaginatedRecords_pageInfo(_ conte return fc, nil } -func (ec *executionContext) _RouterPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.RouterPaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RouterPaginatedRecords_totalCount(ctx, field) +func (ec *executionContext) _RegistryImagePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImagePaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImagePaginatedRecords_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -35744,9 +36704,9 @@ func (ec *executionContext) _RouterPaginatedRecords_totalCount(ctx context.Conte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RouterPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImagePaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RouterPaginatedRecords", + Object: "RegistryImagePaginatedRecords", Field: field, IsMethod: false, IsResolver: false, @@ -35757,8 +36717,8 @@ func (ec *executionContext) fieldContext_RouterPaginatedRecords_totalCount(_ con return fc, nil } -func (ec *executionContext) _Secret_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_accountName(ctx, field) +func (ec *executionContext) _Router_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_accountName(ctx, field) if err != nil { return graphql.Null } @@ -35788,9 +36748,9 @@ func (ec *executionContext) _Secret_accountName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, @@ -35801,8 +36761,8 @@ func (ec *executionContext) fieldContext_Secret_accountName(_ context.Context, f return fc, nil } -func (ec *executionContext) _Secret_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_apiVersion(ctx, field) +func (ec *executionContext) _Router_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_apiVersion(ctx, field) if err != nil { return graphql.Null } @@ -35829,9 +36789,9 @@ func (ec *executionContext) _Secret_apiVersion(ctx context.Context, field graphq return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, @@ -35842,8 +36802,8 @@ func (ec *executionContext) fieldContext_Secret_apiVersion(_ context.Context, fi return fc, nil } -func (ec *executionContext) _Secret_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_createdBy(ctx, field) +func (ec *executionContext) _Router_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_createdBy(ctx, field) if err != nil { return graphql.Null } @@ -35873,9 +36833,9 @@ func (ec *executionContext) _Secret_createdBy(ctx context.Context, field graphql return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, @@ -35894,8 +36854,8 @@ func (ec *executionContext) fieldContext_Secret_createdBy(_ context.Context, fie return fc, nil } -func (ec *executionContext) _Secret_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_creationTime(ctx, field) +func (ec *executionContext) _Router_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_creationTime(ctx, field) if err != nil { return graphql.Null } @@ -35908,7 +36868,7 @@ func (ec *executionContext) _Secret_creationTime(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Secret().CreationTime(rctx, obj) + return ec.resolvers.Router().CreationTime(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -35925,9 +36885,9 @@ func (ec *executionContext) _Secret_creationTime(ctx context.Context, field grap return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: true, IsResolver: true, @@ -35938,49 +36898,8 @@ func (ec *executionContext) fieldContext_Secret_creationTime(_ context.Context, return fc, nil } -func (ec *executionContext) _Secret_data(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_data(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Secret().Data(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(map[string]interface{}) - fc.Result = res - return ec.marshalOMap2map(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Secret_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Secret", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Map does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _Secret_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_displayName(ctx, field) +func (ec *executionContext) _Router_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_displayName(ctx, field) if err != nil { return graphql.Null } @@ -36010,9 +36929,9 @@ func (ec *executionContext) _Secret_displayName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, @@ -36023,8 +36942,8 @@ func (ec *executionContext) fieldContext_Secret_displayName(_ context.Context, f return fc, nil } -func (ec *executionContext) _Secret_environmentName(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_environmentName(ctx, field) +func (ec *executionContext) _Router_enabled(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_enabled(ctx, field) if err != nil { return graphql.Null } @@ -36037,38 +36956,35 @@ func (ec *executionContext) _Secret_environmentName(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EnvironmentName, nil + return obj.Enabled, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Secret_for(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_for(ctx, field) +func (ec *executionContext) _Router_environmentName(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_environmentName(ctx, field) if err != nil { return graphql.Null } @@ -36081,45 +36997,38 @@ func (ec *executionContext) _Secret_for(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Secret().For(rctx, obj) + return obj.EnvironmentName, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*model.GithubComKloudliteAPIAppsConsoleInternalEntitiesSecretCreatedFor) + res := resTmp.(string) fc.Result = res - return ec.marshalOGithub__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsConsoleInternalEntitiesSecretCreatedFor(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_for(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_name(ctx, field) - case "namespace": - return ec.fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_namespace(ctx, field) - case "refId": - return ec.fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_refId(ctx, field) - case "resourceType": - return ec.fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_resourceType(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Secret_id(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_id(ctx, field) +func (ec *executionContext) _Router_id(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_id(ctx, field) if err != nil { return graphql.Null } @@ -36149,9 +37058,9 @@ func (ec *executionContext) _Secret_id(ctx context.Context, field graphql.Collec return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, @@ -36162,93 +37071,8 @@ func (ec *executionContext) fieldContext_Secret_id(_ context.Context, field grap return fc, nil } -func (ec *executionContext) _Secret_immutable(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_immutable(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Immutable, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*bool) - fc.Result = res - return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Secret_immutable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Secret", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _Secret_isReadyOnly(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_isReadyOnly(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Secret().IsReadyOnly(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Secret_isReadyOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Secret", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _Secret_kind(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_kind(ctx, field) +func (ec *executionContext) _Router_kind(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_kind(ctx, field) if err != nil { return graphql.Null } @@ -36275,9 +37099,9 @@ func (ec *executionContext) _Secret_kind(ctx context.Context, field graphql.Coll return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, @@ -36288,8 +37112,8 @@ func (ec *executionContext) fieldContext_Secret_kind(_ context.Context, field gr return fc, nil } -func (ec *executionContext) _Secret_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_lastUpdatedBy(ctx, field) +func (ec *executionContext) _Router_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_lastUpdatedBy(ctx, field) if err != nil { return graphql.Null } @@ -36319,9 +37143,9 @@ func (ec *executionContext) _Secret_lastUpdatedBy(ctx context.Context, field gra return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, @@ -36340,8 +37164,8 @@ func (ec *executionContext) fieldContext_Secret_lastUpdatedBy(_ context.Context, return fc, nil } -func (ec *executionContext) _Secret_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_markedForDeletion(ctx, field) +func (ec *executionContext) _Router_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_markedForDeletion(ctx, field) if err != nil { return graphql.Null } @@ -36368,9 +37192,9 @@ func (ec *executionContext) _Secret_markedForDeletion(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, @@ -36381,8 +37205,8 @@ func (ec *executionContext) fieldContext_Secret_markedForDeletion(_ context.Cont return fc, nil } -func (ec *executionContext) _Secret_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_metadata(ctx, field) +func (ec *executionContext) _Router_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_metadata(ctx, field) if err != nil { return graphql.Null } @@ -36409,9 +37233,9 @@ func (ec *executionContext) _Secret_metadata(ctx context.Context, field graphql. return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, @@ -36438,8 +37262,8 @@ func (ec *executionContext) fieldContext_Secret_metadata(_ context.Context, fiel return fc, nil } -func (ec *executionContext) _Secret_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_recordVersion(ctx, field) +func (ec *executionContext) _Router_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_recordVersion(ctx, field) if err != nil { return graphql.Null } @@ -36469,9 +37293,9 @@ func (ec *executionContext) _Secret_recordVersion(ctx context.Context, field gra return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, @@ -36482,8 +37306,8 @@ func (ec *executionContext) fieldContext_Secret_recordVersion(_ context.Context, return fc, nil } -func (ec *executionContext) _Secret_stringData(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_stringData(ctx, field) +func (ec *executionContext) _Router_spec(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_spec(ctx, field) if err != nil { return graphql.Null } @@ -36496,35 +37320,58 @@ func (ec *executionContext) _Secret_stringData(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Secret().StringData(rctx, obj) + return ec.resolvers.Router().Spec(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(map[string]interface{}) + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1RouterSpec) fc.Result = res - return ec.marshalOMap2map(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__RouterSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouterSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_stringData(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Map does not have child fields") + switch field.Name { + case "backendProtocol": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_backendProtocol(ctx, field) + case "basicAuth": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_basicAuth(ctx, field) + case "cors": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_cors(ctx, field) + case "domains": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_domains(ctx, field) + case "https": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_https(ctx, field) + case "ingressClass": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_ingressClass(ctx, field) + case "maxBodySizeInMB": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_maxBodySizeInMB(ctx, field) + case "rateLimit": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_rateLimit(ctx, field) + case "routes": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_routes(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__RouterSpec", field.Name) }, } return fc, nil } -func (ec *executionContext) _Secret_syncStatus(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_syncStatus(ctx, field) +func (ec *executionContext) _Router_status(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_status(ctx, field) if err != nil { return graphql.Null } @@ -36537,52 +37384,51 @@ func (ec *executionContext) _Secret_syncStatus(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SyncStatus, nil + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(types.SyncStatus) + res := resTmp.(operator.Status) fc.Result = res - return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "action": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_action(ctx, field) - case "error": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_error(ctx, field) - case "lastSyncedAt": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_lastSyncedAt(ctx, field) - case "recordVersion": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_recordVersion(ctx, field) - case "state": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_state(ctx, field) - case "syncScheduledAt": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_syncScheduledAt(ctx, field) + case "checkList": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checkList(ctx, field) + case "checks": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checks(ctx, field) + case "isReady": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_isReady(ctx, field) + case "lastReadyGeneration": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReadyGeneration(ctx, field) + case "lastReconcileTime": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReconcileTime(ctx, field) + case "message": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_message(ctx, field) + case "resources": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_resources(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___pkg___types__SyncStatus", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___pkg___operator__Status", field.Name) }, } return fc, nil } -func (ec *executionContext) _Secret_type(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_type(ctx, field) +func (ec *executionContext) _Router_syncStatus(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_syncStatus(ctx, field) if err != nil { return graphql.Null } @@ -36595,35 +37441,52 @@ func (ec *executionContext) _Secret_type(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Secret().Type(rctx, obj) + return obj.SyncStatus, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*model.K8sIoAPICoreV1SecretType) + res := resTmp.(types.SyncStatus) fc.Result = res - return ec.marshalOK8s__io___api___core___v1__SecretType2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretType(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type K8s__io___api___core___v1__SecretType does not have child fields") + switch field.Name { + case "action": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_action(ctx, field) + case "error": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_error(ctx, field) + case "lastSyncedAt": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_lastSyncedAt(ctx, field) + case "recordVersion": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_recordVersion(ctx, field) + case "state": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_state(ctx, field) + case "syncScheduledAt": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_syncScheduledAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___pkg___types__SyncStatus", field.Name) }, } return fc, nil } -func (ec *executionContext) _Secret_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Secret_updateTime(ctx, field) +func (ec *executionContext) _Router_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Router_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -36636,7 +37499,7 @@ func (ec *executionContext) _Secret_updateTime(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Secret().UpdateTime(rctx, obj) + return ec.resolvers.Router().UpdateTime(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -36653,9 +37516,9 @@ func (ec *executionContext) _Secret_updateTime(ctx context.Context, field graphq return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Router_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Secret", + Object: "Router", Field: field, IsMethod: true, IsResolver: true, @@ -36666,8 +37529,8 @@ func (ec *executionContext) fieldContext_Secret_updateTime(_ context.Context, fi return fc, nil } -func (ec *executionContext) _SecretEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.SecretEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SecretEdge_cursor(ctx, field) +func (ec *executionContext) _RouterEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.RouterEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RouterEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -36697,9 +37560,9 @@ func (ec *executionContext) _SecretEdge_cursor(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SecretEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RouterEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SecretEdge", + Object: "RouterEdge", Field: field, IsMethod: false, IsResolver: false, @@ -36710,8 +37573,1189 @@ func (ec *executionContext) fieldContext_SecretEdge_cursor(_ context.Context, fi return fc, nil } -func (ec *executionContext) _SecretEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.SecretEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SecretEdge_node(ctx, field) +func (ec *executionContext) _RouterEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.RouterEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RouterEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*entities.Router) + fc.Result = res + return ec.marshalNRouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RouterEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RouterEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_Router_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_Router_apiVersion(ctx, field) + case "createdBy": + return ec.fieldContext_Router_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_Router_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_Router_displayName(ctx, field) + case "enabled": + return ec.fieldContext_Router_enabled(ctx, field) + case "environmentName": + return ec.fieldContext_Router_environmentName(ctx, field) + case "id": + return ec.fieldContext_Router_id(ctx, field) + case "kind": + return ec.fieldContext_Router_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_Router_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_Router_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_Router_metadata(ctx, field) + case "recordVersion": + return ec.fieldContext_Router_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_Router_spec(ctx, field) + case "status": + return ec.fieldContext_Router_status(ctx, field) + case "syncStatus": + return ec.fieldContext_Router_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_Router_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Router", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _RouterPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.RouterPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RouterPaginatedRecords_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*model.RouterEdge) + fc.Result = res + return ec.marshalNRouterEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRouterEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RouterPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RouterPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "cursor": + return ec.fieldContext_RouterEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_RouterEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type RouterEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _RouterPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.RouterPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RouterPaginatedRecords_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*model.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RouterPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RouterPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _RouterPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.RouterPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RouterPaginatedRecords_totalCount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TotalCount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RouterPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RouterPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_accountName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AccountName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_apiVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.APIVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_createdBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_creationTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Secret().CreationTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_data(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_data(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Secret().Data(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(map[string]interface{}) + fc.Result = res + return ec.marshalOMap2map(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Map does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_displayName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DisplayName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_environmentName(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_environmentName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnvironmentName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_for(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_for(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Secret().For(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteAPIAppsConsoleInternalEntitiesSecretCreatedFor) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsConsoleInternalEntitiesSecretCreatedFor(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_for(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_name(ctx, field) + case "namespace": + return ec.fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_namespace(ctx, field) + case "refId": + return ec.fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_refId(ctx, field) + case "resourceType": + return ec.fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_resourceType(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_id(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Id, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(repos.ID) + fc.Result = res + return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_immutable(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_immutable(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Immutable, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_immutable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_isReadyOnly(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_isReadyOnly(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Secret().IsReadyOnly(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_isReadyOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_kind(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_kind(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Kind, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_lastUpdatedBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LastUpdatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_markedForDeletion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarkedForDeletion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_metadata(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ObjectMeta, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(v12.ObjectMeta) + fc.Result = res + return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "annotations": + return ec.fieldContext_Metadata_annotations(ctx, field) + case "creationTimestamp": + return ec.fieldContext_Metadata_creationTimestamp(ctx, field) + case "deletionTimestamp": + return ec.fieldContext_Metadata_deletionTimestamp(ctx, field) + case "generation": + return ec.fieldContext_Metadata_generation(ctx, field) + case "labels": + return ec.fieldContext_Metadata_labels(ctx, field) + case "name": + return ec.fieldContext_Metadata_name(ctx, field) + case "namespace": + return ec.fieldContext_Metadata_namespace(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Metadata", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_recordVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RecordVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_stringData(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_stringData(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Secret().StringData(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(map[string]interface{}) + fc.Result = res + return ec.marshalOMap2map(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_stringData(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Map does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_syncStatus(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_syncStatus(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SyncStatus, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(types.SyncStatus) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "action": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_action(ctx, field) + case "error": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_error(ctx, field) + case "lastSyncedAt": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_lastSyncedAt(ctx, field) + case "recordVersion": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_recordVersion(ctx, field) + case "state": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_state(ctx, field) + case "syncScheduledAt": + return ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_syncScheduledAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___pkg___types__SyncStatus", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_type(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Secret().Type(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.K8sIoAPICoreV1SecretType) + fc.Result = res + return ec.marshalOK8s__io___api___core___v1__SecretType2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type K8s__io___api___core___v1__SecretType does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Secret_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.Secret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Secret_updateTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Secret().UpdateTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Secret_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Secret", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SecretEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.SecretEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SecretEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SecretEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SecretEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SecretEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.SecretEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SecretEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -42049,6 +44093,88 @@ func (ec *executionContext) unmarshalInputPortIn(ctx context.Context, obj interf return it, nil } +func (ec *executionContext) unmarshalInputRegistryImageCredentialsIn(ctx context.Context, obj interface{}) (model.RegistryImageCredentialsIn, error) { + var it model.RegistryImageCredentialsIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"accountName", "password"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "accountName": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("accountName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.AccountName = data + case "password": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Password = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputRegistryImageIn(ctx context.Context, obj interface{}) (entities.RegistryImage, error) { + var it entities.RegistryImage + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"accountName", "imageName", "imageTag", "meta"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "accountName": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("accountName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.AccountName = data + case "imageName": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("imageName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.ImageName = data + case "imageTag": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("imageTag")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.ImageTag = data + case "meta": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("meta")) + data, err := ec.unmarshalNMap2map(ctx, v) + if err != nil { + return it, err + } + it.Meta = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputRouterIn(ctx context.Context, obj interface{}) (entities.Router, error) { var it entities.Router asMap := map[string]interface{}{} @@ -42539,6 +44665,33 @@ func (ec *executionContext) unmarshalInputSearchProjects(ctx context.Context, ob return it, nil } +func (ec *executionContext) unmarshalInputSearchRegistryImages(ctx context.Context, obj interface{}) (model.SearchRegistryImages, error) { + var it model.SearchRegistryImages + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"text"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "text": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.Text = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputSearchRouters(ctx context.Context, obj interface{}) (model.SearchRouters, error) { var it model.SearchRouters asMap := map[string]interface{}{} @@ -48455,6 +50608,13 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) if out.Values[i] == graphql.Null { out.Invalids++ } + case "core_deleteRegistryImage": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_core_deleteRegistryImage(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } case "core_createApp": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Mutation_core_createApp(ctx, field) @@ -48859,6 +51019,66 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "core_getRegistryImageURL": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_core_getRegistryImageURL(ctx, field) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "core_getRegistryImage": + field := field + + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_core_getRegistryImage(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "core_listRegistryImages": + field := field + + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_core_listRegistryImages(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) case "core_listApps": field := field @@ -49456,6 +51676,401 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } +var registryImageImplementors = []string{"RegistryImage"} + +func (ec *executionContext) _RegistryImage(ctx context.Context, sel ast.SelectionSet, obj *entities.RegistryImage) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, registryImageImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("RegistryImage") + case "accountName": + out.Values[i] = ec._RegistryImage_accountName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "creationTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._RegistryImage_creationTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "id": + out.Values[i] = ec._RegistryImage_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "imageName": + out.Values[i] = ec._RegistryImage_imageName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "imageTag": + out.Values[i] = ec._RegistryImage_imageTag(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "markedForDeletion": + out.Values[i] = ec._RegistryImage_markedForDeletion(ctx, field, obj) + case "meta": + out.Values[i] = ec._RegistryImage_meta(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "recordVersion": + out.Values[i] = ec._RegistryImage_recordVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "updateTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._RegistryImage_updateTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var registryImageCredentialsImplementors = []string{"RegistryImageCredentials"} + +func (ec *executionContext) _RegistryImageCredentials(ctx context.Context, sel ast.SelectionSet, obj *model.RegistryImageCredentials) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, registryImageCredentialsImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("RegistryImageCredentials") + case "accountName": + out.Values[i] = ec._RegistryImageCredentials_accountName(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "createdBy": + out.Values[i] = ec._RegistryImageCredentials_createdBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "creationTime": + out.Values[i] = ec._RegistryImageCredentials_creationTime(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "id": + out.Values[i] = ec._RegistryImageCredentials_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "markedForDeletion": + out.Values[i] = ec._RegistryImageCredentials_markedForDeletion(ctx, field, obj) + case "password": + out.Values[i] = ec._RegistryImageCredentials_password(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "recordVersion": + out.Values[i] = ec._RegistryImageCredentials_recordVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "updateTime": + out.Values[i] = ec._RegistryImageCredentials_updateTime(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var registryImageCredentialsEdgeImplementors = []string{"RegistryImageCredentialsEdge"} + +func (ec *executionContext) _RegistryImageCredentialsEdge(ctx context.Context, sel ast.SelectionSet, obj *model.RegistryImageCredentialsEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, registryImageCredentialsEdgeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("RegistryImageCredentialsEdge") + case "cursor": + out.Values[i] = ec._RegistryImageCredentialsEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "node": + out.Values[i] = ec._RegistryImageCredentialsEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var registryImageCredentialsPaginatedRecordsImplementors = []string{"RegistryImageCredentialsPaginatedRecords"} + +func (ec *executionContext) _RegistryImageCredentialsPaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.RegistryImageCredentialsPaginatedRecords) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, registryImageCredentialsPaginatedRecordsImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("RegistryImageCredentialsPaginatedRecords") + case "edges": + out.Values[i] = ec._RegistryImageCredentialsPaginatedRecords_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pageInfo": + out.Values[i] = ec._RegistryImageCredentialsPaginatedRecords_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "totalCount": + out.Values[i] = ec._RegistryImageCredentialsPaginatedRecords_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var registryImageEdgeImplementors = []string{"RegistryImageEdge"} + +func (ec *executionContext) _RegistryImageEdge(ctx context.Context, sel ast.SelectionSet, obj *model.RegistryImageEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, registryImageEdgeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("RegistryImageEdge") + case "cursor": + out.Values[i] = ec._RegistryImageEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "node": + out.Values[i] = ec._RegistryImageEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var registryImagePaginatedRecordsImplementors = []string{"RegistryImagePaginatedRecords"} + +func (ec *executionContext) _RegistryImagePaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.RegistryImagePaginatedRecords) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, registryImagePaginatedRecordsImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("RegistryImagePaginatedRecords") + case "edges": + out.Values[i] = ec._RegistryImagePaginatedRecords_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pageInfo": + out.Values[i] = ec._RegistryImagePaginatedRecords_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "totalCount": + out.Values[i] = ec._RegistryImagePaginatedRecords_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + var routerImplementors = []string{"Router"} func (ec *executionContext) _Router(ctx context.Context, sel ast.SelectionSet, obj *entities.Router) graphql.Marshaler { @@ -51123,6 +53738,16 @@ func (ec *executionContext) marshalNGithub__com___kloudlite___api___common__Crea return ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy(ctx, sel, &v) } +func (ec *executionContext) marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2ᚖgithubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx context.Context, sel ast.SelectionSet, v *common.CreatedOrUpdatedBy) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy(ctx, sel, v) +} + func (ec *executionContext) unmarshalNGithub__com___kloudlite___api___pkg___repos__MatchType2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchType(ctx context.Context, v interface{}) (repos.MatchType, error) { tmp, err := graphql.UnmarshalString(v) res := repos.MatchType(tmp) @@ -51238,7 +53863,466 @@ func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainer2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainer(ctx, sel, v[i]) + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainer2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainer(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainer2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainer(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerInᚄ(ctx context.Context, v interface{}) ([]*model.GithubComKloudliteOperatorApisCrdsV1AppContainerIn, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.GithubComKloudliteOperatorApisCrdsV1AppContainerIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1AppContainerIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppInterceptPortMappings(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1AppInterceptPortMappings) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn2ᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐAppInterceptPortMappings(ctx context.Context, v interface{}) (*v1.AppInterceptPortMappings, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpec2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpec(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1AppSpec) graphql.Marshaler { + return ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec(ctx, sel, &v) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpecIn(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1AppSpecIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1AppSpecIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSvc2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvc(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1AppSvc) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__AppSvc(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvcIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1AppSvcIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret, error) { + var res model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) graphql.Marshaler { + return v +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnv2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnv(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnvIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ContainerEnvIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolume2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolume(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolume) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFrom2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFrom(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1EnvFrom) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__EnvFrom(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1EnvFromIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode2githubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐEnvironmentRoutingMode(ctx context.Context, v interface{}) (v1.EnvironmentRoutingMode, error) { + tmp, err := graphql.UnmarshalString(v) + res := v1.EnvironmentRoutingMode(tmp) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode2githubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐEnvironmentRoutingMode(ctx context.Context, sel ast.SelectionSet, v v1.EnvironmentRoutingMode) graphql.Marshaler { + res := graphql.MarshalString(string(v)) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppRecordType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ExternalAppRecordType(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ExternalAppRecordType, error) { + var res model.GithubComKloudliteOperatorApisCrdsV1ExternalAppRecordType + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppRecordType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ExternalAppRecordType(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1ExternalAppRecordType) graphql.Marshaler { + return v +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedResourceSpec(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpec) graphql.Marshaler { + return ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec(ctx, sel, &v) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedResourceSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpec) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpecIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedResourceSpecIn(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpecIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpecIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedResourceSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpecIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpecIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1MresResourceTemplate(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1MresResourceTemplate) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__MresResourceTemplateIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1MresResourceTemplateIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1MresResourceTemplateIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__MresResourceTemplateIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__Route2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Route(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Route) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__Route(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__RouteIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouteIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1RouteIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__RouteIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__RouterSpec2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouterSpec(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1RouterSpec) graphql.Marshaler { + return ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec(ctx, sel, &v) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__RouterSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouterSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1RouterSpec) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__RouterSpecIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouterSpecIn(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1RouterSpecIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__RouterSpecIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__RouterSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouterSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1RouterSpecIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__RouterSpecIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ServiceTemplate(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___pkg___operator__CheckMeta2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMeta(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorPkgOperatorCheckMeta) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___pkg___operator__CheckMeta(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___pkg___operator__CheckMetaIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMetaIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorPkgOperatorCheckMetaIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___pkg___operator__CheckMetaIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___pkg___operator__ResourceRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorResourceRef(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorPkgOperatorResourceRef) 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") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___pkg___operator__ResourceRef(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___pkg___operator__ResourceRefIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorResourceRefIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorPkgOperatorResourceRefIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___pkg___operator__ResourceRefIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx context.Context, v interface{}) (repos.ID, error) { + tmp, err := graphql.UnmarshalString(v) + res := repos.ID(tmp) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx context.Context, sel ast.SelectionSet, v repos.ID) graphql.Marshaler { + res := graphql.MarshalString(string(v)) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) marshalNImagePullSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImagePullSecret(ctx context.Context, sel ast.SelectionSet, v *entities.ImagePullSecret) 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") + } + return graphql.Null + } + return ec._ImagePullSecret(ctx, sel, v) +} + +func (ec *executionContext) marshalNImagePullSecretEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImagePullSecretEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ImagePullSecretEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNImagePullSecretEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImagePullSecretEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNImagePullSecretEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImagePullSecretEdge(ctx context.Context, sel ast.SelectionSet, v *model.ImagePullSecretEdge) 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") + } + return graphql.Null + } + return ec._ImagePullSecretEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNImagePullSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImagePullSecret(ctx context.Context, v interface{}) (entities.ImagePullSecret, error) { + res, err := ec.unmarshalInputImagePullSecretIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNImportedManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImportedManagedResource(ctx context.Context, sel ast.SelectionSet, v *entities.ImportedManagedResource) 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") + } + return graphql.Null + } + return ec._ImportedManagedResource(ctx, sel, v) +} + +func (ec *executionContext) marshalNImportedManagedResourceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImportedManagedResourceEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ImportedManagedResourceEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNImportedManagedResourceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImportedManagedResourceEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -51258,353 +54342,122 @@ func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___ return ret } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainer2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainer(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) 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") - } - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerInᚄ(ctx context.Context, v interface{}) ([]*model.GithubComKloudliteOperatorApisCrdsV1AppContainerIn, error) { - var vSlice []interface{} - if v != nil { - vSlice = graphql.CoerceList(v) - } - var err error - res := make([]*model.GithubComKloudliteOperatorApisCrdsV1AppContainerIn, len(vSlice)) - for i := range vSlice { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerIn(ctx, vSlice[i]) - if err != nil { - return nil, err - } - } - return res, nil -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1AppContainerIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppInterceptPortMappings(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1AppInterceptPortMappings) 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") - } - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn2ᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐAppInterceptPortMappings(ctx context.Context, v interface{}) (*v1.AppInterceptPortMappings, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpec2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpec(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1AppSpec) graphql.Marshaler { - return ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec(ctx, sel, &v) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) graphql.Marshaler { +func (ec *executionContext) marshalNImportedManagedResourceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImportedManagedResourceEdge(ctx context.Context, sel ast.SelectionSet, v *model.ImportedManagedResourceEdge) 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") } return graphql.Null } - return ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec(ctx, sel, v) + return ec._ImportedManagedResourceEdge(ctx, sel, v) } -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpecIn(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1AppSpecIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn(ctx, v) +func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { + res, err := graphql.UnmarshalInt(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1AppSpecIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSvc2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvc(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1AppSvc) graphql.Marshaler { - if v == nil { +func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { + res := graphql.MarshalInt(v) + if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } - return graphql.Null } - return ec._Github__com___kloudlite___operator___apis___crds___v1__AppSvc(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvcIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1AppSvcIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) + return res } -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret, error) { - var res model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret - err := res.UnmarshalGQL(v) +func (ec *executionContext) unmarshalNInt2int64(ctx context.Context, v interface{}) (int64, error) { + res, err := graphql.UnmarshalInt64(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) graphql.Marshaler { - return v -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnv2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnv(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) 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") - } - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnvIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ContainerEnvIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolume2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolume(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolume) graphql.Marshaler { - if v == nil { +func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler { + res := graphql.MarshalInt64(v) + if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } - return graphql.Null } - return ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) + return res } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem) graphql.Marshaler { +func (ec *executionContext) marshalNK8s__io___api___core___v1__Toleration2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Toleration(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1Toleration) 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") } return graphql.Null } - return ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem(ctx, sel, v) + return ec._K8s__io___api___core___v1__Toleration(ctx, sel, v) } -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn(ctx, v) +func (ec *executionContext) unmarshalNK8s__io___api___core___v1__TolerationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationIn(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1TolerationIn, error) { + res, err := ec.unmarshalInputK8s__io___api___core___v1__TolerationIn(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFrom2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFrom(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1EnvFrom) graphql.Marshaler { +func (ec *executionContext) marshalNK8s__io___api___core___v1__TopologySpreadConstraint2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraint(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1TopologySpreadConstraint) 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") } return graphql.Null } - return ec._Github__com___kloudlite___operator___apis___crds___v1__EnvFrom(ctx, sel, v) + return ec._K8s__io___api___core___v1__TopologySpreadConstraint(ctx, sel, v) } -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1EnvFromIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn(ctx, v) +func (ec *executionContext) unmarshalNK8s__io___api___core___v1__TopologySpreadConstraintIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraintIn(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1TopologySpreadConstraintIn, error) { + res, err := ec.unmarshalInputK8s__io___api___core___v1__TopologySpreadConstraintIn(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode2githubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐEnvironmentRoutingMode(ctx context.Context, v interface{}) (v1.EnvironmentRoutingMode, error) { - tmp, err := graphql.UnmarshalString(v) - res := v1.EnvironmentRoutingMode(tmp) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode2githubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐEnvironmentRoutingMode(ctx context.Context, sel ast.SelectionSet, v v1.EnvironmentRoutingMode) graphql.Marshaler { - res := graphql.MarshalString(string(v)) - if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - } - return res -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppRecordType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ExternalAppRecordType(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ExternalAppRecordType, error) { - var res model.GithubComKloudliteOperatorApisCrdsV1ExternalAppRecordType +func (ec *executionContext) unmarshalNK8s__io___api___core___v1__UnsatisfiableConstraintAction2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1UnsatisfiableConstraintAction(ctx context.Context, v interface{}) (model.K8sIoAPICoreV1UnsatisfiableConstraintAction, error) { + var res model.K8sIoAPICoreV1UnsatisfiableConstraintAction err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppRecordType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ExternalAppRecordType(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1ExternalAppRecordType) graphql.Marshaler { +func (ec *executionContext) marshalNK8s__io___api___core___v1__UnsatisfiableConstraintAction2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1UnsatisfiableConstraintAction(ctx context.Context, sel ast.SelectionSet, v model.K8sIoAPICoreV1UnsatisfiableConstraintAction) graphql.Marshaler { return v } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedResourceSpec(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpec) graphql.Marshaler { - return ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec(ctx, sel, &v) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedResourceSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpec) 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") - } - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpecIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedResourceSpecIn(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpecIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpecIn(ctx, v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedResourceSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpecIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpecIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) 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") - } - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1MresResourceTemplate(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1MresResourceTemplate) 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") - } - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__MresResourceTemplateIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1MresResourceTemplateIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1MresResourceTemplateIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__MresResourceTemplateIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__Route2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Route(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Route) 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") - } - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__Route(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__RouteIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouteIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1RouteIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__RouteIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__RouterSpec2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouterSpec(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1RouterSpec) graphql.Marshaler { - return ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec(ctx, sel, &v) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__RouterSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouterSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1RouterSpec) 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") - } - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__RouterSpecIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouterSpecIn(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1RouterSpecIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__RouterSpecIn(ctx, v) +func (ec *executionContext) unmarshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(ctx context.Context, v interface{}) (model.K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator, error) { + var res model.K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator + err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__RouterSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouterSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1RouterSpecIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__RouterSpecIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ServiceTemplate(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) 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") - } - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___pkg___operator__CheckMeta2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMeta(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorPkgOperatorCheckMeta) 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") - } - return graphql.Null - } - return ec._Github__com___kloudlite___operator___pkg___operator__CheckMeta(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___pkg___operator__CheckMetaIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMetaIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorPkgOperatorCheckMetaIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___pkg___operator__CheckMetaIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) +func (ec *executionContext) marshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(ctx context.Context, sel ast.SelectionSet, v model.K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator) graphql.Marshaler { + return v } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___pkg___operator__ResourceRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorResourceRef(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorPkgOperatorResourceRef) graphql.Marshaler { +func (ec *executionContext) marshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement) 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") } return graphql.Null } - return ec._Github__com___kloudlite___operator___pkg___operator__ResourceRef(ctx, sel, v) + return ec._K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement(ctx, sel, v) } -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___pkg___operator__ResourceRefIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorResourceRefIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorPkgOperatorResourceRefIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___pkg___operator__ResourceRefIn(ctx, v) +func (ec *executionContext) unmarshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn(ctx context.Context, v interface{}) (*model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn, error) { + res, err := ec.unmarshalInputK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx context.Context, v interface{}) (repos.ID, error) { - tmp, err := graphql.UnmarshalString(v) - res := repos.ID(tmp) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx context.Context, sel ast.SelectionSet, v repos.ID) graphql.Marshaler { - res := graphql.MarshalString(string(v)) - if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - } - return res -} - -func (ec *executionContext) marshalNImagePullSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImagePullSecret(ctx context.Context, sel ast.SelectionSet, v *entities.ImagePullSecret) graphql.Marshaler { +func (ec *executionContext) marshalNManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx context.Context, sel ast.SelectionSet, v *entities.ManagedResource) 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") } return graphql.Null } - return ec._ImagePullSecret(ctx, sel, v) + return ec._ManagedResource(ctx, sel, v) } -func (ec *executionContext) marshalNImagePullSecretEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImagePullSecretEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ImagePullSecretEdge) graphql.Marshaler { +func (ec *executionContext) marshalNManagedResourceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐManagedResourceEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ManagedResourceEdge) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -51628,7 +54481,7 @@ func (ec *executionContext) marshalNImagePullSecretEdge2ᚕᚖgithubᚗcomᚋklo if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNImagePullSecretEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImagePullSecretEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNManagedResourceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐManagedResourceEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -51648,32 +54501,22 @@ func (ec *executionContext) marshalNImagePullSecretEdge2ᚕᚖgithubᚗcomᚋklo return ret } -func (ec *executionContext) marshalNImagePullSecretEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImagePullSecretEdge(ctx context.Context, sel ast.SelectionSet, v *model.ImagePullSecretEdge) graphql.Marshaler { +func (ec *executionContext) marshalNManagedResourceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐManagedResourceEdge(ctx context.Context, sel ast.SelectionSet, v *model.ManagedResourceEdge) 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") } return graphql.Null } - return ec._ImagePullSecretEdge(ctx, sel, v) + return ec._ManagedResourceEdge(ctx, sel, v) } -func (ec *executionContext) unmarshalNImagePullSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImagePullSecret(ctx context.Context, v interface{}) (entities.ImagePullSecret, error) { - res, err := ec.unmarshalInputImagePullSecretIn(ctx, v) +func (ec *executionContext) unmarshalNManagedResourceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx context.Context, v interface{}) (entities.ManagedResource, error) { + res, err := ec.unmarshalInputManagedResourceIn(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNImportedManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImportedManagedResource(ctx context.Context, sel ast.SelectionSet, v *entities.ImportedManagedResource) 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") - } - return graphql.Null - } - return ec._ImportedManagedResource(ctx, sel, v) -} - -func (ec *executionContext) marshalNImportedManagedResourceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImportedManagedResourceEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ImportedManagedResourceEdge) graphql.Marshaler { +func (ec *executionContext) marshalNManagedResourceKeyValueRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐManagedResourceKeyValueRefᚄ(ctx context.Context, sel ast.SelectionSet, v []*domain.ManagedResourceKeyValueRef) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -51697,7 +54540,7 @@ func (ec *executionContext) marshalNImportedManagedResourceEdge2ᚕᚖgithubᚗc if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNImportedManagedResourceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImportedManagedResourceEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNManagedResourceKeyValueRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐManagedResourceKeyValueRef(ctx, sel, v[i]) } if isLen1 { f(i) @@ -51717,38 +54560,29 @@ func (ec *executionContext) marshalNImportedManagedResourceEdge2ᚕᚖgithubᚗc return ret } -func (ec *executionContext) marshalNImportedManagedResourceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImportedManagedResourceEdge(ctx context.Context, sel ast.SelectionSet, v *model.ImportedManagedResourceEdge) graphql.Marshaler { +func (ec *executionContext) marshalNManagedResourceKeyValueRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐManagedResourceKeyValueRef(ctx context.Context, sel ast.SelectionSet, v *domain.ManagedResourceKeyValueRef) 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") } return graphql.Null } - return ec._ImportedManagedResourceEdge(ctx, sel, v) + return ec._ManagedResourceKeyValueRef(ctx, sel, v) } -func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { - res, err := graphql.UnmarshalInt(v) +func (ec *executionContext) unmarshalNMap2map(ctx context.Context, v interface{}) (map[string]any, error) { + res, err := graphql.UnmarshalMap(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { - res := graphql.MarshalInt(v) - if res == graphql.Null { +func (ec *executionContext) marshalNMap2map(ctx context.Context, sel ast.SelectionSet, v map[string]any) 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") } + return graphql.Null } - return res -} - -func (ec *executionContext) unmarshalNInt2int64(ctx context.Context, v interface{}) (int64, error) { - res, err := graphql.UnmarshalInt64(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler { - res := graphql.MarshalInt64(v) + res := graphql.MarshalMap(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -51757,82 +54591,51 @@ func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.Selec return res } -func (ec *executionContext) marshalNK8s__io___api___core___v1__Toleration2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Toleration(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1Toleration) 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") - } - return graphql.Null - } - return ec._K8s__io___api___core___v1__Toleration(ctx, sel, v) +func (ec *executionContext) marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, sel ast.SelectionSet, v v12.ObjectMeta) graphql.Marshaler { + return ec._Metadata(ctx, sel, &v) } -func (ec *executionContext) unmarshalNK8s__io___api___core___v1__TolerationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationIn(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1TolerationIn, error) { - res, err := ec.unmarshalInputK8s__io___api___core___v1__TolerationIn(ctx, v) +func (ec *executionContext) unmarshalNMetadataIn2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, v interface{}) (v12.ObjectMeta, error) { + res, err := ec.unmarshalInputMetadataIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, v interface{}) (*v12.ObjectMeta, error) { + res, err := ec.unmarshalInputMetadataIn(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNK8s__io___api___core___v1__TopologySpreadConstraint2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraint(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1TopologySpreadConstraint) graphql.Marshaler { +func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *model.PageInfo) 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") } return graphql.Null } - return ec._K8s__io___api___core___v1__TopologySpreadConstraint(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNK8s__io___api___core___v1__TopologySpreadConstraintIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraintIn(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1TopologySpreadConstraintIn, error) { - res, err := ec.unmarshalInputK8s__io___api___core___v1__TopologySpreadConstraintIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) unmarshalNK8s__io___api___core___v1__UnsatisfiableConstraintAction2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1UnsatisfiableConstraintAction(ctx context.Context, v interface{}) (model.K8sIoAPICoreV1UnsatisfiableConstraintAction, error) { - var res model.K8sIoAPICoreV1UnsatisfiableConstraintAction - err := res.UnmarshalGQL(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNK8s__io___api___core___v1__UnsatisfiableConstraintAction2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1UnsatisfiableConstraintAction(ctx context.Context, sel ast.SelectionSet, v model.K8sIoAPICoreV1UnsatisfiableConstraintAction) graphql.Marshaler { - return v -} - -func (ec *executionContext) unmarshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(ctx context.Context, v interface{}) (model.K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator, error) { - var res model.K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator - err := res.UnmarshalGQL(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(ctx context.Context, sel ast.SelectionSet, v model.K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator) graphql.Marshaler { - return v + return ec._PageInfo(ctx, sel, v) } -func (ec *executionContext) marshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement) graphql.Marshaler { +func (ec *executionContext) marshalNRegistryImage2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRegistryImage(ctx context.Context, sel ast.SelectionSet, v *entities.RegistryImage) 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") } return graphql.Null } - return ec._K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn(ctx context.Context, v interface{}) (*model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn, error) { - res, err := ec.unmarshalInputK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) + return ec._RegistryImage(ctx, sel, v) } -func (ec *executionContext) marshalNManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx context.Context, sel ast.SelectionSet, v *entities.ManagedResource) graphql.Marshaler { +func (ec *executionContext) marshalNRegistryImageCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageCredentials(ctx context.Context, sel ast.SelectionSet, v *model.RegistryImageCredentials) 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") } return graphql.Null } - return ec._ManagedResource(ctx, sel, v) + return ec._RegistryImageCredentials(ctx, sel, v) } -func (ec *executionContext) marshalNManagedResourceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐManagedResourceEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ManagedResourceEdge) graphql.Marshaler { +func (ec *executionContext) marshalNRegistryImageCredentialsEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageCredentialsEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.RegistryImageCredentialsEdge) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -51856,7 +54659,7 @@ func (ec *executionContext) marshalNManagedResourceEdge2ᚕᚖgithubᚗcomᚋklo if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNManagedResourceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐManagedResourceEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNRegistryImageCredentialsEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageCredentialsEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -51876,22 +54679,17 @@ func (ec *executionContext) marshalNManagedResourceEdge2ᚕᚖgithubᚗcomᚋklo return ret } -func (ec *executionContext) marshalNManagedResourceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐManagedResourceEdge(ctx context.Context, sel ast.SelectionSet, v *model.ManagedResourceEdge) graphql.Marshaler { +func (ec *executionContext) marshalNRegistryImageCredentialsEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageCredentialsEdge(ctx context.Context, sel ast.SelectionSet, v *model.RegistryImageCredentialsEdge) 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") } return graphql.Null } - return ec._ManagedResourceEdge(ctx, sel, v) + return ec._RegistryImageCredentialsEdge(ctx, sel, v) } -func (ec *executionContext) unmarshalNManagedResourceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx context.Context, v interface{}) (entities.ManagedResource, error) { - res, err := ec.unmarshalInputManagedResourceIn(ctx, v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNManagedResourceKeyValueRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐManagedResourceKeyValueRefᚄ(ctx context.Context, sel ast.SelectionSet, v []*domain.ManagedResourceKeyValueRef) graphql.Marshaler { +func (ec *executionContext) marshalNRegistryImageEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.RegistryImageEdge) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -51915,7 +54713,7 @@ func (ec *executionContext) marshalNManagedResourceKeyValueRef2ᚕᚖgithubᚗco if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNManagedResourceKeyValueRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐManagedResourceKeyValueRef(ctx, sel, v[i]) + ret[i] = ec.marshalNRegistryImageEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -51935,38 +54733,14 @@ func (ec *executionContext) marshalNManagedResourceKeyValueRef2ᚕᚖgithubᚗco return ret } -func (ec *executionContext) marshalNManagedResourceKeyValueRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐManagedResourceKeyValueRef(ctx context.Context, sel ast.SelectionSet, v *domain.ManagedResourceKeyValueRef) graphql.Marshaler { +func (ec *executionContext) marshalNRegistryImageEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageEdge(ctx context.Context, sel ast.SelectionSet, v *model.RegistryImageEdge) 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") } return graphql.Null } - return ec._ManagedResourceKeyValueRef(ctx, sel, v) -} - -func (ec *executionContext) marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, sel ast.SelectionSet, v v12.ObjectMeta) graphql.Marshaler { - return ec._Metadata(ctx, sel, &v) -} - -func (ec *executionContext) unmarshalNMetadataIn2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, v interface{}) (v12.ObjectMeta, error) { - res, err := ec.unmarshalInputMetadataIn(ctx, v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) unmarshalNMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, v interface{}) (*v12.ObjectMeta, error) { - res, err := ec.unmarshalInputMetadataIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *model.PageInfo) 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") - } - return graphql.Null - } - return ec._PageInfo(ctx, sel, v) + return ec._RegistryImageEdge(ctx, sel, v) } func (ec *executionContext) marshalNRouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx context.Context, sel ast.SelectionSet, v *entities.Router) graphql.Marshaler { @@ -54314,6 +57088,20 @@ func (ec *executionContext) unmarshalOMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpk return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) marshalORegistryImage2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRegistryImage(ctx context.Context, sel ast.SelectionSet, v *entities.RegistryImage) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._RegistryImage(ctx, sel, v) +} + +func (ec *executionContext) marshalORegistryImagePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImagePaginatedRecords(ctx context.Context, sel ast.SelectionSet, v *model.RegistryImagePaginatedRecords) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._RegistryImagePaginatedRecords(ctx, sel, v) +} + func (ec *executionContext) marshalORouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx context.Context, sel ast.SelectionSet, v *entities.Router) graphql.Marshaler { if v == nil { return graphql.Null diff --git a/apps/console/internal/app/graph/model/models_gen.go b/apps/console/internal/app/graph/model/models_gen.go index cb37a2a0e..de144052d 100644 --- a/apps/console/internal/app/graph/model/models_gen.go +++ b/apps/console/internal/app/graph/model/models_gen.go @@ -8,6 +8,7 @@ import ( "strconv" "github.com/kloudlite/api/apps/console/internal/entities" + "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/repos" "github.com/kloudlite/api/pkg/types" "github.com/kloudlite/operator/apis/crds/v1" @@ -753,6 +754,44 @@ type Port struct { type Query struct { } +type RegistryImageCredentials struct { + AccountName string `json:"accountName"` + CreatedBy *common.CreatedOrUpdatedBy `json:"createdBy"` + CreationTime string `json:"creationTime"` + ID repos.ID `json:"id"` + MarkedForDeletion *bool `json:"markedForDeletion,omitempty"` + Password string `json:"password"` + RecordVersion int `json:"recordVersion"` + UpdateTime string `json:"updateTime"` +} + +type RegistryImageCredentialsEdge struct { + Cursor string `json:"cursor"` + Node *RegistryImageCredentials `json:"node"` +} + +type RegistryImageCredentialsIn struct { + AccountName string `json:"accountName"` + Password string `json:"password"` +} + +type RegistryImageCredentialsPaginatedRecords struct { + Edges []*RegistryImageCredentialsEdge `json:"edges"` + PageInfo *PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` +} + +type RegistryImageEdge struct { + Cursor string `json:"cursor"` + Node *entities.RegistryImage `json:"node"` +} + +type RegistryImagePaginatedRecords struct { + Edges []*RegistryImageEdge `json:"edges"` + PageInfo *PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` +} + type RouterEdge struct { Cursor string `json:"cursor"` Node *entities.Router `json:"node"` @@ -826,6 +865,10 @@ type SearchProjects struct { MarkedForDeletion *repos.MatchFilter `json:"markedForDeletion,omitempty"` } +type SearchRegistryImages struct { + Text *repos.MatchFilter `json:"text,omitempty"` +} + type SearchRouters struct { Text *repos.MatchFilter `json:"text,omitempty"` IsReady *repos.MatchFilter `json:"isReady,omitempty"` diff --git a/apps/console/internal/app/graph/registryimage.resolvers.go b/apps/console/internal/app/graph/registryimage.resolvers.go new file mode 100644 index 000000000..4a69a0c83 --- /dev/null +++ b/apps/console/internal/app/graph/registryimage.resolvers.go @@ -0,0 +1,34 @@ +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.49 + +import ( + "context" + "time" + + "github.com/kloudlite/api/apps/console/internal/app/graph/generated" + "github.com/kloudlite/api/apps/console/internal/entities" +) + +// CreationTime is the resolver for the creationTime field. +func (r *registryImageResolver) CreationTime(ctx context.Context, obj *entities.RegistryImage) (string, error) { + if obj == nil { + return "", errNilRegistryImage + } + return obj.BaseEntity.CreationTime.Format(time.RFC3339), nil +} + +// UpdateTime is the resolver for the updateTime field. +func (r *registryImageResolver) UpdateTime(ctx context.Context, obj *entities.RegistryImage) (string, error) { + if obj == nil { + return "", errNilRegistryImage + } + return obj.BaseEntity.UpdateTime.Format(time.RFC3339), nil +} + +// RegistryImage returns generated.RegistryImageResolver implementation. +func (r *Resolver) RegistryImage() generated.RegistryImageResolver { return ®istryImageResolver{r} } + +type registryImageResolver struct{ *Resolver } diff --git a/apps/console/internal/app/graph/resolver-utils.go b/apps/console/internal/app/graph/resolver-utils.go index 86bb6894b..40f7832c1 100644 --- a/apps/console/internal/app/graph/resolver-utils.go +++ b/apps/console/internal/app/graph/resolver-utils.go @@ -91,6 +91,7 @@ var ( errNilConfig = errors.Newf("config obj is nil") errNilSecret = errors.Newf("secret obj is nil") errNilEnvironment = errors.Newf("environment obj is nil") + errNilRegistryImage = errors.Newf("registry image obj is nil") errNilVPNDevice = errors.Newf("vpn device obj is nil") errNilImagePullSecret = errors.Newf("imagePullSecret obj is nil") errNilManagedResource = errors.Newf("managed resource obj is nil") diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index 743871f79..bccd4f062 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -11,6 +11,7 @@ enum ConsoleResType { managed_resource imported_managed_resource environment + registry_image vpn_device } @@ -37,6 +38,10 @@ input SearchEnvironments { markedForDeletion: MatchFilterIn } +input SearchRegistryImages { + text: MatchFilterIn +} + input SearchApps { text: MatchFilterIn isReady: MatchFilterIn @@ -111,6 +116,10 @@ type Query { core_getImagePullSecret(name: String!): ImagePullSecret @isLoggedInAndVerified @hasAccount core_resyncImagePullSecret(name: String!): Boolean! @isLoggedInAndVerified @hasAccount + core_getRegistryImageURL(image: String!, meta: Map!): String! @isLoggedInAndVerified @hasAccount + core_getRegistryImage(image: String!,): RegistryImage @isLoggedInAndVerified @hasAccount + core_listRegistryImages(pq: CursorPaginationIn): RegistryImagePaginatedRecords @isLoggedInAndVerified @hasAccount + core_listApps(envName: String!, search: SearchApps, pq: CursorPaginationIn): AppPaginatedRecords @isLoggedInAndVerified @hasAccount core_getApp(envName: String!, name: String!): App @isLoggedInAndVerified @hasAccount core_resyncApp(envName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount @@ -157,6 +166,8 @@ type Mutation { core_updateImagePullSecret(pullSecret: ImagePullSecretIn!): ImagePullSecret @isLoggedInAndVerified @hasAccount core_deleteImagePullSecret(name: String!): Boolean! @isLoggedInAndVerified @hasAccount + core_deleteRegistryImage(image: String!): Boolean! @isLoggedInAndVerified @hasAccount + core_createApp(envName: String!, app: AppIn!): App @isLoggedInAndVerified @hasAccount core_updateApp(envName: String!, app: AppIn!): App @isLoggedInAndVerified @hasAccount core_deleteApp(envName: String!, appName: String!): Boolean! @isLoggedInAndVerified @hasAccount diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index 2b4477ef9..d23472894 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -122,6 +122,18 @@ func (r *mutationResolver) CoreDeleteImagePullSecret(ctx context.Context, name s return true, nil } +// CoreDeleteRegistryImage is the resolver for the core_deleteRegistryImage field. +func (r *mutationResolver) CoreDeleteRegistryImage(ctx context.Context, image string) (bool, error) { + cc, err := toConsoleContext(ctx) + if err != nil { + return false, errors.NewE(err) + } + if err := r.Domain.DeleteRegistryImage(cc, image); err != nil { + return false, errors.NewE(err) + } + return true, nil +} + // CoreCreateApp is the resolver for the core_createApp field. func (r *mutationResolver) CoreCreateApp(ctx context.Context, envName string, app entities.App) (*entities.App, error) { cc, err := toConsoleContext(ctx) @@ -513,6 +525,39 @@ func (r *queryResolver) CoreResyncImagePullSecret(ctx context.Context, name stri return true, nil } +// CoreGetRegistryImageURL is the resolver for the core_getRegistryImageURL field. +func (r *queryResolver) CoreGetRegistryImageURL(ctx context.Context, image string, meta map[string]interface{}) (string, error) { + cc, err := toConsoleContext(ctx) + if err != nil { + return "", errors.NewE(err) + } + return r.Domain.GetRegistryImageURL(cc, image, meta) +} + +// CoreGetRegistryImage is the resolver for the core_getRegistryImage field. +func (r *queryResolver) CoreGetRegistryImage(ctx context.Context, image string) (*entities.RegistryImage, error) { + cc, err := toConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.GetRegistryImage(cc, image) +} + +// CoreListRegistryImages is the resolver for the core_listRegistryImages field. +func (r *queryResolver) CoreListRegistryImages(ctx context.Context, pq *repos.CursorPagination) (*model.RegistryImagePaginatedRecords, error) { + cc, err := toConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + + pImages, err := r.Domain.ListRegistryImages(cc, fn.DefaultIfNil(pq, repos.DefaultCursorPagination)) + if err != nil { + return nil, errors.NewE(err) + } + + return fn.JsonConvertP[model.RegistryImagePaginatedRecords](pImages) +} + // CoreListApps is the resolver for the core_listApps field. func (r *queryResolver) CoreListApps(ctx context.Context, envName string, search *model.SearchApps, pq *repos.CursorPagination) (*model.AppPaginatedRecords, error) { cc, err := toConsoleContext(ctx) diff --git a/apps/console/internal/app/graph/struct-to-graphql/registryimage.graphqls b/apps/console/internal/app/graph/struct-to-graphql/registryimage.graphqls new file mode 100644 index 000000000..70a4447a9 --- /dev/null +++ b/apps/console/internal/app/graph/struct-to-graphql/registryimage.graphqls @@ -0,0 +1,30 @@ +type RegistryImage @shareable { + accountName: String! + creationTime: Date! + id: ID! + imageName: String! + imageTag: String! + markedForDeletion: Boolean + meta: Map! + recordVersion: Int! + updateTime: Date! +} + +type RegistryImageEdge @shareable { + cursor: String! + node: RegistryImage! +} + +type RegistryImagePaginatedRecords @shareable { + edges: [RegistryImageEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input RegistryImageIn { + accountName: String! + imageName: String! + imageTag: String! + meta: Map! +} + diff --git a/apps/console/internal/app/graph/struct-to-graphql/registryimagecredentials.graphqls b/apps/console/internal/app/graph/struct-to-graphql/registryimagecredentials.graphqls new file mode 100644 index 000000000..3a22dac56 --- /dev/null +++ b/apps/console/internal/app/graph/struct-to-graphql/registryimagecredentials.graphqls @@ -0,0 +1,27 @@ +type RegistryImageCredentials @shareable { + accountName: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + id: ID! + markedForDeletion: Boolean + password: String! + recordVersion: Int! + updateTime: Date! +} + +type RegistryImageCredentialsEdge @shareable { + cursor: String! + node: RegistryImageCredentials! +} + +type RegistryImageCredentialsPaginatedRecords @shareable { + edges: [RegistryImageCredentialsEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input RegistryImageCredentialsIn { + accountName: String! + password: String! +} + diff --git a/apps/console/internal/app/process-resource-updates.go b/apps/console/internal/app/process-resource-updates.go index c337c1073..73469bebf 100644 --- a/apps/console/internal/app/process-resource-updates.go +++ b/apps/console/internal/app/process-resource-updates.go @@ -23,7 +23,10 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) -type ResourceUpdateConsumer messaging.Consumer +type ( + ResourceUpdateConsumer messaging.Consumer + WebhookConsumer messaging.Consumer +) func newResourceContext(ctx domain.ConsoleContext, environmentName string) domain.ResourceContext { return domain.ResourceContext{ diff --git a/apps/console/internal/app/webhook-consumer.go b/apps/console/internal/app/webhook-consumer.go new file mode 100644 index 000000000..140be22d3 --- /dev/null +++ b/apps/console/internal/app/webhook-consumer.go @@ -0,0 +1,52 @@ +package app + +import ( + "context" + "encoding/json" + "github.com/kloudlite/api/apps/console/internal/domain" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/logging" + msgTypes "github.com/kloudlite/api/pkg/messaging/types" +) + +func processWebhooks(consumer WebhookConsumer, d domain.Domain, logger logging.Logger) error { + err := consumer.Consume(func(msg *msgTypes.ConsumeMsg) error { + logger := logger.WithName("webhook-consumer") + logger.Infof("started processing message") + + defer func() { + logger.Infof("finished processing message") + }() + + webhook := &domain.ImageHookPayload{} + if err := json.Unmarshal(msg.Payload, &webhook); err != nil { + logger.Errorf(err, "could not unmarshal into *ImageHookPayload") + return errors.NewE(err) + } + if webhook.Image == "" || webhook.AccountName == "" { + return errors.Newf("invalid webhook payload") + } + hook := &domain.ImageHookPayload{ + Image: webhook.Image, + AccountName: webhook.AccountName, + Meta: webhook.Meta, + } + ctx := context.TODO() + _, err := d.CreateRegistryImage(ctx, hook.AccountName, hook.Image, hook.Meta) + if err != nil { + logger.Errorf(err, "could not process image hook") + return errors.NewE(err) + } + return nil + }, msgTypes.ConsumeOpts{ + OnError: func(err error) error { + logger.Errorf(err, "error while consuming message") + return nil + }, + }) + if err != nil { + return errors.NewE(err) + } + + return nil +} diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index ca17846ca..8e01ef30b 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -168,6 +168,12 @@ type Domain interface { ResyncEnvironment(ctx ConsoleContext, name string) error + GetRegistryImageURL(ctx ConsoleContext, image string, meta map[string]any) (string, error) + GetRegistryImage(ctx ConsoleContext, image string) (*entities.RegistryImage, error) + DeleteRegistryImage(ctx ConsoleContext, image string) error + CreateRegistryImage(ctx context.Context, accountName string, image string, meta map[string]any) (*entities.RegistryImage, error) + ListRegistryImages(ctx ConsoleContext, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.RegistryImage], error) + ListApps(ctx ResourceContext, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.App], error) GetApp(ctx ResourceContext, name string) (*entities.App, error) diff --git a/apps/console/internal/domain/domain.go b/apps/console/internal/domain/domain.go index 7e3fe5be4..ddf0fc44c 100644 --- a/apps/console/internal/domain/domain.go +++ b/apps/console/internal/domain/domain.go @@ -57,6 +57,8 @@ type domain struct { importedMresRepo repos.DbRepo[*entities.ImportedManagedResource] pullSecretsRepo repos.DbRepo[*entities.ImagePullSecret] + registryImageRepo repos.DbRepo[*entities.RegistryImage] + serviceBindingRepo repos.DbRepo[*entities.ServiceBinding] clusterManagedServiceRepo repos.DbRepo[*entities.ClusterManagedService] @@ -555,6 +557,7 @@ var Module = fx.Module("domain", infraClient infra.InfraClient, environmentRepo repos.DbRepo[*entities.Environment], + registryImageRepo repos.DbRepo[*entities.RegistryImage], appRepo repos.DbRepo[*entities.App], externalAppRepo repos.DbRepo[*entities.ExternalApp], @@ -596,6 +599,7 @@ var Module = fx.Module("domain", resourceMappingRepo: resourceMappingRepo, serviceBindingRepo: serviceBindingRepo, clusterManagedServiceRepo: clusterManagedServiceRepo, + registryImageRepo: registryImageRepo, envVars: ev, diff --git a/apps/console/internal/domain/registry-image.go b/apps/console/internal/domain/registry-image.go new file mode 100644 index 000000000..a5734befa --- /dev/null +++ b/apps/console/internal/domain/registry-image.go @@ -0,0 +1,144 @@ +package domain + +import ( + "context" + "crypto/sha256" + "encoding/base64" + "encoding/json" + "fmt" + "github.com/kloudlite/api/apps/console/internal/entities" + fc "github.com/kloudlite/api/apps/console/internal/entities/field-constants" + iamT "github.com/kloudlite/api/apps/iam/types" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/errors" + fn "github.com/kloudlite/api/pkg/functions" + "github.com/kloudlite/api/pkg/repos" + "strings" +) + +type ImageHookPayload struct { + Image string `json:"image"` + AccountName string `json:"accountName"` + Meta map[string]any `json:"meta"` +} + +func encodeAccessToken(accountName string, tokenSecret string) string { + info := fmt.Sprintf("account=%s", accountName) + + fn.FxErrorHandler() + + h := sha256.New() + h.Write([]byte(info + tokenSecret)) + sum := fmt.Sprintf("%x", h.Sum(nil)) + + info += fmt.Sprintf(";sha256sum=%s", sum) + + return base64.StdEncoding.EncodeToString([]byte(info)) +} + +func getImageNameTag(image string) (string, string) { + parts := strings.Split(image, ":") + + if len(parts) == 2 { + return parts[0], parts[1] + } + + return parts[0], "latest" +} + +func (d *domain) GetRegistryImageURL(ctx ConsoleContext, image string, meta map[string]any) (string, error) { + encodedToken := encodeAccessToken(ctx.AccountName, d.envVars.WebhookTokenHashingSecret) + + imageName, imageTag := getImageNameTag(image) + + metaJSON, err := json.Marshal(meta) + if err != nil { + return "", err + } + + url := fmt.Sprintf(`curl -X POST "https://webhook.dev.kloudlite.io/image" -H "Authorization: %s" -H "Content-Type: application/json" -d '{"image": "%s:%s", "meta": %s}'`, encodedToken, imageName, imageTag, metaJSON) + + return url, nil +} + +func (d *domain) CreateRegistryImage(ctx context.Context, accountName string, image string, meta map[string]any) (*entities.RegistryImage, error) { + imageName, imageTag := getImageNameTag(image) + + createdImage, err := d.registryImageRepo.Upsert(ctx, repos.Filter{ + fields.AccountName: accountName, + fc.RegistryImageImageName: imageName, + fc.RegistryImageImageTag: imageTag, + }, &entities.RegistryImage{ + AccountName: accountName, + ImageName: imageName, + ImageTag: imageTag, + Meta: meta, + }) + if err != nil { + return nil, errors.NewE(err) + } + + return createdImage, nil + +} + +func (d *domain) DeleteRegistryImage(ctx ConsoleContext, image string) error { + imageName, imageTag := getImageNameTag(image) + + matched, err := d.registryImageRepo.FindOne(ctx, repos.Filter{ + fields.AccountName: ctx.AccountName, + fc.RegistryImageImageName: imageName, + fc.RegistryImageImageTag: imageTag, + }) + + if err != nil { + return errors.NewE(err) + } + + if matched == nil { + return errors.Newf("image not found for account %s", ctx.AccountName) + } + + err = d.registryImageRepo.DeleteOne(ctx, repos.Filter{ + fields.AccountName: ctx.AccountName, + fc.RegistryImageImageName: imageName, + fc.RegistryImageImageTag: imageTag, + }) + + if err != nil { + return errors.NewE(err) + } + + return nil +} + +func (d *domain) GetRegistryImage(ctx ConsoleContext, image string) (*entities.RegistryImage, error) { + imageName, imageTag := getImageNameTag(image) + matched, err := d.registryImageRepo.FindOne(ctx, repos.Filter{ + fields.AccountName: ctx.AccountName, + fc.RegistryImageImageName: imageName, + fc.RegistryImageImageTag: imageTag, + }) + + if err != nil { + return nil, errors.NewE(err) + } + + if matched == nil { + return nil, errors.Newf("image not found for account %s", ctx.AccountName) + } + + return matched, nil +} + +func (d *domain) ListRegistryImages(ctx ConsoleContext, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.RegistryImage], error) { + if err := d.canPerformActionInAccount(ctx, iamT.ListRegistryImages); err != nil { + return nil, errors.NewE(err) + } + + filters := repos.Filter{ + fields.AccountName: ctx.AccountName, + } + + return d.registryImageRepo.FindPaginated(ctx, filters, pq) +} diff --git a/apps/console/internal/entities/field-constants/generated_constants.go b/apps/console/internal/entities/field-constants/generated_constants.go index dbfe519ac..5cec8a8d9 100644 --- a/apps/console/internal/entities/field-constants/generated_constants.go +++ b/apps/console/internal/entities/field-constants/generated_constants.go @@ -200,6 +200,13 @@ const ( ManagedResourceRefNamespace = "namespace" ) +// constant vars generated for struct RegistryImage +const ( + RegistryImageImageName = "imageName" + RegistryImageImageTag = "imageTag" + RegistryImageMeta = "meta" +) + // constant vars generated for struct ResourceMapping const ( ResourceMappingBaseEntity = "BaseEntity" diff --git a/apps/console/internal/entities/registry-image.go b/apps/console/internal/entities/registry-image.go new file mode 100644 index 000000000..d065afb24 --- /dev/null +++ b/apps/console/internal/entities/registry-image.go @@ -0,0 +1,32 @@ +package entities + +import ( + fc "github.com/kloudlite/api/apps/console/internal/entities/field-constants" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/repos" +) + +type RegistryImage struct { + repos.BaseEntity `json:",inline" graphql:"noinput"` + AccountName string `json:"accountName"` + ImageName string `json:"imageName"` + ImageTag string `json:"imageTag"` + Meta map[string]any `json:"meta"` +} + +var RegistryImageIndexes = []repos.IndexField{ + { + Field: []repos.IndexKey{ + {Key: fields.Id, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + {Key: fields.AccountName, Value: repos.IndexAsc}, + {Key: fc.RegistryImageImageName, Value: repos.IndexAsc}, + {Key: fc.RegistryImageImageTag, Value: repos.IndexAsc}, + }, + Unique: true, + }, +} diff --git a/apps/console/internal/env/env.go b/apps/console/internal/env/env.go index 1a2bf74f1..6133fcb19 100644 --- a/apps/console/internal/env/env.go +++ b/apps/console/internal/env/env.go @@ -20,6 +20,8 @@ type Env struct { NatsURL string `env:"NATS_URL" required:"true"` NatsReceiveFromAgentStream string `env:"NATS_RECEIVE_FROM_AGENT_STREAM" required:"true"` + EventsNatsStream string `env:"EVENTS_NATS_STREAM" required:"true"` + WebhookTokenHashingSecret string `env:"WEBHOOK_TOKEN_HASHING_SECRET" required:"true"` IAMGrpcAddr string `env:"IAM_GRPC_ADDR" required:"true"` InfraGrpcAddr string `env:"INFRA_GRPC_ADDR" required:"true"` diff --git a/apps/iam/internal/app/action-role-binding.go b/apps/iam/internal/app/action-role-binding.go index fed10ef4d..e6c2a0937 100644 --- a/apps/iam/internal/app/action-role-binding.go +++ b/apps/iam/internal/app/action-role-binding.go @@ -89,6 +89,9 @@ var roleBindings RoleBindingMap = RoleBindingMap{ t.ListImagePullSecrets: []t.Role{t.RoleAccountOwner, t.RoleAccountAdmin, t.RoleAccountMember}, t.GetImagePullSecret: []t.Role{t.RoleAccountOwner, t.RoleAccountAdmin, t.RoleAccountMember}, + // registry images + t.ListRegistryImages: []t.Role{t.RoleAccountOwner, t.RoleAccountAdmin, t.RoleAccountMember}, + // for projects t.CreateProject: []t.Role{t.RoleAccountOwner, t.RoleAccountAdmin, t.RoleAccountMember}, t.ListProjects: []t.Role{t.RoleAccountOwner, t.RoleAccountAdmin, t.RoleAccountMember, t.RoleProjectAdmin, t.RoleProjectMember}, diff --git a/apps/iam/types/types.go b/apps/iam/types/types.go index 451cf5698..8a3ce7098 100644 --- a/apps/iam/types/types.go +++ b/apps/iam/types/types.go @@ -176,6 +176,9 @@ const ( UpdateImagePullSecret Action = "update-image-pull-secret" CreateImagePullSecret Action = "create-image-pull-secret" DeleteImagePullSecret Action = "delete-image-pull-secret" + + // registry images + ListRegistryImages Action = "list-registry-images" ) func NewResourceRef(accountName string, resourceType ResourceType, resourceName string) string { diff --git a/apps/webhook/Taskfile.yml b/apps/webhook/Taskfile.yml index d1f49b09b..6e83cb28b 100644 --- a/apps/webhook/Taskfile.yml +++ b/apps/webhook/Taskfile.yml @@ -13,9 +13,7 @@ tasks: dotenv: - .secrets/env cmds: - - task: build - # - dlv exec -l 127.0.0.1:31117 --headless /tmp/webhook -- --dev - - ./bin/{{.app}} --dev + - go run ./main.go --dev build: cmds: diff --git a/apps/webhook/internal/app/app.go b/apps/webhook/internal/app/app.go index fc053d5e4..89283b42e 100644 --- a/apps/webhook/internal/app/app.go +++ b/apps/webhook/internal/app/app.go @@ -27,4 +27,6 @@ var Module = fx.Module( domain.Module, LoadGitWebhook(), + + LoadImageHook(), ) diff --git a/apps/webhook/internal/app/image-hook.go b/apps/webhook/internal/app/image-hook.go new file mode 100644 index 000000000..b09178686 --- /dev/null +++ b/apps/webhook/internal/app/image-hook.go @@ -0,0 +1,124 @@ +package app + +import ( + "crypto/sha256" + "encoding/base64" + "encoding/json" + "fmt" + "github.com/gofiber/fiber/v2" + "github.com/kloudlite/api/apps/webhook/internal/domain" + "github.com/kloudlite/api/apps/webhook/internal/env" + "github.com/kloudlite/api/common" + httpServer "github.com/kloudlite/api/pkg/http-server" + "github.com/kloudlite/api/pkg/logging" + "github.com/kloudlite/api/pkg/messaging" + types2 "github.com/kloudlite/api/pkg/messaging/types" + "github.com/pkg/errors" + "go.uber.org/fx" + "net/http" + "strings" + "time" +) + +func validateAndDecodeAccessToken(accessToken string, tokenSecret string) (accountName string, err error) { + b, err := base64.StdEncoding.DecodeString(accessToken) + if err != nil { + return "", errors.Wrap(err, "invalid access token, incorrect format") + } + + info := string(b) + + sp := strings.SplitN(info, ";sha256sum=", 2) + + if len(sp) != 2 { + return "", errors.New("invalid access token, incorrect format") + } + data := sp[0] + sum := sp[1] + + h := sha256.New() + h.Write([]byte(data + tokenSecret)) + calculatedSum := fmt.Sprintf("%x", h.Sum(nil)) + + if sum != calculatedSum { + return "", errors.New("invalid access token, checksum mismatch") + } + + s := strings.SplitN(data, ";", 2) + + if len(s) != 1 { + return "", errors.New("invalid access token, incorrect data format") + } + for _, v := range strings.Split(s[0], ";") { + sp := strings.SplitN(v, "=", 2) + if len(sp) != 2 { + return "", errors.New("invalid access token, incorrect data format") + } + if sp[0] == "account" { + accountName = sp[1] + } + } + return accountName, nil +} + +func LoadImageHook() fx.Option { + return fx.Invoke( + func(server httpServer.Server, envVars *env.Env, producer messaging.Producer, logr logging.Logger, d domain.Domain) error { + + app := server.Raw() + + app.Post("/image", func(ctx *fiber.Ctx) error { + logger := logr.WithName("image-hook") + + headers := ctx.GetReqHeaders() + v, ok := headers["Authorization"] + if !ok { + return ctx.Status(fiber.StatusUnauthorized).SendString("no authorization header passed") + } + + accountName, err := validateAndDecodeAccessToken(v[0], envVars.WebhookTokenHashingSecret) + if err != nil { + return ctx.Status(fiber.StatusUnauthorized).SendString(err.Error()) + } + + data := struct { + Image string `json:"image"` + AccountName string `json:"accountName"` + Meta map[string]any `json:"meta"` + }{} + + body := ctx.Body() + if err := json.Unmarshal(body, &data); err != nil { + return ctx.Status(fiber.StatusBadRequest).SendString(err.Error()) + } + data.AccountName = accountName + + logger = logger.WithKV("account", data.AccountName, "image", data.Image, "meta", data.Meta) + logger.Infof("received image-hook") + + jsonPayload, err := json.Marshal(data) + if err != nil { + return err + } + err = producer.Produce(ctx.Context(), types2.ProduceMsg{ + Subject: string(common.RegistryHookTopicName), + Payload: jsonPayload, + }) + if err != nil { + return err + } + + if err != nil { + errMsg := fmt.Sprintf("failed to produce message: %s", "webhook-provider") + logger.Errorf(err, errMsg) + return ctx.Status(http.StatusInternalServerError).JSON(errMsg) + } + logger.WithKV( + "produced.subject", string(common.RegistryHookTopicName), + "produced.timestamp", time.Now(), + ).Infof("queued webhook") + return ctx.Status(http.StatusAccepted).JSON(map[string]string{"status": "ok"}) + }) + return nil + }) +} diff --git a/apps/webhook/internal/env/env.go b/apps/webhook/internal/env/env.go index a3ee6688b..772b771be 100644 --- a/apps/webhook/internal/env/env.go +++ b/apps/webhook/internal/env/env.go @@ -12,4 +12,6 @@ type Env struct { CommsService string `env:"COMMS_SERVICE" required:"true"` DiscordWebhookUrl string `env:"DISCORD_WEBHOOK_URL" required:"false"` + + WebhookTokenHashingSecret string `env:"WEBHOOK_TOKEN_HASHING_SECRET" required:"true"` } diff --git a/common/kafka-topic-name.go b/common/kafka-topic-name.go index 53c3ab1b4..28755c9a1 100644 --- a/common/kafka-topic-name.go +++ b/common/kafka-topic-name.go @@ -11,11 +11,13 @@ const ( GitWebhookTopicName topicName = "events.webhooks.git" AuditEventLogTopicName topicName = "events.audit.event-log" NotificationTopicName topicName = "events.notification" + RegistryHookTopicName topicName = "events.webhooks.registry" ) const ( sendToAgentSubjectPrefix = "send-to-agent" receiveFromAgentSubjectPrefix = "receive-from-agent" + //receiveFromWebhookSubjectPrefix = "receive-from-webhook" ) func SendToAgentSubjectPrefix(accountName string, clusterName string) string { @@ -65,6 +67,12 @@ type ReceiveFromAgentArgs struct { Name string } +//type ReceiveFromWebhookArgs struct { +// AccountName string +// ImageName string +// ImageTag string +//} + func ReceiveFromAgentSubjectName(args ReceiveFromAgentArgs, receiver MessageReceiver, ev platformEvent) string { if args.AccountName == "*" && args.ClusterName == "*" { slug := "*" @@ -75,6 +83,16 @@ func ReceiveFromAgentSubjectName(args ReceiveFromAgentArgs, receiver MessageRece return fmt.Sprintf("%s.%s.%s.%s.%s.%s", receiveFromAgentSubjectPrefix, args.AccountName, args.ClusterName, slug, receiver, ev) } +//func ReceiveFromWebhookSubjectName(args ReceiveFromWebhookArgs, receiver MessageReceiver) string { +// if args.AccountName == "*" { +// slug := "*" +// return fmt.Sprintf("%s.%s.%s.%s.%s", receiveFromWebhookSubjectPrefix, args.AccountName, args.ImageName, slug, receiver) +// } +// +// slug := base64.RawURLEncoding.EncodeToString([]byte(fmt.Sprintf("%s.%s/%s", args.AccountName, args.ImageName, args.ImageTag))) +// return fmt.Sprintf("%s.%s.%s.%s.%s", receiveFromWebhookSubjectPrefix, args.AccountName, args.ImageName, slug, receiver) +//} + // func GetPlatformClusterMessagingTopic(accountName string, clusterName string, controller messageReceiver, ev platformEvent) string { // if accountName == "*" && clusterName == "*" { // return fmt.Sprintf("resource-sync.*.*.platform.%s.%s", controller, ev) diff --git a/grpc-interfaces/container_registry/container-registry.pb.go b/grpc-interfaces/container_registry/container-registry.pb.go index 70749cf56..499f4f53b 100644 --- a/grpc-interfaces/container_registry/container-registry.pb.go +++ b/grpc-interfaces/container_registry/container-registry.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: container-registry.proto package container_registry diff --git a/grpc-interfaces/container_registry/container-registry_grpc.pb.go b/grpc-interfaces/container_registry/container-registry_grpc.pb.go index 5c0d88f1b..ad99b9235 100644 --- a/grpc-interfaces/container_registry/container-registry_grpc.pb.go +++ b/grpc-interfaces/container_registry/container-registry_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: container-registry.proto package container_registry diff --git a/grpc-interfaces/infra/infra.pb.go b/grpc-interfaces/infra/infra.pb.go index f33718582..f2a493614 100644 --- a/grpc-interfaces/infra/infra.pb.go +++ b/grpc-interfaces/infra/infra.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: infra.proto package infra diff --git a/grpc-interfaces/infra/infra_grpc.pb.go b/grpc-interfaces/infra/infra_grpc.pb.go index a772207ad..9fb76608b 100644 --- a/grpc-interfaces/infra/infra_grpc.pb.go +++ b/grpc-interfaces/infra/infra_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: infra.proto package infra diff --git a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go index 04ccb3a95..1695b328c 100644 --- a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: accounts.proto package accounts diff --git a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go index 91b0b817c..a1028275f 100644 --- a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: accounts.proto package accounts diff --git a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go index df0445227..f2212c6cf 100644 --- a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: kubeagent.proto package agent diff --git a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go index 0d761c0bd..4962d09ca 100644 --- a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: kubeagent.proto package agent diff --git a/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go b/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go index bc0102096..5d409612c 100644 --- a/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: auth.proto package auth diff --git a/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go index d7b047468..8ea9227d9 100644 --- a/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: auth.proto package auth diff --git a/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go b/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go index 7a6f793b5..0c777f030 100644 --- a/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: ci.proto package ci diff --git a/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go index aa4fbd339..e46817642 100644 --- a/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: ci.proto package ci diff --git a/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go b/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go index 35c93117b..5f6f3002e 100644 --- a/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: comms.proto package comms diff --git a/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go index 2105b41ad..883434ec4 100644 --- a/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: comms.proto package comms diff --git a/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go b/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go index 06231994c..ce4949609 100644 --- a/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: console.proto package console diff --git a/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go index ffec4547c..bb2d31df6 100644 --- a/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: console.proto package console diff --git a/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go b/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go index a8931df2e..a4dbdbd23 100644 --- a/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: dns.proto package dns diff --git a/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go index 079d66d82..f918d19f7 100644 --- a/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: dns.proto package dns diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go index 9cf2a27a6..0cbef9dde 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: finance-infra.proto package finance diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go index 417b15177..538ef19b1 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: finance-infra.proto package finance diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go index b13d5a015..ca08d8dc3 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: finance.proto package finance diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go index 61e0d9dd7..91863a5c6 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: finance.proto package finance diff --git a/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go b/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go index e81e5472c..4ea512d89 100644 --- a/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: iam.proto package iam diff --git a/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go index 1810941e2..f18d06bd8 100644 --- a/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: iam.proto package iam diff --git a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go index bdaa70343..ad1bf4482 100644 --- a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: jseval.proto package jseval diff --git a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go index 8c2cb8221..68b848c7b 100644 --- a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: jseval.proto package jseval diff --git a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go index d6ce73674..be09a9ecf 100644 --- a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc-gen-go v1.31.0 +// protoc v5.27.3 // source: message-office-internal.proto package message_office_internal diff --git a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go index bc6c76b18..ab07c2f99 100644 --- a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v5.27.3 // source: message-office-internal.proto package message_office_internal From 0ca1d40fbffe00b999c45fb64080940445fadcb0 Mon Sep 17 00:00:00 2001 From: nxtcoder36 Date: Tue, 3 Sep 2024 13:33:16 +0530 Subject: [PATCH 2/4] changed grpc version and removed comments --- common/kafka-topic-name.go | 16 ---------------- .../container_registry/container-registry.pb.go | 4 ++-- .../container-registry_grpc.pb.go | 2 +- grpc-interfaces/infra/infra.pb.go | 4 ++-- grpc-interfaces/infra/infra_grpc.pb.go | 2 +- .../kloudlite.io/rpc/accounts/accounts.pb.go | 4 ++-- .../rpc/accounts/accounts_grpc.pb.go | 2 +- .../kloudlite.io/rpc/agent/kubeagent.pb.go | 4 ++-- .../kloudlite.io/rpc/agent/kubeagent_grpc.pb.go | 2 +- grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go | 4 ++-- .../kloudlite.io/rpc/auth/auth_grpc.pb.go | 2 +- grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go | 4 ++-- .../kloudlite.io/rpc/ci/ci_grpc.pb.go | 2 +- .../kloudlite.io/rpc/comms/comms.pb.go | 4 ++-- .../kloudlite.io/rpc/comms/comms_grpc.pb.go | 2 +- .../kloudlite.io/rpc/console/console.pb.go | 4 ++-- .../kloudlite.io/rpc/console/console_grpc.pb.go | 2 +- grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go | 4 ++-- .../kloudlite.io/rpc/dns/dns_grpc.pb.go | 2 +- .../kloudlite.io/rpc/finance/finance-infra.pb.go | 4 ++-- .../rpc/finance/finance-infra_grpc.pb.go | 2 +- .../kloudlite.io/rpc/finance/finance.pb.go | 4 ++-- .../kloudlite.io/rpc/finance/finance_grpc.pb.go | 2 +- grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go | 4 ++-- .../kloudlite.io/rpc/iam/iam_grpc.pb.go | 2 +- .../kloudlite.io/rpc/jseval/jseval.pb.go | 4 ++-- .../kloudlite.io/rpc/jseval/jseval_grpc.pb.go | 2 +- .../message-office-internal.pb.go | 4 ++-- .../message-office-internal_grpc.pb.go | 2 +- 29 files changed, 42 insertions(+), 58 deletions(-) diff --git a/common/kafka-topic-name.go b/common/kafka-topic-name.go index 28755c9a1..8e4435a52 100644 --- a/common/kafka-topic-name.go +++ b/common/kafka-topic-name.go @@ -67,12 +67,6 @@ type ReceiveFromAgentArgs struct { Name string } -//type ReceiveFromWebhookArgs struct { -// AccountName string -// ImageName string -// ImageTag string -//} - func ReceiveFromAgentSubjectName(args ReceiveFromAgentArgs, receiver MessageReceiver, ev platformEvent) string { if args.AccountName == "*" && args.ClusterName == "*" { slug := "*" @@ -83,16 +77,6 @@ func ReceiveFromAgentSubjectName(args ReceiveFromAgentArgs, receiver MessageRece return fmt.Sprintf("%s.%s.%s.%s.%s.%s", receiveFromAgentSubjectPrefix, args.AccountName, args.ClusterName, slug, receiver, ev) } -//func ReceiveFromWebhookSubjectName(args ReceiveFromWebhookArgs, receiver MessageReceiver) string { -// if args.AccountName == "*" { -// slug := "*" -// return fmt.Sprintf("%s.%s.%s.%s.%s", receiveFromWebhookSubjectPrefix, args.AccountName, args.ImageName, slug, receiver) -// } -// -// slug := base64.RawURLEncoding.EncodeToString([]byte(fmt.Sprintf("%s.%s/%s", args.AccountName, args.ImageName, args.ImageTag))) -// return fmt.Sprintf("%s.%s.%s.%s.%s", receiveFromWebhookSubjectPrefix, args.AccountName, args.ImageName, slug, receiver) -//} - // func GetPlatformClusterMessagingTopic(accountName string, clusterName string, controller messageReceiver, ev platformEvent) string { // if accountName == "*" && clusterName == "*" { // return fmt.Sprintf("resource-sync.*.*.platform.%s.%s", controller, ev) diff --git a/grpc-interfaces/container_registry/container-registry.pb.go b/grpc-interfaces/container_registry/container-registry.pb.go index 499f4f53b..70749cf56 100644 --- a/grpc-interfaces/container_registry/container-registry.pb.go +++ b/grpc-interfaces/container_registry/container-registry.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: container-registry.proto package container_registry diff --git a/grpc-interfaces/container_registry/container-registry_grpc.pb.go b/grpc-interfaces/container_registry/container-registry_grpc.pb.go index ad99b9235..5c0d88f1b 100644 --- a/grpc-interfaces/container_registry/container-registry_grpc.pb.go +++ b/grpc-interfaces/container_registry/container-registry_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: container-registry.proto package container_registry diff --git a/grpc-interfaces/infra/infra.pb.go b/grpc-interfaces/infra/infra.pb.go index f2a493614..f33718582 100644 --- a/grpc-interfaces/infra/infra.pb.go +++ b/grpc-interfaces/infra/infra.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: infra.proto package infra diff --git a/grpc-interfaces/infra/infra_grpc.pb.go b/grpc-interfaces/infra/infra_grpc.pb.go index 9fb76608b..a772207ad 100644 --- a/grpc-interfaces/infra/infra_grpc.pb.go +++ b/grpc-interfaces/infra/infra_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: infra.proto package infra diff --git a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go index 1695b328c..04ccb3a95 100644 --- a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: accounts.proto package accounts diff --git a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go index a1028275f..91b0b817c 100644 --- a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: accounts.proto package accounts diff --git a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go index f2212c6cf..df0445227 100644 --- a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: kubeagent.proto package agent diff --git a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go index 4962d09ca..0d761c0bd 100644 --- a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: kubeagent.proto package agent diff --git a/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go b/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go index 5d409612c..bc0102096 100644 --- a/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: auth.proto package auth diff --git a/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go index 8ea9227d9..d7b047468 100644 --- a/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: auth.proto package auth diff --git a/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go b/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go index 0c777f030..7a6f793b5 100644 --- a/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: ci.proto package ci diff --git a/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go index e46817642..aa4fbd339 100644 --- a/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: ci.proto package ci diff --git a/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go b/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go index 5f6f3002e..35c93117b 100644 --- a/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: comms.proto package comms diff --git a/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go index 883434ec4..2105b41ad 100644 --- a/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: comms.proto package comms diff --git a/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go b/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go index ce4949609..06231994c 100644 --- a/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: console.proto package console diff --git a/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go index bb2d31df6..ffec4547c 100644 --- a/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: console.proto package console diff --git a/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go b/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go index a4dbdbd23..a8931df2e 100644 --- a/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: dns.proto package dns diff --git a/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go index f918d19f7..079d66d82 100644 --- a/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: dns.proto package dns diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go index 0cbef9dde..9cf2a27a6 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: finance-infra.proto package finance diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go index 538ef19b1..417b15177 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: finance-infra.proto package finance diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go index ca08d8dc3..b13d5a015 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: finance.proto package finance diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go index 91863a5c6..61e0d9dd7 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: finance.proto package finance diff --git a/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go b/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go index 4ea512d89..e81e5472c 100644 --- a/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: iam.proto package iam diff --git a/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go index f18d06bd8..1810941e2 100644 --- a/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: iam.proto package iam diff --git a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go index ad1bf4482..bdaa70343 100644 --- a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: jseval.proto package jseval diff --git a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go index 68b848c7b..8c2cb8221 100644 --- a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: jseval.proto package jseval diff --git a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go index be09a9ecf..d6ce73674 100644 --- a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: message-office-internal.proto package message_office_internal diff --git a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go index ab07c2f99..bc6c76b18 100644 --- a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc v4.24.4 // source: message-office-internal.proto package message_office_internal From 8b0b40e62f8373605d9a304675cbbd29b2595272 Mon Sep 17 00:00:00 2001 From: nxtcoder36 Date: Tue, 3 Sep 2024 16:31:14 +0530 Subject: [PATCH 3/4] image url api changes --- .../console/registry-image.graphql.yml | 5 +- apps/console/Taskfile.yml | 1 + apps/console/internal/app/app.go | 2 +- .../internal/app/graph/generated/generated.go | 231 +++++++++++++++++- .../internal/app/graph/model/models_gen.go | 10 + .../internal/app/graph/schema.graphqls | 2 +- .../internal/app/graph/schema.resolvers.go | 10 +- .../registryimageurl.graphqls | 10 + apps/console/internal/domain/api.go | 2 +- .../console/internal/domain/registry-image.go | 11 +- .../internal/entities/registry-image.go | 5 + apps/console/internal/env/env.go | 1 + apps/webhook/internal/app/image-hook.go | 4 +- common/kafka-topic-name.go | 8 +- 14 files changed, 277 insertions(+), 25 deletions(-) create mode 100644 apps/console/internal/app/graph/struct-to-graphql/registryimageurl.graphqls diff --git a/.tools/nvim/__http__/console/registry-image.graphql.yml b/.tools/nvim/__http__/console/registry-image.graphql.yml index 88f206b7c..398a966dd 100644 --- a/.tools/nvim/__http__/console/registry-image.graphql.yml +++ b/.tools/nvim/__http__/console/registry-image.graphql.yml @@ -57,7 +57,10 @@ variables: label: Get Registry Image URL query: |+ query Core_getRegistryImageURL($image: String!, $meta: Map!) { - core_getRegistryImageURL(image: $image, meta: $meta) + core_getRegistryImageURL(image: $image, meta: $meta) { + url + scriptUrl + } } variables: image: "{{.image}}" diff --git a/apps/console/Taskfile.yml b/apps/console/Taskfile.yml index 36e6c93fe..322f64544 100644 --- a/apps/console/Taskfile.yml +++ b/apps/console/Taskfile.yml @@ -37,6 +37,7 @@ tasks: --struct github.com/kloudlite/api/apps/console/internal/entities.ImportedManagedResource --struct github.com/kloudlite/api/apps/console/internal/entities.ImagePullSecret --struct github.com/kloudlite/api/apps/console/internal/entities.RegistryImage + --struct github.com/kloudlite/api/apps/console/internal/entities.RegistryImageURL --struct github.com/kloudlite/api/pkg/repos.MatchFilter --struct github.com/kloudlite/api/pkg/repos.CursorPagination > ./internal/app/_struct-to-graphql/main.go diff --git a/apps/console/internal/app/app.go b/apps/console/internal/app/app.go index 4b1f846e4..bea14a365 100644 --- a/apps/console/internal/app/app.go +++ b/apps/console/internal/app/app.go @@ -192,7 +192,7 @@ var Module = fx.Module("app", }), fx.Provide(func(jc *nats.JetstreamClient, ev *env.Env, logger logging.Logger) (WebhookConsumer, error) { - topic := string(common.RegistryHookTopicName) + topic := string(common.ImageRegistryHookTopicName) consumerName := "console:webhook" return msg_nats.NewJetstreamConsumer(context.TODO(), jc, msg_nats.JetstreamConsumerArgs{ Stream: ev.EventsNatsStream, diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 530a7af9a..2858aae2f 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -873,6 +873,11 @@ type ComplexityRoot struct { TotalCount func(childComplexity int) int } + RegistryImageURL struct { + ScriptURL func(childComplexity int) int + URL func(childComplexity int) int + } + Router struct { APIVersion func(childComplexity int) int AccountName func(childComplexity int) int @@ -1095,7 +1100,7 @@ type QueryResolver interface { CoreListImagePullSecrets(ctx context.Context, search *model.SearchImagePullSecrets, pq *repos.CursorPagination) (*model.ImagePullSecretPaginatedRecords, error) CoreGetImagePullSecret(ctx context.Context, name string) (*entities.ImagePullSecret, error) CoreResyncImagePullSecret(ctx context.Context, name string) (bool, error) - CoreGetRegistryImageURL(ctx context.Context, image string, meta map[string]interface{}) (string, error) + CoreGetRegistryImageURL(ctx context.Context, image string, meta map[string]interface{}) (*model.RegistryImageURL, error) CoreGetRegistryImage(ctx context.Context, image string) (*entities.RegistryImage, error) CoreListRegistryImages(ctx context.Context, pq *repos.CursorPagination) (*model.RegistryImagePaginatedRecords, error) CoreListApps(ctx context.Context, envName string, search *model.SearchApps, pq *repos.CursorPagination) (*model.AppPaginatedRecords, error) @@ -5189,6 +5194,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.RegistryImagePaginatedRecords.TotalCount(childComplexity), true + case "RegistryImageURL.scriptUrl": + if e.complexity.RegistryImageURL.ScriptURL == nil { + break + } + + return e.complexity.RegistryImageURL.ScriptURL(childComplexity), true + + case "RegistryImageURL.url": + if e.complexity.RegistryImageURL.URL == nil { + break + } + + return e.complexity.RegistryImageURL.URL(childComplexity), true + case "Router.apiVersion": if e.complexity.Router.APIVersion == nil { break @@ -5630,6 +5649,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputPortIn, ec.unmarshalInputRegistryImageCredentialsIn, ec.unmarshalInputRegistryImageIn, + ec.unmarshalInputRegistryImageURLIn, ec.unmarshalInputRouterIn, ec.unmarshalInputSearchApps, ec.unmarshalInputSearchClusterManagedService, @@ -5862,7 +5882,7 @@ type Query { core_getImagePullSecret(name: String!): ImagePullSecret @isLoggedInAndVerified @hasAccount core_resyncImagePullSecret(name: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_getRegistryImageURL(image: String!, meta: Map!): String! @isLoggedInAndVerified @hasAccount + core_getRegistryImageURL(image: String!, meta: Map!): RegistryImageURL! @isLoggedInAndVerified @hasAccount core_getRegistryImage(image: String!,): RegistryImage @isLoggedInAndVerified @hasAccount core_listRegistryImages(pq: CursorPaginationIn): RegistryImagePaginatedRecords @isLoggedInAndVerified @hasAccount @@ -7225,6 +7245,17 @@ input RegistryImageCredentialsIn { password: String! } +`, BuiltIn: false}, + {Name: "../struct-to-graphql/registryimageurl.graphqls", Input: `type RegistryImageURL @shareable { + scriptUrl: String! + url: String! +} + +input RegistryImageURLIn { + scriptUrl: String! + url: String! +} + `, BuiltIn: false}, {Name: "../struct-to-graphql/router.graphqls", Input: `type Router @shareable { accountName: String! @@ -32582,10 +32613,10 @@ func (ec *executionContext) _Query_core_getRegistryImageURL(ctx context.Context, if tmp == nil { return nil, nil } - if data, ok := tmp.(string); ok { + if data, ok := tmp.(*model.RegistryImageURL); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.RegistryImageURL`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -32597,9 +32628,9 @@ func (ec *executionContext) _Query_core_getRegistryImageURL(ctx context.Context, } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*model.RegistryImageURL) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNRegistryImageURL2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageURL(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_core_getRegistryImageURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -32609,7 +32640,13 @@ func (ec *executionContext) fieldContext_Query_core_getRegistryImageURL(ctx cont IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "scriptUrl": + return ec.fieldContext_RegistryImageURL_scriptUrl(ctx, field) + case "url": + return ec.fieldContext_RegistryImageURL_url(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type RegistryImageURL", field.Name) }, } defer func() { @@ -36717,6 +36754,94 @@ func (ec *executionContext) fieldContext_RegistryImagePaginatedRecords_totalCoun return fc, nil } +func (ec *executionContext) _RegistryImageURL_scriptUrl(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageURL) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageURL_scriptUrl(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ScriptURL, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RegistryImageURL_scriptUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RegistryImageURL", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RegistryImageURL_url(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageURL) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageURL_url(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.URL, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RegistryImageURL_url(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RegistryImageURL", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Router_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.Router) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Router_accountName(ctx, field) if err != nil { @@ -44175,6 +44300,40 @@ func (ec *executionContext) unmarshalInputRegistryImageIn(ctx context.Context, o return it, nil } +func (ec *executionContext) unmarshalInputRegistryImageURLIn(ctx context.Context, obj interface{}) (model.RegistryImageURLIn, error) { + var it model.RegistryImageURLIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"scriptUrl", "url"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "scriptUrl": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("scriptUrl")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.ScriptURL = data + case "url": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("url")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.URL = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputRouterIn(ctx context.Context, obj interface{}) (entities.Router, error) { var it entities.Router asMap := map[string]interface{}{} @@ -52071,6 +52230,50 @@ func (ec *executionContext) _RegistryImagePaginatedRecords(ctx context.Context, return out } +var registryImageURLImplementors = []string{"RegistryImageURL"} + +func (ec *executionContext) _RegistryImageURL(ctx context.Context, sel ast.SelectionSet, obj *model.RegistryImageURL) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, registryImageURLImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("RegistryImageURL") + case "scriptUrl": + out.Values[i] = ec._RegistryImageURL_scriptUrl(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "url": + out.Values[i] = ec._RegistryImageURL_url(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + var routerImplementors = []string{"Router"} func (ec *executionContext) _Router(ctx context.Context, sel ast.SelectionSet, obj *entities.Router) graphql.Marshaler { @@ -54743,6 +54946,20 @@ func (ec *executionContext) marshalNRegistryImageEdge2ᚖgithubᚗcomᚋkloudlit return ec._RegistryImageEdge(ctx, sel, v) } +func (ec *executionContext) marshalNRegistryImageURL2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageURL(ctx context.Context, sel ast.SelectionSet, v model.RegistryImageURL) graphql.Marshaler { + return ec._RegistryImageURL(ctx, sel, &v) +} + +func (ec *executionContext) marshalNRegistryImageURL2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageURL(ctx context.Context, sel ast.SelectionSet, v *model.RegistryImageURL) 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") + } + return graphql.Null + } + return ec._RegistryImageURL(ctx, sel, v) +} + func (ec *executionContext) marshalNRouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx context.Context, sel ast.SelectionSet, v *entities.Router) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { diff --git a/apps/console/internal/app/graph/model/models_gen.go b/apps/console/internal/app/graph/model/models_gen.go index de144052d..12482df01 100644 --- a/apps/console/internal/app/graph/model/models_gen.go +++ b/apps/console/internal/app/graph/model/models_gen.go @@ -792,6 +792,16 @@ type RegistryImagePaginatedRecords struct { TotalCount int `json:"totalCount"` } +type RegistryImageURL struct { + ScriptURL string `json:"scriptUrl"` + URL string `json:"url"` +} + +type RegistryImageURLIn struct { + ScriptURL string `json:"scriptUrl"` + URL string `json:"url"` +} + type RouterEdge struct { Cursor string `json:"cursor"` Node *entities.Router `json:"node"` diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index bccd4f062..2cc5fa3b0 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -116,7 +116,7 @@ type Query { core_getImagePullSecret(name: String!): ImagePullSecret @isLoggedInAndVerified @hasAccount core_resyncImagePullSecret(name: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_getRegistryImageURL(image: String!, meta: Map!): String! @isLoggedInAndVerified @hasAccount + core_getRegistryImageURL(image: String!, meta: Map!): RegistryImageURL! @isLoggedInAndVerified @hasAccount core_getRegistryImage(image: String!,): RegistryImage @isLoggedInAndVerified @hasAccount core_listRegistryImages(pq: CursorPaginationIn): RegistryImagePaginatedRecords @isLoggedInAndVerified @hasAccount diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index d23472894..1e3c9e648 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -526,12 +526,16 @@ func (r *queryResolver) CoreResyncImagePullSecret(ctx context.Context, name stri } // CoreGetRegistryImageURL is the resolver for the core_getRegistryImageURL field. -func (r *queryResolver) CoreGetRegistryImageURL(ctx context.Context, image string, meta map[string]interface{}) (string, error) { +func (r *queryResolver) CoreGetRegistryImageURL(ctx context.Context, image string, meta map[string]interface{}) (*model.RegistryImageURL, error) { cc, err := toConsoleContext(ctx) if err != nil { - return "", errors.NewE(err) + return nil, errors.NewE(err) + } + imageURL, err := r.Domain.GetRegistryImageURL(cc, image, meta) + if err != nil { + return nil, errors.NewE(err) } - return r.Domain.GetRegistryImageURL(cc, image, meta) + return fn.JsonConvertP[model.RegistryImageURL](imageURL) } // CoreGetRegistryImage is the resolver for the core_getRegistryImage field. diff --git a/apps/console/internal/app/graph/struct-to-graphql/registryimageurl.graphqls b/apps/console/internal/app/graph/struct-to-graphql/registryimageurl.graphqls new file mode 100644 index 000000000..3a5d15b17 --- /dev/null +++ b/apps/console/internal/app/graph/struct-to-graphql/registryimageurl.graphqls @@ -0,0 +1,10 @@ +type RegistryImageURL @shareable { + scriptUrl: String! + url: String! +} + +input RegistryImageURLIn { + scriptUrl: String! + url: String! +} + diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index 8e01ef30b..52b574555 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -168,7 +168,7 @@ type Domain interface { ResyncEnvironment(ctx ConsoleContext, name string) error - GetRegistryImageURL(ctx ConsoleContext, image string, meta map[string]any) (string, error) + GetRegistryImageURL(ctx ConsoleContext, image string, meta map[string]any) (*entities.RegistryImageURL, error) GetRegistryImage(ctx ConsoleContext, image string) (*entities.RegistryImage, error) DeleteRegistryImage(ctx ConsoleContext, image string) error CreateRegistryImage(ctx context.Context, accountName string, image string, meta map[string]any) (*entities.RegistryImage, error) diff --git a/apps/console/internal/domain/registry-image.go b/apps/console/internal/domain/registry-image.go index a5734befa..ffdd4fef2 100644 --- a/apps/console/internal/domain/registry-image.go +++ b/apps/console/internal/domain/registry-image.go @@ -46,19 +46,20 @@ func getImageNameTag(image string) (string, string) { return parts[0], "latest" } -func (d *domain) GetRegistryImageURL(ctx ConsoleContext, image string, meta map[string]any) (string, error) { +func (d *domain) GetRegistryImageURL(ctx ConsoleContext, image string, meta map[string]any) (*entities.RegistryImageURL, error) { encodedToken := encodeAccessToken(ctx.AccountName, d.envVars.WebhookTokenHashingSecret) imageName, imageTag := getImageNameTag(image) metaJSON, err := json.Marshal(meta) if err != nil { - return "", err + return nil, err } - url := fmt.Sprintf(`curl -X POST "https://webhook.dev.kloudlite.io/image" -H "Authorization: %s" -H "Content-Type: application/json" -d '{"image": "%s:%s", "meta": %s}'`, encodedToken, imageName, imageTag, metaJSON) - - return url, nil + return &entities.RegistryImageURL{ + URL: fmt.Sprintf(`curl -X POST "%s" -H "Authorization: %s" -H "Content-Type: application/json" -d '{"image": "%s:%s", "meta": %s}'`, d.envVars.WebhookURL, encodedToken, imageName, imageTag, metaJSON), + ScriptURL: "", + }, nil } func (d *domain) CreateRegistryImage(ctx context.Context, accountName string, image string, meta map[string]any) (*entities.RegistryImage, error) { diff --git a/apps/console/internal/entities/registry-image.go b/apps/console/internal/entities/registry-image.go index d065afb24..b01d4927a 100644 --- a/apps/console/internal/entities/registry-image.go +++ b/apps/console/internal/entities/registry-image.go @@ -14,6 +14,11 @@ type RegistryImage struct { Meta map[string]any `json:"meta"` } +type RegistryImageURL struct { + URL string `json:"url"` + ScriptURL string `json:"scriptUrl"` +} + var RegistryImageIndexes = []repos.IndexField{ { Field: []repos.IndexKey{ diff --git a/apps/console/internal/env/env.go b/apps/console/internal/env/env.go index 6133fcb19..4d7b08fa1 100644 --- a/apps/console/internal/env/env.go +++ b/apps/console/internal/env/env.go @@ -22,6 +22,7 @@ type Env struct { NatsReceiveFromAgentStream string `env:"NATS_RECEIVE_FROM_AGENT_STREAM" required:"true"` EventsNatsStream string `env:"EVENTS_NATS_STREAM" required:"true"` WebhookTokenHashingSecret string `env:"WEBHOOK_TOKEN_HASHING_SECRET" required:"true"` + WebhookURL string `env:"WEBHOOK_URL" required:"true"` IAMGrpcAddr string `env:"IAM_GRPC_ADDR" required:"true"` InfraGrpcAddr string `env:"INFRA_GRPC_ADDR" required:"true"` diff --git a/apps/webhook/internal/app/image-hook.go b/apps/webhook/internal/app/image-hook.go index b09178686..01a80d5ec 100644 --- a/apps/webhook/internal/app/image-hook.go +++ b/apps/webhook/internal/app/image-hook.go @@ -101,7 +101,7 @@ func LoadImageHook() fx.Option { return err } err = producer.Produce(ctx.Context(), types2.ProduceMsg{ - Subject: string(common.RegistryHookTopicName), + Subject: string(common.ImageRegistryHookTopicName), Payload: jsonPayload, }) if err != nil { @@ -114,7 +114,7 @@ func LoadImageHook() fx.Option { return ctx.Status(http.StatusInternalServerError).JSON(errMsg) } logger.WithKV( - "produced.subject", string(common.RegistryHookTopicName), + "produced.subject", string(common.ImageRegistryHookTopicName), "produced.timestamp", time.Now(), ).Infof("queued webhook") return ctx.Status(http.StatusAccepted).JSON(map[string]string{"status": "ok"}) diff --git a/common/kafka-topic-name.go b/common/kafka-topic-name.go index 8e4435a52..4aa37cf4e 100644 --- a/common/kafka-topic-name.go +++ b/common/kafka-topic-name.go @@ -8,10 +8,10 @@ import ( type topicName string const ( - GitWebhookTopicName topicName = "events.webhooks.git" - AuditEventLogTopicName topicName = "events.audit.event-log" - NotificationTopicName topicName = "events.notification" - RegistryHookTopicName topicName = "events.webhooks.registry" + GitWebhookTopicName topicName = "events.webhooks.git" + AuditEventLogTopicName topicName = "events.audit.event-log" + NotificationTopicName topicName = "events.notification" + ImageRegistryHookTopicName topicName = "events.webhooks.image" ) const ( From 4970685301e48b3d654fd8d969f5f92b3dceadd0 Mon Sep 17 00:00:00 2001 From: nxtcoder36 Date: Tue, 3 Sep 2024 20:20:21 +0530 Subject: [PATCH 4/4] image update message provided in nats --- .../internal/app/graph/generated/generated.go | 4 ++-- apps/console/internal/app/webhook-consumer.go | 4 ++-- apps/webhook/internal/app/image-hook.go | 19 +++++++++++++++++++ common/kafka-topic-name.go | 9 +++++---- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 2858aae2f..792f6e81d 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -54773,12 +54773,12 @@ func (ec *executionContext) marshalNManagedResourceKeyValueRef2ᚖgithubᚗcom return ec._ManagedResourceKeyValueRef(ctx, sel, v) } -func (ec *executionContext) unmarshalNMap2map(ctx context.Context, v interface{}) (map[string]any, error) { +func (ec *executionContext) unmarshalNMap2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { res, err := graphql.UnmarshalMap(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMap2map(ctx context.Context, sel ast.SelectionSet, v map[string]any) graphql.Marshaler { +func (ec *executionContext) marshalNMap2map(ctx context.Context, sel ast.SelectionSet, v map[string]interface{}) 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") diff --git a/apps/console/internal/app/webhook-consumer.go b/apps/console/internal/app/webhook-consumer.go index 140be22d3..d46ac3642 100644 --- a/apps/console/internal/app/webhook-consumer.go +++ b/apps/console/internal/app/webhook-consumer.go @@ -31,8 +31,8 @@ func processWebhooks(consumer WebhookConsumer, d domain.Domain, logger logging.L AccountName: webhook.AccountName, Meta: webhook.Meta, } - ctx := context.TODO() - _, err := d.CreateRegistryImage(ctx, hook.AccountName, hook.Image, hook.Meta) + + _, err := d.CreateRegistryImage(context.TODO(), hook.AccountName, hook.Image, hook.Meta) if err != nil { logger.Errorf(err, "could not process image hook") return errors.NewE(err) diff --git a/apps/webhook/internal/app/image-hook.go b/apps/webhook/internal/app/image-hook.go index 01a80d5ec..d03e07631 100644 --- a/apps/webhook/internal/app/image-hook.go +++ b/apps/webhook/internal/app/image-hook.go @@ -100,6 +100,7 @@ func LoadImageHook() fx.Option { if err != nil { return err } + err = producer.Produce(ctx.Context(), types2.ProduceMsg{ Subject: string(common.ImageRegistryHookTopicName), Payload: jsonPayload, @@ -117,6 +118,24 @@ func LoadImageHook() fx.Option { "produced.subject", string(common.ImageRegistryHookTopicName), "produced.timestamp", time.Now(), ).Infof("queued webhook") + + err = producer.Produce(ctx.Context(), types2.ProduceMsg{ + Subject: string(common.ImageUpdateRegistryHookTopicName), + Payload: jsonPayload, + }) + if err != nil { + return err + } + + if err != nil { + errMsg := fmt.Sprintf("failed to produce message: %s", "webhook-provider") + logger.Errorf(err, errMsg) + return ctx.Status(http.StatusInternalServerError).JSON(errMsg) + } + logger.WithKV( + "produced.subject", string(common.ImageUpdateRegistryHookTopicName), + "produced.timestamp", time.Now(), + ).Infof("queued webhook") return ctx.Status(http.StatusAccepted).JSON(map[string]string{"status": "ok"}) }) return nil diff --git a/common/kafka-topic-name.go b/common/kafka-topic-name.go index 4aa37cf4e..966b43009 100644 --- a/common/kafka-topic-name.go +++ b/common/kafka-topic-name.go @@ -8,10 +8,11 @@ import ( type topicName string const ( - GitWebhookTopicName topicName = "events.webhooks.git" - AuditEventLogTopicName topicName = "events.audit.event-log" - NotificationTopicName topicName = "events.notification" - ImageRegistryHookTopicName topicName = "events.webhooks.image" + GitWebhookTopicName topicName = "events.webhooks.git" + AuditEventLogTopicName topicName = "events.audit.event-log" + NotificationTopicName topicName = "events.notification" + ImageRegistryHookTopicName topicName = "events.webhooks.image" + ImageUpdateRegistryHookTopicName topicName = "events.webhooks.image-update" ) const (