From 28d45b519d797916f890db21ba20b599c725b6e9 Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Wed, 10 Jul 2024 16:23:40 +0530 Subject: [PATCH 01/89] update sent mail option while signup and verify --- apps/auth/internal/domain/impl.go | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/apps/auth/internal/domain/impl.go b/apps/auth/internal/domain/impl.go index 0d12e3c09..00af8d286 100644 --- a/apps/auth/internal/domain/impl.go +++ b/apps/auth/internal/domain/impl.go @@ -211,20 +211,11 @@ func (d *domainI) SignUp(ctx context.Context, name string, email string, passwor return nil, errors.NewE(err) } - if _, err := d.commsClient.SendWaitingEmail( - ctx, &comms.WelcomeEmailInput{ - Email: user.Email, - Name: user.Name, - }, - ); err != nil { - d.logger.Errorf(err) + err = d.generateAndSendVerificationToken(ctx, user) + if err != nil { + return nil, errors.NewE(err) } - //err = d.generateAndSendVerificationToken(ctx, user) - //if err != nil { - // return nil, errors.NewE(err) - //} - return newAuthSession(user.Id, user.Email, user.Name, user.Verified, "email/password"), nil } @@ -278,15 +269,7 @@ func (d *domainI) VerifyEmail(ctx context.Context, token string) (*common.AuthSe if err != nil { return nil, errors.NewE(err) } - //if _, err := d.commsClient.SendWelcomeEmail( - // ctx, &comms.WelcomeEmailInput{ - // Email: user.Email, - // Name: user.Name, - // }, - //); err != nil { - // d.logger.Errorf(err) - //} - if _, err := d.commsClient.SendWaitingEmail( + if _, err := d.commsClient.SendWelcomeEmail( ctx, &comms.WelcomeEmailInput{ Email: user.Email, Name: user.Name, From 2d63cc14b2c83eb5657f27fd7614b10b35994ab2 Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Wed, 10 Jul 2024 19:19:33 +0530 Subject: [PATCH 02/89] check mres name availability based on managedservice name --- .../internal/app/graph/generated/generated.go | 55 +++++++------------ .../internal/app/graph/schema.graphqls | 2 +- .../internal/app/graph/schema.resolvers.go | 4 +- apps/console/internal/domain/api.go | 2 +- apps/console/internal/domain/names.go | 12 +++- 5 files changed, 35 insertions(+), 40 deletions(-) diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index c18344743..04c1f06cc 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -796,7 +796,7 @@ type ComplexityRoot struct { } Query struct { - CoreCheckNameAvailability func(childComplexity int, envName *string, resType entities.ResourceType, name string) int + CoreCheckNameAvailability func(childComplexity int, envName *string, msvcName *string, resType entities.ResourceType, name string) int CoreGetApp func(childComplexity int, envName string, name string) int CoreGetConfig func(childComplexity int, envName string, name string) int CoreGetConfigValues func(childComplexity int, envName string, queries []*domain.ConfigKeyRef) int @@ -1050,7 +1050,7 @@ type MutationResolver interface { CoreDeleteVPNDevice(ctx context.Context, deviceName string) (bool, error) } type QueryResolver interface { - CoreCheckNameAvailability(ctx context.Context, envName *string, resType entities.ResourceType, name string) (*domain.CheckNameAvailabilityOutput, error) + CoreCheckNameAvailability(ctx context.Context, envName *string, msvcName *string, resType entities.ResourceType, name string) (*domain.CheckNameAvailabilityOutput, error) CoreListEnvironments(ctx context.Context, search *model.SearchEnvironments, pq *repos.CursorPagination) (*model.EnvironmentPaginatedRecords, error) CoreGetEnvironment(ctx context.Context, name string) (*entities.Environment, error) CoreResyncEnvironment(ctx context.Context, name string) (bool, error) @@ -4561,7 +4561,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return 0, false } - return e.complexity.Query.CoreCheckNameAvailability(childComplexity, args["envName"].(*string), args["resType"].(entities.ResourceType), args["name"].(string)), true + return e.complexity.Query.CoreCheckNameAvailability(childComplexity, args["envName"].(*string), args["msvcName"].(*string), args["resType"].(entities.ResourceType), args["name"].(string)), true case "Query.core_getApp": if e.complexity.Query.CoreGetApp == nil { @@ -5620,11 +5620,7 @@ input CoreSearchVPNDevices { } type Query { - core_checkNameAvailability(envName: String, resType: ConsoleResType!, name: String!): ConsoleCheckNameAvailabilityOutput! @isLoggedIn @hasAccount - - # core_listProjects(search: SearchProjects, pq: CursorPaginationIn): ProjectPaginatedRecords @isLoggedInAndVerified @hasAccount - # core_getProject(name: String!): Project @isLoggedInAndVerified @hasAccount - # core_resyncProject(name: String!): Boolean! @isLoggedInAndVerified @hasAccount + core_checkNameAvailability(envName: String, msvcName: String ,resType: ConsoleResType!, name: String!): ConsoleCheckNameAvailabilityOutput! @isLoggedIn @hasAccount core_listEnvironments(search: SearchEnvironments, pq: CursorPaginationIn): EnvironmentPaginatedRecords @isLoggedInAndVerified @hasAccount core_getEnvironment(name: String!): Environment @isLoggedInAndVerified @hasAccount @@ -5660,29 +5656,18 @@ type Query { core_getManagedResouceOutputKeys(msvcName: String, envName:String , name: String!): [String!]! @isLoggedInAndVerified @hasAccount core_getManagedResouceOutputKeyValues(msvcName: String, envName:String, keyrefs: [ManagedResourceKeyRefIn]): [ManagedResourceKeyValueRef!]! @isLoggedInAndVerified @hasAccount + core_listManagedResources(search: SearchManagedResources, pq: CursorPaginationIn): ManagedResourcePaginatedRecords @isLoggedInAndVerified @hasAccount core_getManagedResource(msvcName: String, envName: String, name: String!): ManagedResource @isLoggedInAndVerified @hasAccount core_resyncManagedResource(msvcName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount - # core_listImportedManagedResources(envName: String! ,search: SearchManagedResources, pq: CursorPaginationIn): ManagedResourcePaginatedRecords @isLoggedInAndVerified @hasAccount - # core_getImportedManagedResource(envName: String!, name: String!): ManagedResource @isLoggedInAndVerified @hasAccount - core_listImportedManagedResources(envName: String!, search: SearchImportedManagedResources, pq: CursorPaginationIn): ImportedManagedResourcePaginatedRecords @isLoggedInAndVerified @hasAccount - # core_listProjectManagedServices(search: SearchProjectManagedService, pq: CursorPaginationIn): ProjectManagedServicePaginatedRecords @isLoggedInAndVerified @hasAccount - # core_getProjectManagedService( name: String!): ProjectManagedService @isLoggedInAndVerified @hasAccount - # core_resyncProjectManagedService(name: String!): Boolean! @isLoggedInAndVerified @hasAccount - # core_restartProjectManagedService(name: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_listVPNDevices(search: CoreSearchVPNDevices, pq: CursorPaginationIn): ConsoleVPNDevicePaginatedRecords @isLoggedInAndVerified @hasAccount core_listVPNDevicesForUser: [ConsoleVPNDevice!] @isLoggedInAndVerified @hasAccount core_getVPNDevice(name: String!): ConsoleVPNDevice @isLoggedInAndVerified @hasAccount } type Mutation { - # core_createProject(project: ProjectIn!): Project @isLoggedInAndVerified @hasAccount - # core_updateProject(project: ProjectIn!): Project @isLoggedInAndVerified @hasAccount - # core_deleteProject(name: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_createEnvironment(env: EnvironmentIn!): Environment @isLoggedInAndVerified @hasAccount core_updateEnvironment(env: EnvironmentIn!): Environment @isLoggedInAndVerified @hasAccount core_deleteEnvironment(envName: String!): Boolean! @isLoggedInAndVerified @hasAccount @@ -5719,16 +5704,9 @@ type Mutation { core_updateManagedResource(msvcName: String!, mres: ManagedResourceIn!): ManagedResource @isLoggedInAndVerified @hasAccount core_deleteManagedResource(msvcName: String!, mresName: String!): Boolean! @isLoggedInAndVerified @hasAccount - # core_importManagedResource(envName: String!, msvcName: String!, mresName: String!, importName: String!): ManagedResource @isLoggedInAndVerified @hasAccount - # core_deleteImportedManagedResource(envName: String!, importName: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_importManagedResource(envName: String!, msvcName: String!, mresName: String!, importName: String!): ImportedManagedResource @isLoggedInAndVerified @hasAccount core_deleteImportedManagedResource(envName: String!, importName: String!): Boolean! @isLoggedInAndVerified @hasAccount - # core_createProjectManagedService(pmsvc: ProjectManagedServiceIn!): ProjectManagedService @isLoggedInAndVerified @hasAccount - # core_updateProjectManagedService(pmsvc: ProjectManagedServiceIn!): ProjectManagedService @isLoggedInAndVerified @hasAccount - # core_deleteProjectManagedService(pmsvcName: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_createVPNDevice(vpnDevice: ConsoleVPNDeviceIn!): ConsoleVPNDevice @isLoggedInAndVerified @hasAccount core_updateVPNDevice(vpnDevice: ConsoleVPNDeviceIn!): ConsoleVPNDevice @isLoggedInAndVerified @hasAccount @@ -8097,24 +8075,33 @@ func (ec *executionContext) field_Query_core_checkNameAvailability_args(ctx cont } } args["envName"] = arg0 - var arg1 entities.ResourceType + var arg1 *string + if tmp, ok := rawArgs["msvcName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) + arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["msvcName"] = arg1 + var arg2 entities.ResourceType if tmp, ok := rawArgs["resType"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resType")) - arg1, err = ec.unmarshalNConsoleResType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐResourceType(ctx, tmp) + arg2, err = ec.unmarshalNConsoleResType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐResourceType(ctx, tmp) if err != nil { return nil, err } } - args["resType"] = arg1 - var arg2 string + args["resType"] = arg2 + var arg3 string if tmp, ok := rawArgs["name"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg2, err = ec.unmarshalNString2string(ctx, tmp) + arg3, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } - args["name"] = arg2 + args["name"] = arg3 return args, nil } @@ -31847,7 +31834,7 @@ func (ec *executionContext) _Query_core_checkNameAvailability(ctx context.Contex 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().CoreCheckNameAvailability(rctx, fc.Args["envName"].(*string), fc.Args["resType"].(entities.ResourceType), fc.Args["name"].(string)) + return ec.resolvers.Query().CoreCheckNameAvailability(rctx, fc.Args["envName"].(*string), fc.Args["msvcName"].(*string), fc.Args["resType"].(entities.ResourceType), fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedIn == nil { diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index e90567021..370aa649f 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -94,7 +94,7 @@ input CoreSearchVPNDevices { } type Query { - core_checkNameAvailability(envName: String, resType: ConsoleResType!, name: String!): ConsoleCheckNameAvailabilityOutput! @isLoggedIn @hasAccount + core_checkNameAvailability(envName: String, msvcName: String ,resType: ConsoleResType!, name: String!): ConsoleCheckNameAvailabilityOutput! @isLoggedIn @hasAccount core_listEnvironments(search: SearchEnvironments, pq: CursorPaginationIn): EnvironmentPaginatedRecords @isLoggedInAndVerified @hasAccount core_getEnvironment(name: String!): Environment @isLoggedInAndVerified @hasAccount diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index 3ff30bfde..dd5ee389c 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -446,12 +446,12 @@ func (r *mutationResolver) CoreDeleteVPNDevice(ctx context.Context, deviceName s } // CoreCheckNameAvailability is the resolver for the core_checkNameAvailability field. -func (r *queryResolver) CoreCheckNameAvailability(ctx context.Context, envName *string, resType entities.ResourceType, name string) (*domain.CheckNameAvailabilityOutput, error) { +func (r *queryResolver) CoreCheckNameAvailability(ctx context.Context, envName *string, msvcName *string, resType entities.ResourceType, name string) (*domain.CheckNameAvailabilityOutput, error) { cc, err := toConsoleContext(ctx) if err != nil { return nil, err } - return r.Domain.CheckNameAvailability(ctx, cc.AccountName, envName, resType, name) + return r.Domain.CheckNameAvailability(ctx, cc.AccountName, envName, msvcName, resType, name) } // CoreListEnvironments is the resolver for the core_listEnvironments field. diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index cc23a84d9..5158e560f 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -134,7 +134,7 @@ type UpdateAndDeleteOpts struct { } type Domain interface { - CheckNameAvailability(ctx context.Context, accountName string, environmentName *string, resType entities.ResourceType, name string) (*CheckNameAvailabilityOutput, error) + CheckNameAvailability(ctx context.Context, accountName string, environmentName *string, msvcName *string, resType entities.ResourceType, name string) (*CheckNameAvailabilityOutput, error) // INFO: project have been disabled // ListProjects(ctx context.Context, userId repos.ID, accountName string, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.Project], error) diff --git a/apps/console/internal/domain/names.go b/apps/console/internal/domain/names.go index ff84c2539..92d296e24 100644 --- a/apps/console/internal/domain/names.go +++ b/apps/console/internal/domain/names.go @@ -2,6 +2,7 @@ package domain import ( "context" + fc "github.com/kloudlite/api/apps/console/internal/entities/field-constants" "github.com/kloudlite/api/common/fields" @@ -27,11 +28,15 @@ func checkResourceName[T repos.Entity](ctx context.Context, filters repos.Filter }, nil } -func (d *domain) CheckNameAvailability(ctx context.Context, accountName string, environmentName *string, resType entities.ResourceType, name string) (*CheckNameAvailabilityOutput, error) { +func (d *domain) CheckNameAvailability(ctx context.Context, accountName string, environmentName *string, msvcName *string, resType entities.ResourceType, name string) (*CheckNameAvailabilityOutput, error) { errEnvironmentRequired := func() error { return errors.Newf("param environmentName is required for resource type %q", resType) } + errMsvcNameRequired := func() error { + return errors.Newf("param msvcName is required for resource type %q", resType) + } + if !fn.IsValidK8sResourceName(name) { return &CheckNameAvailabilityOutput{ Result: false, @@ -51,7 +56,10 @@ func (d *domain) CheckNameAvailability(ctx context.Context, accountName string, case entities.ResourceTypeManagedResource: { - return checkResourceName(ctx, repos.Filter{fields.AccountName: accountName, fields.MetadataName: name}, d.mresRepo) + if msvcName == nil { + return nil, errMsvcNameRequired() + } + return checkResourceName(ctx, repos.Filter{fields.AccountName: accountName, fields.MetadataName: name, fc.ManagedResourceManagedServiceName: msvcName}, d.mresRepo) } default: From 3889d50e62e65fed344c60c08722468207bb2761 Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Thu, 11 Jul 2024 11:15:40 +0530 Subject: [PATCH 03/89] remove device intercepts while switching environment in cli --- .../internal/app/graph/generated/generated.go | 142 ++++++++++++++++++ .../internal/app/graph/schema.graphqls | 1 + .../internal/app/graph/schema.resolvers.go | 12 ++ apps/console/internal/domain/api.go | 1 + apps/console/internal/domain/app.go | 27 ++++ apps/console/internal/domain/domain.go | 14 +- 6 files changed, 190 insertions(+), 7 deletions(-) diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 04c1f06cc..7af3bec07 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -821,6 +821,7 @@ type ComplexityRoot struct { CoreListSecrets func(childComplexity int, envName string, search *model.SearchSecrets, pq *repos.CursorPagination) int CoreListVPNDevices func(childComplexity int, search *model.CoreSearchVPNDevices, pq *repos.CursorPagination) int CoreListVPNDevicesForUser func(childComplexity int) int + CoreRemoveDeviceIntercepts func(childComplexity int, envName string, deviceName string) int CoreRestartApp func(childComplexity int, envName string, appName string) int CoreResyncApp func(childComplexity int, envName string, name string) int CoreResyncConfig func(childComplexity int, envName string, name string) int @@ -1061,6 +1062,7 @@ type QueryResolver interface { CoreGetApp(ctx context.Context, envName string, name string) (*entities.App, error) CoreResyncApp(ctx context.Context, envName string, name string) (bool, error) CoreRestartApp(ctx context.Context, envName string, appName string) (bool, error) + CoreRemoveDeviceIntercepts(ctx context.Context, envName string, deviceName string) (bool, error) CoreListExternalApps(ctx context.Context, envName string, search *model.SearchExternalApps, pq *repos.CursorPagination) (*model.ExternalAppPaginatedRecords, error) CoreGetExternalApp(ctx context.Context, envName string, name string) (*entities.ExternalApp, error) CoreResyncExternalApp(ctx context.Context, envName string, name string) (bool, error) @@ -4846,6 +4848,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.CoreListVPNDevicesForUser(childComplexity), true + case "Query.core_removeDeviceIntercepts": + if e.complexity.Query.CoreRemoveDeviceIntercepts == nil { + break + } + + args, err := ec.field_Query_core_removeDeviceIntercepts_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.CoreRemoveDeviceIntercepts(childComplexity, args["envName"].(string), args["deviceName"].(string)), true + case "Query.core_restartApp": if e.complexity.Query.CoreRestartApp == nil { break @@ -5635,6 +5649,7 @@ type Query { core_getApp(envName: String!, name: String!): App @isLoggedInAndVerified @hasAccount core_resyncApp(envName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount core_restartApp(envName: String!, appName: String!): Boolean! @isLoggedInAndVerified @hasAccount + core_removeDeviceIntercepts(envName: String!, deviceName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_listExternalApps(envName: String!, search: SearchExternalApps, pq: CursorPaginationIn): ExternalAppPaginatedRecords @isLoggedInAndVerified @hasAccount core_getExternalApp(envName: String!, name: String!): ExternalApp @isLoggedInAndVerified @hasAccount @@ -8711,6 +8726,30 @@ func (ec *executionContext) field_Query_core_listVPNDevices_args(ctx context.Con return args, nil } +func (ec *executionContext) field_Query_core_removeDeviceIntercepts_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["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["deviceName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["deviceName"] = arg1 + return args, nil +} + func (ec *executionContext) field_Query_core_restartApp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -32834,6 +32873,87 @@ func (ec *executionContext) fieldContext_Query_core_restartApp(ctx context.Conte return fc, nil } +func (ec *executionContext) _Query_core_removeDeviceIntercepts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_removeDeviceIntercepts(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().CoreRemoveDeviceIntercepts(rctx, fc.Args["envName"].(string), fc.Args["deviceName"].(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_removeDeviceIntercepts(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_removeDeviceIntercepts_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) if err != nil { @@ -49514,6 +49634,28 @@ 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_removeDeviceIntercepts": + 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_removeDeviceIntercepts(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_listExternalApps": field := field diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index 370aa649f..ff221ef31 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -109,6 +109,7 @@ type Query { core_getApp(envName: String!, name: String!): App @isLoggedInAndVerified @hasAccount core_resyncApp(envName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount core_restartApp(envName: String!, appName: String!): Boolean! @isLoggedInAndVerified @hasAccount + core_removeDeviceIntercepts(envName: String!, deviceName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_listExternalApps(envName: String!, search: SearchExternalApps, pq: CursorPaginationIn): ExternalAppPaginatedRecords @isLoggedInAndVerified @hasAccount core_getExternalApp(envName: String!, name: String!): ExternalApp @isLoggedInAndVerified @hasAccount diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index dd5ee389c..16fa2f249 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -612,6 +612,18 @@ func (r *queryResolver) CoreRestartApp(ctx context.Context, envName string, appN return true, nil } +// CoreRemoveDeviceIntercepts is the resolver for the core_removeDeviceIntercepts field. +func (r *queryResolver) CoreRemoveDeviceIntercepts(ctx context.Context, envName string, deviceName string) (bool, error) { + cc, err := toConsoleContext(ctx) + if err != nil { + return false, errors.NewE(err) + } + if err := r.Domain.RemoveDeviceIntercepts(newResourceContext(cc, envName), deviceName); err != nil { + return false, err + } + return true, nil +} + // CoreListExternalApps is the resolver for the core_listExternalApps field. func (r *queryResolver) CoreListExternalApps(ctx context.Context, envName string, search *model.SearchExternalApps, pq *repos.CursorPagination) (*model.ExternalAppPaginatedRecords, error) { cc, err := toConsoleContext(ctx) diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index 5158e560f..411a363fc 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -174,6 +174,7 @@ type Domain interface { InterceptApp(ctx ResourceContext, appName string, deviceName string, intercept bool, portMappings []crdsv1.AppInterceptPortMappings) (bool, error) RestartApp(ctx ResourceContext, appName string) error + RemoveDeviceIntercepts(ctx ResourceContext, deviceName string) error OnAppApplyError(ctx ResourceContext, errMsg string, name string, opts UpdateAndDeleteOpts) error OnAppDeleteMessage(ctx ResourceContext, app entities.App) error diff --git a/apps/console/internal/domain/app.go b/apps/console/internal/domain/app.go index fb1712162..0cf084f38 100644 --- a/apps/console/internal/domain/app.go +++ b/apps/console/internal/domain/app.go @@ -250,6 +250,33 @@ func (d *domain) RestartApp(ctx ResourceContext, appName string) error { return nil } +func (d *domain) RemoveDeviceIntercepts(ctx ResourceContext, deviceName string) error { + apps, err := d.appRepo.Find(ctx, repos.Query{ + Filter: repos.Filter{ + fields.AccountName: ctx.AccountName, + fields.EnvironmentName: ctx.EnvironmentName, + fc.AppSpecInterceptToDevice: deviceName, + }, + Sort: nil, + }) + if err != nil { + return errors.NewE(err) + } + + for i := range apps { + patchForUpdate := repos.Document{ + fc.AppSpecIntercept: nil, + } + + _, err := d.appRepo.PatchById(ctx, apps[i].Id, patchForUpdate) + if err != nil { + return errors.NewE(err) + } + } + + return nil +} + func (d *domain) OnAppUpdateMessage(ctx ResourceContext, app entities.App, status types.ResourceStatus, opts UpdateAndDeleteOpts) error { xApp, err := d.findApp(ctx, app.Name) if err != nil { diff --git a/apps/console/internal/domain/domain.go b/apps/console/internal/domain/domain.go index 77af9171f..f2f2d135e 100644 --- a/apps/console/internal/domain/domain.go +++ b/apps/console/internal/domain/domain.go @@ -49,14 +49,14 @@ type domain struct { environmentRepo repos.DbRepo[*entities.Environment] vpnDeviceRepo repos.DbRepo[*entities.ConsoleVPNDevice] - appRepo repos.DbRepo[*entities.App] - externalAppRepo repos.DbRepo[*entities.ExternalApp] - configRepo repos.DbRepo[*entities.Config] - secretRepo repos.DbRepo[*entities.Secret] - routerRepo repos.DbRepo[*entities.Router] - mresRepo repos.DbRepo[*entities.ManagedResource] + appRepo repos.DbRepo[*entities.App] + externalAppRepo repos.DbRepo[*entities.ExternalApp] + configRepo repos.DbRepo[*entities.Config] + secretRepo repos.DbRepo[*entities.Secret] + routerRepo repos.DbRepo[*entities.Router] + mresRepo repos.DbRepo[*entities.ManagedResource] importedMresRepo repos.DbRepo[*entities.ImportedManagedResource] - pullSecretsRepo repos.DbRepo[*entities.ImagePullSecret] + pullSecretsRepo repos.DbRepo[*entities.ImagePullSecret] envVars *env.Env From f13224c04fc0cf018519f71848ef81866345e794 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Fri, 12 Jul 2024 00:10:23 +0530 Subject: [PATCH 04/89] feat: aggregated DNS service using service bindings --- apps/console/internal/app/app.go | 38 ++ apps/console/internal/app/dns-server.go | 79 ++++ .../internal/app/graph/generated/generated.go | 342 +++++++----------- .../internal/app/graph/model/models_gen.go | 22 +- .../internal/app/graph/schema.graphqls | 2 +- .../internal/app/graph/schema.resolvers.go | 31 +- .../struct-to-graphql/common-types.graphqls | 3 +- .../internal/app/process-resource-updates.go | 76 ++-- apps/console/internal/domain/api.go | 10 + apps/console/internal/domain/app.go | 2 +- .../internal/domain/domain-service-binding.go | 31 ++ apps/console/internal/domain/domain.go | 4 + apps/console/internal/domain/mres.go | 6 +- .../internal/domain/service-binding.go | 42 +++ apps/console/internal/entities/app.go | 6 + .../field-constants/generated_constants.go | 14 +- .../internal/entities/resource-mapping.go | 19 +- .../internal/entities/service-binding.go | 33 ++ apps/console/internal/env/env.go | 2 + apps/console/internal/framework/framework.go | 15 + cmd/pod-logs-proxy/Taskfile.yml | 9 +- go.mod | 1 + go.sum | 2 + 23 files changed, 481 insertions(+), 308 deletions(-) create mode 100644 apps/console/internal/app/dns-server.go create mode 100644 apps/console/internal/domain/domain-service-binding.go create mode 100644 apps/console/internal/domain/service-binding.go create mode 100644 apps/console/internal/entities/service-binding.go diff --git a/apps/console/internal/app/app.go b/apps/console/internal/app/app.go index 528d7dc9a..b33d45de8 100644 --- a/apps/console/internal/app/app.go +++ b/apps/console/internal/app/app.go @@ -28,6 +28,8 @@ import ( msg_nats "github.com/kloudlite/api/pkg/messaging/nats" "github.com/kloudlite/api/pkg/nats" "github.com/kloudlite/api/pkg/repos" + + "github.com/miekg/dns" ) type ( @@ -39,6 +41,10 @@ type ( ConsoleGrpcServer grpc.Server ) +type DNSServer struct { + *dns.Server +} + func toConsoleContext(requestCtx context.Context, accountCookieName string) (domain.ConsoleContext, error) { sess := httpServer.GetSession[*common.AuthSession](requestCtx) if sess == nil { @@ -65,6 +71,7 @@ var Module = fx.Module("app", repos.NewFxMongoRepo[*entities.ImagePullSecret]("image_pull_secrets", "ips", entities.ImagePullSecretIndexes), repos.NewFxMongoRepo[*entities.ResourceMapping]("resource_mappings", "rmap", entities.ResourceMappingIndices), repos.NewFxMongoRepo[*entities.ConsoleVPNDevice]("vpn_devices", "devs", entities.VPNDeviceIndexes), + repos.NewFxMongoRepo[*entities.ServiceBinding]("service_bindings", "svcb", entities.ServiceBindingIndexes), fx.Provide( func(conn IAMGrpcClient) iam.IAMClient { @@ -208,4 +215,35 @@ var Module = fx.Module("app", }, }) }), + + fx.Provide(func(svcBindingRepo repos.DbRepo[*entities.ServiceBinding]) domain.ServiceBindingDomain { + return domain.NewSvcBindingDomain(svcBindingRepo) + }), + + fx.Provide(func(logger logging.Logger, sbd domain.ServiceBindingDomain) *dnsHandler { + return &dnsHandler{ + logger: logger, + serviceBindingDomain: sbd, + } + }), + + fx.Invoke(func(server *DNSServer, handler *dnsHandler, lf fx.Lifecycle, logger logging.Logger) { + lf.Append(fx.Hook{ + OnStart: func(ctx context.Context) error { + logger.Infof("starting dns server at %s", server.Addr) + server.Handler = handler + go func() { + err := server.ListenAndServe() + if err != nil { + logger.Errorf(err, "failed to start dns server") + panic(err) + } + }() + return nil + }, + OnStop: func(ctx context.Context) error { + return server.ShutdownContext(ctx) + }, + }) + }), ) diff --git a/apps/console/internal/app/dns-server.go b/apps/console/internal/app/dns-server.go new file mode 100644 index 000000000..51461752e --- /dev/null +++ b/apps/console/internal/app/dns-server.go @@ -0,0 +1,79 @@ +package app + +import ( + "context" + "fmt" + "strings" + + "github.com/kloudlite/api/apps/console/internal/domain" + "github.com/kloudlite/api/pkg/logging" + "github.com/miekg/dns" +) + +type dnsHandler struct { + logger logging.Logger + serviceBindingDomain domain.ServiceBindingDomain +} + +const ( + DefaultDNSTTL = 5 +) + +func (h *dnsHandler) ServeDNS(w dns.ResponseWriter, r *dns.Msg) { + logger := h.logger.WithKV("qname", r.Question[0].Name, "qtype", r.Question[0].Qtype) + logger.Debugf("incoming dns request") + msg := new(dns.Msg) + msg.SetReply(r) + msg.Authoritative = true + + // ctx, cf := context.WithTimeout(context.TODO(), 5*time.Second) + ctx, cf := context.WithCancel(context.TODO()) + defer cf() + + for _, question := range r.Question { + answers := h.resolver(ctx, question.Name, question.Qtype) + if answers == nil { + msg.Rcode = dns.RcodeNameError + continue + } + msg.Answer = append(msg.Answer, answers...) + } + + w.WriteMsg(msg) + logger.Debugf("outgoing dns request", "answers", msg.Answer) +} + +func (h *dnsHandler) newRR(domain string, ttl int, ip string) []dns.RR { + r, err := dns.NewRR(fmt.Sprintf("%s %d IN A %s", domain, ttl, ip)) + if err != nil { + h.logger.Errorf(err, "failed to create dns record") + panic(err) + } + return []dns.RR{r} +} + +func (h *dnsHandler) resolver(ctx context.Context, domain string, qtype uint16) []dns.RR { + m := new(dns.Msg) + m.SetQuestion(dns.Fqdn(domain), qtype) + m.RecursionDesired = true + + question := m.Question[0] + sp := strings.SplitN(question.Name, ".devprod.sh", 2) + if len(sp) < 2 { + return nil + } + + comps := strings.Split(sp[0], ".") + accountName := comps[len(comps)-1] + hostname := strings.Join(comps[:len(comps)-1], ".") + + sb, err := h.serviceBindingDomain.FindServiceBindingByHostname(ctx, accountName, hostname) + if err != nil { + return nil + } + if sb == nil { + return nil + } + + return h.newRR(question.Name, DefaultDNSTTL, sb.Spec.GlobalIP) +} diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 7af3bec07..12a8cc8ad 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -313,11 +313,10 @@ type ComplexityRoot struct { } Github__com___kloudlite___operator___apis___common____types__MsvcRef struct { - APIVersion func(childComplexity int) int - ClusterName func(childComplexity int) int - Kind func(childComplexity int) int - Name func(childComplexity int) int - Namespace func(childComplexity int) int + APIVersion func(childComplexity int) int + Kind func(childComplexity int) int + Name func(childComplexity int) int + Namespace func(childComplexity int) int } Github__com___kloudlite___operator___apis___common____types__SecretRef struct { @@ -768,6 +767,7 @@ type ComplexityRoot struct { CoreImportManagedResource func(childComplexity int, envName string, msvcName string, mresName string, importName string) int CoreInterceptApp func(childComplexity int, envName string, appname string, deviceName string, intercept bool, portMappings []*v1.AppInterceptPortMappings) int CoreInterceptExternalApp func(childComplexity int, envName string, externalAppName string, deviceName string, intercept bool, portMappings []*v1.AppInterceptPortMappings) int + CoreRemoveDeviceIntercepts func(childComplexity int, envName string, deviceName string) int CoreUpdateApp func(childComplexity int, envName string, app entities.App) int CoreUpdateConfig func(childComplexity int, envName string, config entities.Config) int CoreUpdateEnvironment func(childComplexity int, env entities.Environment) int @@ -821,7 +821,6 @@ type ComplexityRoot struct { CoreListSecrets func(childComplexity int, envName string, search *model.SearchSecrets, pq *repos.CursorPagination) int CoreListVPNDevices func(childComplexity int, search *model.CoreSearchVPNDevices, pq *repos.CursorPagination) int CoreListVPNDevicesForUser func(childComplexity int) int - CoreRemoveDeviceIntercepts func(childComplexity int, envName string, deviceName string) int CoreRestartApp func(childComplexity int, envName string, appName string) int CoreResyncApp func(childComplexity int, envName string, name string) int CoreResyncConfig func(childComplexity int, envName string, name string) int @@ -1024,6 +1023,7 @@ type MutationResolver interface { CoreUpdateApp(ctx context.Context, envName string, app entities.App) (*entities.App, error) CoreDeleteApp(ctx context.Context, envName string, appName string) (bool, error) CoreInterceptApp(ctx context.Context, envName string, appname string, deviceName string, intercept bool, portMappings []*v1.AppInterceptPortMappings) (bool, error) + CoreRemoveDeviceIntercepts(ctx context.Context, envName string, deviceName string) (bool, error) CoreCreateExternalApp(ctx context.Context, envName string, externalApp entities.ExternalApp) (*entities.ExternalApp, error) CoreUpdateExternalApp(ctx context.Context, envName string, externalApp entities.ExternalApp) (*entities.ExternalApp, error) CoreDeleteExternalApp(ctx context.Context, envName string, externalAppName string) (bool, error) @@ -1062,7 +1062,6 @@ type QueryResolver interface { CoreGetApp(ctx context.Context, envName string, name string) (*entities.App, error) CoreResyncApp(ctx context.Context, envName string, name string) (bool, error) CoreRestartApp(ctx context.Context, envName string, appName string) (bool, error) - CoreRemoveDeviceIntercepts(ctx context.Context, envName string, deviceName string) (bool, error) CoreListExternalApps(ctx context.Context, envName string, search *model.SearchExternalApps, pq *repos.CursorPagination) (*model.ExternalAppPaginatedRecords, error) CoreGetExternalApp(ctx context.Context, envName string, name string) (*entities.ExternalApp, error) CoreResyncExternalApp(ctx context.Context, envName string, name string) (bool, error) @@ -2217,13 +2216,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___common____types__MsvcRef.APIVersion(childComplexity), true - case "Github__com___kloudlite___operator___apis___common____types__MsvcRef.clusterName": - if e.complexity.Github__com___kloudlite___operator___apis___common____types__MsvcRef.ClusterName == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___common____types__MsvcRef.ClusterName(childComplexity), true - case "Github__com___kloudlite___operator___apis___common____types__MsvcRef.kind": if e.complexity.Github__com___kloudlite___operator___apis___common____types__MsvcRef.Kind == nil { break @@ -4355,6 +4347,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CoreInterceptExternalApp(childComplexity, args["envName"].(string), args["externalAppName"].(string), args["deviceName"].(string), args["intercept"].(bool), args["portMappings"].([]*v1.AppInterceptPortMappings)), true + case "Mutation.core_removeDeviceIntercepts": + if e.complexity.Mutation.CoreRemoveDeviceIntercepts == nil { + break + } + + args, err := ec.field_Mutation_core_removeDeviceIntercepts_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.CoreRemoveDeviceIntercepts(childComplexity, args["envName"].(string), args["deviceName"].(string)), true + case "Mutation.core_updateApp": if e.complexity.Mutation.CoreUpdateApp == nil { break @@ -4848,18 +4852,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.CoreListVPNDevicesForUser(childComplexity), true - case "Query.core_removeDeviceIntercepts": - if e.complexity.Query.CoreRemoveDeviceIntercepts == nil { - break - } - - args, err := ec.field_Query_core_removeDeviceIntercepts_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Query.CoreRemoveDeviceIntercepts(childComplexity, args["envName"].(string), args["deviceName"].(string)), true - case "Query.core_restartApp": if e.complexity.Query.CoreRestartApp == nil { break @@ -5649,7 +5641,6 @@ type Query { core_getApp(envName: String!, name: String!): App @isLoggedInAndVerified @hasAccount core_resyncApp(envName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount core_restartApp(envName: String!, appName: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_removeDeviceIntercepts(envName: String!, deviceName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_listExternalApps(envName: String!, search: SearchExternalApps, pq: CursorPaginationIn): ExternalAppPaginatedRecords @isLoggedInAndVerified @hasAccount core_getExternalApp(envName: String!, name: String!): ExternalApp @isLoggedInAndVerified @hasAccount @@ -5697,6 +5688,7 @@ type Mutation { core_updateApp(envName: String!, app: AppIn!): App @isLoggedInAndVerified @hasAccount core_deleteApp(envName: String!, appName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_interceptApp(envName: String!, appname: String!, deviceName: String!, intercept: Boolean!, portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn!]): Boolean! @isLoggedInAndVerified @hasAccount + core_removeDeviceIntercepts(envName: String!, deviceName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_createExternalApp(envName: String!, externalApp: ExternalAppIn!): ExternalApp @isLoggedInAndVerified @hasAccount core_updateExternalApp(envName: String!, externalApp: ExternalAppIn!): ExternalApp @isLoggedInAndVerified @hasAccount @@ -5823,7 +5815,6 @@ type Github__com___kloudlite___api___pkg___types__SyncStatus @shareable { type Github__com___kloudlite___operator___apis___common____types__MsvcRef @shareable { apiVersion: String - clusterName: String kind: String name: String! namespace: String! @@ -6162,7 +6153,6 @@ input Github__com___kloudlite___api___pkg___types__SyncStatusIn { input Github__com___kloudlite___operator___apis___common____types__MsvcRefIn { apiVersion: String - clusterName: String kind: String name: String! namespace: String! @@ -6474,6 +6464,7 @@ enum Github__com___kloudlite___api___apps___console___internal___entities__Resou managed_resource router secret + service_binding vpn_device } @@ -7763,6 +7754,30 @@ func (ec *executionContext) field_Mutation_core_interceptExternalApp_args(ctx co return args, nil } +func (ec *executionContext) field_Mutation_core_removeDeviceIntercepts_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["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["deviceName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["deviceName"] = arg1 + return args, nil +} + func (ec *executionContext) field_Mutation_core_updateApp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -8726,30 +8741,6 @@ func (ec *executionContext) field_Query_core_listVPNDevices_args(ctx context.Con return args, nil } -func (ec *executionContext) field_Query_core_removeDeviceIntercepts_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["deviceName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["deviceName"] = arg1 - return args, nil -} - func (ec *executionContext) field_Query_core_restartApp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -15974,47 +15965,6 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___common____types__MsvcRef_clusterName(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCommonTypesMsvcRef) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_clusterName(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.ClusterName, 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.marshalOString2ᚖstring(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___common____types__MsvcRef", - 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) _Github__com___kloudlite___operator___apis___common____types__MsvcRef_kind(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCommonTypesMsvcRef) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_kind(ctx, field) if err != nil { @@ -20132,8 +20082,6 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap switch field.Name { case "apiVersion": return ec.fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_clusterName(ctx, field) case "kind": return ec.fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_kind(ctx, field) case "name": @@ -29126,6 +29074,87 @@ func (ec *executionContext) fieldContext_Mutation_core_interceptApp(ctx context. return fc, nil } +func (ec *executionContext) _Mutation_core_removeDeviceIntercepts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_removeDeviceIntercepts(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().CoreRemoveDeviceIntercepts(rctx, fc.Args["envName"].(string), fc.Args["deviceName"].(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_removeDeviceIntercepts(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_removeDeviceIntercepts_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + func (ec *executionContext) _Mutation_core_createExternalApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Mutation_core_createExternalApp(ctx, field) if err != nil { @@ -32873,87 +32902,6 @@ func (ec *executionContext) fieldContext_Query_core_restartApp(ctx context.Conte return fc, nil } -func (ec *executionContext) _Query_core_removeDeviceIntercepts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_removeDeviceIntercepts(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().CoreRemoveDeviceIntercepts(rctx, fc.Args["envName"].(string), fc.Args["deviceName"].(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_removeDeviceIntercepts(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_removeDeviceIntercepts_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) if err != nil { @@ -40303,7 +40251,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a asMap[k] = v } - fieldsInOrder := [...]string{"apiVersion", "clusterName", "kind", "name", "namespace"} + fieldsInOrder := [...]string{"apiVersion", "kind", "name", "namespace"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -40317,13 +40265,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, err } it.APIVersion = data - case "clusterName": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.ClusterName = data case "kind": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) @@ -45607,8 +45548,6 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___common____types__MsvcRef") case "apiVersion": out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__MsvcRef_apiVersion(ctx, field, obj) - case "clusterName": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__MsvcRef_clusterName(ctx, field, obj) case "kind": out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__MsvcRef_kind(ctx, field, obj) case "name": @@ -49153,6 +49092,13 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) if out.Values[i] == graphql.Null { out.Invalids++ } + case "core_removeDeviceIntercepts": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_core_removeDeviceIntercepts(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } case "core_createExternalApp": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Mutation_core_createExternalApp(ctx, field) @@ -49634,28 +49580,6 @@ 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_removeDeviceIntercepts": - 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_removeDeviceIntercepts(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_listExternalApps": field := field diff --git a/apps/console/internal/app/graph/model/models_gen.go b/apps/console/internal/app/graph/model/models_gen.go index 3254fa262..900fa6a40 100644 --- a/apps/console/internal/app/graph/model/models_gen.go +++ b/apps/console/internal/app/graph/model/models_gen.go @@ -116,19 +116,17 @@ type GithubComKloudliteAPIPkgTypesEncodedString struct { } type GithubComKloudliteOperatorApisCommonTypesMsvcRef struct { - APIVersion *string `json:"apiVersion,omitempty"` - ClusterName *string `json:"clusterName,omitempty"` - Kind *string `json:"kind,omitempty"` - Name string `json:"name"` - Namespace string `json:"namespace"` + APIVersion *string `json:"apiVersion,omitempty"` + Kind *string `json:"kind,omitempty"` + Name string `json:"name"` + Namespace string `json:"namespace"` } type GithubComKloudliteOperatorApisCommonTypesMsvcRefIn struct { - APIVersion *string `json:"apiVersion,omitempty"` - ClusterName *string `json:"clusterName,omitempty"` - Kind *string `json:"kind,omitempty"` - Name string `json:"name"` - Namespace string `json:"namespace"` + APIVersion *string `json:"apiVersion,omitempty"` + Kind *string `json:"kind,omitempty"` + Name string `json:"name"` + Namespace string `json:"namespace"` } type GithubComKloudliteOperatorApisCommonTypesSecretRef struct { @@ -915,6 +913,7 @@ const ( GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeManagedResource GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "managed_resource" GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeRouter GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "router" GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeSecret GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "secret" + GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeServiceBinding GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "service_binding" GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeVpnDevice GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "vpn_device" ) @@ -928,12 +927,13 @@ var AllGithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = []GithubCo GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeManagedResource, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeRouter, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeSecret, + GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeServiceBinding, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeVpnDevice, } func (e GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType) IsValid() bool { switch e { - case GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeApp, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeConfig, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeEnvironment, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeExternalApp, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeImagePullSecret, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeImportedManagedResource, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeManagedResource, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeRouter, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeSecret, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeVpnDevice: + case GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeApp, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeConfig, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeEnvironment, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeExternalApp, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeImagePullSecret, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeImportedManagedResource, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeManagedResource, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeRouter, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeSecret, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeServiceBinding, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeVpnDevice: return true } return false diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index ff221ef31..b8f14d573 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -109,7 +109,6 @@ type Query { core_getApp(envName: String!, name: String!): App @isLoggedInAndVerified @hasAccount core_resyncApp(envName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount core_restartApp(envName: String!, appName: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_removeDeviceIntercepts(envName: String!, deviceName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_listExternalApps(envName: String!, search: SearchExternalApps, pq: CursorPaginationIn): ExternalAppPaginatedRecords @isLoggedInAndVerified @hasAccount core_getExternalApp(envName: String!, name: String!): ExternalApp @isLoggedInAndVerified @hasAccount @@ -157,6 +156,7 @@ type Mutation { core_updateApp(envName: String!, app: AppIn!): App @isLoggedInAndVerified @hasAccount core_deleteApp(envName: String!, appName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_interceptApp(envName: String!, appname: String!, deviceName: String!, intercept: Boolean!, portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn!]): Boolean! @isLoggedInAndVerified @hasAccount + core_removeDeviceIntercepts(envName: String!, deviceName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_createExternalApp(envName: String!, externalApp: ExternalAppIn!): ExternalApp @isLoggedInAndVerified @hasAccount core_updateExternalApp(envName: String!, externalApp: ExternalAppIn!): ExternalApp @isLoggedInAndVerified @hasAccount diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index 16fa2f249..75be7f019 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -7,6 +7,7 @@ package graph import ( "context" "fmt" + "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/apps/console/internal/app/graph/generated" @@ -162,6 +163,18 @@ func (r *mutationResolver) CoreInterceptApp(ctx context.Context, envName string, return r.Domain.InterceptApp(newResourceContext(cc, envName), appname, deviceName, intercept, pmappings) } +// CoreRemoveDeviceIntercepts is the resolver for the core_removeDeviceIntercepts field. +func (r *mutationResolver) CoreRemoveDeviceIntercepts(ctx context.Context, envName string, deviceName string) (bool, error) { + cc, err := toConsoleContext(ctx) + if err != nil { + return false, errors.NewE(err) + } + if err := r.Domain.RemoveDeviceIntercepts(newResourceContext(cc, envName), deviceName); err != nil { + return false, err + } + return true, nil +} + // CoreCreateExternalApp is the resolver for the core_createExternalApp field. func (r *mutationResolver) CoreCreateExternalApp(ctx context.Context, envName string, externalApp entities.ExternalApp) (*entities.ExternalApp, error) { cc, err := toConsoleContext(ctx) @@ -612,18 +625,6 @@ func (r *queryResolver) CoreRestartApp(ctx context.Context, envName string, appN return true, nil } -// CoreRemoveDeviceIntercepts is the resolver for the core_removeDeviceIntercepts field. -func (r *queryResolver) CoreRemoveDeviceIntercepts(ctx context.Context, envName string, deviceName string) (bool, error) { - cc, err := toConsoleContext(ctx) - if err != nil { - return false, errors.NewE(err) - } - if err := r.Domain.RemoveDeviceIntercepts(newResourceContext(cc, envName), deviceName); err != nil { - return false, err - } - return true, nil -} - // CoreListExternalApps is the resolver for the core_listExternalApps field. func (r *queryResolver) CoreListExternalApps(ctx context.Context, envName string, search *model.SearchExternalApps, pq *repos.CursorPagination) (*model.ExternalAppPaginatedRecords, error) { cc, err := toConsoleContext(ctx) @@ -1041,5 +1042,7 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type mutationResolver struct{ *Resolver } -type queryResolver struct{ *Resolver } +type ( + mutationResolver struct{ *Resolver } + queryResolver struct{ *Resolver } +) diff --git a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls index 28f805cbb..3af43e405 100644 --- a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -33,7 +33,6 @@ type Github__com___kloudlite___api___pkg___types__SyncStatus @shareable { type Github__com___kloudlite___operator___apis___common____types__MsvcRef @shareable { apiVersion: String - clusterName: String kind: String name: String! namespace: String! @@ -372,7 +371,6 @@ input Github__com___kloudlite___api___pkg___types__SyncStatusIn { input Github__com___kloudlite___operator___apis___common____types__MsvcRefIn { apiVersion: String - clusterName: String kind: String name: String! namespace: String! @@ -684,6 +682,7 @@ enum Github__com___kloudlite___api___apps___console___internal___entities__Resou managed_resource router secret + service_binding vpn_device } diff --git a/apps/console/internal/app/process-resource-updates.go b/apps/console/internal/app/process-resource-updates.go index cb39f3959..56c51d070 100644 --- a/apps/console/internal/app/process-resource-updates.go +++ b/apps/console/internal/app/process-resource-updates.go @@ -15,6 +15,7 @@ import ( "github.com/kloudlite/api/pkg/messaging" msgTypes "github.com/kloudlite/api/pkg/messaging/types" t "github.com/kloudlite/api/pkg/types" + networkingv1 "github.com/kloudlite/operator/apis/networking/v1" "github.com/kloudlite/operator/operators/resource-watcher/types" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -30,15 +31,16 @@ func newResourceContext(ctx domain.ConsoleContext, environmentName string) domai } var ( - appsGVK = fn.GVK("crds.kloudlite.io/v1", "App") - externalAppsGVK = fn.GVK("crds.kloudlite.io/v1", "ExternalApp") - environmentGVK = fn.GVK("crds.kloudlite.io/v1", "Environment") - deviceGVK = fn.GVK("wireguard.kloudlite.io/v1", "Device") - configGVK = fn.GVK("v1", "ConfigMap") - secretGVK = fn.GVK("v1", "Secret") - routerGVK = fn.GVK("crds.kloudlite.io/v1", "Router") - managedResourceGVK = fn.GVK("crds.kloudlite.io/v1", "ManagedResource") - projectManagedServiceGVK = fn.GVK("crds.kloudlite.io/v1", "ProjectManagedService") + appsGVK = fn.GVK("crds.kloudlite.io/v1", "App") + externalAppsGVK = fn.GVK("crds.kloudlite.io/v1", "ExternalApp") + environmentGVK = fn.GVK("crds.kloudlite.io/v1", "Environment") + deviceGVK = fn.GVK("wireguard.kloudlite.io/v1", "Device") + configGVK = fn.GVK("v1", "ConfigMap") + secretGVK = fn.GVK("v1", "Secret") + routerGVK = fn.GVK("crds.kloudlite.io/v1", "Router") + managedResourceGVK = fn.GVK("crds.kloudlite.io/v1", "ManagedResource") + + serviceBindingGVK = fn.GVK("networking.kloudlite.io/v1", "ServiceBinding") ) func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, logger logging.Logger) { @@ -123,7 +125,7 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo return err } - opts := domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp} + opts := domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp, ClusterName: ru.ClusterName} switch gvkStr { case deviceGVK.String(): @@ -152,48 +154,6 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo return d.OnVPNDeviceUpdateMessage(dctx, dev, resStatus, opts, ru.ClusterName) } - //case projectGVK.String(): - // { - // var p entities.Project - // if err := fn.JsonConversion(ru.Object, &p); err != nil { - // return errors.NewE(err) - // } - // - // if resStatus == types.ResourceStatusDeleted { - // return d.OnProjectDeleteMessage(dctx, p) - // } - // return d.OnProjectUpdateMessage(dctx, p, resStatus, opts) - // } - - //case projectManagedServiceGVK.String(): - // { - // var pmsvc entities.ProjectManagedService - // if err := fn.JsonConversion(ru.Object, &pmsvc); err != nil { - // return errors.NewE(err) - // } - // - // mapping, err := d.GetProjectResourceMapping(dctx, entities.ResourceTypeProjectManagedService, ru.ClusterName, obj.GetNamespace(), obj.GetName()) - // if err != nil { - // return err - // } - // if mapping == nil { - // return err - // } - // - // if v, ok := ru.Object[types.KeyProjectManagedSvcSecret]; ok { - // s, err := fn.JsonConvertP[corev1.Secret](v) - // s.SetManagedFields(nil) - // if err != nil { - // return err - // } - // pmsvc.SyncedOutputSecretRef = s - // } - // - // if resStatus == types.ResourceStatusDeleted { - // return d.OnProjectManagedServiceDeleteMessage(dctx, mapping.ProjectName, pmsvc) - // } - // return d.OnProjectManagedServiceUpdateMessage(dctx, mapping.ProjectName, pmsvc, resStatus, opts) - // } case environmentGVK.String(): { @@ -331,6 +291,18 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo return d.OnManagedResourceUpdateMessage(dctx, mres.ManagedResource.Spec.ResourceTemplate.MsvcRef.Name, mres, resStatus, opts) } + case serviceBindingGVK.String(): + { + var svcb networkingv1.ServiceBinding + if err := fn.JsonConversion(rwu.Object, &svcb); err != nil { + return errors.NewE(err) + } + + if resStatus == types.ResourceStatusDeleted { + return d.OnServiceBindingDeleteMessage(dctx, &svcb) + } + return d.OnServiceBindingUpdateMessage(dctx, &svcb, resStatus, opts) + } } return nil } diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index 411a363fc..a99166140 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -15,6 +15,8 @@ import ( "github.com/kloudlite/api/apps/console/internal/entities" "github.com/kloudlite/api/pkg/repos" + + networkingv1 "github.com/kloudlite/operator/apis/networking/v1" ) type ConsoleContext struct { @@ -131,6 +133,7 @@ type ResType string type UpdateAndDeleteOpts struct { MessageTimestamp time.Time + ClusterName string } type Domain interface { @@ -318,6 +321,13 @@ type Domain interface { ActivateVpnDeviceOnCluster(ctx ConsoleContext, devName string, clusterName string) error ActivateVPNDeviceOnNamespace(ctx ConsoleContext, devName string, namespace string) error + + ServiceBinding +} + +type ServiceBinding interface { + OnServiceBindingUpdateMessage(ctx ConsoleContext, svcb *networkingv1.ServiceBinding, status types.ResourceStatus, opts UpdateAndDeleteOpts) error + OnServiceBindingDeleteMessage(ctx ConsoleContext, svcb *networkingv1.ServiceBinding) error } type PublishMsg string diff --git a/apps/console/internal/domain/app.go b/apps/console/internal/domain/app.go index 0cf084f38..0a166c571 100644 --- a/apps/console/internal/domain/app.go +++ b/apps/console/internal/domain/app.go @@ -265,7 +265,7 @@ func (d *domain) RemoveDeviceIntercepts(ctx ResourceContext, deviceName string) for i := range apps { patchForUpdate := repos.Document{ - fc.AppSpecIntercept: nil, + fc.AppSpecInterceptEnabled: false, } _, err := d.appRepo.PatchById(ctx, apps[i].Id, patchForUpdate) diff --git a/apps/console/internal/domain/domain-service-binding.go b/apps/console/internal/domain/domain-service-binding.go new file mode 100644 index 000000000..1e1b7a46c --- /dev/null +++ b/apps/console/internal/domain/domain-service-binding.go @@ -0,0 +1,31 @@ +package domain + +import ( + "context" + + "github.com/kloudlite/api/apps/console/internal/entities" + fc "github.com/kloudlite/api/apps/console/internal/entities/field-constants" + "github.com/kloudlite/api/pkg/repos" +) + +type ServiceBindingDomain interface { + FindServiceBindingByHostname(ctx context.Context, accountName string, hostname string) (*entities.ServiceBinding, error) +} + +type svcBindingDomain struct { + repo repos.DbRepo[*entities.ServiceBinding] +} + +// FindServiceBindingByHostname implements ServiceBindingDomain. +func (s *svcBindingDomain) FindServiceBindingByHostname(ctx context.Context, accountName string, hostname string) (*entities.ServiceBinding, error) { + return s.repo.FindOne(ctx, repos.Filter{ + fc.AccountName: accountName, + fc.ServiceBindingSpecHostname: hostname, + }) +} + +func NewSvcBindingDomain(svcBindingRepo repos.DbRepo[*entities.ServiceBinding]) ServiceBindingDomain { + return &svcBindingDomain{ + repo: svcBindingRepo, + } +} diff --git a/apps/console/internal/domain/domain.go b/apps/console/internal/domain/domain.go index f2f2d135e..99f081f4f 100644 --- a/apps/console/internal/domain/domain.go +++ b/apps/console/internal/domain/domain.go @@ -58,6 +58,8 @@ type domain struct { importedMresRepo repos.DbRepo[*entities.ImportedManagedResource] pullSecretsRepo repos.DbRepo[*entities.ImagePullSecret] + serviceBindingRepo repos.DbRepo[*entities.ServiceBinding] + envVars *env.Env resourceEventPublisher ResourceEventPublisher @@ -562,6 +564,7 @@ var Module = fx.Module("domain", ipsRepo repos.DbRepo[*entities.ImagePullSecret], resourceMappingRepo repos.DbRepo[*entities.ResourceMapping], vpnDeviceRepo repos.DbRepo[*entities.ConsoleVPNDevice], + serviceBindingRepo repos.DbRepo[*entities.ServiceBinding], logger logging.Logger, resourceEventPublisher ResourceEventPublisher, @@ -590,6 +593,7 @@ var Module = fx.Module("domain", pullSecretsRepo: ipsRepo, resourceMappingRepo: resourceMappingRepo, vpnDeviceRepo: vpnDeviceRepo, + serviceBindingRepo: serviceBindingRepo, envVars: ev, diff --git a/apps/console/internal/domain/mres.go b/apps/console/internal/domain/mres.go index dd7732760..cf0565e1f 100644 --- a/apps/console/internal/domain/mres.go +++ b/apps/console/internal/domain/mres.go @@ -222,9 +222,9 @@ func (d *domain) CreateManagedResource(ctx ManagedResourceContext, mres entities } mres.Namespace = msvcOut.TargetNamespace - if mres.ManagedResource.Spec.ResourceTemplate.MsvcRef.ClusterName == nil { - mres.ManagedResource.Spec.ResourceTemplate.MsvcRef.ClusterName = &msvcOut.ClusterName - } + // if mres.ManagedResource.Spec.ResourceTemplate.MsvcRef.ClusterName == nil { + // mres.ManagedResource.Spec.ResourceTemplate.MsvcRef.ClusterName = &msvcOut.ClusterName + // } mres.EnsureGVK() if err := d.k8sClient.ValidateObject(ctx, &mres.ManagedResource); err != nil { diff --git a/apps/console/internal/domain/service-binding.go b/apps/console/internal/domain/service-binding.go new file mode 100644 index 000000000..5679a8f06 --- /dev/null +++ b/apps/console/internal/domain/service-binding.go @@ -0,0 +1,42 @@ +package domain + +import ( + "github.com/kloudlite/api/apps/console/internal/entities" + fc "github.com/kloudlite/api/apps/console/internal/entities/field-constants" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/repos" + networkingv1 "github.com/kloudlite/operator/apis/networking/v1" + "github.com/kloudlite/operator/operators/resource-watcher/types" +) + +// OnServiceBindingDeleteMessage implements Domain. +func (d *domain) OnServiceBindingDeleteMessage(ctx ConsoleContext, svcb *networkingv1.ServiceBinding) error { + panic("unimplemented") +} + +// OnServiceBindingUpdateMessage implements Domain. +func (d *domain) OnServiceBindingUpdateMessage(ctx ConsoleContext, svcb *networkingv1.ServiceBinding, status types.ResourceStatus, opts UpdateAndDeleteOpts) error { + if svcb == nil { + return errors.Newf("no service binding found") + } + + if svcb.Spec.Hostname == "" { + return nil + } + + if _, err := d.serviceBindingRepo.Upsert(ctx, repos.Filter{ + fc.AccountName: ctx.AccountName, + // fc.ClusterName: opts.ClusterName, + // fc.MetadataName: svcb.Name, + fc.ServiceBindingSpecHostname: svcb.Spec.Hostname, + }, &entities.ServiceBinding{ + ServiceBinding: *svcb, + AccountName: ctx.AccountName, + ClusterName: opts.ClusterName, + }); err != nil { + return errors.NewE(err) + } + + // d.resourceEventPublisher.PublishResourceEvent(ctx, urouter.GetResourceType(), urouter.GetName(), PublishUpdate) + return nil +} diff --git a/apps/console/internal/entities/app.go b/apps/console/internal/entities/app.go index 00513ea91..51e99f206 100644 --- a/apps/console/internal/entities/app.go +++ b/apps/console/internal/entities/app.go @@ -1,6 +1,7 @@ package entities import ( + fc "github.com/kloudlite/api/apps/console/internal/entities/field-constants" "github.com/kloudlite/api/common" "github.com/kloudlite/api/common/fields" "github.com/kloudlite/api/pkg/repos" @@ -55,4 +56,9 @@ var AppIndexes = []repos.IndexField{ }, Unique: true, }, + { + Field: []repos.IndexKey{ + {Key: fc.AppSpecInterceptToDevice, Value: repos.IndexAsc}, + }, + }, } diff --git a/apps/console/internal/entities/field-constants/generated_constants.go b/apps/console/internal/entities/field-constants/generated_constants.go index c525fa14d..9cd21ed16 100644 --- a/apps/console/internal/entities/field-constants/generated_constants.go +++ b/apps/console/internal/entities/field-constants/generated_constants.go @@ -136,11 +136,9 @@ const ( ManagedResourceSpecResourceTemplateKind = "spec.resourceTemplate.kind" ManagedResourceSpecResourceTemplateMsvcRef = "spec.resourceTemplate.msvcRef" ManagedResourceSpecResourceTemplateMsvcRefApiVersion = "spec.resourceTemplate.msvcRef.apiVersion" - ManagedResourceSpecResourceTemplateMsvcRefClusterName = "spec.resourceTemplate.msvcRef.clusterName" ManagedResourceSpecResourceTemplateMsvcRefKind = "spec.resourceTemplate.msvcRef.kind" ManagedResourceSpecResourceTemplateMsvcRefName = "spec.resourceTemplate.msvcRef.name" ManagedResourceSpecResourceTemplateMsvcRefNamespace = "spec.resourceTemplate.msvcRef.namespace" - ManagedResourceSpecResourceTemplateMsvcRefSharedSecret = "spec.resourceTemplate.msvcRef.sharedSecret" ManagedResourceSpecResourceTemplateSpec = "spec.resourceTemplate.spec" ManagedResourceSyncedOutputSecretRef = "syncedOutputSecretRef" ManagedResourceSyncedOutputSecretRefApiVersion = "syncedOutputSecretRef.apiVersion" @@ -237,6 +235,18 @@ const ( SecretCreatedForResourceType = "resourceType" ) +// constant vars generated for struct ServiceBinding +const ( + ServiceBindingSpec = "spec" + ServiceBindingSpecGlobalIP = "spec.globalIP" + ServiceBindingSpecHostname = "spec.hostname" + ServiceBindingSpecPorts = "spec.ports" + ServiceBindingSpecServiceIP = "spec.serviceIP" + ServiceBindingSpecServiceRef = "spec.serviceRef" + ServiceBindingSpecServiceRefName = "spec.serviceRef.name" + ServiceBindingSpecServiceRefNamespace = "spec.serviceRef.namespace" +) + // constant vars generated for struct const ( AccountName = "accountName" diff --git a/apps/console/internal/entities/resource-mapping.go b/apps/console/internal/entities/resource-mapping.go index 1ec828aee..dcb960e6b 100644 --- a/apps/console/internal/entities/resource-mapping.go +++ b/apps/console/internal/entities/resource-mapping.go @@ -9,16 +9,17 @@ import ( type ResourceType string const ( - ResourceTypeEnvironment ResourceType = "environment" - ResourceTypeApp ResourceType = "app" - ResourceTypeExternalApp ResourceType = "external_app" - ResourceTypeConfig ResourceType = "config" - ResourceTypeSecret ResourceType = "secret" - ResourceTypeImagePullSecret ResourceType = "image_pull_secret" - ResourceTypeRouter ResourceType = "router" - ResourceTypeManagedResource ResourceType = "managed_resource" + ResourceTypeEnvironment ResourceType = "environment" + ResourceTypeApp ResourceType = "app" + ResourceTypeExternalApp ResourceType = "external_app" + ResourceTypeConfig ResourceType = "config" + ResourceTypeSecret ResourceType = "secret" + ResourceTypeImagePullSecret ResourceType = "image_pull_secret" + ResourceTypeRouter ResourceType = "router" + ResourceTypeManagedResource ResourceType = "managed_resource" ResourceTypeImportedManagedResource ResourceType = "imported_managed_resource" - ResourceTypeVPNDevice ResourceType = "vpn_device" + ResourceTypeVPNDevice ResourceType = "vpn_device" + ResourceTypeServiceBinding ResourceType = "service_binding" ) type ResourceHeirarchy string diff --git a/apps/console/internal/entities/service-binding.go b/apps/console/internal/entities/service-binding.go new file mode 100644 index 000000000..e7d64ee6f --- /dev/null +++ b/apps/console/internal/entities/service-binding.go @@ -0,0 +1,33 @@ +package entities + +import ( + fc "github.com/kloudlite/api/apps/console/internal/entities/field-constants" + "github.com/kloudlite/api/pkg/repos" + networkingv1 "github.com/kloudlite/operator/apis/networking/v1" +) + +type ServiceBinding struct { + repos.BaseEntity `json:",inline"` + networkingv1.ServiceBinding `json:",inline"` + + AccountName string `json:"accountName"` + ClusterName string `json:"clusterName"` +} + +var ServiceBindingIndexes = []repos.IndexField{ + { + Field: []repos.IndexKey{ + {Key: fc.Id, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + {Key: fc.AccountName, Value: repos.IndexAsc}, + // {Key: fc.ClusterName, Value: repos.IndexAsc}, + // {Key: fc.MetadataName, Value: repos.IndexAsc}, + {Key: fc.ServiceBindingSpecHostname, Value: repos.IndexAsc}, + }, + Unique: true, + }, +} diff --git a/apps/console/internal/env/env.go b/apps/console/internal/env/env.go index 5dc6cbfe8..bf1f25cc6 100644 --- a/apps/console/internal/env/env.go +++ b/apps/console/internal/env/env.go @@ -9,6 +9,8 @@ type Env struct { Port uint16 `env:"HTTP_PORT" required:"true"` GrpcPort uint16 `env:"GRPC_PORT" required:"true"` + DNSAddr string `env:"DNS_ADDR" required:"true"` + ConsoleDBUri string `env:"MONGO_URI" required:"true"` ConsoleDBName string `env:"MONGO_DB_NAME" required:"true"` diff --git a/apps/console/internal/framework/framework.go b/apps/console/internal/framework/framework.go index c6a4250b0..0f69b5b74 100644 --- a/apps/console/internal/framework/framework.go +++ b/apps/console/internal/framework/framework.go @@ -3,6 +3,7 @@ package framework import ( "context" "fmt" + "github.com/kloudlite/api/apps/console/internal/domain" "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/errors" @@ -20,6 +21,8 @@ import ( "github.com/kloudlite/api/pkg/grpc" "go.uber.org/fx" "k8s.io/client-go/rest" + + "github.com/miekg/dns" ) type fm struct { @@ -127,4 +130,16 @@ var Module = fx.Module("framework", }, }) }), + + fx.Provide(func(ev *env.Env) *app.DNSServer { + return &app.DNSServer{ + Server: &dns.Server{ + Addr: ev.DNSAddr, + Net: "udp", + // Handler: handler, + UDPSize: 0xffff, + ReusePort: true, + }, + } + }), ) diff --git a/cmd/pod-logs-proxy/Taskfile.yml b/cmd/pod-logs-proxy/Taskfile.yml index c12305d74..ff891c478 100644 --- a/cmd/pod-logs-proxy/Taskfile.yml +++ b/cmd/pod-logs-proxy/Taskfile.yml @@ -1,7 +1,7 @@ version: 3 includes: - go: ../../.tools/taskfiles/go-build.yml + go: ../../.tools/taskfiles/go-build.Taskfile.yml vars: app: pod-logs-proxy @@ -11,7 +11,8 @@ tasks: cmds: - task: go:build vars: - Out: ./bin/{{.app}}-{{.GOARCH}} + GOARCH: '{{.GOARCH}}' + out: ./bin/{{.app}}-{{.GOARCH}} run: cmds: @@ -19,7 +20,7 @@ tasks: container:build-and-push: preconditions: - - sh: '[[ -n "{{.Image}}" ]]' + - sh: '[[ -n "{{.image}}" ]]' msg: "var Image is not set" cmds: - task: build @@ -28,4 +29,4 @@ tasks: - task: build vars: GOARCH: arm64 - - docker buildx build --platform linux/amd64,linux/arm64 --output=type=image,compression=zstd,force-compression=true,compression-level=14,push=true --build-arg BINARY="./bin/{{.app}}" -t {{.Image}} . + - docker buildx build --platform linux/amd64,linux/arm64 --output=type=image,compression=zstd,force-compression=true,compression-level=14,push=true --build-arg BINARY="./bin/{{.app}}" -t {{.image}} . diff --git a/go.mod b/go.mod index 9d7b38fb6..0624371f2 100644 --- a/go.mod +++ b/go.mod @@ -44,6 +44,7 @@ require ( require ( github.com/go-chi/chi/v5 v5.0.10 github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 + github.com/miekg/dns v1.1.55 github.com/nats-io/nats.go v1.31.0 github.com/onsi/ginkgo/v2 v2.12.0 github.com/onsi/gomega v1.27.10 diff --git a/go.sum b/go.sum index 79ee660d2..f4d2c0818 100644 --- a/go.sum +++ b/go.sum @@ -205,6 +205,8 @@ github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZ github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= +github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= From e11088fa31aa5d3a736b4a1771669210def78234 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Mon, 15 Jul 2024 11:49:09 +0530 Subject: [PATCH 05/89] feat: migrates cluster managed service to console from infra --- apps/console/Taskfile.yml | 6 +- apps/console/internal/app/app.go | 5 +- apps/console/internal/app/dns-server.go | 32 +- apps/console/internal/app/gqlgen.yml | 4 + .../graph/clustermanagedservice.resolvers.go | 49 +- .../app/graph/consolevpndevice.resolvers.go | 99 - .../internal/app/graph/generated/generated.go | 7374 +++++++---------- .../internal/app/graph/model/models_gen.go | 106 +- .../internal/app/graph/resolver-utils.go | 1 + .../internal/app/graph/schema.graphqls | 28 +- .../internal/app/graph/schema.resolvers.go | 217 +- .../clustermanagedservice.graphqls | 0 .../struct-to-graphql/common-types.graphqls | 75 +- .../consolevpndevice.graphqls | 43 - apps/console/internal/app/grpc-server.go | 82 - .../internal/app/process-error-on-apply.go | 33 +- .../internal/app/process-resource-updates.go | 67 +- apps/console/internal/domain/api.go | 54 +- .../domain/cluster-managed-service.go | 167 +- apps/console/internal/domain/domain.go | 37 +- .../domain/imported-managed-resource.go | 28 + apps/console/internal/domain/mres.go | 147 +- apps/console/internal/domain/names.go | 4 - apps/console/internal/domain/secret.go | 28 +- apps/console/internal/domain/vpn-device.go | 539 -- .../entities/cluster-managed-service.go | 0 apps/console/internal/entities/config.go | 1 - .../field-constants/generated_constants.go | 56 +- .../entities/imported-managed-resource.go | 5 + .../internal/entities/resource-mapping.go | 2 +- apps/console/internal/entities/vpn-device.go | 67 - apps/console/internal/env/env.go | 5 +- apps/console/main.go | 4 +- apps/infra/Taskfile.yml | 3 +- apps/infra/internal/app/app.go | 1 - apps/infra/internal/app/gqlgen.yml | 4 - .../internal/app/graph/generated/generated.go | 5408 +++--------- .../internal/app/graph/model/models_gen.go | 49 - apps/infra/internal/app/graph/schema.graphqls | 13 - .../internal/app/graph/schema.resolvers.go | 108 +- .../struct-to-graphql/common-types.graphqls | 33 - apps/infra/internal/app/grpc-server.go | 23 - .../internal/app/process-error-on-apply.go | 13 - .../internal/app/process-resource-updates.go | 23 - apps/infra/internal/domain/api.go | 15 +- apps/infra/internal/domain/byok-clusters.go | 4 - apps/infra/internal/domain/clusters.go | 4 - apps/infra/internal/domain/domain.go | 14 +- apps/infra/internal/domain/names.go | 16 +- .../field-constants/generated_constants.go | 42 - common/patch-util.go | 20 +- grpc-interfaces/console.proto | 25 - grpc-interfaces/infra.proto | 15 - grpc-interfaces/infra/infra.pb.go | 317 +- grpc-interfaces/infra/infra_grpc.pb.go | 47 +- .../kloudlite.io/rpc/console/console.pb.go | 275 +- .../rpc/console/console_grpc.pb.go | 37 - 57 files changed, 4847 insertions(+), 11027 deletions(-) rename apps/{infra => console}/internal/app/graph/clustermanagedservice.resolvers.go (66%) delete mode 100644 apps/console/internal/app/graph/consolevpndevice.resolvers.go rename apps/{infra => console}/internal/app/graph/struct-to-graphql/clustermanagedservice.graphqls (100%) delete mode 100644 apps/console/internal/app/graph/struct-to-graphql/consolevpndevice.graphqls rename apps/{infra => console}/internal/domain/cluster-managed-service.go (58%) delete mode 100644 apps/console/internal/domain/vpn-device.go rename apps/{infra => console}/internal/entities/cluster-managed-service.go (100%) delete mode 100644 apps/console/internal/entities/vpn-device.go diff --git a/apps/console/Taskfile.yml b/apps/console/Taskfile.yml index a91e5c93a..8063005a2 100644 --- a/apps/console/Taskfile.yml +++ b/apps/console/Taskfile.yml @@ -24,7 +24,6 @@ tasks: --struct github.com/kloudlite/api/apps/console/internal/entities.ExternalApp --struct github.com/kloudlite/api/apps/console/internal/entities.Secret --struct github.com/kloudlite/api/apps/console/internal/entities.Config - --struct github.com/kloudlite/api/apps/console/internal/entities.ConsoleVPNDevice --struct github.com/kloudlite/operator/apis/wireguard/v1.Port --struct github.com/kloudlite/api/apps/console/internal/domain.ConfigKeyRef --struct github.com/kloudlite/api/apps/console/internal/domain.ConfigKeyValueRef @@ -34,6 +33,7 @@ tasks: --struct github.com/kloudlite/api/apps/console/internal/domain.ManagedResourceKeyValueRef --struct github.com/kloudlite/api/apps/console/internal/entities.Router --struct github.com/kloudlite/api/apps/console/internal/entities.ManagedResource + --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/pkg/repos.MatchFilter @@ -41,7 +41,7 @@ tasks: > ./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,ConsoleVPNDevice + go run main.go --dev --out-dir ../graph/struct-to-graphql --with-pagination Environment,App,ExternalApp,Secret,Config,Router,ManagedResource,ImportedManagedResource,ImagePullSecret,ClusterManagedService popd - rm -rf ./internal/app/_struct-to-graphql @@ -81,6 +81,6 @@ tasks: - task: docker:build-and-push vars: - args: "-t {{.image}} . --build-arg BINARY={{.binary}}" + args: "--platform linux/amd64,linux/arm64 -t {{.image}} . --build-arg BINARY={{.binary}}" image: "{{.image}}" diff --git a/apps/console/internal/app/app.go b/apps/console/internal/app/app.go index b33d45de8..5506eebbd 100644 --- a/apps/console/internal/app/app.go +++ b/apps/console/internal/app/app.go @@ -70,8 +70,8 @@ var Module = fx.Module("app", repos.NewFxMongoRepo[*entities.Router]("routers", "rt", entities.RouterIndexes), repos.NewFxMongoRepo[*entities.ImagePullSecret]("image_pull_secrets", "ips", entities.ImagePullSecretIndexes), repos.NewFxMongoRepo[*entities.ResourceMapping]("resource_mappings", "rmap", entities.ResourceMappingIndices), - repos.NewFxMongoRepo[*entities.ConsoleVPNDevice]("vpn_devices", "devs", entities.VPNDeviceIndexes), repos.NewFxMongoRepo[*entities.ServiceBinding]("service_bindings", "svcb", entities.ServiceBindingIndexes), + repos.NewFxMongoRepo[*entities.ClusterManagedService]("cluster_managed_services", "cmsvc", entities.ClusterManagedServiceIndices), fx.Provide( func(conn IAMGrpcClient) iam.IAMClient { @@ -220,10 +220,11 @@ var Module = fx.Module("app", return domain.NewSvcBindingDomain(svcBindingRepo) }), - fx.Provide(func(logger logging.Logger, sbd domain.ServiceBindingDomain) *dnsHandler { + fx.Provide(func(logger logging.Logger, sbd domain.ServiceBindingDomain, ev *env.Env) *dnsHandler { return &dnsHandler{ logger: logger, serviceBindingDomain: sbd, + kloudliteDNSSuffix: ev.KloudliteDNSSuffix, } }), diff --git a/apps/console/internal/app/dns-server.go b/apps/console/internal/app/dns-server.go index 51461752e..8ad4e94d3 100644 --- a/apps/console/internal/app/dns-server.go +++ b/apps/console/internal/app/dns-server.go @@ -7,12 +7,14 @@ import ( "github.com/kloudlite/api/apps/console/internal/domain" "github.com/kloudlite/api/pkg/logging" + "github.com/kloudlite/operator/pkg/errors" "github.com/miekg/dns" ) type dnsHandler struct { logger logging.Logger serviceBindingDomain domain.ServiceBindingDomain + kloudliteDNSSuffix string } const ( @@ -20,19 +22,19 @@ const ( ) func (h *dnsHandler) ServeDNS(w dns.ResponseWriter, r *dns.Msg) { - logger := h.logger.WithKV("qname", r.Question[0].Name, "qtype", r.Question[0].Qtype) + logger := h.logger.WithKV("query", r.Question[0].Name) logger.Debugf("incoming dns request") msg := new(dns.Msg) msg.SetReply(r) msg.Authoritative = true - // ctx, cf := context.WithTimeout(context.TODO(), 5*time.Second) ctx, cf := context.WithCancel(context.TODO()) defer cf() for _, question := range r.Question { - answers := h.resolver(ctx, question.Name, question.Qtype) - if answers == nil { + answers, err := h.resolver(ctx, question.Name, question.Qtype) + if err != nil { + h.logger.Errorf(err) msg.Rcode = dns.RcodeNameError continue } @@ -40,27 +42,28 @@ func (h *dnsHandler) ServeDNS(w dns.ResponseWriter, r *dns.Msg) { } w.WriteMsg(msg) - logger.Debugf("outgoing dns request", "answers", msg.Answer) + logger.WithKV("answers", msg.Answer).Debugf("outgoing dns request") } -func (h *dnsHandler) newRR(domain string, ttl int, ip string) []dns.RR { +func (h *dnsHandler) newRR(domain string, ttl int, ip string) ([]dns.RR, error) { r, err := dns.NewRR(fmt.Sprintf("%s %d IN A %s", domain, ttl, ip)) if err != nil { - h.logger.Errorf(err, "failed to create dns record") - panic(err) + return nil, errors.NewEf(err, "failed to create dns record") } - return []dns.RR{r} + return []dns.RR{r}, nil } -func (h *dnsHandler) resolver(ctx context.Context, domain string, qtype uint16) []dns.RR { +var errNoServiceBinding = errors.Newf("no service binding found") + +func (h *dnsHandler) resolver(ctx context.Context, domain string, qtype uint16) ([]dns.RR, error) { m := new(dns.Msg) m.SetQuestion(dns.Fqdn(domain), qtype) m.RecursionDesired = true question := m.Question[0] - sp := strings.SplitN(question.Name, ".devprod.sh", 2) + sp := strings.SplitN(question.Name, fmt.Sprintf(".%s", h.kloudliteDNSSuffix), 2) if len(sp) < 2 { - return nil + return nil, fmt.Errorf("failed to split into 2 over .%s", h.kloudliteDNSSuffix) } comps := strings.Split(sp[0], ".") @@ -69,10 +72,11 @@ func (h *dnsHandler) resolver(ctx context.Context, domain string, qtype uint16) sb, err := h.serviceBindingDomain.FindServiceBindingByHostname(ctx, accountName, hostname) if err != nil { - return nil + return nil, errors.NewEf(err, "failed to find service binding") } + if sb == nil { - return nil + return nil, errNoServiceBinding } return h.newRR(question.Name, DefaultDNSTTL, sb.Spec.GlobalIP) diff --git a/apps/console/internal/app/gqlgen.yml b/apps/console/internal/app/gqlgen.yml index fc7e6dba1..a99f675bc 100644 --- a/apps/console/internal/app/gqlgen.yml +++ b/apps/console/internal/app/gqlgen.yml @@ -147,6 +147,10 @@ models: managedResource: resolver: true + ClusterManagedService: &custer-managed-service-model + model: github.com/kloudlite/api/apps/console/internal/entities.ClusterManagedService + ClusterManagedServiceIn: *custer-managed-service-model + ManagedResourceKeyRefIn: model: github.com/kloudlite/api/apps/console/internal/domain.ManagedResourceKeyRef diff --git a/apps/infra/internal/app/graph/clustermanagedservice.resolvers.go b/apps/console/internal/app/graph/clustermanagedservice.resolvers.go similarity index 66% rename from apps/infra/internal/app/graph/clustermanagedservice.resolvers.go rename to apps/console/internal/app/graph/clustermanagedservice.resolvers.go index d89777c94..af83dd1c6 100644 --- a/apps/infra/internal/app/graph/clustermanagedservice.resolvers.go +++ b/apps/console/internal/app/graph/clustermanagedservice.resolvers.go @@ -9,71 +9,54 @@ import ( "github.com/kloudlite/api/pkg/errors" "time" - "github.com/kloudlite/api/apps/infra/internal/app/graph/generated" - "github.com/kloudlite/api/apps/infra/internal/app/graph/model" - "github.com/kloudlite/api/apps/infra/internal/entities" + "github.com/kloudlite/api/apps/console/internal/app/graph/generated" + "github.com/kloudlite/api/apps/console/internal/app/graph/model" + "github.com/kloudlite/api/apps/console/internal/entities" fn "github.com/kloudlite/api/pkg/functions" - "github.com/kloudlite/api/pkg/repos" "k8s.io/apimachinery/pkg/apis/meta/v1" ) // CreationTime is the resolver for the creationTime field. func (r *clusterManagedServiceResolver) CreationTime(ctx context.Context, obj *entities.ClusterManagedService) (string, error) { if obj == nil { - return "", errors.Newf("clusterManagedService obj is nil") + return "", errNilManagedResource } - - return obj.CreationTime.Format(time.RFC3339), nil -} - -// ID is the resolver for the id field. -func (r *clusterManagedServiceResolver) ID(ctx context.Context, obj *entities.ClusterManagedService) (repos.ID, error) { - if obj == nil { - return "", errors.Newf("clusterManagedService obj is nil") - } - - return obj.Id, nil + return obj.BaseEntity.CreationTime.Format(time.RFC3339), nil } // Spec is the resolver for the spec field. func (r *clusterManagedServiceResolver) Spec(ctx context.Context, obj *entities.ClusterManagedService) (*model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec, error) { - if obj == nil { - return nil, errors.Newf("clusterManagedService is nil") - } - - var spec model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec - - if err := fn.JsonConversion(&obj.Spec, &spec); err != nil { + m := &model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec{} + if err := fn.JsonConversion(obj.Spec, &m); err != nil { return nil, errors.NewE(err) } - - return &spec, nil + return m, nil } // UpdateTime is the resolver for the updateTime field. func (r *clusterManagedServiceResolver) UpdateTime(ctx context.Context, obj *entities.ClusterManagedService) (string, error) { if obj == nil { - return "", errors.Newf("clusterManagedService is nil") + return "", errNilManagedResource } - - return obj.UpdateTime.Format(time.RFC3339), nil + return obj.BaseEntity.UpdateTime.Format(time.RFC3339), nil } // Metadata is the resolver for the metadata field. func (r *clusterManagedServiceInResolver) Metadata(ctx context.Context, obj *entities.ClusterManagedService, data *v1.ObjectMeta) error { if obj == nil { - return errors.Newf("clusterManagedService is nil") + return errNilManagedResource } - - return fn.JsonConversion(data, &obj.ObjectMeta) + if data != nil { + obj.ObjectMeta = *data + } + return nil } // Spec is the resolver for the spec field. func (r *clusterManagedServiceInResolver) Spec(ctx context.Context, obj *entities.ClusterManagedService, data *model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn) error { if obj == nil { - return errors.Newf("clusterManagedService is nil") + return errNilManagedResource } - return fn.JsonConversion(data, &obj.Spec) } diff --git a/apps/console/internal/app/graph/consolevpndevice.resolvers.go b/apps/console/internal/app/graph/consolevpndevice.resolvers.go deleted file mode 100644 index 637839b7d..000000000 --- a/apps/console/internal/app/graph/consolevpndevice.resolvers.go +++ /dev/null @@ -1,99 +0,0 @@ -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.45 - -import ( - "context" - "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" - "github.com/kloudlite/api/apps/console/internal/entities" - fn "github.com/kloudlite/api/pkg/functions" - "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// CreationTime is the resolver for the creationTime field. -func (r *consoleVPNDeviceResolver) CreationTime(ctx context.Context, obj *entities.ConsoleVPNDevice) (string, error) { - if obj == nil { - return "", errNilVPNDevice - } - return obj.BaseEntity.CreationTime.Format(time.RFC3339), nil -} - -// Spec is the resolver for the spec field. -func (r *consoleVPNDeviceResolver) Spec(ctx context.Context, obj *entities.ConsoleVPNDevice) (*model.GithubComKloudliteOperatorApisWireguardV1DeviceSpec, error) { - if obj == nil { - return nil, errNilVPNDevice - } - - m := &model.GithubComKloudliteOperatorApisWireguardV1DeviceSpec{} - - if err := fn.JsonConversion(obj.Spec, &m); err != nil { - return nil, errors.NewE(err) - } - - return m, nil -} - -// UpdateTime is the resolver for the updateTime field. -func (r *consoleVPNDeviceResolver) UpdateTime(ctx context.Context, obj *entities.ConsoleVPNDevice) (string, error) { - if obj == nil { - return "", errNilVPNDevice - } - - return obj.BaseEntity.UpdateTime.Format(time.RFC3339), nil -} - -// WireguardConfig is the resolver for the wireguardConfig field. -func (r *consoleVPNDeviceResolver) WireguardConfig(ctx context.Context, obj *entities.ConsoleVPNDevice) (*model.GithubComKloudliteAPIPkgTypesEncodedString, error) { - if obj == nil { - return nil, errNilVPNDevice - } - - m := &model.GithubComKloudliteAPIPkgTypesEncodedString{} - - if err := fn.JsonConversion(obj.WireguardConfig, &m); err != nil { - return nil, errors.NewE(err) - } - - return m, nil -} - -// Metadata is the resolver for the metadata field. -func (r *consoleVPNDeviceInResolver) Metadata(ctx context.Context, obj *entities.ConsoleVPNDevice, data *v1.ObjectMeta) error { - if obj == nil { - return errNilVPNDevice - } - - if data != nil { - obj.ObjectMeta = *data - } - - return nil -} - -// Spec is the resolver for the spec field. -func (r *consoleVPNDeviceInResolver) Spec(ctx context.Context, obj *entities.ConsoleVPNDevice, data *model.GithubComKloudliteOperatorApisWireguardV1DeviceSpecIn) error { - if obj == nil { - return errNilVPNDevice - } - - return fn.JsonConversion(data, &obj.Spec) -} - -// ConsoleVPNDevice returns generated.ConsoleVPNDeviceResolver implementation. -func (r *Resolver) ConsoleVPNDevice() generated.ConsoleVPNDeviceResolver { - return &consoleVPNDeviceResolver{r} -} - -// ConsoleVPNDeviceIn returns generated.ConsoleVPNDeviceInResolver implementation. -func (r *Resolver) ConsoleVPNDeviceIn() generated.ConsoleVPNDeviceInResolver { - return &consoleVPNDeviceInResolver{r} -} - -type consoleVPNDeviceResolver struct{ *Resolver } -type consoleVPNDeviceInResolver struct{ *Resolver } diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 12a8cc8ad..548afdd6a 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -21,12 +21,12 @@ import ( "github.com/kloudlite/api/pkg/repos" "github.com/kloudlite/api/pkg/types" "github.com/kloudlite/operator/apis/crds/v1" - v11 "github.com/kloudlite/operator/apis/wireguard/v1" + v13 "github.com/kloudlite/operator/apis/wireguard/v1" "github.com/kloudlite/operator/pkg/operator" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" - v12 "k8s.io/api/core/v1" - v13 "k8s.io/apimachinery/pkg/apis/meta/v1" + v11 "k8s.io/api/core/v1" + v12 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // region ************************** generated!.gotpl ************************** @@ -50,8 +50,8 @@ type Config struct { type ResolverRoot interface { App() AppResolver + ClusterManagedService() ClusterManagedServiceResolver Config() ConfigResolver - ConsoleVPNDevice() ConsoleVPNDeviceResolver Entity() EntityResolver Environment() EnvironmentResolver ExternalApp() ExternalAppResolver @@ -68,8 +68,8 @@ type ResolverRoot interface { Router() RouterResolver Secret() SecretResolver AppIn() AppInResolver + ClusterManagedServiceIn() ClusterManagedServiceInResolver ConfigIn() ConfigInResolver - ConsoleVPNDeviceIn() ConsoleVPNDeviceInResolver EnvironmentIn() EnvironmentInResolver ExternalAppIn() ExternalAppInResolver Github__com___kloudlite___api___pkg___types__SyncStatusIn() Github__com___kloudlite___api___pkg___types__SyncStatusInResolver @@ -125,86 +125,84 @@ type ComplexityRoot struct { ID func(childComplexity int) int } - Config struct { + ClusterManagedService struct { APIVersion func(childComplexity int) int AccountName func(childComplexity int) int - BinaryData func(childComplexity int) int + ClusterName func(childComplexity int) int CreatedBy func(childComplexity int) int CreationTime func(childComplexity int) int - Data func(childComplexity int) int DisplayName func(childComplexity int) int - EnvironmentName func(childComplexity int) int Id func(childComplexity int) int - Immutable func(childComplexity int) int + IsArchived func(childComplexity int) int Kind func(childComplexity int) int LastUpdatedBy func(childComplexity int) int MarkedForDeletion func(childComplexity int) int ObjectMeta func(childComplexity int) int RecordVersion func(childComplexity int) int + Spec func(childComplexity int) int + Status func(childComplexity int) int SyncStatus func(childComplexity int) int UpdateTime func(childComplexity int) int } - ConfigEdge struct { + ClusterManagedServiceEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } - ConfigKeyRef struct { - ConfigName func(childComplexity int) int - Key func(childComplexity int) int - } - - ConfigKeyValueRef struct { - ConfigName func(childComplexity int) int - Key func(childComplexity int) int - Value func(childComplexity int) int - } - - ConfigPaginatedRecords struct { + ClusterManagedServicePaginatedRecords struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } - ConsoleCheckNameAvailabilityOutput struct { - Result func(childComplexity int) int - SuggestedNames func(childComplexity int) int - } - - ConsoleVPNDevice struct { + Config struct { APIVersion func(childComplexity int) int AccountName func(childComplexity int) int - ClusterName func(childComplexity int) int + BinaryData func(childComplexity int) int CreatedBy func(childComplexity int) int CreationTime func(childComplexity int) int + Data func(childComplexity int) int DisplayName func(childComplexity int) int EnvironmentName func(childComplexity int) int Id func(childComplexity int) int + Immutable func(childComplexity int) int Kind func(childComplexity int) int LastUpdatedBy func(childComplexity int) int - LinkedClusters func(childComplexity int) int MarkedForDeletion func(childComplexity int) int ObjectMeta func(childComplexity int) int RecordVersion func(childComplexity int) int - Spec func(childComplexity int) int - Status func(childComplexity int) int SyncStatus func(childComplexity int) int UpdateTime func(childComplexity int) int - WireguardConfig func(childComplexity int) int } - ConsoleVPNDeviceEdge struct { + ConfigEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } - ConsoleVPNDevicePaginatedRecords struct { + ConfigKeyRef struct { + ConfigName func(childComplexity int) int + Key func(childComplexity int) int + } + + ConfigKeyValueRef struct { + ConfigName func(childComplexity int) int + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + ConfigPaginatedRecords struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } + ConsoleCheckNameAvailabilityOutput struct { + Result func(childComplexity int) int + SuggestedNames func(childComplexity int) int + } + CursorPagination struct { After func(childComplexity int) int Before func(childComplexity int) int @@ -298,11 +296,6 @@ type ComplexityRoot struct { UserName func(childComplexity int) int } - Github__com___kloudlite___api___pkg___types__EncodedString struct { - Encoding func(childComplexity int) int - Value func(childComplexity int) int - } - Github__com___kloudlite___api___pkg___types__SyncStatus struct { Action func(childComplexity int) int Error func(childComplexity int) int @@ -383,6 +376,11 @@ type ComplexityRoot struct { Username func(childComplexity int) int } + Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec struct { + MsvcSpec func(childComplexity int) int + TargetNamespace func(childComplexity int) int + } + Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv struct { Key func(childComplexity int) int Optional func(childComplexity int) int @@ -468,6 +466,12 @@ type ComplexityRoot struct { ResourceTemplate func(childComplexity int) int } + Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec struct { + NodeSelector func(childComplexity int) int + ServiceTemplate func(childComplexity int) int + Tolerations func(childComplexity int) int + } + Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate struct { APIVersion func(childComplexity int) int Kind func(childComplexity int) int @@ -511,6 +515,12 @@ type ComplexityRoot struct { Routes func(childComplexity int) int } + Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate struct { + APIVersion func(childComplexity int) int + Kind func(childComplexity int) int + Spec func(childComplexity int) int + } + Github__com___kloudlite___operator___apis___crds___v1__ShellProbe struct { Command func(childComplexity int) int } @@ -519,25 +529,6 @@ type ComplexityRoot struct { Port func(childComplexity int) int } - Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord struct { - Host func(childComplexity int) int - Target func(childComplexity int) int - } - - Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec struct { - ActiveNamespace func(childComplexity int) int - CnameRecords func(childComplexity int) int - Disabled func(childComplexity int) int - NoExternalService func(childComplexity int) int - NodeSelector func(childComplexity int) int - Ports func(childComplexity int) int - } - - Github__com___kloudlite___operator___apis___wireguard___v1__Port struct { - Port func(childComplexity int) int - TargetPort func(childComplexity int) int - } - Github__com___kloudlite___operator___pkg___operator__Check struct { Debug func(childComplexity int) int Error func(childComplexity int) int @@ -753,7 +744,6 @@ type ComplexityRoot struct { CoreCreateManagedResource func(childComplexity int, msvcName string, mres entities.ManagedResource) int CoreCreateRouter func(childComplexity int, envName string, router entities.Router) int CoreCreateSecret func(childComplexity int, envName string, secret entities.Secret) int - CoreCreateVPNDevice func(childComplexity int, vpnDevice entities.ConsoleVPNDevice) int CoreDeleteApp func(childComplexity int, envName string, appName string) int CoreDeleteConfig func(childComplexity int, envName string, configName string) int CoreDeleteEnvironment func(childComplexity int, envName string) int @@ -763,7 +753,6 @@ type ComplexityRoot struct { CoreDeleteManagedResource func(childComplexity int, msvcName string, mresName string) int CoreDeleteRouter func(childComplexity int, envName string, routerName string) int CoreDeleteSecret func(childComplexity int, envName string, secretName string) int - CoreDeleteVPNDevice func(childComplexity int, deviceName string) int CoreImportManagedResource func(childComplexity int, envName string, msvcName string, mresName string, importName string) int CoreInterceptApp func(childComplexity int, envName string, appname string, deviceName string, intercept bool, portMappings []*v1.AppInterceptPortMappings) int CoreInterceptExternalApp func(childComplexity int, envName string, externalAppName string, deviceName string, intercept bool, portMappings []*v1.AppInterceptPortMappings) int @@ -776,11 +765,10 @@ type ComplexityRoot struct { CoreUpdateManagedResource func(childComplexity int, msvcName string, mres entities.ManagedResource) int CoreUpdateRouter func(childComplexity int, envName string, router entities.Router) int CoreUpdateSecret func(childComplexity int, envName string, secret entities.Secret) int - CoreUpdateVPNDevice func(childComplexity int, vpnDevice entities.ConsoleVPNDevice) int - CoreUpdateVPNDeviceEnv func(childComplexity int, deviceName string, envName string) int - CoreUpdateVPNDevicePorts func(childComplexity int, deviceName string, ports []*v11.Port) int - CoreUpdateVpnClusterName func(childComplexity int, deviceName string, clusterName string) int - CoreUpdateVpnDeviceNs func(childComplexity int, deviceName string, ns string) int + InfraCloneClusterManagedService func(childComplexity int, clusterName string, sourceMsvcName string, destinationMsvcName string, displayName string) int + InfraCreateClusterManagedService func(childComplexity int, service entities.ClusterManagedService) int + InfraDeleteClusterManagedService func(childComplexity int, name string) int + InfraUpdateClusterManagedService func(childComplexity int, service entities.ClusterManagedService) int } PageInfo struct { @@ -809,7 +797,6 @@ type ComplexityRoot struct { 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 - CoreGetVPNDevice func(childComplexity int, name string) int CoreListApps func(childComplexity int, envName string, search *model.SearchApps, pq *repos.CursorPagination) int CoreListConfigs func(childComplexity int, envName string, search *model.SearchConfigs, pq *repos.CursorPagination) int CoreListEnvironments func(childComplexity int, search *model.SearchEnvironments, pq *repos.CursorPagination) int @@ -819,8 +806,6 @@ type ComplexityRoot struct { CoreListManagedResources func(childComplexity int, search *model.SearchManagedResources, 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 - CoreListVPNDevices func(childComplexity int, search *model.CoreSearchVPNDevices, pq *repos.CursorPagination) int - CoreListVPNDevicesForUser func(childComplexity int) int CoreRestartApp func(childComplexity int, envName string, appName string) int CoreResyncApp func(childComplexity int, envName string, name string) int CoreResyncConfig func(childComplexity int, envName string, name string) int @@ -830,6 +815,8 @@ type ComplexityRoot struct { CoreResyncManagedResource func(childComplexity int, msvcName string, name string) int CoreResyncRouter func(childComplexity int, envName string, name string) int CoreResyncSecret func(childComplexity int, envName string, name string) int + InfraGetClusterManagedService func(childComplexity int, name string) int + InfraListClusterManagedServices func(childComplexity int, search *model.SearchClusterManagedService, pagination *repos.CursorPagination) int __resolve__service func(childComplexity int) int __resolve_entities func(childComplexity int, representations []map[string]interface{}) int } @@ -923,6 +910,13 @@ type AppResolver interface { UpdateTime(ctx context.Context, obj *entities.App) (string, error) Build(ctx context.Context, obj *entities.App) (*model.Build, error) } +type ClusterManagedServiceResolver interface { + CreationTime(ctx context.Context, obj *entities.ClusterManagedService) (string, error) + + Spec(ctx context.Context, obj *entities.ClusterManagedService) (*model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec, error) + + UpdateTime(ctx context.Context, obj *entities.ClusterManagedService) (string, error) +} type ConfigResolver interface { BinaryData(ctx context.Context, obj *entities.Config) (map[string]interface{}, error) @@ -931,14 +925,6 @@ type ConfigResolver interface { UpdateTime(ctx context.Context, obj *entities.Config) (string, error) } -type ConsoleVPNDeviceResolver interface { - CreationTime(ctx context.Context, obj *entities.ConsoleVPNDevice) (string, error) - - Spec(ctx context.Context, obj *entities.ConsoleVPNDevice) (*model.GithubComKloudliteOperatorApisWireguardV1DeviceSpec, error) - - UpdateTime(ctx context.Context, obj *entities.ConsoleVPNDevice) (string, error) - WireguardConfig(ctx context.Context, obj *entities.ConsoleVPNDevice) (*model.GithubComKloudliteAPIPkgTypesEncodedString, error) -} type EntityResolver interface { FindBuildByID(ctx context.Context, id repos.ID) (*model.Build, error) } @@ -992,10 +978,10 @@ type ImportedManagedResourceResolver interface { ManagedResource(ctx context.Context, obj *entities.ImportedManagedResource) (*entities.ManagedResource, error) } type K8s__io___api___core___v1__SecretResolver interface { - Data(ctx context.Context, obj *v12.Secret) (map[string]interface{}, error) + Data(ctx context.Context, obj *v11.Secret) (map[string]interface{}, error) - StringData(ctx context.Context, obj *v12.Secret) (map[string]interface{}, error) - Type(ctx context.Context, obj *v12.Secret) (*model.K8sIoAPICoreV1SecretType, error) + StringData(ctx context.Context, obj *v11.Secret) (map[string]interface{}, error) + Type(ctx context.Context, obj *v11.Secret) (*model.K8sIoAPICoreV1SecretType, error) } type ManagedResourceResolver interface { CreationTime(ctx context.Context, obj *entities.ManagedResource) (string, error) @@ -1005,11 +991,11 @@ type ManagedResourceResolver interface { UpdateTime(ctx context.Context, obj *entities.ManagedResource) (string, error) } type MetadataResolver interface { - Annotations(ctx context.Context, obj *v13.ObjectMeta) (map[string]interface{}, error) - CreationTimestamp(ctx context.Context, obj *v13.ObjectMeta) (string, error) - DeletionTimestamp(ctx context.Context, obj *v13.ObjectMeta) (*string, error) + Annotations(ctx context.Context, obj *v12.ObjectMeta) (map[string]interface{}, error) + CreationTimestamp(ctx context.Context, obj *v12.ObjectMeta) (string, error) + DeletionTimestamp(ctx context.Context, obj *v12.ObjectMeta) (*string, error) - Labels(ctx context.Context, obj *v13.ObjectMeta) (map[string]interface{}, error) + Labels(ctx context.Context, obj *v12.ObjectMeta) (map[string]interface{}, error) } type MutationResolver interface { CoreCreateEnvironment(ctx context.Context, env entities.Environment) (*entities.Environment, error) @@ -1037,18 +1023,15 @@ type MutationResolver interface { CoreCreateRouter(ctx context.Context, envName string, router entities.Router) (*entities.Router, error) CoreUpdateRouter(ctx context.Context, envName string, router entities.Router) (*entities.Router, error) CoreDeleteRouter(ctx context.Context, envName string, routerName string) (bool, error) + InfraCreateClusterManagedService(ctx context.Context, service entities.ClusterManagedService) (*entities.ClusterManagedService, error) + InfraUpdateClusterManagedService(ctx context.Context, service entities.ClusterManagedService) (*entities.ClusterManagedService, error) + InfraDeleteClusterManagedService(ctx context.Context, name string) (bool, error) + InfraCloneClusterManagedService(ctx context.Context, clusterName string, sourceMsvcName string, destinationMsvcName string, displayName string) (*entities.ClusterManagedService, error) CoreCreateManagedResource(ctx context.Context, msvcName string, mres entities.ManagedResource) (*entities.ManagedResource, error) CoreUpdateManagedResource(ctx context.Context, msvcName string, mres entities.ManagedResource) (*entities.ManagedResource, error) CoreDeleteManagedResource(ctx context.Context, msvcName string, mresName string) (bool, error) CoreImportManagedResource(ctx context.Context, envName string, msvcName string, mresName string, importName string) (*entities.ImportedManagedResource, error) CoreDeleteImportedManagedResource(ctx context.Context, envName string, importName string) (bool, error) - CoreCreateVPNDevice(ctx context.Context, vpnDevice entities.ConsoleVPNDevice) (*entities.ConsoleVPNDevice, error) - CoreUpdateVPNDevice(ctx context.Context, vpnDevice entities.ConsoleVPNDevice) (*entities.ConsoleVPNDevice, error) - CoreUpdateVPNDevicePorts(ctx context.Context, deviceName string, ports []*v11.Port) (bool, error) - CoreUpdateVPNDeviceEnv(ctx context.Context, deviceName string, envName string) (bool, error) - CoreUpdateVpnDeviceNs(ctx context.Context, deviceName string, ns string) (bool, error) - CoreUpdateVpnClusterName(ctx context.Context, deviceName string, clusterName string) (bool, error) - CoreDeleteVPNDevice(ctx context.Context, deviceName string) (bool, error) } type QueryResolver interface { CoreCheckNameAvailability(ctx context.Context, envName *string, msvcName *string, resType entities.ResourceType, name string) (*domain.CheckNameAvailabilityOutput, error) @@ -1078,13 +1061,12 @@ type QueryResolver interface { CoreResyncRouter(ctx context.Context, envName string, name string) (bool, error) CoreGetManagedResouceOutputKeys(ctx context.Context, msvcName *string, envName *string, name string) ([]string, error) CoreGetManagedResouceOutputKeyValues(ctx context.Context, msvcName *string, envName *string, keyrefs []*domain.ManagedResourceKeyRef) ([]*domain.ManagedResourceKeyValueRef, error) + InfraListClusterManagedServices(ctx context.Context, search *model.SearchClusterManagedService, pagination *repos.CursorPagination) (*model.ClusterManagedServicePaginatedRecords, error) + InfraGetClusterManagedService(ctx context.Context, name string) (*entities.ClusterManagedService, error) CoreListManagedResources(ctx context.Context, search *model.SearchManagedResources, pq *repos.CursorPagination) (*model.ManagedResourcePaginatedRecords, error) CoreGetManagedResource(ctx context.Context, msvcName *string, envName *string, name string) (*entities.ManagedResource, error) 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) - CoreListVPNDevices(ctx context.Context, search *model.CoreSearchVPNDevices, pq *repos.CursorPagination) (*model.ConsoleVPNDevicePaginatedRecords, error) - CoreListVPNDevicesForUser(ctx context.Context) ([]*entities.ConsoleVPNDevice, error) - CoreGetVPNDevice(ctx context.Context, name string) (*entities.ConsoleVPNDevice, error) } type RouterResolver interface { CreationTime(ctx context.Context, obj *entities.Router) (string, error) @@ -1108,25 +1090,25 @@ type SecretResolver interface { } type AppInResolver interface { - Metadata(ctx context.Context, obj *entities.App, data *v13.ObjectMeta) error + Metadata(ctx context.Context, obj *entities.App, data *v12.ObjectMeta) error Spec(ctx context.Context, obj *entities.App, data *model.GithubComKloudliteOperatorApisCrdsV1AppSpecIn) error } +type ClusterManagedServiceInResolver interface { + Metadata(ctx context.Context, obj *entities.ClusterManagedService, data *v12.ObjectMeta) error + Spec(ctx context.Context, obj *entities.ClusterManagedService, data *model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn) error +} type ConfigInResolver interface { BinaryData(ctx context.Context, obj *entities.Config, data map[string]interface{}) error Data(ctx context.Context, obj *entities.Config, data map[string]interface{}) error - Metadata(ctx context.Context, obj *entities.Config, data *v13.ObjectMeta) error -} -type ConsoleVPNDeviceInResolver interface { - Metadata(ctx context.Context, obj *entities.ConsoleVPNDevice, data *v13.ObjectMeta) error - Spec(ctx context.Context, obj *entities.ConsoleVPNDevice, data *model.GithubComKloudliteOperatorApisWireguardV1DeviceSpecIn) error + Metadata(ctx context.Context, obj *entities.Config, data *v12.ObjectMeta) error } type EnvironmentInResolver interface { - Metadata(ctx context.Context, obj *entities.Environment, data *v13.ObjectMeta) error + Metadata(ctx context.Context, obj *entities.Environment, data *v12.ObjectMeta) error Spec(ctx context.Context, obj *entities.Environment, data *model.GithubComKloudliteOperatorApisCrdsV1EnvironmentSpecIn) error } type ExternalAppInResolver interface { - Metadata(ctx context.Context, obj *entities.ExternalApp, data *v13.ObjectMeta) error + Metadata(ctx context.Context, obj *entities.ExternalApp, data *v12.ObjectMeta) error Spec(ctx context.Context, obj *entities.ExternalApp, data *model.GithubComKloudliteOperatorApisCrdsV1ExternalAppSpecIn) error Status(ctx context.Context, obj *entities.ExternalApp, data *model.GithubComKloudliteOperatorPkgOperatorStatusIn) error } @@ -1141,24 +1123,24 @@ type Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMapp } type ImagePullSecretInResolver interface { Format(ctx context.Context, obj *entities.ImagePullSecret, data model.GithubComKloudliteAPIAppsConsoleInternalEntitiesPullSecretFormat) error - Metadata(ctx context.Context, obj *entities.ImagePullSecret, data *v13.ObjectMeta) error + Metadata(ctx context.Context, obj *entities.ImagePullSecret, data *v12.ObjectMeta) error } type ManagedResourceInResolver interface { - Metadata(ctx context.Context, obj *entities.ManagedResource, data *v13.ObjectMeta) error + Metadata(ctx context.Context, obj *entities.ManagedResource, data *v12.ObjectMeta) error Spec(ctx context.Context, obj *entities.ManagedResource, data *model.GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpecIn) error } type MetadataInResolver interface { - Annotations(ctx context.Context, obj *v13.ObjectMeta, data map[string]interface{}) error - Labels(ctx context.Context, obj *v13.ObjectMeta, data map[string]interface{}) error + Annotations(ctx context.Context, obj *v12.ObjectMeta, data map[string]interface{}) error + Labels(ctx context.Context, obj *v12.ObjectMeta, data map[string]interface{}) error } type RouterInResolver interface { - Metadata(ctx context.Context, obj *entities.Router, data *v13.ObjectMeta) error + Metadata(ctx context.Context, obj *entities.Router, data *v12.ObjectMeta) error Spec(ctx context.Context, obj *entities.Router, data *model.GithubComKloudliteOperatorApisCrdsV1RouterSpecIn) error } type SecretInResolver interface { Data(ctx context.Context, obj *entities.Secret, data map[string]interface{}) error - Metadata(ctx context.Context, obj *entities.Secret, data *v13.ObjectMeta) error + Metadata(ctx context.Context, obj *entities.Secret, data *v12.ObjectMeta) error StringData(ctx context.Context, obj *entities.Secret, data map[string]interface{}) error Type(ctx context.Context, obj *entities.Secret, data *model.K8sIoAPICoreV1SecretType) error } @@ -1357,376 +1339,362 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Build.ID(childComplexity), true - case "Config.apiVersion": - if e.complexity.Config.APIVersion == nil { + case "ClusterManagedService.apiVersion": + if e.complexity.ClusterManagedService.APIVersion == nil { break } - return e.complexity.Config.APIVersion(childComplexity), true + return e.complexity.ClusterManagedService.APIVersion(childComplexity), true - case "Config.accountName": - if e.complexity.Config.AccountName == nil { + case "ClusterManagedService.accountName": + if e.complexity.ClusterManagedService.AccountName == nil { break } - return e.complexity.Config.AccountName(childComplexity), true + return e.complexity.ClusterManagedService.AccountName(childComplexity), true - case "Config.binaryData": - if e.complexity.Config.BinaryData == nil { + case "ClusterManagedService.clusterName": + if e.complexity.ClusterManagedService.ClusterName == nil { break } - return e.complexity.Config.BinaryData(childComplexity), true + return e.complexity.ClusterManagedService.ClusterName(childComplexity), true - case "Config.createdBy": - if e.complexity.Config.CreatedBy == nil { + case "ClusterManagedService.createdBy": + if e.complexity.ClusterManagedService.CreatedBy == nil { break } - return e.complexity.Config.CreatedBy(childComplexity), true + return e.complexity.ClusterManagedService.CreatedBy(childComplexity), true - case "Config.creationTime": - if e.complexity.Config.CreationTime == nil { + case "ClusterManagedService.creationTime": + if e.complexity.ClusterManagedService.CreationTime == nil { break } - return e.complexity.Config.CreationTime(childComplexity), true + return e.complexity.ClusterManagedService.CreationTime(childComplexity), true - case "Config.data": - if e.complexity.Config.Data == nil { + case "ClusterManagedService.displayName": + if e.complexity.ClusterManagedService.DisplayName == nil { break } - return e.complexity.Config.Data(childComplexity), true + return e.complexity.ClusterManagedService.DisplayName(childComplexity), true - case "Config.displayName": - if e.complexity.Config.DisplayName == nil { + case "ClusterManagedService.id": + if e.complexity.ClusterManagedService.Id == nil { break } - return e.complexity.Config.DisplayName(childComplexity), true + return e.complexity.ClusterManagedService.Id(childComplexity), true - case "Config.environmentName": - if e.complexity.Config.EnvironmentName == nil { + case "ClusterManagedService.isArchived": + if e.complexity.ClusterManagedService.IsArchived == nil { break } - return e.complexity.Config.EnvironmentName(childComplexity), true + return e.complexity.ClusterManagedService.IsArchived(childComplexity), true - case "Config.id": - if e.complexity.Config.Id == nil { + case "ClusterManagedService.kind": + if e.complexity.ClusterManagedService.Kind == nil { break } - return e.complexity.Config.Id(childComplexity), true + return e.complexity.ClusterManagedService.Kind(childComplexity), true - case "Config.immutable": - if e.complexity.Config.Immutable == nil { + case "ClusterManagedService.lastUpdatedBy": + if e.complexity.ClusterManagedService.LastUpdatedBy == nil { break } - return e.complexity.Config.Immutable(childComplexity), true + return e.complexity.ClusterManagedService.LastUpdatedBy(childComplexity), true - case "Config.kind": - if e.complexity.Config.Kind == nil { + case "ClusterManagedService.markedForDeletion": + if e.complexity.ClusterManagedService.MarkedForDeletion == nil { break } - return e.complexity.Config.Kind(childComplexity), true + return e.complexity.ClusterManagedService.MarkedForDeletion(childComplexity), true - case "Config.lastUpdatedBy": - if e.complexity.Config.LastUpdatedBy == nil { + case "ClusterManagedService.metadata": + if e.complexity.ClusterManagedService.ObjectMeta == nil { break } - return e.complexity.Config.LastUpdatedBy(childComplexity), true + return e.complexity.ClusterManagedService.ObjectMeta(childComplexity), true - case "Config.markedForDeletion": - if e.complexity.Config.MarkedForDeletion == nil { + case "ClusterManagedService.recordVersion": + if e.complexity.ClusterManagedService.RecordVersion == nil { break } - return e.complexity.Config.MarkedForDeletion(childComplexity), true + return e.complexity.ClusterManagedService.RecordVersion(childComplexity), true - case "Config.metadata": - if e.complexity.Config.ObjectMeta == nil { + case "ClusterManagedService.spec": + if e.complexity.ClusterManagedService.Spec == nil { break } - return e.complexity.Config.ObjectMeta(childComplexity), true + return e.complexity.ClusterManagedService.Spec(childComplexity), true - case "Config.recordVersion": - if e.complexity.Config.RecordVersion == nil { + case "ClusterManagedService.status": + if e.complexity.ClusterManagedService.Status == nil { break } - return e.complexity.Config.RecordVersion(childComplexity), true + return e.complexity.ClusterManagedService.Status(childComplexity), true - case "Config.syncStatus": - if e.complexity.Config.SyncStatus == nil { + case "ClusterManagedService.syncStatus": + if e.complexity.ClusterManagedService.SyncStatus == nil { break } - return e.complexity.Config.SyncStatus(childComplexity), true + return e.complexity.ClusterManagedService.SyncStatus(childComplexity), true - case "Config.updateTime": - if e.complexity.Config.UpdateTime == nil { + case "ClusterManagedService.updateTime": + if e.complexity.ClusterManagedService.UpdateTime == nil { break } - return e.complexity.Config.UpdateTime(childComplexity), true + return e.complexity.ClusterManagedService.UpdateTime(childComplexity), true - case "ConfigEdge.cursor": - if e.complexity.ConfigEdge.Cursor == nil { + case "ClusterManagedServiceEdge.cursor": + if e.complexity.ClusterManagedServiceEdge.Cursor == nil { break } - return e.complexity.ConfigEdge.Cursor(childComplexity), true + return e.complexity.ClusterManagedServiceEdge.Cursor(childComplexity), true - case "ConfigEdge.node": - if e.complexity.ConfigEdge.Node == nil { + case "ClusterManagedServiceEdge.node": + if e.complexity.ClusterManagedServiceEdge.Node == nil { break } - return e.complexity.ConfigEdge.Node(childComplexity), true + return e.complexity.ClusterManagedServiceEdge.Node(childComplexity), true - case "ConfigKeyRef.configName": - if e.complexity.ConfigKeyRef.ConfigName == nil { + case "ClusterManagedServicePaginatedRecords.edges": + if e.complexity.ClusterManagedServicePaginatedRecords.Edges == nil { break } - return e.complexity.ConfigKeyRef.ConfigName(childComplexity), true + return e.complexity.ClusterManagedServicePaginatedRecords.Edges(childComplexity), true - case "ConfigKeyRef.key": - if e.complexity.ConfigKeyRef.Key == nil { + case "ClusterManagedServicePaginatedRecords.pageInfo": + if e.complexity.ClusterManagedServicePaginatedRecords.PageInfo == nil { break } - return e.complexity.ConfigKeyRef.Key(childComplexity), true + return e.complexity.ClusterManagedServicePaginatedRecords.PageInfo(childComplexity), true - case "ConfigKeyValueRef.configName": - if e.complexity.ConfigKeyValueRef.ConfigName == nil { + case "ClusterManagedServicePaginatedRecords.totalCount": + if e.complexity.ClusterManagedServicePaginatedRecords.TotalCount == nil { break } - return e.complexity.ConfigKeyValueRef.ConfigName(childComplexity), true + return e.complexity.ClusterManagedServicePaginatedRecords.TotalCount(childComplexity), true - case "ConfigKeyValueRef.key": - if e.complexity.ConfigKeyValueRef.Key == nil { - break - } - - return e.complexity.ConfigKeyValueRef.Key(childComplexity), true - - case "ConfigKeyValueRef.value": - if e.complexity.ConfigKeyValueRef.Value == nil { - break - } - - return e.complexity.ConfigKeyValueRef.Value(childComplexity), true - - case "ConfigPaginatedRecords.edges": - if e.complexity.ConfigPaginatedRecords.Edges == nil { + case "Config.apiVersion": + if e.complexity.Config.APIVersion == nil { break } - return e.complexity.ConfigPaginatedRecords.Edges(childComplexity), true + return e.complexity.Config.APIVersion(childComplexity), true - case "ConfigPaginatedRecords.pageInfo": - if e.complexity.ConfigPaginatedRecords.PageInfo == nil { + case "Config.accountName": + if e.complexity.Config.AccountName == nil { break } - return e.complexity.ConfigPaginatedRecords.PageInfo(childComplexity), true + return e.complexity.Config.AccountName(childComplexity), true - case "ConfigPaginatedRecords.totalCount": - if e.complexity.ConfigPaginatedRecords.TotalCount == nil { + case "Config.binaryData": + if e.complexity.Config.BinaryData == nil { break } - return e.complexity.ConfigPaginatedRecords.TotalCount(childComplexity), true + return e.complexity.Config.BinaryData(childComplexity), true - case "ConsoleCheckNameAvailabilityOutput.result": - if e.complexity.ConsoleCheckNameAvailabilityOutput.Result == nil { + case "Config.createdBy": + if e.complexity.Config.CreatedBy == nil { break } - return e.complexity.ConsoleCheckNameAvailabilityOutput.Result(childComplexity), true + return e.complexity.Config.CreatedBy(childComplexity), true - case "ConsoleCheckNameAvailabilityOutput.suggestedNames": - if e.complexity.ConsoleCheckNameAvailabilityOutput.SuggestedNames == nil { + case "Config.creationTime": + if e.complexity.Config.CreationTime == nil { break } - return e.complexity.ConsoleCheckNameAvailabilityOutput.SuggestedNames(childComplexity), true + return e.complexity.Config.CreationTime(childComplexity), true - case "ConsoleVPNDevice.apiVersion": - if e.complexity.ConsoleVPNDevice.APIVersion == nil { + case "Config.data": + if e.complexity.Config.Data == nil { break } - return e.complexity.ConsoleVPNDevice.APIVersion(childComplexity), true + return e.complexity.Config.Data(childComplexity), true - case "ConsoleVPNDevice.accountName": - if e.complexity.ConsoleVPNDevice.AccountName == nil { + case "Config.displayName": + if e.complexity.Config.DisplayName == nil { break } - return e.complexity.ConsoleVPNDevice.AccountName(childComplexity), true + return e.complexity.Config.DisplayName(childComplexity), true - case "ConsoleVPNDevice.clusterName": - if e.complexity.ConsoleVPNDevice.ClusterName == nil { + case "Config.environmentName": + if e.complexity.Config.EnvironmentName == nil { break } - return e.complexity.ConsoleVPNDevice.ClusterName(childComplexity), true + return e.complexity.Config.EnvironmentName(childComplexity), true - case "ConsoleVPNDevice.createdBy": - if e.complexity.ConsoleVPNDevice.CreatedBy == nil { + case "Config.id": + if e.complexity.Config.Id == nil { break } - return e.complexity.ConsoleVPNDevice.CreatedBy(childComplexity), true + return e.complexity.Config.Id(childComplexity), true - case "ConsoleVPNDevice.creationTime": - if e.complexity.ConsoleVPNDevice.CreationTime == nil { + case "Config.immutable": + if e.complexity.Config.Immutable == nil { break } - return e.complexity.ConsoleVPNDevice.CreationTime(childComplexity), true + return e.complexity.Config.Immutable(childComplexity), true - case "ConsoleVPNDevice.displayName": - if e.complexity.ConsoleVPNDevice.DisplayName == nil { + case "Config.kind": + if e.complexity.Config.Kind == nil { break } - return e.complexity.ConsoleVPNDevice.DisplayName(childComplexity), true + return e.complexity.Config.Kind(childComplexity), true - case "ConsoleVPNDevice.environmentName": - if e.complexity.ConsoleVPNDevice.EnvironmentName == nil { + case "Config.lastUpdatedBy": + if e.complexity.Config.LastUpdatedBy == nil { break } - return e.complexity.ConsoleVPNDevice.EnvironmentName(childComplexity), true + return e.complexity.Config.LastUpdatedBy(childComplexity), true - case "ConsoleVPNDevice.id": - if e.complexity.ConsoleVPNDevice.Id == nil { + case "Config.markedForDeletion": + if e.complexity.Config.MarkedForDeletion == nil { break } - return e.complexity.ConsoleVPNDevice.Id(childComplexity), true + return e.complexity.Config.MarkedForDeletion(childComplexity), true - case "ConsoleVPNDevice.kind": - if e.complexity.ConsoleVPNDevice.Kind == nil { + case "Config.metadata": + if e.complexity.Config.ObjectMeta == nil { break } - return e.complexity.ConsoleVPNDevice.Kind(childComplexity), true + return e.complexity.Config.ObjectMeta(childComplexity), true - case "ConsoleVPNDevice.lastUpdatedBy": - if e.complexity.ConsoleVPNDevice.LastUpdatedBy == nil { + case "Config.recordVersion": + if e.complexity.Config.RecordVersion == nil { break } - return e.complexity.ConsoleVPNDevice.LastUpdatedBy(childComplexity), true + return e.complexity.Config.RecordVersion(childComplexity), true - case "ConsoleVPNDevice.linkedClusters": - if e.complexity.ConsoleVPNDevice.LinkedClusters == nil { + case "Config.syncStatus": + if e.complexity.Config.SyncStatus == nil { break } - return e.complexity.ConsoleVPNDevice.LinkedClusters(childComplexity), true + return e.complexity.Config.SyncStatus(childComplexity), true - case "ConsoleVPNDevice.markedForDeletion": - if e.complexity.ConsoleVPNDevice.MarkedForDeletion == nil { + case "Config.updateTime": + if e.complexity.Config.UpdateTime == nil { break } - return e.complexity.ConsoleVPNDevice.MarkedForDeletion(childComplexity), true + return e.complexity.Config.UpdateTime(childComplexity), true - case "ConsoleVPNDevice.metadata": - if e.complexity.ConsoleVPNDevice.ObjectMeta == nil { + case "ConfigEdge.cursor": + if e.complexity.ConfigEdge.Cursor == nil { break } - return e.complexity.ConsoleVPNDevice.ObjectMeta(childComplexity), true + return e.complexity.ConfigEdge.Cursor(childComplexity), true - case "ConsoleVPNDevice.recordVersion": - if e.complexity.ConsoleVPNDevice.RecordVersion == nil { + case "ConfigEdge.node": + if e.complexity.ConfigEdge.Node == nil { break } - return e.complexity.ConsoleVPNDevice.RecordVersion(childComplexity), true + return e.complexity.ConfigEdge.Node(childComplexity), true - case "ConsoleVPNDevice.spec": - if e.complexity.ConsoleVPNDevice.Spec == nil { + case "ConfigKeyRef.configName": + if e.complexity.ConfigKeyRef.ConfigName == nil { break } - return e.complexity.ConsoleVPNDevice.Spec(childComplexity), true + return e.complexity.ConfigKeyRef.ConfigName(childComplexity), true - case "ConsoleVPNDevice.status": - if e.complexity.ConsoleVPNDevice.Status == nil { + case "ConfigKeyRef.key": + if e.complexity.ConfigKeyRef.Key == nil { break } - return e.complexity.ConsoleVPNDevice.Status(childComplexity), true + return e.complexity.ConfigKeyRef.Key(childComplexity), true - case "ConsoleVPNDevice.syncStatus": - if e.complexity.ConsoleVPNDevice.SyncStatus == nil { + case "ConfigKeyValueRef.configName": + if e.complexity.ConfigKeyValueRef.ConfigName == nil { break } - return e.complexity.ConsoleVPNDevice.SyncStatus(childComplexity), true + return e.complexity.ConfigKeyValueRef.ConfigName(childComplexity), true - case "ConsoleVPNDevice.updateTime": - if e.complexity.ConsoleVPNDevice.UpdateTime == nil { + case "ConfigKeyValueRef.key": + if e.complexity.ConfigKeyValueRef.Key == nil { break } - return e.complexity.ConsoleVPNDevice.UpdateTime(childComplexity), true + return e.complexity.ConfigKeyValueRef.Key(childComplexity), true - case "ConsoleVPNDevice.wireguardConfig": - if e.complexity.ConsoleVPNDevice.WireguardConfig == nil { + case "ConfigKeyValueRef.value": + if e.complexity.ConfigKeyValueRef.Value == nil { break } - return e.complexity.ConsoleVPNDevice.WireguardConfig(childComplexity), true + return e.complexity.ConfigKeyValueRef.Value(childComplexity), true - case "ConsoleVPNDeviceEdge.cursor": - if e.complexity.ConsoleVPNDeviceEdge.Cursor == nil { + case "ConfigPaginatedRecords.edges": + if e.complexity.ConfigPaginatedRecords.Edges == nil { break } - return e.complexity.ConsoleVPNDeviceEdge.Cursor(childComplexity), true + return e.complexity.ConfigPaginatedRecords.Edges(childComplexity), true - case "ConsoleVPNDeviceEdge.node": - if e.complexity.ConsoleVPNDeviceEdge.Node == nil { + case "ConfigPaginatedRecords.pageInfo": + if e.complexity.ConfigPaginatedRecords.PageInfo == nil { break } - return e.complexity.ConsoleVPNDeviceEdge.Node(childComplexity), true + return e.complexity.ConfigPaginatedRecords.PageInfo(childComplexity), true - case "ConsoleVPNDevicePaginatedRecords.edges": - if e.complexity.ConsoleVPNDevicePaginatedRecords.Edges == nil { + case "ConfigPaginatedRecords.totalCount": + if e.complexity.ConfigPaginatedRecords.TotalCount == nil { break } - return e.complexity.ConsoleVPNDevicePaginatedRecords.Edges(childComplexity), true + return e.complexity.ConfigPaginatedRecords.TotalCount(childComplexity), true - case "ConsoleVPNDevicePaginatedRecords.pageInfo": - if e.complexity.ConsoleVPNDevicePaginatedRecords.PageInfo == nil { + case "ConsoleCheckNameAvailabilityOutput.result": + if e.complexity.ConsoleCheckNameAvailabilityOutput.Result == nil { break } - return e.complexity.ConsoleVPNDevicePaginatedRecords.PageInfo(childComplexity), true + return e.complexity.ConsoleCheckNameAvailabilityOutput.Result(childComplexity), true - case "ConsoleVPNDevicePaginatedRecords.totalCount": - if e.complexity.ConsoleVPNDevicePaginatedRecords.TotalCount == nil { + case "ConsoleCheckNameAvailabilityOutput.suggestedNames": + if e.complexity.ConsoleCheckNameAvailabilityOutput.SuggestedNames == nil { break } - return e.complexity.ConsoleVPNDevicePaginatedRecords.TotalCount(childComplexity), true + return e.complexity.ConsoleCheckNameAvailabilityOutput.SuggestedNames(childComplexity), true case "CursorPagination.after": if e.complexity.CursorPagination.After == nil { @@ -2153,20 +2121,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___api___common__CreatedOrUpdatedBy.UserName(childComplexity), true - case "Github__com___kloudlite___api___pkg___types__EncodedString.encoding": - if e.complexity.Github__com___kloudlite___api___pkg___types__EncodedString.Encoding == nil { - break - } - - return e.complexity.Github__com___kloudlite___api___pkg___types__EncodedString.Encoding(childComplexity), true - - case "Github__com___kloudlite___api___pkg___types__EncodedString.value": - if e.complexity.Github__com___kloudlite___api___pkg___types__EncodedString.Value == nil { - break - } - - return e.complexity.Github__com___kloudlite___api___pkg___types__EncodedString.Value(childComplexity), true - case "Github__com___kloudlite___api___pkg___types__SyncStatus.action": if e.complexity.Github__com___kloudlite___api___pkg___types__SyncStatus.Action == nil { break @@ -2538,6 +2492,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__BasicAuth.Username(childComplexity), true + case "Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.msvcSpec": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.MsvcSpec == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.MsvcSpec(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.targetNamespace": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.TargetNamespace == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.TargetNamespace(childComplexity), true + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.key": if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.Key == nil { break @@ -2839,6 +2807,27 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec.ResourceTemplate(childComplexity), true + case "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.nodeSelector": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.NodeSelector == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.NodeSelector(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.serviceTemplate": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.ServiceTemplate == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.ServiceTemplate(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.tolerations": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.Tolerations == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.Tolerations(childComplexity), true + case "Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate.apiVersion": if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate.APIVersion == nil { break @@ -3035,89 +3024,40 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__RouterSpec.Routes(childComplexity), true - case "Github__com___kloudlite___operator___apis___crds___v1__ShellProbe.command": - if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ShellProbe.Command == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ShellProbe.Command(childComplexity), true - - case "Github__com___kloudlite___operator___apis___crds___v1__TcpProbe.port": - if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__TcpProbe.Port == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__TcpProbe.Port(childComplexity), true - - case "Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord.host": - if e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord.Host == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord.Host(childComplexity), true - - case "Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord.target": - if e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord.Target == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord.Target(childComplexity), true - - case "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.activeNamespace": - if e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.ActiveNamespace == nil { + case "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.apiVersion": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.APIVersion == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.ActiveNamespace(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.APIVersion(childComplexity), true - case "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.cnameRecords": - if e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.CnameRecords == nil { + case "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.kind": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.Kind == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.CnameRecords(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.Kind(childComplexity), true - case "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.disabled": - if e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.Disabled == nil { + case "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.spec": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.Spec == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.Disabled(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.Spec(childComplexity), true - case "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.noExternalService": - if e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.NoExternalService == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.NoExternalService(childComplexity), true - - case "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.nodeSelector": - if e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.NodeSelector == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.NodeSelector(childComplexity), true - - case "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.ports": - if e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.Ports == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec.Ports(childComplexity), true - - case "Github__com___kloudlite___operator___apis___wireguard___v1__Port.port": - if e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__Port.Port == nil { + case "Github__com___kloudlite___operator___apis___crds___v1__ShellProbe.command": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ShellProbe.Command == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__Port.Port(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ShellProbe.Command(childComplexity), true - case "Github__com___kloudlite___operator___apis___wireguard___v1__Port.targetPort": - if e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__Port.TargetPort == nil { + case "Github__com___kloudlite___operator___apis___crds___v1__TcpProbe.port": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__TcpProbe.Port == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___wireguard___v1__Port.TargetPort(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__TcpProbe.Port(childComplexity), true case "Github__com___kloudlite___operator___pkg___operator__Check.debug": if e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Debug == nil { @@ -4179,18 +4119,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CoreCreateSecret(childComplexity, args["envName"].(string), args["secret"].(entities.Secret)), true - case "Mutation.core_createVPNDevice": - if e.complexity.Mutation.CoreCreateVPNDevice == nil { - break - } - - args, err := ec.field_Mutation_core_createVPNDevice_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Mutation.CoreCreateVPNDevice(childComplexity, args["vpnDevice"].(entities.ConsoleVPNDevice)), true - case "Mutation.core_deleteApp": if e.complexity.Mutation.CoreDeleteApp == nil { break @@ -4299,18 +4227,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CoreDeleteSecret(childComplexity, args["envName"].(string), args["secretName"].(string)), true - case "Mutation.core_deleteVPNDevice": - if e.complexity.Mutation.CoreDeleteVPNDevice == nil { - break - } - - args, err := ec.field_Mutation_core_deleteVPNDevice_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Mutation.CoreDeleteVPNDevice(childComplexity, args["deviceName"].(string)), true - case "Mutation.core_importManagedResource": if e.complexity.Mutation.CoreImportManagedResource == nil { break @@ -4455,65 +4371,53 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CoreUpdateSecret(childComplexity, args["envName"].(string), args["secret"].(entities.Secret)), true - case "Mutation.core_updateVPNDevice": - if e.complexity.Mutation.CoreUpdateVPNDevice == nil { - break - } - - args, err := ec.field_Mutation_core_updateVPNDevice_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Mutation.CoreUpdateVPNDevice(childComplexity, args["vpnDevice"].(entities.ConsoleVPNDevice)), true - - case "Mutation.core_updateVPNDeviceEnv": - if e.complexity.Mutation.CoreUpdateVPNDeviceEnv == nil { + case "Mutation.infra_cloneClusterManagedService": + if e.complexity.Mutation.InfraCloneClusterManagedService == nil { break } - args, err := ec.field_Mutation_core_updateVPNDeviceEnv_args(context.TODO(), rawArgs) + args, err := ec.field_Mutation_infra_cloneClusterManagedService_args(context.TODO(), rawArgs) if err != nil { return 0, false } - return e.complexity.Mutation.CoreUpdateVPNDeviceEnv(childComplexity, args["deviceName"].(string), args["envName"].(string)), true + return e.complexity.Mutation.InfraCloneClusterManagedService(childComplexity, args["clusterName"].(string), args["sourceMsvcName"].(string), args["destinationMsvcName"].(string), args["displayName"].(string)), true - case "Mutation.core_updateVPNDevicePorts": - if e.complexity.Mutation.CoreUpdateVPNDevicePorts == nil { + case "Mutation.infra_createClusterManagedService": + if e.complexity.Mutation.InfraCreateClusterManagedService == nil { break } - args, err := ec.field_Mutation_core_updateVPNDevicePorts_args(context.TODO(), rawArgs) + args, err := ec.field_Mutation_infra_createClusterManagedService_args(context.TODO(), rawArgs) if err != nil { return 0, false } - return e.complexity.Mutation.CoreUpdateVPNDevicePorts(childComplexity, args["deviceName"].(string), args["ports"].([]*v11.Port)), true + return e.complexity.Mutation.InfraCreateClusterManagedService(childComplexity, args["service"].(entities.ClusterManagedService)), true - case "Mutation.core_updateVpnClusterName": - if e.complexity.Mutation.CoreUpdateVpnClusterName == nil { + case "Mutation.infra_deleteClusterManagedService": + if e.complexity.Mutation.InfraDeleteClusterManagedService == nil { break } - args, err := ec.field_Mutation_core_updateVpnClusterName_args(context.TODO(), rawArgs) + args, err := ec.field_Mutation_infra_deleteClusterManagedService_args(context.TODO(), rawArgs) if err != nil { return 0, false } - return e.complexity.Mutation.CoreUpdateVpnClusterName(childComplexity, args["deviceName"].(string), args["clusterName"].(string)), true + return e.complexity.Mutation.InfraDeleteClusterManagedService(childComplexity, args["name"].(string)), true - case "Mutation.core_updateVpnDeviceNs": - if e.complexity.Mutation.CoreUpdateVpnDeviceNs == nil { + case "Mutation.infra_updateClusterManagedService": + if e.complexity.Mutation.InfraUpdateClusterManagedService == nil { break } - args, err := ec.field_Mutation_core_updateVpnDeviceNs_args(context.TODO(), rawArgs) + args, err := ec.field_Mutation_infra_updateClusterManagedService_args(context.TODO(), rawArgs) if err != nil { return 0, false } - return e.complexity.Mutation.CoreUpdateVpnDeviceNs(childComplexity, args["deviceName"].(string), args["ns"].(string)), true + return e.complexity.Mutation.InfraUpdateClusterManagedService(childComplexity, args["service"].(entities.ClusterManagedService)), true case "PageInfo.endCursor": if e.complexity.PageInfo.EndCursor == nil { @@ -4713,18 +4617,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.CoreGetSecretValues(childComplexity, args["envName"].(string), args["queries"].([]*domain.SecretKeyRef)), true - case "Query.core_getVPNDevice": - if e.complexity.Query.CoreGetVPNDevice == nil { - break - } - - args, err := ec.field_Query_core_getVPNDevice_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Query.CoreGetVPNDevice(childComplexity, args["name"].(string)), true - case "Query.core_listApps": if e.complexity.Query.CoreListApps == nil { break @@ -4833,25 +4725,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.CoreListSecrets(childComplexity, args["envName"].(string), args["search"].(*model.SearchSecrets), args["pq"].(*repos.CursorPagination)), true - case "Query.core_listVPNDevices": - if e.complexity.Query.CoreListVPNDevices == nil { - break - } - - args, err := ec.field_Query_core_listVPNDevices_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Query.CoreListVPNDevices(childComplexity, args["search"].(*model.CoreSearchVPNDevices), args["pq"].(*repos.CursorPagination)), true - - case "Query.core_listVPNDevicesForUser": - if e.complexity.Query.CoreListVPNDevicesForUser == nil { - break - } - - return e.complexity.Query.CoreListVPNDevicesForUser(childComplexity), true - case "Query.core_restartApp": if e.complexity.Query.CoreRestartApp == nil { break @@ -4960,6 +4833,30 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.CoreResyncSecret(childComplexity, args["envName"].(string), args["name"].(string)), true + case "Query.infra_getClusterManagedService": + if e.complexity.Query.InfraGetClusterManagedService == nil { + break + } + + args, err := ec.field_Query_infra_getClusterManagedService_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.InfraGetClusterManagedService(childComplexity, args["name"].(string)), true + + case "Query.infra_listClusterManagedServices": + if e.complexity.Query.InfraListClusterManagedServices == nil { + break + } + + args, err := ec.field_Query_infra_listClusterManagedServices_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.InfraListClusterManagedServices(childComplexity, args["search"].(*model.SearchClusterManagedService), args["pagination"].(*repos.CursorPagination)), true + case "Query._service": if e.complexity.Query.__resolve__service == nil { break @@ -5359,10 +5256,10 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec := executionContext{rc, e, 0, 0, make(chan graphql.DeferredResult)} inputUnmarshalMap := graphql.BuildUnmarshalerMap( ec.unmarshalInputAppIn, + ec.unmarshalInputClusterManagedServiceIn, ec.unmarshalInputConfigIn, ec.unmarshalInputConfigKeyRefIn, ec.unmarshalInputConfigKeyValueRefIn, - ec.unmarshalInputConsoleVPNDeviceIn, ec.unmarshalInputCoreSearchVPNDevices, ec.unmarshalInputCursorPaginationIn, ec.unmarshalInputEnvironmentIn, @@ -5377,6 +5274,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__BasicAuthIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn, @@ -5391,16 +5289,15 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HttpsIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__InterceptIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpecIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__MresResourceTemplateIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__RateLimitIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__RouteIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__RouterSpecIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn, - ec.unmarshalInputGithub__com___kloudlite___operator___apis___wireguard___v1__CNameRecordIn, - ec.unmarshalInputGithub__com___kloudlite___operator___apis___wireguard___v1__DeviceSpecIn, - ec.unmarshalInputGithub__com___kloudlite___operator___apis___wireguard___v1__PortIn, ec.unmarshalInputGithub__com___kloudlite___operator___pkg___operator__CheckIn, ec.unmarshalInputGithub__com___kloudlite___operator___pkg___operator__CheckMetaIn, ec.unmarshalInputGithub__com___kloudlite___operator___pkg___operator__ResourceRefIn, @@ -5420,6 +5317,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputPortIn, ec.unmarshalInputRouterIn, ec.unmarshalInputSearchApps, + ec.unmarshalInputSearchClusterManagedService, ec.unmarshalInputSearchConfigs, ec.unmarshalInputSearchEnvironments, ec.unmarshalInputSearchExternalApps, @@ -5541,6 +5439,7 @@ enum ConsoleResType { router managed_service managed_resource + imported_managed_resource environment vpn_device } @@ -5606,6 +5505,11 @@ input SearchManagedResources { markedForDeletion: MatchFilterIn } +input SearchClusterManagedService { + isReady: MatchFilterIn + text: MatchFilterIn +} + input SearchImportedManagedResources { text: MatchFilterIn isReady: MatchFilterIn @@ -5663,14 +5567,13 @@ type Query { core_getManagedResouceOutputKeys(msvcName: String, envName:String , name: String!): [String!]! @isLoggedInAndVerified @hasAccount core_getManagedResouceOutputKeyValues(msvcName: String, envName:String, keyrefs: [ManagedResourceKeyRefIn]): [ManagedResourceKeyValueRef!]! @isLoggedInAndVerified @hasAccount + infra_listClusterManagedServices(search: SearchClusterManagedService, pagination: CursorPaginationIn): ClusterManagedServicePaginatedRecords @isLoggedInAndVerified @hasAccount + infra_getClusterManagedService(name: String!): ClusterManagedService @isLoggedInAndVerified @hasAccount + core_listManagedResources(search: SearchManagedResources, pq: CursorPaginationIn): ManagedResourcePaginatedRecords @isLoggedInAndVerified @hasAccount core_getManagedResource(msvcName: String, envName: String, name: String!): ManagedResource @isLoggedInAndVerified @hasAccount core_resyncManagedResource(msvcName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount core_listImportedManagedResources(envName: String!, search: SearchImportedManagedResources, pq: CursorPaginationIn): ImportedManagedResourcePaginatedRecords @isLoggedInAndVerified @hasAccount - - core_listVPNDevices(search: CoreSearchVPNDevices, pq: CursorPaginationIn): ConsoleVPNDevicePaginatedRecords @isLoggedInAndVerified @hasAccount - core_listVPNDevicesForUser: [ConsoleVPNDevice!] @isLoggedInAndVerified @hasAccount - core_getVPNDevice(name: String!): ConsoleVPNDevice @isLoggedInAndVerified @hasAccount } type Mutation { @@ -5707,22 +5610,17 @@ type Mutation { core_updateRouter(envName: String!, router: RouterIn!): Router @isLoggedInAndVerified @hasAccount core_deleteRouter(envName: String!, routerName: String!): Boolean! @isLoggedInAndVerified @hasAccount + infra_createClusterManagedService(service: ClusterManagedServiceIn!): ClusterManagedService @isLoggedInAndVerified @hasAccount + infra_updateClusterManagedService(service: ClusterManagedServiceIn!): ClusterManagedService @isLoggedInAndVerified @hasAccount + infra_deleteClusterManagedService(name: String!): Boolean! @isLoggedInAndVerified @hasAccount + infra_cloneClusterManagedService(clusterName: String!, sourceMsvcName: String!, destinationMsvcName: String!, displayName: String!): ClusterManagedService @isLoggedInAndVerified @hasAccount + core_createManagedResource(msvcName: String! ,mres: ManagedResourceIn!): ManagedResource @isLoggedInAndVerified @hasAccount core_updateManagedResource(msvcName: String!, mres: ManagedResourceIn!): ManagedResource @isLoggedInAndVerified @hasAccount core_deleteManagedResource(msvcName: String!, mresName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_importManagedResource(envName: String!, msvcName: String!, mresName: String!, importName: String!): ImportedManagedResource @isLoggedInAndVerified @hasAccount core_deleteImportedManagedResource(envName: String!, importName: String!): Boolean! @isLoggedInAndVerified @hasAccount - - core_createVPNDevice(vpnDevice: ConsoleVPNDeviceIn!): ConsoleVPNDevice @isLoggedInAndVerified @hasAccount - core_updateVPNDevice(vpnDevice: ConsoleVPNDeviceIn!): ConsoleVPNDevice @isLoggedInAndVerified @hasAccount - - core_updateVPNDevicePorts(deviceName: String!,ports: [PortIn!]!): Boolean! @isLoggedInAndVerified @hasAccount - core_updateVPNDeviceEnv(deviceName: String!,envName: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_updateVpnDeviceNs(deviceName: String!,ns: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_updateVpnClusterName(deviceName: String!,clusterName: String!): Boolean! @isLoggedInAndVerified @hasAccount - - core_deleteVPNDevice(deviceName: String!): Boolean! @isLoggedInAndVerified @hasAccount } type Build @key(fields: "id") { @@ -5779,6 +5677,47 @@ input AppIn { spec: Github__com___kloudlite___operator___apis___crds___v1__AppSpecIn! } +`, BuiltIn: false}, + {Name: "../struct-to-graphql/clustermanagedservice.graphqls", Input: `type ClusterManagedService @shareable { + accountName: String! + apiVersion: String + clusterName: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + id: ID! + isArchived: Boolean + kind: String + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + metadata: Metadata @goField(name: "objectMeta") + recordVersion: Int! + spec: Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec + status: Github__com___kloudlite___operator___pkg___operator__Status + syncStatus: Github__com___kloudlite___api___pkg___types__SyncStatus! + updateTime: Date! +} + +type ClusterManagedServiceEdge @shareable { + cursor: String! + node: ClusterManagedService! +} + +type ClusterManagedServicePaginatedRecords @shareable { + edges: [ClusterManagedServiceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ClusterManagedServiceIn { + apiVersion: String + clusterName: String! + displayName: String! + kind: String + metadata: MetadataIn + spec: Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn +} + `, BuiltIn: false}, {Name: "../struct-to-graphql/common-types.graphqls", Input: `type Github__com___kloudlite___api___apps___console___internal___entities__ManagedResourceRef @shareable { id: String! @@ -5799,11 +5738,6 @@ type Github__com___kloudlite___api___common__CreatedOrUpdatedBy @shareable { userName: String! } -type Github__com___kloudlite___api___pkg___types__EncodedString @shareable { - encoding: String! - value: String! -} - type Github__com___kloudlite___api___pkg___types__SyncStatus @shareable { action: Github__com___kloudlite___api___pkg___types__SyncAction! error: String @@ -5884,6 +5818,11 @@ type Github__com___kloudlite___operator___apis___crds___v1__BasicAuth @shareable username: String } +type Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec @shareable { + msvcSpec: Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec! + targetNamespace: String! +} + type Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv @shareable { key: String! optional: Boolean @@ -5969,6 +5908,12 @@ type Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec resourceTemplate: Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate! } +type Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec @shareable { + nodeSelector: Map + serviceTemplate: Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate! + tolerations: [K8s__io___api___core___v1__Toleration!] +} + type Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate @shareable { apiVersion: String! kind: String! @@ -6012,6 +5957,12 @@ type Github__com___kloudlite___operator___apis___crds___v1__RouterSpec @shareabl routes: [Github__com___kloudlite___operator___apis___crds___v1__Route!] } +type Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate @shareable { + apiVersion: String! + kind: String! + spec: Map +} + type Github__com___kloudlite___operator___apis___crds___v1__ShellProbe @shareable { command: [String!] } @@ -6020,25 +5971,6 @@ type Github__com___kloudlite___operator___apis___crds___v1__TcpProbe @shareable port: Int! } -type Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord @shareable { - host: String - target: String -} - -type Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec @shareable { - activeNamespace: String - cnameRecords: [Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord!] - disabled: Boolean - nodeSelector: Map - noExternalService: Boolean - ports: [Github__com___kloudlite___operator___apis___wireguard___v1__Port!] -} - -type Github__com___kloudlite___operator___apis___wireguard___v1__Port @shareable { - port: Int - targetPort: Int -} - type Github__com___kloudlite___operator___pkg___operator__Check @shareable { debug: String error: String @@ -6222,6 +6154,10 @@ input Github__com___kloudlite___operator___apis___crds___v1__BasicAuthIn { username: String } +input Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn { + msvcSpec: Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn! +} + input Github__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn { key: String! optional: Boolean @@ -6305,6 +6241,12 @@ input Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec resourceTemplate: Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplateIn! } +input Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn { + nodeSelector: Map + serviceTemplate: Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn! + tolerations: [K8s__io___api___core___v1__TolerationIn!] +} + input Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplateIn { apiVersion: String! kind: String! @@ -6348,6 +6290,12 @@ input Github__com___kloudlite___operator___apis___crds___v1__RouterSpecIn { routes: [Github__com___kloudlite___operator___apis___crds___v1__RouteIn!] } +input Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn { + apiVersion: String! + kind: String! + spec: Map +} + input Github__com___kloudlite___operator___apis___crds___v1__ShellProbeIn { command: [String!] } @@ -6356,22 +6304,6 @@ input Github__com___kloudlite___operator___apis___crds___v1__TcpProbeIn { port: Int! } -input Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecordIn { - host: String - target: String -} - -input Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpecIn { - activeNamespace: String - cnameRecords: [Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecordIn!] - ports: [Github__com___kloudlite___operator___apis___wireguard___v1__PortIn!] -} - -input Github__com___kloudlite___operator___apis___wireguard___v1__PortIn { - port: Int - targetPort: Int -} - input Github__com___kloudlite___operator___pkg___operator__CheckIn { debug: String error: String @@ -6456,6 +6388,7 @@ enum Github__com___kloudlite___api___apps___console___internal___entities__PullS enum Github__com___kloudlite___api___apps___console___internal___entities__ResourceType { app + cluster_managed_service config environment external_app @@ -6465,7 +6398,6 @@ enum Github__com___kloudlite___api___apps___console___internal___entities__Resou router secret service_binding - vpn_device } enum Github__com___kloudlite___api___pkg___repos__MatchType { @@ -6613,50 +6545,6 @@ input ConfigKeyValueRefIn { value: String! } -`, BuiltIn: false}, - {Name: "../struct-to-graphql/consolevpndevice.graphqls", Input: `type ConsoleVPNDevice @shareable { - accountName: String! - apiVersion: String - clusterName: String - createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! - creationTime: Date! - displayName: String! - environmentName: String - id: ID! - kind: String - lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! - linkedClusters: [String!] - markedForDeletion: Boolean - metadata: Metadata @goField(name: "objectMeta") - recordVersion: Int! - spec: Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec - status: Github__com___kloudlite___operator___pkg___operator__Status - syncStatus: Github__com___kloudlite___api___pkg___types__SyncStatus! - updateTime: Date! - wireguardConfig: Github__com___kloudlite___api___pkg___types__EncodedString -} - -type ConsoleVPNDeviceEdge @shareable { - cursor: String! - node: ConsoleVPNDevice! -} - -type ConsoleVPNDevicePaginatedRecords @shareable { - edges: [ConsoleVPNDeviceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ConsoleVPNDeviceIn { - apiVersion: String - clusterName: String - displayName: String! - environmentName: String - kind: String - metadata: MetadataIn - spec: Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpecIn -} - `, BuiltIn: false}, {Name: "../struct-to-graphql/cursorpagination.graphqls", Input: `type CursorPagination @shareable { after: String @@ -7382,21 +7270,6 @@ func (ec *executionContext) field_Mutation_core_createSecret_args(ctx context.Co return args, nil } -func (ec *executionContext) field_Mutation_core_createVPNDevice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 entities.ConsoleVPNDevice - if tmp, ok := rawArgs["vpnDevice"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("vpnDevice")) - arg0, err = ec.unmarshalNConsoleVPNDeviceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDevice(ctx, tmp) - if err != nil { - return nil, err - } - } - args["vpnDevice"] = arg0 - return args, nil -} - func (ec *executionContext) field_Mutation_core_deleteApp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -7595,21 +7468,6 @@ func (ec *executionContext) field_Mutation_core_deleteSecret_args(ctx context.Co return args, nil } -func (ec *executionContext) field_Mutation_core_deleteVPNDevice_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["deviceName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["deviceName"] = arg0 - return args, nil -} - func (ec *executionContext) field_Mutation_core_importManagedResource_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -7952,114 +7810,90 @@ func (ec *executionContext) field_Mutation_core_updateSecret_args(ctx context.Co return args, nil } -func (ec *executionContext) field_Mutation_core_updateVPNDeviceEnv_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { +func (ec *executionContext) field_Mutation_infra_cloneClusterManagedService_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["deviceName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) + if tmp, ok := rawArgs["clusterName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) arg0, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } - args["deviceName"] = arg0 + args["clusterName"] = arg0 var arg1 string - if tmp, ok := rawArgs["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["sourceMsvcName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sourceMsvcName")) arg1, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } - args["envName"] = arg1 - return args, nil -} - -func (ec *executionContext) field_Mutation_core_updateVPNDevicePorts_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["deviceName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) + args["sourceMsvcName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["destinationMsvcName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("destinationMsvcName")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } - args["deviceName"] = arg0 - var arg1 []*v11.Port - if tmp, ok := rawArgs["ports"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ports")) - arg1, err = ec.unmarshalNPortIn2ᚕᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋwireguardᚋv1ᚐPortᚄ(ctx, tmp) + args["destinationMsvcName"] = arg2 + var arg3 string + if tmp, ok := rawArgs["displayName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + arg3, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } - args["ports"] = arg1 + args["displayName"] = arg3 return args, nil } -func (ec *executionContext) field_Mutation_core_updateVPNDevice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { +func (ec *executionContext) field_Mutation_infra_createClusterManagedService_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.ConsoleVPNDevice - if tmp, ok := rawArgs["vpnDevice"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("vpnDevice")) - arg0, err = ec.unmarshalNConsoleVPNDeviceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDevice(ctx, tmp) + var arg0 entities.ClusterManagedService + if tmp, ok := rawArgs["service"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("service")) + arg0, err = ec.unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, tmp) if err != nil { return nil, err } } - args["vpnDevice"] = arg0 + args["service"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_core_updateVpnClusterName_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { +func (ec *executionContext) field_Mutation_infra_deleteClusterManagedService_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["deviceName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) arg0, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } - args["deviceName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["clusterName"] = arg1 + args["name"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_core_updateVpnDeviceNs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { +func (ec *executionContext) field_Mutation_infra_updateClusterManagedService_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["deviceName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) + var arg0 entities.ClusterManagedService + if tmp, ok := rawArgs["service"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("service")) + arg0, err = ec.unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, tmp) if err != nil { return nil, err } } - args["deviceName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["ns"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ns")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["ns"] = arg1 + args["service"] = arg0 return args, nil } @@ -8432,21 +8266,6 @@ func (ec *executionContext) field_Query_core_getSecret_args(ctx context.Context, return args, nil } -func (ec *executionContext) field_Query_core_getVPNDevice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["name"] = arg0 - return args, nil -} - func (ec *executionContext) field_Query_core_listApps_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -8717,30 +8536,6 @@ func (ec *executionContext) field_Query_core_listSecrets_args(ctx context.Contex return args, nil } -func (ec *executionContext) field_Query_core_listVPNDevices_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 *model.CoreSearchVPNDevices - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg0, err = ec.unmarshalOCoreSearchVPNDevices2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐCoreSearchVPNDevices(ctx, tmp) - if err != nil { - return nil, err - } - } - args["search"] = arg0 - var arg1 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } - } - args["pq"] = arg1 - return args, nil -} - func (ec *executionContext) field_Query_core_restartApp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -8939,6 +8734,45 @@ func (ec *executionContext) field_Query_core_resyncSecret_args(ctx context.Conte return args, nil } +func (ec *executionContext) field_Query_infra_getClusterManagedService_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query_infra_listClusterManagedServices_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *model.SearchClusterManagedService + if tmp, ok := rawArgs["search"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + arg0, err = ec.unmarshalOSearchClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchClusterManagedService(ctx, tmp) + if err != nil { + return nil, err + } + } + args["search"] = arg0 + var arg1 *repos.CursorPagination + if tmp, ok := rawArgs["pagination"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pagination"] = arg1 + return args, nil +} + func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -9529,7 +9363,7 @@ func (ec *executionContext) _App_metadata(ctx context.Context, field graphql.Col if resTmp == nil { return graphql.Null } - res := resTmp.(v13.ObjectMeta) + res := resTmp.(v12.ObjectMeta) fc.Result = res return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } @@ -10229,8 +10063,8 @@ func (ec *executionContext) fieldContext_Build_id(ctx context.Context, field gra return fc, nil } -func (ec *executionContext) _Config_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_accountName(ctx, field) +func (ec *executionContext) _ClusterManagedService_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_accountName(ctx, field) if err != nil { return graphql.Null } @@ -10260,9 +10094,9 @@ func (ec *executionContext) _Config_accountName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: false, IsResolver: false, @@ -10273,8 +10107,8 @@ func (ec *executionContext) fieldContext_Config_accountName(ctx context.Context, return fc, nil } -func (ec *executionContext) _Config_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_apiVersion(ctx, field) +func (ec *executionContext) _ClusterManagedService_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) if err != nil { return graphql.Null } @@ -10301,9 +10135,9 @@ func (ec *executionContext) _Config_apiVersion(ctx context.Context, field graphq return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: false, IsResolver: false, @@ -10314,8 +10148,8 @@ func (ec *executionContext) fieldContext_Config_apiVersion(ctx context.Context, return fc, nil } -func (ec *executionContext) _Config_binaryData(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_binaryData(ctx, field) +func (ec *executionContext) _ClusterManagedService_clusterName(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_clusterName(ctx, field) if err != nil { return graphql.Null } @@ -10328,35 +10162,38 @@ func (ec *executionContext) _Config_binaryData(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.Config().BinaryData(rctx, obj) + return obj.ClusterName, 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.(map[string]interface{}) + res := resTmp.(string) fc.Result = res - return ec.marshalOMap2map(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_binaryData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", 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 Map does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Config_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_createdBy(ctx, field) +func (ec *executionContext) _ClusterManagedService_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_createdBy(ctx, field) if err != nil { return graphql.Null } @@ -10386,9 +10223,9 @@ func (ec *executionContext) _Config_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_Config_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: false, IsResolver: false, @@ -10407,8 +10244,8 @@ func (ec *executionContext) fieldContext_Config_createdBy(ctx context.Context, f return fc, nil } -func (ec *executionContext) _Config_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_creationTime(ctx, field) +func (ec *executionContext) _ClusterManagedService_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_creationTime(ctx, field) if err != nil { return graphql.Null } @@ -10421,7 +10258,7 @@ func (ec *executionContext) _Config_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.Config().CreationTime(rctx, obj) + return ec.resolvers.ClusterManagedService().CreationTime(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -10438,9 +10275,9 @@ func (ec *executionContext) _Config_creationTime(ctx context.Context, field grap return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: true, IsResolver: true, @@ -10451,49 +10288,8 @@ func (ec *executionContext) fieldContext_Config_creationTime(ctx context.Context return fc, nil } -func (ec *executionContext) _Config_data(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_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.Config().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_Config_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Config", - 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) _Config_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_displayName(ctx, field) +func (ec *executionContext) _ClusterManagedService_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_displayName(ctx, field) if err != nil { return graphql.Null } @@ -10523,9 +10319,9 @@ func (ec *executionContext) _Config_displayName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: false, IsResolver: false, @@ -10536,52 +10332,8 @@ func (ec *executionContext) fieldContext_Config_displayName(ctx context.Context, return fc, nil } -func (ec *executionContext) _Config_environmentName(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_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_Config_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Config", - 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) _Config_id(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_id(ctx, field) +func (ec *executionContext) _ClusterManagedService_id(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_id(ctx, field) if err != nil { return graphql.Null } @@ -10611,9 +10363,9 @@ func (ec *executionContext) _Config_id(ctx context.Context, field graphql.Collec return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: false, IsResolver: false, @@ -10624,8 +10376,8 @@ func (ec *executionContext) fieldContext_Config_id(ctx context.Context, field gr return fc, nil } -func (ec *executionContext) _Config_immutable(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_immutable(ctx, field) +func (ec *executionContext) _ClusterManagedService_isArchived(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_isArchived(ctx, field) if err != nil { return graphql.Null } @@ -10638,7 +10390,7 @@ func (ec *executionContext) _Config_immutable(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.Immutable, nil + return obj.IsArchived, nil }) if err != nil { ec.Error(ctx, err) @@ -10652,9 +10404,9 @@ func (ec *executionContext) _Config_immutable(ctx context.Context, field graphql return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_immutable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_isArchived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: false, IsResolver: false, @@ -10665,8 +10417,8 @@ func (ec *executionContext) fieldContext_Config_immutable(ctx context.Context, f return fc, nil } -func (ec *executionContext) _Config_kind(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_kind(ctx, field) +func (ec *executionContext) _ClusterManagedService_kind(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_kind(ctx, field) if err != nil { return graphql.Null } @@ -10693,9 +10445,9 @@ func (ec *executionContext) _Config_kind(ctx context.Context, field graphql.Coll return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: false, IsResolver: false, @@ -10706,8 +10458,8 @@ func (ec *executionContext) fieldContext_Config_kind(ctx context.Context, field return fc, nil } -func (ec *executionContext) _Config_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_lastUpdatedBy(ctx, field) +func (ec *executionContext) _ClusterManagedService_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) if err != nil { return graphql.Null } @@ -10737,9 +10489,9 @@ func (ec *executionContext) _Config_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_Config_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: false, IsResolver: false, @@ -10758,8 +10510,8 @@ func (ec *executionContext) fieldContext_Config_lastUpdatedBy(ctx context.Contex return fc, nil } -func (ec *executionContext) _Config_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_markedForDeletion(ctx, field) +func (ec *executionContext) _ClusterManagedService_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) if err != nil { return graphql.Null } @@ -10786,9 +10538,9 @@ func (ec *executionContext) _Config_markedForDeletion(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: false, IsResolver: false, @@ -10799,8 +10551,8 @@ func (ec *executionContext) fieldContext_Config_markedForDeletion(ctx context.Co return fc, nil } -func (ec *executionContext) _Config_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_metadata(ctx, field) +func (ec *executionContext) _ClusterManagedService_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_metadata(ctx, field) if err != nil { return graphql.Null } @@ -10822,14 +10574,14 @@ func (ec *executionContext) _Config_metadata(ctx context.Context, field graphql. if resTmp == nil { return graphql.Null } - res := resTmp.(v13.ObjectMeta) + 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_Config_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: false, IsResolver: false, @@ -10856,8 +10608,8 @@ func (ec *executionContext) fieldContext_Config_metadata(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _Config_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_recordVersion(ctx, field) +func (ec *executionContext) _ClusterManagedService_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) if err != nil { return graphql.Null } @@ -10887,9 +10639,9 @@ func (ec *executionContext) _Config_recordVersion(ctx context.Context, field gra return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, IsMethod: false, IsResolver: false, @@ -10900,8 +10652,8 @@ func (ec *executionContext) fieldContext_Config_recordVersion(ctx context.Contex return fc, nil } -func (ec *executionContext) _Config_syncStatus(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_syncStatus(ctx, field) +func (ec *executionContext) _ClusterManagedService_spec(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_spec(ctx, field) if err != nil { return graphql.Null } @@ -10914,52 +10666,41 @@ func (ec *executionContext) _Config_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 ec.resolvers.ClusterManagedService().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.(types.SyncStatus) + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec) 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___apis___crds___v1__ClusterManagedServiceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, 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 "msvcSpec": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(ctx, field) + case "targetNamespace": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(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___apis___crds___v1__ClusterManagedServiceSpec", field.Name) }, } return fc, nil } -func (ec *executionContext) _Config_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Config_updateTime(ctx, field) +func (ec *executionContext) _ClusterManagedService_status(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_status(ctx, field) if err != nil { return graphql.Null } @@ -10972,38 +10713,51 @@ func (ec *executionContext) _Config_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.Config().UpdateTime(rctx, obj) + 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.(string) + res := resTmp.(operator.Status) fc.Result = res - return ec.marshalNDate2string(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_Config_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Config", + Object: "ClusterManagedService", 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") + 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) + } + 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) _ConfigEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.ConfigEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigEdge_cursor(ctx, field) +func (ec *executionContext) _ClusterManagedService_syncStatus(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) if err != nil { return graphql.Null } @@ -11016,7 +10770,7 @@ func (ec *executionContext) _ConfigEdge_cursor(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.Cursor, nil + return obj.SyncStatus, nil }) if err != nil { ec.Error(ctx, err) @@ -11028,26 +10782,40 @@ func (ec *executionContext) _ConfigEdge_cursor(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(string) + res := resTmp.(types.SyncStatus) fc.Result = res - return ec.marshalNString2string(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_ConfigEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigEdge", + Object: "ClusterManagedService", 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") + 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) _ConfigEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.ConfigEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigEdge_node(ctx, field) +func (ec *executionContext) _ClusterManagedService_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedService_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -11060,7 +10828,7 @@ func (ec *executionContext) _ConfigEdge_node(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.Node, nil + return ec.resolvers.ClusterManagedService().UpdateTime(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -11072,62 +10840,26 @@ func (ec *executionContext) _ConfigEdge_node(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(*entities.Config) + res := resTmp.(string) fc.Result = res - return ec.marshalNConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx, field.Selections, res) + return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigEdge", + Object: "ClusterManagedService", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "accountName": - return ec.fieldContext_Config_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_Config_apiVersion(ctx, field) - case "binaryData": - return ec.fieldContext_Config_binaryData(ctx, field) - case "createdBy": - return ec.fieldContext_Config_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_Config_creationTime(ctx, field) - case "data": - return ec.fieldContext_Config_data(ctx, field) - case "displayName": - return ec.fieldContext_Config_displayName(ctx, field) - case "environmentName": - return ec.fieldContext_Config_environmentName(ctx, field) - case "id": - return ec.fieldContext_Config_id(ctx, field) - case "immutable": - return ec.fieldContext_Config_immutable(ctx, field) - case "kind": - return ec.fieldContext_Config_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_Config_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_Config_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_Config_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_Config_recordVersion(ctx, field) - case "syncStatus": - return ec.fieldContext_Config_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_Config_updateTime(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Config", field.Name) + return nil, errors.New("field of type Date does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConfigKeyRef_configName(ctx context.Context, field graphql.CollectedField, obj *model.ConfigKeyRef) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigKeyRef_configName(ctx, field) +func (ec *executionContext) _ClusterManagedServiceEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.ClusterManagedServiceEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedServiceEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -11140,7 +10872,7 @@ func (ec *executionContext) _ConfigKeyRef_configName(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ConfigName, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -11157,9 +10889,9 @@ func (ec *executionContext) _ConfigKeyRef_configName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigKeyRef_configName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedServiceEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigKeyRef", + Object: "ClusterManagedServiceEdge", Field: field, IsMethod: false, IsResolver: false, @@ -11170,8 +10902,8 @@ func (ec *executionContext) fieldContext_ConfigKeyRef_configName(ctx context.Con return fc, nil } -func (ec *executionContext) _ConfigKeyRef_key(ctx context.Context, field graphql.CollectedField, obj *model.ConfigKeyRef) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigKeyRef_key(ctx, field) +func (ec *executionContext) _ClusterManagedServiceEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.ClusterManagedServiceEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedServiceEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -11184,7 +10916,7 @@ func (ec *executionContext) _ConfigKeyRef_key(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.Key, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -11196,26 +10928,62 @@ func (ec *executionContext) _ConfigKeyRef_key(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*entities.ClusterManagedService) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigKeyRef_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedServiceEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigKeyRef", + Object: "ClusterManagedServiceEdge", 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") + switch field.Name { + case "accountName": + return ec.fieldContext_ClusterManagedService_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) + case "clusterName": + return ec.fieldContext_ClusterManagedService_clusterName(ctx, field) + case "createdBy": + return ec.fieldContext_ClusterManagedService_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_ClusterManagedService_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_ClusterManagedService_displayName(ctx, field) + case "id": + return ec.fieldContext_ClusterManagedService_id(ctx, field) + case "isArchived": + return ec.fieldContext_ClusterManagedService_isArchived(ctx, field) + case "kind": + return ec.fieldContext_ClusterManagedService_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_ClusterManagedService_metadata(ctx, field) + case "recordVersion": + return ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_ClusterManagedService_spec(ctx, field) + case "status": + return ec.fieldContext_ClusterManagedService_status(ctx, field) + case "syncStatus": + return ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_ClusterManagedService_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ClusterManagedService", field.Name) }, } return fc, nil } -func (ec *executionContext) _ConfigKeyValueRef_configName(ctx context.Context, field graphql.CollectedField, obj *domain.ConfigKeyValueRef) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigKeyValueRef_configName(ctx, field) +func (ec *executionContext) _ClusterManagedServicePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.ClusterManagedServicePaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedServicePaginatedRecords_edges(ctx, field) if err != nil { return graphql.Null } @@ -11228,7 +10996,7 @@ func (ec *executionContext) _ConfigKeyValueRef_configName(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ConfigName, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -11240,26 +11008,32 @@ func (ec *executionContext) _ConfigKeyValueRef_configName(ctx context.Context, f } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*model.ClusterManagedServiceEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNClusterManagedServiceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigKeyValueRef_configName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigKeyValueRef", + Object: "ClusterManagedServicePaginatedRecords", 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") + switch field.Name { + case "cursor": + return ec.fieldContext_ClusterManagedServiceEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_ClusterManagedServiceEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ClusterManagedServiceEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _ConfigKeyValueRef_key(ctx context.Context, field graphql.CollectedField, obj *domain.ConfigKeyValueRef) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigKeyValueRef_key(ctx, field) +func (ec *executionContext) _ClusterManagedServicePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.ClusterManagedServicePaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedServicePaginatedRecords_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -11272,7 +11046,7 @@ func (ec *executionContext) _ConfigKeyValueRef_key(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Key, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -11284,26 +11058,36 @@ func (ec *executionContext) _ConfigKeyValueRef_key(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*model.PageInfo) fc.Result = res - return ec.marshalNString2string(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_ConfigKeyValueRef_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigKeyValueRef", + Object: "ClusterManagedServicePaginatedRecords", 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") + switch field.Name { + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(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) _ConfigKeyValueRef_value(ctx context.Context, field graphql.CollectedField, obj *domain.ConfigKeyValueRef) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigKeyValueRef_value(ctx, field) +func (ec *executionContext) _ClusterManagedServicePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.ClusterManagedServicePaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterManagedServicePaginatedRecords_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -11316,7 +11100,7 @@ func (ec *executionContext) _ConfigKeyValueRef_value(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Value, nil + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) @@ -11328,26 +11112,26 @@ func (ec *executionContext) _ConfigKeyValueRef_value(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigKeyValueRef_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigKeyValueRef", + Object: "ClusterManagedServicePaginatedRecords", 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 Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConfigPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.ConfigPaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigPaginatedRecords_edges(ctx, field) +func (ec *executionContext) _Config_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_accountName(ctx, field) if err != nil { return graphql.Null } @@ -11360,7 +11144,7 @@ func (ec *executionContext) _ConfigPaginatedRecords_edges(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.AccountName, nil }) if err != nil { ec.Error(ctx, err) @@ -11372,32 +11156,26 @@ func (ec *executionContext) _ConfigPaginatedRecords_edges(ctx context.Context, f } return graphql.Null } - res := resTmp.([]*model.ConfigEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalNConfigEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConfigEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigPaginatedRecords", + Object: "Config", 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_ConfigEdge_cursor(ctx, field) - case "node": - return ec.fieldContext_ConfigEdge_node(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ConfigEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConfigPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.ConfigPaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigPaginatedRecords_pageInfo(ctx, field) +func (ec *executionContext) _Config_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_apiVersion(ctx, field) if err != nil { return graphql.Null } @@ -11410,48 +11188,35 @@ func (ec *executionContext) _ConfigPaginatedRecords_pageInfo(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.APIVersion, 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) + res := resTmp.(string) fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigPaginatedRecords", + Object: "Config", 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 "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(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 nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConfigPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.ConfigPaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigPaginatedRecords_totalCount(ctx, field) +func (ec *executionContext) _Config_binaryData(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_binaryData(ctx, field) if err != nil { return graphql.Null } @@ -11464,38 +11229,35 @@ func (ec *executionContext) _ConfigPaginatedRecords_totalCount(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return ec.resolvers.Config().BinaryData(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.(int) + res := resTmp.(map[string]interface{}) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_binaryData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigPaginatedRecords", + Object: "Config", 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 Int does not have child fields") + return nil, errors.New("field of type Map does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleCheckNameAvailabilityOutput_result(ctx context.Context, field graphql.CollectedField, obj *domain.CheckNameAvailabilityOutput) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleCheckNameAvailabilityOutput_result(ctx, field) +func (ec *executionContext) _Config_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_createdBy(ctx, field) if err != nil { return graphql.Null } @@ -11508,7 +11270,7 @@ func (ec *executionContext) _ConsoleCheckNameAvailabilityOutput_result(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Result, nil + return obj.CreatedBy, nil }) if err != nil { ec.Error(ctx, err) @@ -11520,26 +11282,34 @@ func (ec *executionContext) _ConsoleCheckNameAvailabilityOutput_result(ctx conte } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(common.CreatedOrUpdatedBy) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleCheckNameAvailabilityOutput_result(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleCheckNameAvailabilityOutput", + Object: "Config", 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") + 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) _ConsoleCheckNameAvailabilityOutput_suggestedNames(ctx context.Context, field graphql.CollectedField, obj *domain.CheckNameAvailabilityOutput) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleCheckNameAvailabilityOutput_suggestedNames(ctx, field) +func (ec *executionContext) _Config_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_creationTime(ctx, field) if err != nil { return graphql.Null } @@ -11552,35 +11322,38 @@ func (ec *executionContext) _ConsoleCheckNameAvailabilityOutput_suggestedNames(c }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SuggestedNames, nil + return ec.resolvers.Config().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) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleCheckNameAvailabilityOutput_suggestedNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleCheckNameAvailabilityOutput", + Object: "Config", 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) _ConsoleVPNDevice_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_accountName(ctx, field) +func (ec *executionContext) _Config_data(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_data(ctx, field) if err != nil { return graphql.Null } @@ -11593,38 +11366,35 @@ func (ec *executionContext) _ConsoleVPNDevice_accountName(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AccountName, nil + return ec.resolvers.Config().Data(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) + res := resTmp.(map[string]interface{}) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", 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 Map does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_apiVersion(ctx, field) +func (ec *executionContext) _Config_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_displayName(ctx, field) if err != nil { return graphql.Null } @@ -11637,23 +11407,26 @@ func (ec *executionContext) _ConsoleVPNDevice_apiVersion(ctx context.Context, fi }() 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 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.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", Field: field, IsMethod: false, IsResolver: false, @@ -11664,8 +11437,8 @@ func (ec *executionContext) fieldContext_ConsoleVPNDevice_apiVersion(ctx context return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_clusterName(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_clusterName(ctx, field) +func (ec *executionContext) _Config_environmentName(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_environmentName(ctx, field) if err != nil { return graphql.Null } @@ -11678,23 +11451,26 @@ func (ec *executionContext) _ConsoleVPNDevice_clusterName(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ClusterName, nil + 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) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", Field: field, IsMethod: false, IsResolver: false, @@ -11705,8 +11481,8 @@ func (ec *executionContext) fieldContext_ConsoleVPNDevice_clusterName(ctx contex return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_createdBy(ctx, field) +func (ec *executionContext) _Config_id(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_id(ctx, field) if err != nil { return graphql.Null } @@ -11719,7 +11495,7 @@ func (ec *executionContext) _ConsoleVPNDevice_createdBy(ctx context.Context, fie }() 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) @@ -11731,34 +11507,26 @@ func (ec *executionContext) _ConsoleVPNDevice_createdBy(ctx context.Context, fie } 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_ConsoleVPNDevice_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", 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) _ConsoleVPNDevice_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_creationTime(ctx, field) +func (ec *executionContext) _Config_immutable(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_immutable(ctx, field) if err != nil { return graphql.Null } @@ -11771,38 +11539,35 @@ func (ec *executionContext) _ConsoleVPNDevice_creationTime(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ConsoleVPNDevice().CreationTime(rctx, obj) + return obj.Immutable, 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.marshalNDate2string(ctx, field.Selections, res) + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_immutable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", 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 Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_displayName(ctx, field) +func (ec *executionContext) _Config_kind(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_kind(ctx, field) if err != nil { return graphql.Null } @@ -11815,26 +11580,23 @@ func (ec *executionContext) _ConsoleVPNDevice_displayName(ctx context.Context, f }() 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.Kind, 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) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", Field: field, IsMethod: false, IsResolver: false, @@ -11845,8 +11607,8 @@ func (ec *executionContext) fieldContext_ConsoleVPNDevice_displayName(ctx contex return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_environmentName(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_environmentName(ctx, field) +func (ec *executionContext) _Config_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_lastUpdatedBy(ctx, field) if err != nil { return graphql.Null } @@ -11859,35 +11621,46 @@ func (ec *executionContext) _ConsoleVPNDevice_environmentName(ctx context.Contex }() 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.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.(*string) + res := resTmp.(common.CreatedOrUpdatedBy) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", 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") + 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) _ConsoleVPNDevice_id(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_id(ctx, field) +func (ec *executionContext) _Config_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_markedForDeletion(ctx, field) if err != nil { return graphql.Null } @@ -11900,38 +11673,35 @@ func (ec *executionContext) _ConsoleVPNDevice_id(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 obj.Id, nil + return obj.MarkedForDeletion, 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) + res := resTmp.(*bool) fc.Result = res - return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", 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 Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_kind(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_kind(ctx, field) +func (ec *executionContext) _Config_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_metadata(ctx, field) if err != nil { return graphql.Null } @@ -11944,7 +11714,7 @@ func (ec *executionContext) _ConsoleVPNDevice_kind(ctx context.Context, field gr }() 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 obj.ObjectMeta, nil }) if err != nil { ec.Error(ctx, err) @@ -11953,26 +11723,42 @@ func (ec *executionContext) _ConsoleVPNDevice_kind(ctx context.Context, field gr if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(v12.ObjectMeta) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", 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") + 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) _ConsoleVPNDevice_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_lastUpdatedBy(ctx, field) +func (ec *executionContext) _Config_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_recordVersion(ctx, field) if err != nil { return graphql.Null } @@ -11985,7 +11771,7 @@ func (ec *executionContext) _ConsoleVPNDevice_lastUpdatedBy(ctx context.Context, }() 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.RecordVersion, nil }) if err != nil { ec.Error(ctx, err) @@ -11997,34 +11783,26 @@ func (ec *executionContext) _ConsoleVPNDevice_lastUpdatedBy(ctx context.Context, } return graphql.Null } - res := resTmp.(common.CreatedOrUpdatedBy) + res := resTmp.(int) fc.Result = res - return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", 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 Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_linkedClusters(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_linkedClusters(ctx, field) +func (ec *executionContext) _Config_syncStatus(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_syncStatus(ctx, field) if err != nil { return graphql.Null } @@ -12037,35 +11815,52 @@ func (ec *executionContext) _ConsoleVPNDevice_linkedClusters(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LinkedClusters, nil + 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.([]string) + res := resTmp.(types.SyncStatus) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(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_ConsoleVPNDevice_linkedClusters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", 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") + 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) _ConsoleVPNDevice_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_markedForDeletion(ctx, field) +func (ec *executionContext) _Config_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.Config) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Config_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -12078,35 +11873,38 @@ func (ec *executionContext) _ConsoleVPNDevice_markedForDeletion(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarkedForDeletion, nil + return ec.resolvers.Config().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.(*bool) + res := resTmp.(string) fc.Result = res - return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) + return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "Config", 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 Boolean does not have child fields") + return nil, errors.New("field of type Date does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_metadata(ctx, field) +func (ec *executionContext) _ConfigEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.ConfigEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -12119,51 +11917,38 @@ func (ec *executionContext) _ConsoleVPNDevice_metadata(ctx context.Context, fiel }() 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.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.(v13.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_ConsoleVPNDevice_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "ConfigEdge", 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) _ConsoleVPNDevice_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_recordVersion(ctx, field) +func (ec *executionContext) _ConfigEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.ConfigEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -12176,7 +11961,7 @@ func (ec *executionContext) _ConsoleVPNDevice_recordVersion(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RecordVersion, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -12188,26 +11973,62 @@ func (ec *executionContext) _ConsoleVPNDevice_recordVersion(ctx context.Context, } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*entities.Config) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "ConfigEdge", 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") + switch field.Name { + case "accountName": + return ec.fieldContext_Config_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_Config_apiVersion(ctx, field) + case "binaryData": + return ec.fieldContext_Config_binaryData(ctx, field) + case "createdBy": + return ec.fieldContext_Config_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_Config_creationTime(ctx, field) + case "data": + return ec.fieldContext_Config_data(ctx, field) + case "displayName": + return ec.fieldContext_Config_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_Config_environmentName(ctx, field) + case "id": + return ec.fieldContext_Config_id(ctx, field) + case "immutable": + return ec.fieldContext_Config_immutable(ctx, field) + case "kind": + return ec.fieldContext_Config_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_Config_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_Config_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_Config_metadata(ctx, field) + case "recordVersion": + return ec.fieldContext_Config_recordVersion(ctx, field) + case "syncStatus": + return ec.fieldContext_Config_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_Config_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Config", field.Name) }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_spec(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_spec(ctx, field) +func (ec *executionContext) _ConfigKeyRef_configName(ctx context.Context, field graphql.CollectedField, obj *model.ConfigKeyRef) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigKeyRef_configName(ctx, field) if err != nil { return graphql.Null } @@ -12220,49 +12041,38 @@ func (ec *executionContext) _ConsoleVPNDevice_spec(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ConsoleVPNDevice().Spec(rctx, obj) + return obj.ConfigName, 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.GithubComKloudliteOperatorApisWireguardV1DeviceSpec) + res := resTmp.(string) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1DeviceSpec(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigKeyRef_configName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "ConfigKeyRef", 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 "activeNamespace": - return ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_activeNamespace(ctx, field) - case "cnameRecords": - return ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_cnameRecords(ctx, field) - case "disabled": - return ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_disabled(ctx, field) - case "nodeSelector": - return ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_nodeSelector(ctx, field) - case "noExternalService": - return ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_noExternalService(ctx, field) - case "ports": - return ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_ports(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_status(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_status(ctx, field) +func (ec *executionContext) _ConfigKeyRef_key(ctx context.Context, field graphql.CollectedField, obj *model.ConfigKeyRef) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigKeyRef_key(ctx, field) if err != nil { return graphql.Null } @@ -12275,51 +12085,38 @@ func (ec *executionContext) _ConsoleVPNDevice_status(ctx context.Context, field }() 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.Key, 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.(string) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigKeyRef_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "ConfigKeyRef", 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) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___pkg___operator__Status", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_syncStatus(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_syncStatus(ctx, field) +func (ec *executionContext) _ConfigKeyValueRef_configName(ctx context.Context, field graphql.CollectedField, obj *domain.ConfigKeyValueRef) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigKeyValueRef_configName(ctx, field) if err != nil { return graphql.Null } @@ -12332,7 +12129,7 @@ func (ec *executionContext) _ConsoleVPNDevice_syncStatus(ctx context.Context, fi }() 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.ConfigName, nil }) if err != nil { ec.Error(ctx, err) @@ -12344,40 +12141,26 @@ func (ec *executionContext) _ConsoleVPNDevice_syncStatus(ctx context.Context, fi } return graphql.Null } - res := resTmp.(types.SyncStatus) + res := resTmp.(string) fc.Result = res - return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigKeyValueRef_configName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "ConfigKeyValueRef", 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 nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevice_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_updateTime(ctx, field) +func (ec *executionContext) _ConfigKeyValueRef_key(ctx context.Context, field graphql.CollectedField, obj *domain.ConfigKeyValueRef) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigKeyValueRef_key(ctx, field) if err != nil { return graphql.Null } @@ -12390,7 +12173,7 @@ func (ec *executionContext) _ConsoleVPNDevice_updateTime(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ConsoleVPNDevice().UpdateTime(rctx, obj) + return obj.Key, nil }) if err != nil { ec.Error(ctx, err) @@ -12404,24 +12187,24 @@ func (ec *executionContext) _ConsoleVPNDevice_updateTime(ctx context.Context, fi } res := resTmp.(string) fc.Result = res - return ec.marshalNDate2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigKeyValueRef_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "ConfigKeyValueRef", 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) _ConsoleVPNDevice_wireguardConfig(ctx context.Context, field graphql.CollectedField, obj *entities.ConsoleVPNDevice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevice_wireguardConfig(ctx, field) +func (ec *executionContext) _ConfigKeyValueRef_value(ctx context.Context, field graphql.CollectedField, obj *domain.ConfigKeyValueRef) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigKeyValueRef_value(ctx, field) if err != nil { return graphql.Null } @@ -12434,41 +12217,38 @@ func (ec *executionContext) _ConsoleVPNDevice_wireguardConfig(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ConsoleVPNDevice().WireguardConfig(rctx, obj) + return obj.Value, 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.GithubComKloudliteAPIPkgTypesEncodedString) + res := resTmp.(string) fc.Result = res - return ec.marshalOGithub__com___kloudlite___api___pkg___types__EncodedString2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIPkgTypesEncodedString(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevice_wireguardConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigKeyValueRef_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevice", + Object: "ConfigKeyValueRef", 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 "encoding": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__EncodedString_encoding(ctx, field) - case "value": - return ec.fieldContext_Github__com___kloudlite___api___pkg___types__EncodedString_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___pkg___types__EncodedString", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDeviceEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.ConsoleVPNDeviceEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDeviceEdge_cursor(ctx, field) +func (ec *executionContext) _ConfigPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.ConfigPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigPaginatedRecords_edges(ctx, field) if err != nil { return graphql.Null } @@ -12481,7 +12261,7 @@ func (ec *executionContext) _ConsoleVPNDeviceEdge_cursor(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -12493,26 +12273,32 @@ func (ec *executionContext) _ConsoleVPNDeviceEdge_cursor(ctx context.Context, fi } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*model.ConfigEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNConfigEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConfigEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDeviceEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDeviceEdge", + Object: "ConfigPaginatedRecords", 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") + switch field.Name { + case "cursor": + return ec.fieldContext_ConfigEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_ConfigEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ConfigEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDeviceEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.ConsoleVPNDeviceEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDeviceEdge_node(ctx, field) +func (ec *executionContext) _ConfigPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.ConfigPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigPaginatedRecords_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -12525,7 +12311,7 @@ func (ec *executionContext) _ConsoleVPNDeviceEdge_node(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -12537,66 +12323,36 @@ func (ec *executionContext) _ConsoleVPNDeviceEdge_node(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(*entities.ConsoleVPNDevice) + res := resTmp.(*model.PageInfo) fc.Result = res - return ec.marshalNConsoleVPNDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDevice(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_ConsoleVPNDeviceEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDeviceEdge", + Object: "ConfigPaginatedRecords", 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_ConsoleVPNDevice_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_ConsoleVPNDevice_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_ConsoleVPNDevice_clusterName(ctx, field) - case "createdBy": - return ec.fieldContext_ConsoleVPNDevice_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_ConsoleVPNDevice_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_ConsoleVPNDevice_displayName(ctx, field) - case "environmentName": - return ec.fieldContext_ConsoleVPNDevice_environmentName(ctx, field) - case "id": - return ec.fieldContext_ConsoleVPNDevice_id(ctx, field) - case "kind": - return ec.fieldContext_ConsoleVPNDevice_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_ConsoleVPNDevice_lastUpdatedBy(ctx, field) - case "linkedClusters": - return ec.fieldContext_ConsoleVPNDevice_linkedClusters(ctx, field) - case "markedForDeletion": - return ec.fieldContext_ConsoleVPNDevice_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_ConsoleVPNDevice_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_ConsoleVPNDevice_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_ConsoleVPNDevice_spec(ctx, field) - case "status": - return ec.fieldContext_ConsoleVPNDevice_status(ctx, field) - case "syncStatus": - return ec.fieldContext_ConsoleVPNDevice_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_ConsoleVPNDevice_updateTime(ctx, field) - case "wireguardConfig": - return ec.fieldContext_ConsoleVPNDevice_wireguardConfig(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ConsoleVPNDevice", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevicePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.ConsoleVPNDevicePaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevicePaginatedRecords_edges(ctx, field) +func (ec *executionContext) _ConfigPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.ConfigPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigPaginatedRecords_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -12609,7 +12365,7 @@ func (ec *executionContext) _ConsoleVPNDevicePaginatedRecords_edges(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) @@ -12621,32 +12377,26 @@ func (ec *executionContext) _ConsoleVPNDevicePaginatedRecords_edges(ctx context. } return graphql.Null } - res := resTmp.([]*model.ConsoleVPNDeviceEdge) + res := resTmp.(int) fc.Result = res - return ec.marshalNConsoleVPNDeviceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConsoleVPNDeviceEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevicePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevicePaginatedRecords", + Object: "ConfigPaginatedRecords", 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_ConsoleVPNDeviceEdge_cursor(ctx, field) - case "node": - return ec.fieldContext_ConsoleVPNDeviceEdge_node(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ConsoleVPNDeviceEdge", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevicePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.ConsoleVPNDevicePaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevicePaginatedRecords_pageInfo(ctx, field) +func (ec *executionContext) _ConsoleCheckNameAvailabilityOutput_result(ctx context.Context, field graphql.CollectedField, obj *domain.CheckNameAvailabilityOutput) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConsoleCheckNameAvailabilityOutput_result(ctx, field) if err != nil { return graphql.Null } @@ -12659,7 +12409,7 @@ func (ec *executionContext) _ConsoleVPNDevicePaginatedRecords_pageInfo(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Result, nil }) if err != nil { ec.Error(ctx, err) @@ -12671,36 +12421,26 @@ func (ec *executionContext) _ConsoleVPNDevicePaginatedRecords_pageInfo(ctx conte } return graphql.Null } - res := resTmp.(*model.PageInfo) + res := resTmp.(bool) fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevicePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConsoleCheckNameAvailabilityOutput_result(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevicePaginatedRecords", + Object: "ConsoleCheckNameAvailabilityOutput", 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 "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(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 nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConsoleVPNDevicePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.ConsoleVPNDevicePaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConsoleVPNDevicePaginatedRecords_totalCount(ctx, field) +func (ec *executionContext) _ConsoleCheckNameAvailabilityOutput_suggestedNames(ctx context.Context, field graphql.CollectedField, obj *domain.CheckNameAvailabilityOutput) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConsoleCheckNameAvailabilityOutput_suggestedNames(ctx, field) if err != nil { return graphql.Null } @@ -12713,31 +12453,28 @@ func (ec *executionContext) _ConsoleVPNDevicePaginatedRecords_totalCount(ctx con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return obj.SuggestedNames, 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) + res := resTmp.([]string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleVPNDevicePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConsoleCheckNameAvailabilityOutput_suggestedNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConsoleVPNDevicePaginatedRecords", + Object: "ConsoleCheckNameAvailabilityOutput", 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 nil, errors.New("field of type String does not have child fields") }, } return fc, nil @@ -13559,7 +13296,7 @@ func (ec *executionContext) _Environment_metadata(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.(v13.ObjectMeta) + res := resTmp.(v12.ObjectMeta) fc.Result = res return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } @@ -14585,7 +14322,7 @@ func (ec *executionContext) _ExternalApp_metadata(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.(v13.ObjectMeta) + res := resTmp.(v12.ObjectMeta) fc.Result = res return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } @@ -15581,94 +15318,6 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common_ return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__EncodedString_encoding(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteAPIPkgTypesEncodedString) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___api___pkg___types__EncodedString_encoding(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.Encoding, 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_Github__com___kloudlite___api___pkg___types__EncodedString_encoding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___api___pkg___types__EncodedString", - 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) _Github__com___kloudlite___api___pkg___types__EncodedString_value(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteAPIPkgTypesEncodedString) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___api___pkg___types__EncodedString_value(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.Value, 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_Github__com___kloudlite___api___pkg___types__EncodedString_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___api___pkg___types__EncodedString", - 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) _Github__com___kloudlite___api___pkg___types__SyncStatus_action(ctx context.Context, field graphql.CollectedField, obj *types.SyncStatus) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_action(ctx, field) if err != nil { @@ -18104,6 +17753,102 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(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.MsvcSpec, 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.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "nodeSelector": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(ctx, field) + case "serviceTemplate": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(ctx, field) + case "tolerations": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(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.TargetNamespace, 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_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec", + 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) _Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_key(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_key(ctx, field) if err != nil { @@ -19953,6 +19698,152 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(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.NodeSelector, nil + }) + 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_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec", + Field: field, + IsMethod: false, + IsResolver: false, + 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) _Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(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.ServiceTemplate, 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.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ServiceTemplate(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "apiVersion": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_apiVersion(ctx, field) + case "kind": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_kind(ctx, field) + case "spec": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(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.Tolerations, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*model.K8sIoAPICoreV1Toleration) + fc.Result = res + return ec.marshalOK8s__io___api___core___v1__Toleration2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Tolerationᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "effect": + return ec.fieldContext_K8s__io___api___core___v1__Toleration_effect(ctx, field) + case "key": + return ec.fieldContext_K8s__io___api___core___v1__Toleration_key(ctx, field) + case "operator": + return ec.fieldContext_K8s__io___api___core___v1__Toleration_operator(ctx, field) + case "tolerationSeconds": + return ec.fieldContext_K8s__io___api___core___v1__Toleration_tolerationSeconds(ctx, field) + case "value": + return ec.fieldContext_K8s__io___api___core___v1__Toleration_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type K8s__io___api___core___v1__Toleration", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate_apiVersion(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1MresResourceTemplate) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate_apiVersion(ctx, field) if err != nil { @@ -21195,49 +21086,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ShellProbe) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(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.Command, 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.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___crds___v1__ShellProbe", - 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) _Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1TCPProbe) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_apiVersion(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_apiVersion(ctx, field) if err != nil { return graphql.Null } @@ -21250,7 +21100,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Port, nil + return obj.APIVersion, nil }) if err != nil { ec.Error(ctx, err) @@ -21262,55 +21112,14 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ } return graphql.Null } - res := resTmp.(int) - fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___crds___v1__TcpProbe", - 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) _Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord_host(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisWireguardV1CNameRecord) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord_host(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.Host, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord_host(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord", + Object: "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate", Field: field, IsMethod: false, IsResolver: false, @@ -21321,8 +21130,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord_target(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisWireguardV1CNameRecord) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord_target(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_kind(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_kind(ctx, field) if err != nil { return graphql.Null } @@ -21335,64 +21144,26 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___wiregua }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Target, nil + 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.marshalOString2ᚖstring(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord_target(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord", - 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) _Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_activeNamespace(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisWireguardV1DeviceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_activeNamespace(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 + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.ActiveNamespace, nil - }) - if err != nil { - ec.Error(ctx, err) return graphql.Null } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_activeNamespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec", + Object: "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate", Field: field, IsMethod: false, IsResolver: false, @@ -21403,8 +21174,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_cnameRecords(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisWireguardV1DeviceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_cnameRecords(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(ctx, field) if err != nil { return graphql.Null } @@ -21417,95 +21188,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___wiregua }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CnameRecords, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]*model.GithubComKloudliteOperatorApisWireguardV1CNameRecord) - fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___wireguard___v1__CNameRecord2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1CNameRecordᚄ(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_cnameRecords(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "host": - return ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord_host(ctx, field) - case "target": - return ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord_target(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_disabled(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisWireguardV1DeviceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_disabled(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.Disabled, 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_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_disabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec", - 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) _Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_nodeSelector(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisWireguardV1DeviceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_nodeSelector(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.NodeSelector, nil + return obj.Spec, nil }) if err != nil { ec.Error(ctx, err) @@ -21519,9 +21202,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___wiregua return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_nodeSelector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec", + Object: "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate", Field: field, IsMethod: false, IsResolver: false, @@ -21532,49 +21215,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_noExternalService(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisWireguardV1DeviceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_noExternalService(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.NoExternalService, 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_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_noExternalService(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec", - 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) _Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_ports(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisWireguardV1DeviceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_ports(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ShellProbe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx, field) if err != nil { return graphql.Null } @@ -21587,7 +21229,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___wiregua }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Ports, nil + return obj.Command, nil }) if err != nil { ec.Error(ctx, err) @@ -21596,32 +21238,26 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___wiregua if resTmp == nil { return graphql.Null } - res := resTmp.([]*model.GithubComKloudliteOperatorApisWireguardV1Port) + res := resTmp.([]string) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___wireguard___v1__Port2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1Portᚄ(ctx, field.Selections, res) + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_ports(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec", + Object: "Github__com___kloudlite___operator___apis___crds___v1__ShellProbe", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "port": - return ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__Port_port(ctx, field) - case "targetPort": - return ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__Port_targetPort(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___wireguard___v1__Port", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___wireguard___v1__Port_port(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisWireguardV1Port) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__Port_port(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1TCPProbe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx, field) if err != nil { return graphql.Null } @@ -21641,57 +21277,19 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___wiregua return graphql.Null } if resTmp == nil { - return graphql.Null - } - res := resTmp.(*int) - fc.Result = res - return ec.marshalOInt2ᚖint(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__Port_port(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___wireguard___v1__Port", - 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) _Github__com___kloudlite___operator___apis___wireguard___v1__Port_targetPort(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisWireguardV1Port) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__Port_targetPort(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 + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.TargetPort, nil - }) - if err != nil { - ec.Error(ctx, err) return graphql.Null } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*int) + res := resTmp.(int) fc.Result = res - return ec.marshalOInt2ᚖint(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___wireguard___v1__Port_targetPort(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___wireguard___v1__Port", + Object: "Github__com___kloudlite___operator___apis___crds___v1__TcpProbe", Field: field, IsMethod: false, IsResolver: false, @@ -23250,7 +22848,7 @@ func (ec *executionContext) _ImagePullSecret_metadata(ctx context.Context, field } return graphql.Null } - res := resTmp.(v13.ObjectMeta) + res := resTmp.(v12.ObjectMeta) fc.Result = res return ec.marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } @@ -24837,7 +24435,7 @@ func (ec *executionContext) fieldContext_ImportedManagedResourcePaginatedRecords return fc, nil } -func (ec *executionContext) _K8s__io___api___core___v1__Secret_apiVersion(ctx context.Context, field graphql.CollectedField, obj *v12.Secret) (ret graphql.Marshaler) { +func (ec *executionContext) _K8s__io___api___core___v1__Secret_apiVersion(ctx context.Context, field graphql.CollectedField, obj *v11.Secret) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__Secret_apiVersion(ctx, field) if err != nil { return graphql.Null @@ -24878,7 +24476,7 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_apiVe return fc, nil } -func (ec *executionContext) _K8s__io___api___core___v1__Secret_data(ctx context.Context, field graphql.CollectedField, obj *v12.Secret) (ret graphql.Marshaler) { +func (ec *executionContext) _K8s__io___api___core___v1__Secret_data(ctx context.Context, field graphql.CollectedField, obj *v11.Secret) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__Secret_data(ctx, field) if err != nil { return graphql.Null @@ -24919,7 +24517,7 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_data( return fc, nil } -func (ec *executionContext) _K8s__io___api___core___v1__Secret_immutable(ctx context.Context, field graphql.CollectedField, obj *v12.Secret) (ret graphql.Marshaler) { +func (ec *executionContext) _K8s__io___api___core___v1__Secret_immutable(ctx context.Context, field graphql.CollectedField, obj *v11.Secret) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__Secret_immutable(ctx, field) if err != nil { return graphql.Null @@ -24960,7 +24558,7 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_immut return fc, nil } -func (ec *executionContext) _K8s__io___api___core___v1__Secret_kind(ctx context.Context, field graphql.CollectedField, obj *v12.Secret) (ret graphql.Marshaler) { +func (ec *executionContext) _K8s__io___api___core___v1__Secret_kind(ctx context.Context, field graphql.CollectedField, obj *v11.Secret) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__Secret_kind(ctx, field) if err != nil { return graphql.Null @@ -25001,7 +24599,7 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_kind( return fc, nil } -func (ec *executionContext) _K8s__io___api___core___v1__Secret_metadata(ctx context.Context, field graphql.CollectedField, obj *v12.Secret) (ret graphql.Marshaler) { +func (ec *executionContext) _K8s__io___api___core___v1__Secret_metadata(ctx context.Context, field graphql.CollectedField, obj *v11.Secret) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__Secret_metadata(ctx, field) if err != nil { return graphql.Null @@ -25024,7 +24622,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Secret_metadata(ctx cont if resTmp == nil { return graphql.Null } - res := resTmp.(v13.ObjectMeta) + res := resTmp.(v12.ObjectMeta) fc.Result = res return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } @@ -25058,7 +24656,7 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_metad return fc, nil } -func (ec *executionContext) _K8s__io___api___core___v1__Secret_stringData(ctx context.Context, field graphql.CollectedField, obj *v12.Secret) (ret graphql.Marshaler) { +func (ec *executionContext) _K8s__io___api___core___v1__Secret_stringData(ctx context.Context, field graphql.CollectedField, obj *v11.Secret) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__Secret_stringData(ctx, field) if err != nil { return graphql.Null @@ -25099,7 +24697,7 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_strin return fc, nil } -func (ec *executionContext) _K8s__io___api___core___v1__Secret_type(ctx context.Context, field graphql.CollectedField, obj *v12.Secret) (ret graphql.Marshaler) { +func (ec *executionContext) _K8s__io___api___core___v1__Secret_type(ctx context.Context, field graphql.CollectedField, obj *v11.Secret) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__Secret_type(ctx, field) if err != nil { return graphql.Null @@ -26550,7 +26148,7 @@ func (ec *executionContext) _ManagedResource_metadata(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(v13.ObjectMeta) + res := resTmp.(v12.ObjectMeta) fc.Result = res return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } @@ -26802,7 +26400,7 @@ func (ec *executionContext) _ManagedResource_syncedOutputSecretRef(ctx context.C if resTmp == nil { return graphql.Null } - res := resTmp.(*v12.Secret) + res := resTmp.(*v11.Secret) fc.Result = res return ec.marshalOK8s__io___api___core___v1__Secret2ᚖk8sᚗioᚋapiᚋcoreᚋv1ᚐSecret(ctx, field.Selections, res) } @@ -27648,7 +27246,7 @@ func (ec *executionContext) fieldContext_MatchFilter_regex(ctx context.Context, return fc, nil } -func (ec *executionContext) _Metadata_annotations(ctx context.Context, field graphql.CollectedField, obj *v13.ObjectMeta) (ret graphql.Marshaler) { +func (ec *executionContext) _Metadata_annotations(ctx context.Context, field graphql.CollectedField, obj *v12.ObjectMeta) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Metadata_annotations(ctx, field) if err != nil { return graphql.Null @@ -27689,7 +27287,7 @@ func (ec *executionContext) fieldContext_Metadata_annotations(ctx context.Contex return fc, nil } -func (ec *executionContext) _Metadata_creationTimestamp(ctx context.Context, field graphql.CollectedField, obj *v13.ObjectMeta) (ret graphql.Marshaler) { +func (ec *executionContext) _Metadata_creationTimestamp(ctx context.Context, field graphql.CollectedField, obj *v12.ObjectMeta) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Metadata_creationTimestamp(ctx, field) if err != nil { return graphql.Null @@ -27733,7 +27331,7 @@ func (ec *executionContext) fieldContext_Metadata_creationTimestamp(ctx context. return fc, nil } -func (ec *executionContext) _Metadata_deletionTimestamp(ctx context.Context, field graphql.CollectedField, obj *v13.ObjectMeta) (ret graphql.Marshaler) { +func (ec *executionContext) _Metadata_deletionTimestamp(ctx context.Context, field graphql.CollectedField, obj *v12.ObjectMeta) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Metadata_deletionTimestamp(ctx, field) if err != nil { return graphql.Null @@ -27774,7 +27372,7 @@ func (ec *executionContext) fieldContext_Metadata_deletionTimestamp(ctx context. return fc, nil } -func (ec *executionContext) _Metadata_generation(ctx context.Context, field graphql.CollectedField, obj *v13.ObjectMeta) (ret graphql.Marshaler) { +func (ec *executionContext) _Metadata_generation(ctx context.Context, field graphql.CollectedField, obj *v12.ObjectMeta) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Metadata_generation(ctx, field) if err != nil { return graphql.Null @@ -27818,7 +27416,7 @@ func (ec *executionContext) fieldContext_Metadata_generation(ctx context.Context return fc, nil } -func (ec *executionContext) _Metadata_labels(ctx context.Context, field graphql.CollectedField, obj *v13.ObjectMeta) (ret graphql.Marshaler) { +func (ec *executionContext) _Metadata_labels(ctx context.Context, field graphql.CollectedField, obj *v12.ObjectMeta) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Metadata_labels(ctx, field) if err != nil { return graphql.Null @@ -27859,7 +27457,7 @@ func (ec *executionContext) fieldContext_Metadata_labels(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _Metadata_name(ctx context.Context, field graphql.CollectedField, obj *v13.ObjectMeta) (ret graphql.Marshaler) { +func (ec *executionContext) _Metadata_name(ctx context.Context, field graphql.CollectedField, obj *v12.ObjectMeta) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Metadata_name(ctx, field) if err != nil { return graphql.Null @@ -27903,7 +27501,7 @@ func (ec *executionContext) fieldContext_Metadata_name(ctx context.Context, fiel return fc, nil } -func (ec *executionContext) _Metadata_namespace(ctx context.Context, field graphql.CollectedField, obj *v13.ObjectMeta) (ret graphql.Marshaler) { +func (ec *executionContext) _Metadata_namespace(ctx context.Context, field graphql.CollectedField, obj *v12.ObjectMeta) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Metadata_namespace(ctx, field) if err != nil { return graphql.Null @@ -29416,343 +29014,34 @@ func (ec *executionContext) _Mutation_core_deleteExternalApp(ctx context.Context 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_deleteExternalApp(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_deleteExternalApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _Mutation_core_interceptExternalApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_interceptExternalApp(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().CoreInterceptExternalApp(rctx, fc.Args["envName"].(string), fc.Args["externalAppName"].(string), fc.Args["deviceName"].(string), fc.Args["intercept"].(bool), fc.Args["portMappings"].([]*v1.AppInterceptPortMappings)) - } - 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_interceptExternalApp(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_interceptExternalApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _Mutation_core_createConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_createConfig(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().CoreCreateConfig(rctx, fc.Args["envName"].(string), fc.Args["config"].(entities.Config)) - } - 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.Config); 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) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*entities.Config) - fc.Result = res - return ec.marshalOConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Mutation_core_createConfig(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) { - switch field.Name { - case "accountName": - return ec.fieldContext_Config_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_Config_apiVersion(ctx, field) - case "binaryData": - return ec.fieldContext_Config_binaryData(ctx, field) - case "createdBy": - return ec.fieldContext_Config_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_Config_creationTime(ctx, field) - case "data": - return ec.fieldContext_Config_data(ctx, field) - case "displayName": - return ec.fieldContext_Config_displayName(ctx, field) - case "environmentName": - return ec.fieldContext_Config_environmentName(ctx, field) - case "id": - return ec.fieldContext_Config_id(ctx, field) - case "immutable": - return ec.fieldContext_Config_immutable(ctx, field) - case "kind": - return ec.fieldContext_Config_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_Config_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_Config_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_Config_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_Config_recordVersion(ctx, field) - case "syncStatus": - return ec.fieldContext_Config_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_Config_updateTime(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Config", 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_Mutation_core_createConfig_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _Mutation_core_updateConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_updateConfig(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().CoreUpdateConfig(rctx, fc.Args["envName"].(string), fc.Args["config"].(entities.Config)) - } - 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.Config); 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/entities.Config`, 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.(*entities.Config) + res := resTmp.(bool) fc.Result = res - return ec.marshalOConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_updateConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_deleteExternalApp(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) { - switch field.Name { - case "accountName": - return ec.fieldContext_Config_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_Config_apiVersion(ctx, field) - case "binaryData": - return ec.fieldContext_Config_binaryData(ctx, field) - case "createdBy": - return ec.fieldContext_Config_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_Config_creationTime(ctx, field) - case "data": - return ec.fieldContext_Config_data(ctx, field) - case "displayName": - return ec.fieldContext_Config_displayName(ctx, field) - case "environmentName": - return ec.fieldContext_Config_environmentName(ctx, field) - case "id": - return ec.fieldContext_Config_id(ctx, field) - case "immutable": - return ec.fieldContext_Config_immutable(ctx, field) - case "kind": - return ec.fieldContext_Config_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_Config_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_Config_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_Config_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_Config_recordVersion(ctx, field) - case "syncStatus": - return ec.fieldContext_Config_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_Config_updateTime(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Config", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } defer func() { @@ -29762,15 +29051,15 @@ func (ec *executionContext) fieldContext_Mutation_core_updateConfig(ctx context. } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_updateConfig_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_deleteExternalApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_deleteConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_deleteConfig(ctx, field) +func (ec *executionContext) _Mutation_core_interceptExternalApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_interceptExternalApp(ctx, field) if err != nil { return graphql.Null } @@ -29784,7 +29073,7 @@ func (ec *executionContext) _Mutation_core_deleteConfig(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.Mutation().CoreDeleteConfig(rctx, fc.Args["envName"].(string), fc.Args["configName"].(string)) + return ec.resolvers.Mutation().CoreInterceptExternalApp(rctx, fc.Args["envName"].(string), fc.Args["externalAppName"].(string), fc.Args["deviceName"].(string), fc.Args["intercept"].(bool), fc.Args["portMappings"].([]*v1.AppInterceptPortMappings)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -29826,7 +29115,7 @@ func (ec *executionContext) _Mutation_core_deleteConfig(ctx context.Context, fie return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_deleteConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_interceptExternalApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -29843,15 +29132,15 @@ func (ec *executionContext) fieldContext_Mutation_core_deleteConfig(ctx context. } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_deleteConfig_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_interceptExternalApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_createSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_createSecret(ctx, field) +func (ec *executionContext) _Mutation_core_createConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_createConfig(ctx, field) if err != nil { return graphql.Null } @@ -29865,7 +29154,7 @@ func (ec *executionContext) _Mutation_core_createSecret(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.Mutation().CoreCreateSecret(rctx, fc.Args["envName"].(string), fc.Args["secret"].(entities.Secret)) + return ec.resolvers.Mutation().CoreCreateConfig(rctx, fc.Args["envName"].(string), fc.Args["config"].(entities.Config)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -29887,10 +29176,10 @@ func (ec *executionContext) _Mutation_core_createSecret(ctx context.Context, fie 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) @@ -29899,12 +29188,12 @@ func (ec *executionContext) _Mutation_core_createSecret(ctx context.Context, fie 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_Mutation_core_createSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_createConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -29913,47 +29202,41 @@ func (ec *executionContext) fieldContext_Mutation_core_createSecret(ctx context. 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() { @@ -29963,15 +29246,15 @@ func (ec *executionContext) fieldContext_Mutation_core_createSecret(ctx context. } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_createSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_createConfig_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_updateSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_updateSecret(ctx, field) +func (ec *executionContext) _Mutation_core_updateConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_updateConfig(ctx, field) if err != nil { return graphql.Null } @@ -29985,7 +29268,7 @@ func (ec *executionContext) _Mutation_core_updateSecret(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.Mutation().CoreUpdateSecret(rctx, fc.Args["envName"].(string), fc.Args["secret"].(entities.Secret)) + return ec.resolvers.Mutation().CoreUpdateConfig(rctx, fc.Args["envName"].(string), fc.Args["config"].(entities.Config)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -30007,10 +29290,10 @@ func (ec *executionContext) _Mutation_core_updateSecret(ctx context.Context, fie 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) @@ -30019,12 +29302,12 @@ func (ec *executionContext) _Mutation_core_updateSecret(ctx context.Context, fie 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_Mutation_core_updateSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_updateConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -30033,47 +29316,41 @@ func (ec *executionContext) fieldContext_Mutation_core_updateSecret(ctx context. 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() { @@ -30083,15 +29360,15 @@ func (ec *executionContext) fieldContext_Mutation_core_updateSecret(ctx context. } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_updateSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_updateConfig_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_deleteSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_deleteSecret(ctx, field) +func (ec *executionContext) _Mutation_core_deleteConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_deleteConfig(ctx, field) if err != nil { return graphql.Null } @@ -30105,7 +29382,7 @@ func (ec *executionContext) _Mutation_core_deleteSecret(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.Mutation().CoreDeleteSecret(rctx, fc.Args["envName"].(string), fc.Args["secretName"].(string)) + return ec.resolvers.Mutation().CoreDeleteConfig(rctx, fc.Args["envName"].(string), fc.Args["configName"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -30147,7 +29424,7 @@ func (ec *executionContext) _Mutation_core_deleteSecret(ctx context.Context, fie return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_deleteSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_deleteConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -30164,15 +29441,15 @@ func (ec *executionContext) fieldContext_Mutation_core_deleteSecret(ctx context. } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_deleteSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_deleteConfig_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_createRouter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_createRouter(ctx, field) +func (ec *executionContext) _Mutation_core_createSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_createSecret(ctx, field) if err != nil { return graphql.Null } @@ -30186,7 +29463,7 @@ func (ec *executionContext) _Mutation_core_createRouter(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.Mutation().CoreCreateRouter(rctx, fc.Args["envName"].(string), fc.Args["router"].(entities.Router)) + return ec.resolvers.Mutation().CoreCreateSecret(rctx, fc.Args["envName"].(string), fc.Args["secret"].(entities.Secret)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -30208,10 +29485,10 @@ func (ec *executionContext) _Mutation_core_createRouter(ctx context.Context, fie if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.Router); ok { + if data, ok := tmp.(*entities.Secret); 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/entities.Secret`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -30220,12 +29497,12 @@ func (ec *executionContext) _Mutation_core_createRouter(ctx context.Context, fie if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.Router) + res := resTmp.(*entities.Secret) fc.Result = res - return ec.marshalORouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, field.Selections, res) + return ec.marshalOSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_createRouter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_createSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -30234,41 +29511,47 @@ func (ec *executionContext) fieldContext_Mutation_core_createRouter(ctx context. Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_Router_accountName(ctx, field) + return ec.fieldContext_Secret_accountName(ctx, field) case "apiVersion": - return ec.fieldContext_Router_apiVersion(ctx, field) + return ec.fieldContext_Secret_apiVersion(ctx, field) case "createdBy": - return ec.fieldContext_Router_createdBy(ctx, field) + return ec.fieldContext_Secret_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_Router_creationTime(ctx, field) + return ec.fieldContext_Secret_creationTime(ctx, field) + case "data": + return ec.fieldContext_Secret_data(ctx, field) case "displayName": - return ec.fieldContext_Router_displayName(ctx, field) - case "enabled": - return ec.fieldContext_Router_enabled(ctx, field) + return ec.fieldContext_Secret_displayName(ctx, field) case "environmentName": - return ec.fieldContext_Router_environmentName(ctx, field) + return ec.fieldContext_Secret_environmentName(ctx, field) + case "for": + return ec.fieldContext_Secret_for(ctx, field) case "id": - return ec.fieldContext_Router_id(ctx, field) + 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_Router_kind(ctx, field) + return ec.fieldContext_Secret_kind(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_Router_lastUpdatedBy(ctx, field) + return ec.fieldContext_Secret_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_Router_markedForDeletion(ctx, field) + return ec.fieldContext_Secret_markedForDeletion(ctx, field) case "metadata": - return ec.fieldContext_Router_metadata(ctx, field) + return ec.fieldContext_Secret_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) + return ec.fieldContext_Secret_recordVersion(ctx, field) + case "stringData": + return ec.fieldContext_Secret_stringData(ctx, field) case "syncStatus": - return ec.fieldContext_Router_syncStatus(ctx, field) + return ec.fieldContext_Secret_syncStatus(ctx, field) + case "type": + return ec.fieldContext_Secret_type(ctx, field) case "updateTime": - return ec.fieldContext_Router_updateTime(ctx, field) + return ec.fieldContext_Secret_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 Secret", field.Name) }, } defer func() { @@ -30278,15 +29561,15 @@ func (ec *executionContext) fieldContext_Mutation_core_createRouter(ctx context. } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_createRouter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_createSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_updateRouter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_updateRouter(ctx, field) +func (ec *executionContext) _Mutation_core_updateSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_updateSecret(ctx, field) if err != nil { return graphql.Null } @@ -30300,7 +29583,7 @@ func (ec *executionContext) _Mutation_core_updateRouter(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.Mutation().CoreUpdateRouter(rctx, fc.Args["envName"].(string), fc.Args["router"].(entities.Router)) + return ec.resolvers.Mutation().CoreUpdateSecret(rctx, fc.Args["envName"].(string), fc.Args["secret"].(entities.Secret)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -30322,10 +29605,10 @@ func (ec *executionContext) _Mutation_core_updateRouter(ctx context.Context, fie if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.Router); ok { + if data, ok := tmp.(*entities.Secret); 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/entities.Secret`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -30334,12 +29617,12 @@ func (ec *executionContext) _Mutation_core_updateRouter(ctx context.Context, fie if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.Router) + res := resTmp.(*entities.Secret) fc.Result = res - return ec.marshalORouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, field.Selections, res) + return ec.marshalOSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_updateRouter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_updateSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -30348,41 +29631,47 @@ func (ec *executionContext) fieldContext_Mutation_core_updateRouter(ctx context. Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_Router_accountName(ctx, field) + return ec.fieldContext_Secret_accountName(ctx, field) case "apiVersion": - return ec.fieldContext_Router_apiVersion(ctx, field) + return ec.fieldContext_Secret_apiVersion(ctx, field) case "createdBy": - return ec.fieldContext_Router_createdBy(ctx, field) + return ec.fieldContext_Secret_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_Router_creationTime(ctx, field) + return ec.fieldContext_Secret_creationTime(ctx, field) + case "data": + return ec.fieldContext_Secret_data(ctx, field) case "displayName": - return ec.fieldContext_Router_displayName(ctx, field) - case "enabled": - return ec.fieldContext_Router_enabled(ctx, field) + return ec.fieldContext_Secret_displayName(ctx, field) case "environmentName": - return ec.fieldContext_Router_environmentName(ctx, field) + return ec.fieldContext_Secret_environmentName(ctx, field) + case "for": + return ec.fieldContext_Secret_for(ctx, field) case "id": - return ec.fieldContext_Router_id(ctx, field) + 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_Router_kind(ctx, field) + return ec.fieldContext_Secret_kind(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_Router_lastUpdatedBy(ctx, field) + return ec.fieldContext_Secret_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_Router_markedForDeletion(ctx, field) + return ec.fieldContext_Secret_markedForDeletion(ctx, field) case "metadata": - return ec.fieldContext_Router_metadata(ctx, field) + return ec.fieldContext_Secret_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) + return ec.fieldContext_Secret_recordVersion(ctx, field) + case "stringData": + return ec.fieldContext_Secret_stringData(ctx, field) case "syncStatus": - return ec.fieldContext_Router_syncStatus(ctx, field) + return ec.fieldContext_Secret_syncStatus(ctx, field) + case "type": + return ec.fieldContext_Secret_type(ctx, field) case "updateTime": - return ec.fieldContext_Router_updateTime(ctx, field) + return ec.fieldContext_Secret_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 Secret", field.Name) }, } defer func() { @@ -30392,15 +29681,15 @@ func (ec *executionContext) fieldContext_Mutation_core_updateRouter(ctx context. } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_updateRouter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_updateSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_deleteRouter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_deleteRouter(ctx, field) +func (ec *executionContext) _Mutation_core_deleteSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_deleteSecret(ctx, field) if err != nil { return graphql.Null } @@ -30414,7 +29703,7 @@ func (ec *executionContext) _Mutation_core_deleteRouter(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.Mutation().CoreDeleteRouter(rctx, fc.Args["envName"].(string), fc.Args["routerName"].(string)) + return ec.resolvers.Mutation().CoreDeleteSecret(rctx, fc.Args["envName"].(string), fc.Args["secretName"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -30456,7 +29745,7 @@ func (ec *executionContext) _Mutation_core_deleteRouter(ctx context.Context, fie return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_deleteRouter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_deleteSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -30473,15 +29762,15 @@ func (ec *executionContext) fieldContext_Mutation_core_deleteRouter(ctx context. } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_deleteRouter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_deleteSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_createManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_createManagedResource(ctx, field) +func (ec *executionContext) _Mutation_core_createRouter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_createRouter(ctx, field) if err != nil { return graphql.Null } @@ -30495,7 +29784,7 @@ func (ec *executionContext) _Mutation_core_createManagedResource(ctx context.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.Mutation().CoreCreateManagedResource(rctx, fc.Args["msvcName"].(string), fc.Args["mres"].(entities.ManagedResource)) + return ec.resolvers.Mutation().CoreCreateRouter(rctx, fc.Args["envName"].(string), fc.Args["router"].(entities.Router)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -30517,10 +29806,10 @@ func (ec *executionContext) _Mutation_core_createManagedResource(ctx context.Con if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.ManagedResource); ok { + 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.ManagedResource`, tmp) + 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) @@ -30529,12 +29818,12 @@ func (ec *executionContext) _Mutation_core_createManagedResource(ctx context.Con if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.ManagedResource) + res := resTmp.(*entities.Router) fc.Result = res - return ec.marshalOManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, field.Selections, res) + return ec.marshalORouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_createManagedResource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_createRouter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -30543,51 +29832,41 @@ func (ec *executionContext) fieldContext_Mutation_core_createManagedResource(ctx Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_ManagedResource_accountName(ctx, field) + return ec.fieldContext_Router_accountName(ctx, field) case "apiVersion": - return ec.fieldContext_ManagedResource_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_ManagedResource_clusterName(ctx, field) + return ec.fieldContext_Router_apiVersion(ctx, field) case "createdBy": - return ec.fieldContext_ManagedResource_createdBy(ctx, field) + return ec.fieldContext_Router_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_ManagedResource_creationTime(ctx, field) + return ec.fieldContext_Router_creationTime(ctx, field) case "displayName": - return ec.fieldContext_ManagedResource_displayName(ctx, field) + return ec.fieldContext_Router_displayName(ctx, field) case "enabled": - return ec.fieldContext_ManagedResource_enabled(ctx, field) + return ec.fieldContext_Router_enabled(ctx, field) case "environmentName": - return ec.fieldContext_ManagedResource_environmentName(ctx, field) + return ec.fieldContext_Router_environmentName(ctx, field) case "id": - return ec.fieldContext_ManagedResource_id(ctx, field) - case "isImported": - return ec.fieldContext_ManagedResource_isImported(ctx, field) + return ec.fieldContext_Router_id(ctx, field) case "kind": - return ec.fieldContext_ManagedResource_kind(ctx, field) + return ec.fieldContext_Router_kind(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_ManagedResource_lastUpdatedBy(ctx, field) - case "managedServiceName": - return ec.fieldContext_ManagedResource_managedServiceName(ctx, field) + return ec.fieldContext_Router_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_ManagedResource_markedForDeletion(ctx, field) + return ec.fieldContext_Router_markedForDeletion(ctx, field) case "metadata": - return ec.fieldContext_ManagedResource_metadata(ctx, field) - case "mresRef": - return ec.fieldContext_ManagedResource_mresRef(ctx, field) + return ec.fieldContext_Router_metadata(ctx, field) case "recordVersion": - return ec.fieldContext_ManagedResource_recordVersion(ctx, field) + return ec.fieldContext_Router_recordVersion(ctx, field) case "spec": - return ec.fieldContext_ManagedResource_spec(ctx, field) + return ec.fieldContext_Router_spec(ctx, field) case "status": - return ec.fieldContext_ManagedResource_status(ctx, field) - case "syncedOutputSecretRef": - return ec.fieldContext_ManagedResource_syncedOutputSecretRef(ctx, field) + return ec.fieldContext_Router_status(ctx, field) case "syncStatus": - return ec.fieldContext_ManagedResource_syncStatus(ctx, field) + return ec.fieldContext_Router_syncStatus(ctx, field) case "updateTime": - return ec.fieldContext_ManagedResource_updateTime(ctx, field) + return ec.fieldContext_Router_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ManagedResource", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Router", field.Name) }, } defer func() { @@ -30597,15 +29876,15 @@ func (ec *executionContext) fieldContext_Mutation_core_createManagedResource(ctx } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_createManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_createRouter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_updateManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_updateManagedResource(ctx, field) +func (ec *executionContext) _Mutation_core_updateRouter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_updateRouter(ctx, field) if err != nil { return graphql.Null } @@ -30619,7 +29898,7 @@ func (ec *executionContext) _Mutation_core_updateManagedResource(ctx context.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.Mutation().CoreUpdateManagedResource(rctx, fc.Args["msvcName"].(string), fc.Args["mres"].(entities.ManagedResource)) + return ec.resolvers.Mutation().CoreUpdateRouter(rctx, fc.Args["envName"].(string), fc.Args["router"].(entities.Router)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -30641,10 +29920,10 @@ func (ec *executionContext) _Mutation_core_updateManagedResource(ctx context.Con if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.ManagedResource); ok { + 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.ManagedResource`, tmp) + 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) @@ -30653,12 +29932,12 @@ func (ec *executionContext) _Mutation_core_updateManagedResource(ctx context.Con if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.ManagedResource) + res := resTmp.(*entities.Router) fc.Result = res - return ec.marshalOManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, field.Selections, res) + return ec.marshalORouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_updateManagedResource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_updateRouter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -30667,51 +29946,41 @@ func (ec *executionContext) fieldContext_Mutation_core_updateManagedResource(ctx Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_ManagedResource_accountName(ctx, field) + return ec.fieldContext_Router_accountName(ctx, field) case "apiVersion": - return ec.fieldContext_ManagedResource_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_ManagedResource_clusterName(ctx, field) + return ec.fieldContext_Router_apiVersion(ctx, field) case "createdBy": - return ec.fieldContext_ManagedResource_createdBy(ctx, field) + return ec.fieldContext_Router_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_ManagedResource_creationTime(ctx, field) + return ec.fieldContext_Router_creationTime(ctx, field) case "displayName": - return ec.fieldContext_ManagedResource_displayName(ctx, field) + return ec.fieldContext_Router_displayName(ctx, field) case "enabled": - return ec.fieldContext_ManagedResource_enabled(ctx, field) + return ec.fieldContext_Router_enabled(ctx, field) case "environmentName": - return ec.fieldContext_ManagedResource_environmentName(ctx, field) + return ec.fieldContext_Router_environmentName(ctx, field) case "id": - return ec.fieldContext_ManagedResource_id(ctx, field) - case "isImported": - return ec.fieldContext_ManagedResource_isImported(ctx, field) + return ec.fieldContext_Router_id(ctx, field) case "kind": - return ec.fieldContext_ManagedResource_kind(ctx, field) + return ec.fieldContext_Router_kind(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_ManagedResource_lastUpdatedBy(ctx, field) - case "managedServiceName": - return ec.fieldContext_ManagedResource_managedServiceName(ctx, field) + return ec.fieldContext_Router_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_ManagedResource_markedForDeletion(ctx, field) + return ec.fieldContext_Router_markedForDeletion(ctx, field) case "metadata": - return ec.fieldContext_ManagedResource_metadata(ctx, field) - case "mresRef": - return ec.fieldContext_ManagedResource_mresRef(ctx, field) + return ec.fieldContext_Router_metadata(ctx, field) case "recordVersion": - return ec.fieldContext_ManagedResource_recordVersion(ctx, field) + return ec.fieldContext_Router_recordVersion(ctx, field) case "spec": - return ec.fieldContext_ManagedResource_spec(ctx, field) + return ec.fieldContext_Router_spec(ctx, field) case "status": - return ec.fieldContext_ManagedResource_status(ctx, field) - case "syncedOutputSecretRef": - return ec.fieldContext_ManagedResource_syncedOutputSecretRef(ctx, field) + return ec.fieldContext_Router_status(ctx, field) case "syncStatus": - return ec.fieldContext_ManagedResource_syncStatus(ctx, field) + return ec.fieldContext_Router_syncStatus(ctx, field) case "updateTime": - return ec.fieldContext_ManagedResource_updateTime(ctx, field) + return ec.fieldContext_Router_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ManagedResource", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Router", field.Name) }, } defer func() { @@ -30721,15 +29990,15 @@ func (ec *executionContext) fieldContext_Mutation_core_updateManagedResource(ctx } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_updateManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_updateRouter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_deleteManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_deleteManagedResource(ctx, field) +func (ec *executionContext) _Mutation_core_deleteRouter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_deleteRouter(ctx, field) if err != nil { return graphql.Null } @@ -30743,7 +30012,7 @@ func (ec *executionContext) _Mutation_core_deleteManagedResource(ctx context.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.Mutation().CoreDeleteManagedResource(rctx, fc.Args["msvcName"].(string), fc.Args["mresName"].(string)) + return ec.resolvers.Mutation().CoreDeleteRouter(rctx, fc.Args["envName"].(string), fc.Args["routerName"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -30785,7 +30054,7 @@ func (ec *executionContext) _Mutation_core_deleteManagedResource(ctx context.Con return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_deleteManagedResource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_deleteRouter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -30802,15 +30071,15 @@ func (ec *executionContext) fieldContext_Mutation_core_deleteManagedResource(ctx } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_deleteManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_deleteRouter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_importManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_importManagedResource(ctx, field) +func (ec *executionContext) _Mutation_infra_createClusterManagedService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_infra_createClusterManagedService(ctx, field) if err != nil { return graphql.Null } @@ -30824,7 +30093,7 @@ func (ec *executionContext) _Mutation_core_importManagedResource(ctx context.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.Mutation().CoreImportManagedResource(rctx, fc.Args["envName"].(string), fc.Args["msvcName"].(string), fc.Args["mresName"].(string), fc.Args["importName"].(string)) + return ec.resolvers.Mutation().InfraCreateClusterManagedService(rctx, fc.Args["service"].(entities.ClusterManagedService)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -30846,10 +30115,10 @@ func (ec *executionContext) _Mutation_core_importManagedResource(ctx context.Con if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.ImportedManagedResource); ok { + if data, ok := tmp.(*entities.ClusterManagedService); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.ImportedManagedResource`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.ClusterManagedService`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -30858,12 +30127,12 @@ func (ec *executionContext) _Mutation_core_importManagedResource(ctx context.Con if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.ImportedManagedResource) + res := resTmp.(*entities.ClusterManagedService) fc.Result = res - return ec.marshalOImportedManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImportedManagedResource(ctx, field.Selections, res) + return ec.marshalOClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_importManagedResource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_infra_createClusterManagedService(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -30872,37 +30141,41 @@ func (ec *executionContext) fieldContext_Mutation_core_importManagedResource(ctx Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_ImportedManagedResource_accountName(ctx, field) + return ec.fieldContext_ClusterManagedService_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) + case "clusterName": + return ec.fieldContext_ClusterManagedService_clusterName(ctx, field) case "createdBy": - return ec.fieldContext_ImportedManagedResource_createdBy(ctx, field) + return ec.fieldContext_ClusterManagedService_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_ImportedManagedResource_creationTime(ctx, field) + return ec.fieldContext_ClusterManagedService_creationTime(ctx, field) case "displayName": - return ec.fieldContext_ImportedManagedResource_displayName(ctx, field) - case "environmentName": - return ec.fieldContext_ImportedManagedResource_environmentName(ctx, field) + return ec.fieldContext_ClusterManagedService_displayName(ctx, field) case "id": - return ec.fieldContext_ImportedManagedResource_id(ctx, field) + return ec.fieldContext_ClusterManagedService_id(ctx, field) + case "isArchived": + return ec.fieldContext_ClusterManagedService_isArchived(ctx, field) + case "kind": + return ec.fieldContext_ClusterManagedService_kind(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_ImportedManagedResource_lastUpdatedBy(ctx, field) - case "managedResourceRef": - return ec.fieldContext_ImportedManagedResource_managedResourceRef(ctx, field) + return ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_ImportedManagedResource_markedForDeletion(ctx, field) - case "name": - return ec.fieldContext_ImportedManagedResource_name(ctx, field) + return ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_ClusterManagedService_metadata(ctx, field) case "recordVersion": - return ec.fieldContext_ImportedManagedResource_recordVersion(ctx, field) - case "secretRef": - return ec.fieldContext_ImportedManagedResource_secretRef(ctx, field) + return ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_ClusterManagedService_spec(ctx, field) + case "status": + return ec.fieldContext_ClusterManagedService_status(ctx, field) case "syncStatus": - return ec.fieldContext_ImportedManagedResource_syncStatus(ctx, field) + return ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) case "updateTime": - return ec.fieldContext_ImportedManagedResource_updateTime(ctx, field) - case "managedResource": - return ec.fieldContext_ImportedManagedResource_managedResource(ctx, field) + return ec.fieldContext_ClusterManagedService_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ImportedManagedResource", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ClusterManagedService", field.Name) }, } defer func() { @@ -30912,15 +30185,15 @@ func (ec *executionContext) fieldContext_Mutation_core_importManagedResource(ctx } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_importManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_infra_createClusterManagedService_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_deleteImportedManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_deleteImportedManagedResource(ctx, field) +func (ec *executionContext) _Mutation_infra_updateClusterManagedService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_infra_updateClusterManagedService(ctx, field) if err != nil { return graphql.Null } @@ -30934,7 +30207,7 @@ func (ec *executionContext) _Mutation_core_deleteImportedManagedResource(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.Mutation().CoreDeleteImportedManagedResource(rctx, fc.Args["envName"].(string), fc.Args["importName"].(string)) + return ec.resolvers.Mutation().InfraUpdateClusterManagedService(rctx, fc.Args["service"].(entities.ClusterManagedService)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -30956,34 +30229,67 @@ func (ec *executionContext) _Mutation_core_deleteImportedManagedResource(ctx con if tmp == nil { return nil, nil } - if data, ok := tmp.(bool); ok { + if data, ok := tmp.(*entities.ClusterManagedService); 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.ClusterManagedService`, 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.ClusterManagedService) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_deleteImportedManagedResource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_infra_updateClusterManagedService(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") + switch field.Name { + case "accountName": + return ec.fieldContext_ClusterManagedService_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) + case "clusterName": + return ec.fieldContext_ClusterManagedService_clusterName(ctx, field) + case "createdBy": + return ec.fieldContext_ClusterManagedService_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_ClusterManagedService_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_ClusterManagedService_displayName(ctx, field) + case "id": + return ec.fieldContext_ClusterManagedService_id(ctx, field) + case "isArchived": + return ec.fieldContext_ClusterManagedService_isArchived(ctx, field) + case "kind": + return ec.fieldContext_ClusterManagedService_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_ClusterManagedService_metadata(ctx, field) + case "recordVersion": + return ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_ClusterManagedService_spec(ctx, field) + case "status": + return ec.fieldContext_ClusterManagedService_status(ctx, field) + case "syncStatus": + return ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_ClusterManagedService_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ClusterManagedService", field.Name) }, } defer func() { @@ -30993,15 +30299,15 @@ func (ec *executionContext) fieldContext_Mutation_core_deleteImportedManagedReso } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_deleteImportedManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_infra_updateClusterManagedService_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_createVPNDevice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_createVPNDevice(ctx, field) +func (ec *executionContext) _Mutation_infra_deleteClusterManagedService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_infra_deleteClusterManagedService(ctx, field) if err != nil { return graphql.Null } @@ -31015,7 +30321,7 @@ func (ec *executionContext) _Mutation_core_createVPNDevice(ctx context.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.Mutation().CoreCreateVPNDevice(rctx, fc.Args["vpnDevice"].(entities.ConsoleVPNDevice)) + return ec.resolvers.Mutation().InfraDeleteClusterManagedService(rctx, fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -31037,71 +30343,34 @@ func (ec *executionContext) _Mutation_core_createVPNDevice(ctx context.Context, if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.ConsoleVPNDevice); 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/entities.ConsoleVPNDevice`, 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.(*entities.ConsoleVPNDevice) + res := resTmp.(bool) fc.Result = res - return ec.marshalOConsoleVPNDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDevice(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_createVPNDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_infra_deleteClusterManagedService(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) { - switch field.Name { - case "accountName": - return ec.fieldContext_ConsoleVPNDevice_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_ConsoleVPNDevice_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_ConsoleVPNDevice_clusterName(ctx, field) - case "createdBy": - return ec.fieldContext_ConsoleVPNDevice_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_ConsoleVPNDevice_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_ConsoleVPNDevice_displayName(ctx, field) - case "environmentName": - return ec.fieldContext_ConsoleVPNDevice_environmentName(ctx, field) - case "id": - return ec.fieldContext_ConsoleVPNDevice_id(ctx, field) - case "kind": - return ec.fieldContext_ConsoleVPNDevice_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_ConsoleVPNDevice_lastUpdatedBy(ctx, field) - case "linkedClusters": - return ec.fieldContext_ConsoleVPNDevice_linkedClusters(ctx, field) - case "markedForDeletion": - return ec.fieldContext_ConsoleVPNDevice_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_ConsoleVPNDevice_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_ConsoleVPNDevice_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_ConsoleVPNDevice_spec(ctx, field) - case "status": - return ec.fieldContext_ConsoleVPNDevice_status(ctx, field) - case "syncStatus": - return ec.fieldContext_ConsoleVPNDevice_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_ConsoleVPNDevice_updateTime(ctx, field) - case "wireguardConfig": - return ec.fieldContext_ConsoleVPNDevice_wireguardConfig(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ConsoleVPNDevice", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } defer func() { @@ -31111,15 +30380,15 @@ func (ec *executionContext) fieldContext_Mutation_core_createVPNDevice(ctx conte } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_createVPNDevice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_infra_deleteClusterManagedService_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_updateVPNDevice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_updateVPNDevice(ctx, field) +func (ec *executionContext) _Mutation_infra_cloneClusterManagedService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_infra_cloneClusterManagedService(ctx, field) if err != nil { return graphql.Null } @@ -31133,7 +30402,7 @@ func (ec *executionContext) _Mutation_core_updateVPNDevice(ctx context.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.Mutation().CoreUpdateVPNDevice(rctx, fc.Args["vpnDevice"].(entities.ConsoleVPNDevice)) + return ec.resolvers.Mutation().InfraCloneClusterManagedService(rctx, fc.Args["clusterName"].(string), fc.Args["sourceMsvcName"].(string), fc.Args["destinationMsvcName"].(string), fc.Args["displayName"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -31155,10 +30424,10 @@ func (ec *executionContext) _Mutation_core_updateVPNDevice(ctx context.Context, if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.ConsoleVPNDevice); ok { + if data, ok := tmp.(*entities.ClusterManagedService); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.ConsoleVPNDevice`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.ClusterManagedService`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -31167,12 +30436,12 @@ func (ec *executionContext) _Mutation_core_updateVPNDevice(ctx context.Context, if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.ConsoleVPNDevice) + res := resTmp.(*entities.ClusterManagedService) fc.Result = res - return ec.marshalOConsoleVPNDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDevice(ctx, field.Selections, res) + return ec.marshalOClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_updateVPNDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_infra_cloneClusterManagedService(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -31181,45 +30450,41 @@ func (ec *executionContext) fieldContext_Mutation_core_updateVPNDevice(ctx conte Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_ConsoleVPNDevice_accountName(ctx, field) + return ec.fieldContext_ClusterManagedService_accountName(ctx, field) case "apiVersion": - return ec.fieldContext_ConsoleVPNDevice_apiVersion(ctx, field) + return ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) case "clusterName": - return ec.fieldContext_ConsoleVPNDevice_clusterName(ctx, field) + return ec.fieldContext_ClusterManagedService_clusterName(ctx, field) case "createdBy": - return ec.fieldContext_ConsoleVPNDevice_createdBy(ctx, field) + return ec.fieldContext_ClusterManagedService_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_ConsoleVPNDevice_creationTime(ctx, field) + return ec.fieldContext_ClusterManagedService_creationTime(ctx, field) case "displayName": - return ec.fieldContext_ConsoleVPNDevice_displayName(ctx, field) - case "environmentName": - return ec.fieldContext_ConsoleVPNDevice_environmentName(ctx, field) + return ec.fieldContext_ClusterManagedService_displayName(ctx, field) case "id": - return ec.fieldContext_ConsoleVPNDevice_id(ctx, field) + return ec.fieldContext_ClusterManagedService_id(ctx, field) + case "isArchived": + return ec.fieldContext_ClusterManagedService_isArchived(ctx, field) case "kind": - return ec.fieldContext_ConsoleVPNDevice_kind(ctx, field) + return ec.fieldContext_ClusterManagedService_kind(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_ConsoleVPNDevice_lastUpdatedBy(ctx, field) - case "linkedClusters": - return ec.fieldContext_ConsoleVPNDevice_linkedClusters(ctx, field) + return ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_ConsoleVPNDevice_markedForDeletion(ctx, field) + return ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) case "metadata": - return ec.fieldContext_ConsoleVPNDevice_metadata(ctx, field) + return ec.fieldContext_ClusterManagedService_metadata(ctx, field) case "recordVersion": - return ec.fieldContext_ConsoleVPNDevice_recordVersion(ctx, field) + return ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) case "spec": - return ec.fieldContext_ConsoleVPNDevice_spec(ctx, field) + return ec.fieldContext_ClusterManagedService_spec(ctx, field) case "status": - return ec.fieldContext_ConsoleVPNDevice_status(ctx, field) + return ec.fieldContext_ClusterManagedService_status(ctx, field) case "syncStatus": - return ec.fieldContext_ConsoleVPNDevice_syncStatus(ctx, field) + return ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) case "updateTime": - return ec.fieldContext_ConsoleVPNDevice_updateTime(ctx, field) - case "wireguardConfig": - return ec.fieldContext_ConsoleVPNDevice_wireguardConfig(ctx, field) + return ec.fieldContext_ClusterManagedService_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ConsoleVPNDevice", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ClusterManagedService", field.Name) }, } defer func() { @@ -31229,15 +30494,15 @@ func (ec *executionContext) fieldContext_Mutation_core_updateVPNDevice(ctx conte } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_updateVPNDevice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_infra_cloneClusterManagedService_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_updateVPNDevicePorts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_updateVPNDevicePorts(ctx, field) +func (ec *executionContext) _Mutation_core_createManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_createManagedResource(ctx, field) if err != nil { return graphql.Null } @@ -31251,7 +30516,7 @@ func (ec *executionContext) _Mutation_core_updateVPNDevicePorts(ctx context.Cont 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().CoreUpdateVPNDevicePorts(rctx, fc.Args["deviceName"].(string), fc.Args["ports"].([]*v11.Port)) + return ec.resolvers.Mutation().CoreCreateManagedResource(rctx, fc.Args["msvcName"].(string), fc.Args["mres"].(entities.ManagedResource)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -31273,34 +30538,77 @@ func (ec *executionContext) _Mutation_core_updateVPNDevicePorts(ctx context.Cont if tmp == nil { return nil, nil } - if data, ok := tmp.(bool); ok { + if data, ok := tmp.(*entities.ManagedResource); 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.ManagedResource`, 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.ManagedResource) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_updateVPNDevicePorts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_createManagedResource(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") + switch field.Name { + case "accountName": + return ec.fieldContext_ManagedResource_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_ManagedResource_apiVersion(ctx, field) + case "clusterName": + return ec.fieldContext_ManagedResource_clusterName(ctx, field) + case "createdBy": + return ec.fieldContext_ManagedResource_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_ManagedResource_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_ManagedResource_displayName(ctx, field) + case "enabled": + return ec.fieldContext_ManagedResource_enabled(ctx, field) + case "environmentName": + return ec.fieldContext_ManagedResource_environmentName(ctx, field) + case "id": + return ec.fieldContext_ManagedResource_id(ctx, field) + case "isImported": + return ec.fieldContext_ManagedResource_isImported(ctx, field) + case "kind": + return ec.fieldContext_ManagedResource_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_ManagedResource_lastUpdatedBy(ctx, field) + case "managedServiceName": + return ec.fieldContext_ManagedResource_managedServiceName(ctx, field) + case "markedForDeletion": + return ec.fieldContext_ManagedResource_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_ManagedResource_metadata(ctx, field) + case "mresRef": + return ec.fieldContext_ManagedResource_mresRef(ctx, field) + case "recordVersion": + return ec.fieldContext_ManagedResource_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_ManagedResource_spec(ctx, field) + case "status": + return ec.fieldContext_ManagedResource_status(ctx, field) + case "syncedOutputSecretRef": + return ec.fieldContext_ManagedResource_syncedOutputSecretRef(ctx, field) + case "syncStatus": + return ec.fieldContext_ManagedResource_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_ManagedResource_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ManagedResource", field.Name) }, } defer func() { @@ -31310,15 +30618,15 @@ func (ec *executionContext) fieldContext_Mutation_core_updateVPNDevicePorts(ctx } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_updateVPNDevicePorts_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_createManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_updateVPNDeviceEnv(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_updateVPNDeviceEnv(ctx, field) +func (ec *executionContext) _Mutation_core_updateManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_updateManagedResource(ctx, field) if err != nil { return graphql.Null } @@ -31332,7 +30640,7 @@ func (ec *executionContext) _Mutation_core_updateVPNDeviceEnv(ctx context.Contex 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().CoreUpdateVPNDeviceEnv(rctx, fc.Args["deviceName"].(string), fc.Args["envName"].(string)) + return ec.resolvers.Mutation().CoreUpdateManagedResource(rctx, fc.Args["msvcName"].(string), fc.Args["mres"].(entities.ManagedResource)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -31354,34 +30662,77 @@ func (ec *executionContext) _Mutation_core_updateVPNDeviceEnv(ctx context.Contex if tmp == nil { return nil, nil } - if data, ok := tmp.(bool); ok { + if data, ok := tmp.(*entities.ManagedResource); 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.ManagedResource`, 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.ManagedResource) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_updateVPNDeviceEnv(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_updateManagedResource(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") + switch field.Name { + case "accountName": + return ec.fieldContext_ManagedResource_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_ManagedResource_apiVersion(ctx, field) + case "clusterName": + return ec.fieldContext_ManagedResource_clusterName(ctx, field) + case "createdBy": + return ec.fieldContext_ManagedResource_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_ManagedResource_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_ManagedResource_displayName(ctx, field) + case "enabled": + return ec.fieldContext_ManagedResource_enabled(ctx, field) + case "environmentName": + return ec.fieldContext_ManagedResource_environmentName(ctx, field) + case "id": + return ec.fieldContext_ManagedResource_id(ctx, field) + case "isImported": + return ec.fieldContext_ManagedResource_isImported(ctx, field) + case "kind": + return ec.fieldContext_ManagedResource_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_ManagedResource_lastUpdatedBy(ctx, field) + case "managedServiceName": + return ec.fieldContext_ManagedResource_managedServiceName(ctx, field) + case "markedForDeletion": + return ec.fieldContext_ManagedResource_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_ManagedResource_metadata(ctx, field) + case "mresRef": + return ec.fieldContext_ManagedResource_mresRef(ctx, field) + case "recordVersion": + return ec.fieldContext_ManagedResource_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_ManagedResource_spec(ctx, field) + case "status": + return ec.fieldContext_ManagedResource_status(ctx, field) + case "syncedOutputSecretRef": + return ec.fieldContext_ManagedResource_syncedOutputSecretRef(ctx, field) + case "syncStatus": + return ec.fieldContext_ManagedResource_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_ManagedResource_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ManagedResource", field.Name) }, } defer func() { @@ -31391,15 +30742,15 @@ func (ec *executionContext) fieldContext_Mutation_core_updateVPNDeviceEnv(ctx co } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_updateVPNDeviceEnv_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_updateManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_updateVpnDeviceNs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_updateVpnDeviceNs(ctx, field) +func (ec *executionContext) _Mutation_core_deleteManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_deleteManagedResource(ctx, field) if err != nil { return graphql.Null } @@ -31413,7 +30764,7 @@ func (ec *executionContext) _Mutation_core_updateVpnDeviceNs(ctx context.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.Mutation().CoreUpdateVpnDeviceNs(rctx, fc.Args["deviceName"].(string), fc.Args["ns"].(string)) + return ec.resolvers.Mutation().CoreDeleteManagedResource(rctx, fc.Args["msvcName"].(string), fc.Args["mresName"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -31455,7 +30806,7 @@ func (ec *executionContext) _Mutation_core_updateVpnDeviceNs(ctx context.Context return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_updateVpnDeviceNs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_deleteManagedResource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -31472,15 +30823,15 @@ func (ec *executionContext) fieldContext_Mutation_core_updateVpnDeviceNs(ctx con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_updateVpnDeviceNs_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_deleteManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_updateVpnClusterName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_updateVpnClusterName(ctx, field) +func (ec *executionContext) _Mutation_core_importManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_importManagedResource(ctx, field) if err != nil { return graphql.Null } @@ -31494,7 +30845,7 @@ func (ec *executionContext) _Mutation_core_updateVpnClusterName(ctx context.Cont 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().CoreUpdateVpnClusterName(rctx, fc.Args["deviceName"].(string), fc.Args["clusterName"].(string)) + return ec.resolvers.Mutation().CoreImportManagedResource(rctx, fc.Args["envName"].(string), fc.Args["msvcName"].(string), fc.Args["mresName"].(string), fc.Args["importName"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -31516,34 +30867,63 @@ func (ec *executionContext) _Mutation_core_updateVpnClusterName(ctx context.Cont if tmp == nil { return nil, nil } - if data, ok := tmp.(bool); ok { + if data, ok := tmp.(*entities.ImportedManagedResource); 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.ImportedManagedResource`, 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.ImportedManagedResource) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOImportedManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImportedManagedResource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_updateVpnClusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_importManagedResource(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") + switch field.Name { + case "accountName": + return ec.fieldContext_ImportedManagedResource_accountName(ctx, field) + case "createdBy": + return ec.fieldContext_ImportedManagedResource_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_ImportedManagedResource_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_ImportedManagedResource_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_ImportedManagedResource_environmentName(ctx, field) + case "id": + return ec.fieldContext_ImportedManagedResource_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_ImportedManagedResource_lastUpdatedBy(ctx, field) + case "managedResourceRef": + return ec.fieldContext_ImportedManagedResource_managedResourceRef(ctx, field) + case "markedForDeletion": + return ec.fieldContext_ImportedManagedResource_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_ImportedManagedResource_name(ctx, field) + case "recordVersion": + return ec.fieldContext_ImportedManagedResource_recordVersion(ctx, field) + case "secretRef": + return ec.fieldContext_ImportedManagedResource_secretRef(ctx, field) + case "syncStatus": + return ec.fieldContext_ImportedManagedResource_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_ImportedManagedResource_updateTime(ctx, field) + case "managedResource": + return ec.fieldContext_ImportedManagedResource_managedResource(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ImportedManagedResource", field.Name) }, } defer func() { @@ -31553,15 +30933,15 @@ func (ec *executionContext) fieldContext_Mutation_core_updateVpnClusterName(ctx } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_updateVpnClusterName_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_importManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_core_deleteVPNDevice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_core_deleteVPNDevice(ctx, field) +func (ec *executionContext) _Mutation_core_deleteImportedManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_deleteImportedManagedResource(ctx, field) if err != nil { return graphql.Null } @@ -31575,7 +30955,7 @@ func (ec *executionContext) _Mutation_core_deleteVPNDevice(ctx context.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.Mutation().CoreDeleteVPNDevice(rctx, fc.Args["deviceName"].(string)) + return ec.resolvers.Mutation().CoreDeleteImportedManagedResource(rctx, fc.Args["envName"].(string), fc.Args["importName"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -31617,7 +30997,7 @@ func (ec *executionContext) _Mutation_core_deleteVPNDevice(ctx context.Context, return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_core_deleteVPNDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_core_deleteImportedManagedResource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -31634,7 +31014,7 @@ func (ec *executionContext) fieldContext_Mutation_core_deleteVPNDevice(ctx conte } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_core_deleteVPNDevice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_core_deleteImportedManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } @@ -34320,113 +33700,27 @@ func (ec *executionContext) _Query_core_getManagedResouceOutputKeyValues(ctx con 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_core_listManagedResources(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_listManagedResources(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().CoreListManagedResources(rctx, fc.Args["search"].(*model.SearchManagedResources), fc.Args["pq"].(*repos.CursorPagination)) - } - 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.(*model.ManagedResourcePaginatedRecords); ok { + 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/app/graph/model.ManagedResourcePaginatedRecords`, tmp) + 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.(*model.ManagedResourcePaginatedRecords) + res := resTmp.([]*domain.ManagedResourceKeyValueRef) fc.Result = res - return ec.marshalOManagedResourcePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐManagedResourcePaginatedRecords(ctx, field.Selections, res) + return ec.marshalNManagedResourceKeyValueRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐManagedResourceKeyValueRefᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_listManagedResources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +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, @@ -34434,14 +33728,14 @@ func (ec *executionContext) fieldContext_Query_core_listManagedResources(ctx con IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_ManagedResourcePaginatedRecords_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ManagedResourcePaginatedRecords_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_ManagedResourcePaginatedRecords_totalCount(ctx, field) + 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 ManagedResourcePaginatedRecords", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ManagedResourceKeyValueRef", field.Name) }, } defer func() { @@ -34451,15 +33745,15 @@ func (ec *executionContext) fieldContext_Query_core_listManagedResources(ctx con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_listManagedResources_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + 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_core_getManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_getManagedResource(ctx, field) +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 } @@ -34473,7 +33767,7 @@ func (ec *executionContext) _Query_core_getManagedResource(ctx context.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().CoreGetManagedResource(rctx, fc.Args["msvcName"].(*string), fc.Args["envName"].(*string), fc.Args["name"].(string)) + 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 { @@ -34495,10 +33789,10 @@ func (ec *executionContext) _Query_core_getManagedResource(ctx context.Context, if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.ManagedResource); ok { + if data, ok := tmp.(*model.ClusterManagedServicePaginatedRecords); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.ManagedResource`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.ClusterManagedServicePaginatedRecords`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -34507,12 +33801,12 @@ func (ec *executionContext) _Query_core_getManagedResource(ctx context.Context, if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.ManagedResource) + res := resTmp.(*model.ClusterManagedServicePaginatedRecords) fc.Result = res - return ec.marshalOManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, field.Selections, res) + return ec.marshalOClusterManagedServicePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServicePaginatedRecords(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_getManagedResource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_infra_listClusterManagedServices(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -34520,52 +33814,14 @@ func (ec *executionContext) fieldContext_Query_core_getManagedResource(ctx conte IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "accountName": - return ec.fieldContext_ManagedResource_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_ManagedResource_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_ManagedResource_clusterName(ctx, field) - case "createdBy": - return ec.fieldContext_ManagedResource_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_ManagedResource_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_ManagedResource_displayName(ctx, field) - case "enabled": - return ec.fieldContext_ManagedResource_enabled(ctx, field) - case "environmentName": - return ec.fieldContext_ManagedResource_environmentName(ctx, field) - case "id": - return ec.fieldContext_ManagedResource_id(ctx, field) - case "isImported": - return ec.fieldContext_ManagedResource_isImported(ctx, field) - case "kind": - return ec.fieldContext_ManagedResource_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_ManagedResource_lastUpdatedBy(ctx, field) - case "managedServiceName": - return ec.fieldContext_ManagedResource_managedServiceName(ctx, field) - case "markedForDeletion": - return ec.fieldContext_ManagedResource_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_ManagedResource_metadata(ctx, field) - case "mresRef": - return ec.fieldContext_ManagedResource_mresRef(ctx, field) - case "recordVersion": - return ec.fieldContext_ManagedResource_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_ManagedResource_spec(ctx, field) - case "status": - return ec.fieldContext_ManagedResource_status(ctx, field) - case "syncedOutputSecretRef": - return ec.fieldContext_ManagedResource_syncedOutputSecretRef(ctx, field) - case "syncStatus": - return ec.fieldContext_ManagedResource_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_ManagedResource_updateTime(ctx, field) + case "edges": + return ec.fieldContext_ClusterManagedServicePaginatedRecords_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ClusterManagedServicePaginatedRecords_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_ClusterManagedServicePaginatedRecords_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ManagedResource", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ClusterManagedServicePaginatedRecords", field.Name) }, } defer func() { @@ -34575,15 +33831,15 @@ func (ec *executionContext) fieldContext_Query_core_getManagedResource(ctx conte } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_getManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_infra_listClusterManagedServices_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_resyncManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_resyncManagedResource(ctx, field) +func (ec *executionContext) _Query_infra_getClusterManagedService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_infra_getClusterManagedService(ctx, field) if err != nil { return graphql.Null } @@ -34597,7 +33853,7 @@ func (ec *executionContext) _Query_core_resyncManagedResource(ctx context.Contex 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().CoreResyncManagedResource(rctx, fc.Args["msvcName"].(string), fc.Args["name"].(string)) + return ec.resolvers.Query().InfraGetClusterManagedService(rctx, fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -34619,34 +33875,67 @@ func (ec *executionContext) _Query_core_resyncManagedResource(ctx context.Contex if tmp == nil { return nil, nil } - if data, ok := tmp.(bool); ok { + if data, ok := tmp.(*entities.ClusterManagedService); 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.ClusterManagedService`, 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.ClusterManagedService) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_resyncManagedResource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_infra_getClusterManagedService(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_ClusterManagedService_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) + case "clusterName": + return ec.fieldContext_ClusterManagedService_clusterName(ctx, field) + case "createdBy": + return ec.fieldContext_ClusterManagedService_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_ClusterManagedService_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_ClusterManagedService_displayName(ctx, field) + case "id": + return ec.fieldContext_ClusterManagedService_id(ctx, field) + case "isArchived": + return ec.fieldContext_ClusterManagedService_isArchived(ctx, field) + case "kind": + return ec.fieldContext_ClusterManagedService_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_ClusterManagedService_metadata(ctx, field) + case "recordVersion": + return ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_ClusterManagedService_spec(ctx, field) + case "status": + return ec.fieldContext_ClusterManagedService_status(ctx, field) + case "syncStatus": + return ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_ClusterManagedService_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ClusterManagedService", field.Name) }, } defer func() { @@ -34656,15 +33945,15 @@ func (ec *executionContext) fieldContext_Query_core_resyncManagedResource(ctx co } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_resyncManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_infra_getClusterManagedService_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_listImportedManagedResources(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_listImportedManagedResources(ctx, field) +func (ec *executionContext) _Query_core_listManagedResources(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_listManagedResources(ctx, field) if err != nil { return graphql.Null } @@ -34678,7 +33967,7 @@ func (ec *executionContext) _Query_core_listImportedManagedResources(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().CoreListImportedManagedResources(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchImportedManagedResources), fc.Args["pq"].(*repos.CursorPagination)) + return ec.resolvers.Query().CoreListManagedResources(rctx, fc.Args["search"].(*model.SearchManagedResources), fc.Args["pq"].(*repos.CursorPagination)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -34700,10 +33989,10 @@ func (ec *executionContext) _Query_core_listImportedManagedResources(ctx context if tmp == nil { return nil, nil } - if data, ok := tmp.(*model.ImportedManagedResourcePaginatedRecords); ok { + if data, ok := tmp.(*model.ManagedResourcePaginatedRecords); 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.ImportedManagedResourcePaginatedRecords`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.ManagedResourcePaginatedRecords`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -34712,12 +34001,12 @@ func (ec *executionContext) _Query_core_listImportedManagedResources(ctx context if resTmp == nil { return graphql.Null } - res := resTmp.(*model.ImportedManagedResourcePaginatedRecords) + res := resTmp.(*model.ManagedResourcePaginatedRecords) fc.Result = res - return ec.marshalOImportedManagedResourcePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImportedManagedResourcePaginatedRecords(ctx, field.Selections, res) + return ec.marshalOManagedResourcePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐManagedResourcePaginatedRecords(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_listImportedManagedResources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_listManagedResources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -34726,13 +34015,13 @@ func (ec *executionContext) fieldContext_Query_core_listImportedManagedResources Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "edges": - return ec.fieldContext_ImportedManagedResourcePaginatedRecords_edges(ctx, field) + return ec.fieldContext_ManagedResourcePaginatedRecords_edges(ctx, field) case "pageInfo": - return ec.fieldContext_ImportedManagedResourcePaginatedRecords_pageInfo(ctx, field) + return ec.fieldContext_ManagedResourcePaginatedRecords_pageInfo(ctx, field) case "totalCount": - return ec.fieldContext_ImportedManagedResourcePaginatedRecords_totalCount(ctx, field) + return ec.fieldContext_ManagedResourcePaginatedRecords_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ImportedManagedResourcePaginatedRecords", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ManagedResourcePaginatedRecords", field.Name) }, } defer func() { @@ -34742,15 +34031,15 @@ func (ec *executionContext) fieldContext_Query_core_listImportedManagedResources } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_listImportedManagedResources_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_listManagedResources_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_listVPNDevices(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_listVPNDevices(ctx, field) +func (ec *executionContext) _Query_core_getManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getManagedResource(ctx, field) if err != nil { return graphql.Null } @@ -34764,7 +34053,7 @@ func (ec *executionContext) _Query_core_listVPNDevices(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().CoreListVPNDevices(rctx, fc.Args["search"].(*model.CoreSearchVPNDevices), fc.Args["pq"].(*repos.CursorPagination)) + return ec.resolvers.Query().CoreGetManagedResource(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 { @@ -34786,10 +34075,10 @@ func (ec *executionContext) _Query_core_listVPNDevices(ctx context.Context, fiel if tmp == nil { return nil, nil } - if data, ok := tmp.(*model.ConsoleVPNDevicePaginatedRecords); ok { + if data, ok := tmp.(*entities.ManagedResource); 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.ConsoleVPNDevicePaginatedRecords`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.ManagedResource`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -34798,12 +34087,12 @@ func (ec *executionContext) _Query_core_listVPNDevices(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*model.ConsoleVPNDevicePaginatedRecords) + res := resTmp.(*entities.ManagedResource) fc.Result = res - return ec.marshalOConsoleVPNDevicePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConsoleVPNDevicePaginatedRecords(ctx, field.Selections, res) + return ec.marshalOManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_listVPNDevices(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_getManagedResource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -34811,14 +34100,52 @@ func (ec *executionContext) fieldContext_Query_core_listVPNDevices(ctx context.C IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_ConsoleVPNDevicePaginatedRecords_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ConsoleVPNDevicePaginatedRecords_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_ConsoleVPNDevicePaginatedRecords_totalCount(ctx, field) + case "accountName": + return ec.fieldContext_ManagedResource_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_ManagedResource_apiVersion(ctx, field) + case "clusterName": + return ec.fieldContext_ManagedResource_clusterName(ctx, field) + case "createdBy": + return ec.fieldContext_ManagedResource_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_ManagedResource_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_ManagedResource_displayName(ctx, field) + case "enabled": + return ec.fieldContext_ManagedResource_enabled(ctx, field) + case "environmentName": + return ec.fieldContext_ManagedResource_environmentName(ctx, field) + case "id": + return ec.fieldContext_ManagedResource_id(ctx, field) + case "isImported": + return ec.fieldContext_ManagedResource_isImported(ctx, field) + case "kind": + return ec.fieldContext_ManagedResource_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_ManagedResource_lastUpdatedBy(ctx, field) + case "managedServiceName": + return ec.fieldContext_ManagedResource_managedServiceName(ctx, field) + case "markedForDeletion": + return ec.fieldContext_ManagedResource_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_ManagedResource_metadata(ctx, field) + case "mresRef": + return ec.fieldContext_ManagedResource_mresRef(ctx, field) + case "recordVersion": + return ec.fieldContext_ManagedResource_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_ManagedResource_spec(ctx, field) + case "status": + return ec.fieldContext_ManagedResource_status(ctx, field) + case "syncedOutputSecretRef": + return ec.fieldContext_ManagedResource_syncedOutputSecretRef(ctx, field) + case "syncStatus": + return ec.fieldContext_ManagedResource_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_ManagedResource_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ConsoleVPNDevicePaginatedRecords", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ManagedResource", field.Name) }, } defer func() { @@ -34828,15 +34155,15 @@ func (ec *executionContext) fieldContext_Query_core_listVPNDevices(ctx context.C } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_listVPNDevices_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_getManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_core_listVPNDevicesForUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_listVPNDevicesForUser(ctx, field) +func (ec *executionContext) _Query_core_resyncManagedResource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_resyncManagedResource(ctx, field) if err != nil { return graphql.Null } @@ -34850,7 +34177,7 @@ func (ec *executionContext) _Query_core_listVPNDevicesForUser(ctx context.Contex 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().CoreListVPNDevicesForUser(rctx) + return ec.resolvers.Query().CoreResyncManagedResource(rctx, fc.Args["msvcName"].(string), fc.Args["name"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -34872,78 +34199,52 @@ func (ec *executionContext) _Query_core_listVPNDevicesForUser(ctx context.Contex if tmp == nil { return nil, nil } - if data, ok := tmp.([]*entities.ConsoleVPNDevice); 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/entities.ConsoleVPNDevice`, 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.([]*entities.ConsoleVPNDevice) + res := resTmp.(bool) fc.Result = res - return ec.marshalOConsoleVPNDevice2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDeviceᚄ(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_listVPNDevicesForUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_resyncManagedResource(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_ConsoleVPNDevice_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_ConsoleVPNDevice_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_ConsoleVPNDevice_clusterName(ctx, field) - case "createdBy": - return ec.fieldContext_ConsoleVPNDevice_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_ConsoleVPNDevice_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_ConsoleVPNDevice_displayName(ctx, field) - case "environmentName": - return ec.fieldContext_ConsoleVPNDevice_environmentName(ctx, field) - case "id": - return ec.fieldContext_ConsoleVPNDevice_id(ctx, field) - case "kind": - return ec.fieldContext_ConsoleVPNDevice_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_ConsoleVPNDevice_lastUpdatedBy(ctx, field) - case "linkedClusters": - return ec.fieldContext_ConsoleVPNDevice_linkedClusters(ctx, field) - case "markedForDeletion": - return ec.fieldContext_ConsoleVPNDevice_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_ConsoleVPNDevice_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_ConsoleVPNDevice_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_ConsoleVPNDevice_spec(ctx, field) - case "status": - return ec.fieldContext_ConsoleVPNDevice_status(ctx, field) - case "syncStatus": - return ec.fieldContext_ConsoleVPNDevice_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_ConsoleVPNDevice_updateTime(ctx, field) - case "wireguardConfig": - return ec.fieldContext_ConsoleVPNDevice_wireguardConfig(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ConsoleVPNDevice", field.Name) + 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_resyncManagedResource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Query_core_getVPNDevice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_core_getVPNDevice(ctx, field) +func (ec *executionContext) _Query_core_listImportedManagedResources(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_listImportedManagedResources(ctx, field) if err != nil { return graphql.Null } @@ -34957,7 +34258,7 @@ func (ec *executionContext) _Query_core_getVPNDevice(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().CoreGetVPNDevice(rctx, fc.Args["name"].(string)) + return ec.resolvers.Query().CoreListImportedManagedResources(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchImportedManagedResources), fc.Args["pq"].(*repos.CursorPagination)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -34979,10 +34280,10 @@ func (ec *executionContext) _Query_core_getVPNDevice(ctx context.Context, field if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.ConsoleVPNDevice); ok { + if data, ok := tmp.(*model.ImportedManagedResourcePaginatedRecords); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/entities.ConsoleVPNDevice`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/console/internal/app/graph/model.ImportedManagedResourcePaginatedRecords`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -34991,12 +34292,12 @@ func (ec *executionContext) _Query_core_getVPNDevice(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.ConsoleVPNDevice) + res := resTmp.(*model.ImportedManagedResourcePaginatedRecords) fc.Result = res - return ec.marshalOConsoleVPNDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDevice(ctx, field.Selections, res) + return ec.marshalOImportedManagedResourcePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImportedManagedResourcePaginatedRecords(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_core_getVPNDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_core_listImportedManagedResources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -35004,46 +34305,14 @@ func (ec *executionContext) fieldContext_Query_core_getVPNDevice(ctx context.Con IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "accountName": - return ec.fieldContext_ConsoleVPNDevice_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_ConsoleVPNDevice_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_ConsoleVPNDevice_clusterName(ctx, field) - case "createdBy": - return ec.fieldContext_ConsoleVPNDevice_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_ConsoleVPNDevice_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_ConsoleVPNDevice_displayName(ctx, field) - case "environmentName": - return ec.fieldContext_ConsoleVPNDevice_environmentName(ctx, field) - case "id": - return ec.fieldContext_ConsoleVPNDevice_id(ctx, field) - case "kind": - return ec.fieldContext_ConsoleVPNDevice_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_ConsoleVPNDevice_lastUpdatedBy(ctx, field) - case "linkedClusters": - return ec.fieldContext_ConsoleVPNDevice_linkedClusters(ctx, field) - case "markedForDeletion": - return ec.fieldContext_ConsoleVPNDevice_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_ConsoleVPNDevice_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_ConsoleVPNDevice_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_ConsoleVPNDevice_spec(ctx, field) - case "status": - return ec.fieldContext_ConsoleVPNDevice_status(ctx, field) - case "syncStatus": - return ec.fieldContext_ConsoleVPNDevice_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_ConsoleVPNDevice_updateTime(ctx, field) - case "wireguardConfig": - return ec.fieldContext_ConsoleVPNDevice_wireguardConfig(ctx, field) + case "edges": + return ec.fieldContext_ImportedManagedResourcePaginatedRecords_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ImportedManagedResourcePaginatedRecords_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_ImportedManagedResourcePaginatedRecords_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ConsoleVPNDevice", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ImportedManagedResourcePaginatedRecords", field.Name) }, } defer func() { @@ -35053,7 +34322,7 @@ func (ec *executionContext) fieldContext_Query_core_getVPNDevice(ctx context.Con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_core_getVPNDevice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_core_listImportedManagedResources_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } @@ -35803,7 +35072,7 @@ func (ec *executionContext) _Router_metadata(ctx context.Context, field graphql. if resTmp == nil { return graphql.Null } - res := resTmp.(v13.ObjectMeta) + res := resTmp.(v12.ObjectMeta) fc.Result = res return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } @@ -37023,7 +36292,7 @@ func (ec *executionContext) _Secret_metadata(ctx context.Context, field graphql. if resTmp == nil { return graphql.Null } - res := resTmp.(v13.ObjectMeta) + res := resTmp.(v12.ObjectMeta) fc.Result = res return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } @@ -39670,6 +38939,72 @@ func (ec *executionContext) unmarshalInputAppIn(ctx context.Context, obj interfa return it, nil } +func (ec *executionContext) unmarshalInputClusterManagedServiceIn(ctx context.Context, obj interface{}) (entities.ClusterManagedService, error) { + var it entities.ClusterManagedService + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"apiVersion", "clusterName", "displayName", "kind", "metadata", "spec"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "apiVersion": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiVersion")) + data, err := ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + it.APIVersion = data + case "clusterName": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.ClusterName = data + case "displayName": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "kind": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) + data, err := ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + it.Kind = data + case "metadata": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("metadata")) + data, err := ec.unmarshalOMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.ClusterManagedServiceIn().Metadata(ctx, &it, data); err != nil { + return it, err + } + case "spec": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spec")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.ClusterManagedServiceIn().Spec(ctx, &it, data); err != nil { + return it, err + } + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputConfigIn(ctx context.Context, obj interface{}) (entities.Config, error) { var it entities.Config asMap := map[string]interface{}{} @@ -39820,79 +39155,6 @@ func (ec *executionContext) unmarshalInputConfigKeyValueRefIn(ctx context.Contex return it, nil } -func (ec *executionContext) unmarshalInputConsoleVPNDeviceIn(ctx context.Context, obj interface{}) (entities.ConsoleVPNDevice, error) { - var it entities.ConsoleVPNDevice - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"apiVersion", "clusterName", "displayName", "environmentName", "kind", "metadata", "spec"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "apiVersion": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiVersion")) - data, err := ec.unmarshalOString2string(ctx, v) - if err != nil { - return it, err - } - it.APIVersion = data - case "clusterName": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.ClusterName = data - case "displayName": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.DisplayName = data - case "environmentName": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("environmentName")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.EnvironmentName = data - case "kind": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) - data, err := ec.unmarshalOString2string(ctx, v) - if err != nil { - return it, err - } - it.Kind = data - case "metadata": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("metadata")) - data, err := ec.unmarshalOMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, v) - if err != nil { - return it, err - } - if err = ec.resolvers.ConsoleVPNDeviceIn().Metadata(ctx, &it, data); err != nil { - return it, err - } - case "spec": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spec")) - data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___wireguard___v1__DeviceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1DeviceSpecIn(ctx, v) - if err != nil { - return it, err - } - if err = ec.resolvers.ConsoleVPNDeviceIn().Spec(ctx, &it, data); err != nil { - return it, err - } - } - } - - return it, nil -} - func (ec *executionContext) unmarshalInputCoreSearchVPNDevices(ctx context.Context, obj interface{}) (model.CoreSearchVPNDevices, error) { var it model.CoreSearchVPNDevices asMap := map[string]interface{}{} @@ -40737,6 +39999,33 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, nil } +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"msvcSpec"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "msvcSpec": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcSpec")) + data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn(ctx, v) + if err != nil { + return it, err + } + it.MsvcSpec = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ContainerEnvIn, error) { var it model.GithubComKloudliteOperatorApisCrdsV1ContainerEnvIn asMap := map[string]interface{}{} @@ -41304,6 +40593,47 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, nil } +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"nodeSelector", "serviceTemplate", "tolerations"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "nodeSelector": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nodeSelector")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.NodeSelector = data + case "serviceTemplate": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceTemplate")) + data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn(ctx, v) + if err != nil { + return it, err + } + it.ServiceTemplate = data + case "tolerations": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tolerations")) + data, err := ec.unmarshalOK8s__io___api___core___v1__TolerationIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationInᚄ(ctx, v) + if err != nil { + return it, err + } + it.Tolerations = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__MresResourceTemplateIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1MresResourceTemplateIn, error) { var it model.GithubComKloudliteOperatorApisCrdsV1MresResourceTemplateIn asMap := map[string]interface{}{} @@ -41600,143 +40930,82 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, nil } -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ShellProbeIn, error) { - var it model.GithubComKloudliteOperatorApisCrdsV1ShellProbeIn - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"command"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "command": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("command")) - data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) - if err != nil { - return it, err - } - it.Command = data - } - } - - return it, nil -} - -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1TCPProbeIn, error) { - var it model.GithubComKloudliteOperatorApisCrdsV1TCPProbeIn +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"port"} + fieldsInOrder := [...]string{"apiVersion", "kind", "spec"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { continue } switch k { - case "port": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("port")) - data, err := ec.unmarshalNInt2int(ctx, v) + case "apiVersion": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiVersion")) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } - it.Port = data - } - } - - return it, nil -} - -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___wireguard___v1__CNameRecordIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisWireguardV1CNameRecordIn, error) { - var it model.GithubComKloudliteOperatorApisWireguardV1CNameRecordIn - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"host", "target"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "host": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("host")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.APIVersion = data + case "kind": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } - it.Host = data - case "target": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("target")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.Kind = data + case "spec": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spec")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.Target = data + it.Spec = data } } return it, nil } -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___wireguard___v1__DeviceSpecIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisWireguardV1DeviceSpecIn, error) { - var it model.GithubComKloudliteOperatorApisWireguardV1DeviceSpecIn +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ShellProbeIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1ShellProbeIn asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"activeNamespace", "cnameRecords", "ports"} + fieldsInOrder := [...]string{"command"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { continue } switch k { - case "activeNamespace": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("activeNamespace")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.ActiveNamespace = data - case "cnameRecords": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cnameRecords")) - data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___wireguard___v1__CNameRecordIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1CNameRecordInᚄ(ctx, v) - if err != nil { - return it, err - } - it.CnameRecords = data - case "ports": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ports")) - data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___wireguard___v1__PortIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1PortInᚄ(ctx, v) + case "command": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("command")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } - it.Ports = data + it.Command = data } } return it, nil } -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___wireguard___v1__PortIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisWireguardV1PortIn, error) { - var it model.GithubComKloudliteOperatorApisWireguardV1PortIn +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1TCPProbeIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1TCPProbeIn asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"port", "targetPort"} + fieldsInOrder := [...]string{"port"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -41745,18 +41014,11 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a switch k { case "port": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("port")) - data, err := ec.unmarshalOInt2ᚖint(ctx, v) + data, err := ec.unmarshalNInt2int(ctx, v) if err != nil { return it, err } it.Port = data - case "targetPort": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("targetPort")) - data, err := ec.unmarshalOInt2ᚖint(ctx, v) - if err != nil { - return it, err - } - it.TargetPort = data } } @@ -42582,8 +41844,8 @@ func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj return it, nil } -func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj interface{}) (v13.ObjectMeta, error) { - var it v13.ObjectMeta +func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj interface{}) (v12.ObjectMeta, error) { + var it v12.ObjectMeta asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v @@ -42634,8 +41896,8 @@ func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj in return it, nil } -func (ec *executionContext) unmarshalInputPortIn(ctx context.Context, obj interface{}) (v11.Port, error) { - var it v11.Port +func (ec *executionContext) unmarshalInputPortIn(ctx context.Context, obj interface{}) (v13.Port, error) { + var it v13.Port asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v @@ -42775,6 +42037,40 @@ func (ec *executionContext) unmarshalInputSearchApps(ctx context.Context, obj in return it, nil } +func (ec *executionContext) unmarshalInputSearchClusterManagedService(ctx context.Context, obj interface{}) (model.SearchClusterManagedService, error) { + var it model.SearchClusterManagedService + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"isReady", "text"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "isReady": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.IsReady = data + 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) unmarshalInputSearchConfigs(ctx context.Context, obj interface{}) (model.SearchConfigs, error) { var it model.SearchConfigs asMap := map[string]interface{}{} @@ -43750,59 +43046,31 @@ func (ec *executionContext) _Build(ctx context.Context, sel ast.SelectionSet, ob return out } -var configImplementors = []string{"Config"} +var clusterManagedServiceImplementors = []string{"ClusterManagedService"} -func (ec *executionContext) _Config(ctx context.Context, sel ast.SelectionSet, obj *entities.Config) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, configImplementors) +func (ec *executionContext) _ClusterManagedService(ctx context.Context, sel ast.SelectionSet, obj *entities.ClusterManagedService) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, clusterManagedServiceImplementors) 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("Config") + out.Values[i] = graphql.MarshalString("ClusterManagedService") case "accountName": - out.Values[i] = ec._Config_accountName(ctx, field, obj) + out.Values[i] = ec._ClusterManagedService_accountName(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } case "apiVersion": - out.Values[i] = ec._Config_apiVersion(ctx, field, obj) - case "binaryData": - 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._Config_binaryData(ctx, field, obj) - 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.Values[i] = ec._ClusterManagedService_apiVersion(ctx, field, obj) + case "clusterName": + out.Values[i] = ec._ClusterManagedService_clusterName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "createdBy": - out.Values[i] = ec._Config_createdBy(ctx, field, obj) + out.Values[i] = ec._ClusterManagedService_createdBy(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } @@ -43815,7 +43083,7 @@ func (ec *executionContext) _Config(ctx context.Context, sel ast.SelectionSet, o ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Config_creationTime(ctx, field, obj) + res = ec._ClusterManagedService_creationTime(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -43842,7 +43110,35 @@ func (ec *executionContext) _Config(ctx context.Context, sel ast.SelectionSet, o } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "data": + case "displayName": + out.Values[i] = ec._ClusterManagedService_displayName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "id": + out.Values[i] = ec._ClusterManagedService_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "isArchived": + out.Values[i] = ec._ClusterManagedService_isArchived(ctx, field, obj) + case "kind": + out.Values[i] = ec._ClusterManagedService_kind(ctx, field, obj) + case "lastUpdatedBy": + out.Values[i] = ec._ClusterManagedService_lastUpdatedBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "markedForDeletion": + out.Values[i] = ec._ClusterManagedService_markedForDeletion(ctx, field, obj) + case "metadata": + out.Values[i] = ec._ClusterManagedService_metadata(ctx, field, obj) + case "recordVersion": + out.Values[i] = ec._ClusterManagedService_recordVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "spec": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -43851,7 +43147,7 @@ func (ec *executionContext) _Config(ctx context.Context, sel ast.SelectionSet, o ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Config_data(ctx, field, obj) + res = ec._ClusterManagedService_spec(ctx, field, obj) return res } @@ -43875,41 +43171,10 @@ func (ec *executionContext) _Config(ctx context.Context, sel ast.SelectionSet, o } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "displayName": - out.Values[i] = ec._Config_displayName(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "environmentName": - out.Values[i] = ec._Config_environmentName(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "id": - out.Values[i] = ec._Config_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "immutable": - out.Values[i] = ec._Config_immutable(ctx, field, obj) - case "kind": - out.Values[i] = ec._Config_kind(ctx, field, obj) - case "lastUpdatedBy": - out.Values[i] = ec._Config_lastUpdatedBy(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "markedForDeletion": - out.Values[i] = ec._Config_markedForDeletion(ctx, field, obj) - case "metadata": - out.Values[i] = ec._Config_metadata(ctx, field, obj) - case "recordVersion": - out.Values[i] = ec._Config_recordVersion(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } + case "status": + out.Values[i] = ec._ClusterManagedService_status(ctx, field, obj) case "syncStatus": - out.Values[i] = ec._Config_syncStatus(ctx, field, obj) + out.Values[i] = ec._ClusterManagedService_syncStatus(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } @@ -43922,7 +43187,7 @@ func (ec *executionContext) _Config(ctx context.Context, sel ast.SelectionSet, o ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Config_updateTime(ctx, field, obj) + res = ec._ClusterManagedService_updateTime(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -43972,68 +43237,24 @@ func (ec *executionContext) _Config(ctx context.Context, sel ast.SelectionSet, o return out } -var configEdgeImplementors = []string{"ConfigEdge"} +var clusterManagedServiceEdgeImplementors = []string{"ClusterManagedServiceEdge"} -func (ec *executionContext) _ConfigEdge(ctx context.Context, sel ast.SelectionSet, obj *model.ConfigEdge) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, configEdgeImplementors) +func (ec *executionContext) _ClusterManagedServiceEdge(ctx context.Context, sel ast.SelectionSet, obj *model.ClusterManagedServiceEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, clusterManagedServiceEdgeImplementors) 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("ConfigEdge") + out.Values[i] = graphql.MarshalString("ClusterManagedServiceEdge") case "cursor": - out.Values[i] = ec._ConfigEdge_cursor(ctx, field, obj) + out.Values[i] = ec._ClusterManagedServiceEdge_cursor(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "node": - out.Values[i] = ec._ConfigEdge_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 configKeyRefImplementors = []string{"ConfigKeyRef"} - -func (ec *executionContext) _ConfigKeyRef(ctx context.Context, sel ast.SelectionSet, obj *model.ConfigKeyRef) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, configKeyRefImplementors) - - 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("ConfigKeyRef") - case "configName": - out.Values[i] = ec._ConfigKeyRef_configName(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "key": - out.Values[i] = ec._ConfigKeyRef_key(ctx, field, obj) + out.Values[i] = ec._ClusterManagedServiceEdge_node(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -44060,122 +43281,32 @@ func (ec *executionContext) _ConfigKeyRef(ctx context.Context, sel ast.Selection return out } -var configKeyValueRefImplementors = []string{"ConfigKeyValueRef"} +var clusterManagedServicePaginatedRecordsImplementors = []string{"ClusterManagedServicePaginatedRecords"} -func (ec *executionContext) _ConfigKeyValueRef(ctx context.Context, sel ast.SelectionSet, obj *domain.ConfigKeyValueRef) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, configKeyValueRefImplementors) +func (ec *executionContext) _ClusterManagedServicePaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.ClusterManagedServicePaginatedRecords) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, clusterManagedServicePaginatedRecordsImplementors) 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("ConfigKeyValueRef") - case "configName": - out.Values[i] = ec._ConfigKeyValueRef_configName(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "key": - out.Values[i] = ec._ConfigKeyValueRef_key(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "value": - out.Values[i] = ec._ConfigKeyValueRef_value(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 configPaginatedRecordsImplementors = []string{"ConfigPaginatedRecords"} - -func (ec *executionContext) _ConfigPaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.ConfigPaginatedRecords) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, configPaginatedRecordsImplementors) - - 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("ConfigPaginatedRecords") + out.Values[i] = graphql.MarshalString("ClusterManagedServicePaginatedRecords") case "edges": - out.Values[i] = ec._ConfigPaginatedRecords_edges(ctx, field, obj) + out.Values[i] = ec._ClusterManagedServicePaginatedRecords_edges(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "pageInfo": - out.Values[i] = ec._ConfigPaginatedRecords_pageInfo(ctx, field, obj) + out.Values[i] = ec._ClusterManagedServicePaginatedRecords_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "totalCount": - out.Values[i] = ec._ConfigPaginatedRecords_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 consoleCheckNameAvailabilityOutputImplementors = []string{"ConsoleCheckNameAvailabilityOutput"} - -func (ec *executionContext) _ConsoleCheckNameAvailabilityOutput(ctx context.Context, sel ast.SelectionSet, obj *domain.CheckNameAvailabilityOutput) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, consoleCheckNameAvailabilityOutputImplementors) - - 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("ConsoleCheckNameAvailabilityOutput") - case "result": - out.Values[i] = ec._ConsoleCheckNameAvailabilityOutput_result(ctx, field, obj) + out.Values[i] = ec._ClusterManagedServicePaginatedRecords_totalCount(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "suggestedNames": - out.Values[i] = ec._ConsoleCheckNameAvailabilityOutput_suggestedNames(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -44199,32 +43330,25 @@ func (ec *executionContext) _ConsoleCheckNameAvailabilityOutput(ctx context.Cont return out } -var consoleVPNDeviceImplementors = []string{"ConsoleVPNDevice"} +var configImplementors = []string{"Config"} -func (ec *executionContext) _ConsoleVPNDevice(ctx context.Context, sel ast.SelectionSet, obj *entities.ConsoleVPNDevice) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, consoleVPNDeviceImplementors) +func (ec *executionContext) _Config(ctx context.Context, sel ast.SelectionSet, obj *entities.Config) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, configImplementors) 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("ConsoleVPNDevice") + out.Values[i] = graphql.MarshalString("Config") case "accountName": - out.Values[i] = ec._ConsoleVPNDevice_accountName(ctx, field, obj) + out.Values[i] = ec._Config_accountName(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } case "apiVersion": - out.Values[i] = ec._ConsoleVPNDevice_apiVersion(ctx, field, obj) - case "clusterName": - out.Values[i] = ec._ConsoleVPNDevice_clusterName(ctx, field, obj) - case "createdBy": - out.Values[i] = ec._ConsoleVPNDevice_createdBy(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "creationTime": + out.Values[i] = ec._Config_apiVersion(ctx, field, obj) + case "binaryData": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -44233,10 +43357,7 @@ func (ec *executionContext) _ConsoleVPNDevice(ctx context.Context, sel ast.Selec ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ConsoleVPNDevice_creationTime(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } + res = ec._Config_binaryData(ctx, field, obj) return res } @@ -44260,37 +43381,12 @@ func (ec *executionContext) _ConsoleVPNDevice(ctx context.Context, sel ast.Selec } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "displayName": - out.Values[i] = ec._ConsoleVPNDevice_displayName(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "environmentName": - out.Values[i] = ec._ConsoleVPNDevice_environmentName(ctx, field, obj) - case "id": - out.Values[i] = ec._ConsoleVPNDevice_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "kind": - out.Values[i] = ec._ConsoleVPNDevice_kind(ctx, field, obj) - case "lastUpdatedBy": - out.Values[i] = ec._ConsoleVPNDevice_lastUpdatedBy(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "linkedClusters": - out.Values[i] = ec._ConsoleVPNDevice_linkedClusters(ctx, field, obj) - case "markedForDeletion": - out.Values[i] = ec._ConsoleVPNDevice_markedForDeletion(ctx, field, obj) - case "metadata": - out.Values[i] = ec._ConsoleVPNDevice_metadata(ctx, field, obj) - case "recordVersion": - out.Values[i] = ec._ConsoleVPNDevice_recordVersion(ctx, field, obj) + case "createdBy": + out.Values[i] = ec._Config_createdBy(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "spec": + case "creationTime": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -44299,7 +43395,10 @@ func (ec *executionContext) _ConsoleVPNDevice(ctx context.Context, sel ast.Selec ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ConsoleVPNDevice_spec(ctx, field, obj) + res = ec._Config_creationTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -44323,14 +43422,7 @@ func (ec *executionContext) _ConsoleVPNDevice(ctx context.Context, sel ast.Selec } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "status": - out.Values[i] = ec._ConsoleVPNDevice_status(ctx, field, obj) - case "syncStatus": - out.Values[i] = ec._ConsoleVPNDevice_syncStatus(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "updateTime": + case "data": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -44339,10 +43431,7 @@ func (ec *executionContext) _ConsoleVPNDevice(ctx context.Context, sel ast.Selec ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ConsoleVPNDevice_updateTime(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } + res = ec._Config_data(ctx, field, obj) return res } @@ -44366,7 +43455,45 @@ func (ec *executionContext) _ConsoleVPNDevice(ctx context.Context, sel ast.Selec } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "wireguardConfig": + case "displayName": + out.Values[i] = ec._Config_displayName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "environmentName": + out.Values[i] = ec._Config_environmentName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "id": + out.Values[i] = ec._Config_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "immutable": + out.Values[i] = ec._Config_immutable(ctx, field, obj) + case "kind": + out.Values[i] = ec._Config_kind(ctx, field, obj) + case "lastUpdatedBy": + out.Values[i] = ec._Config_lastUpdatedBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "markedForDeletion": + out.Values[i] = ec._Config_markedForDeletion(ctx, field, obj) + case "metadata": + out.Values[i] = ec._Config_metadata(ctx, field, obj) + case "recordVersion": + out.Values[i] = ec._Config_recordVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "syncStatus": + out.Values[i] = ec._Config_syncStatus(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) { @@ -44375,7 +43502,10 @@ func (ec *executionContext) _ConsoleVPNDevice(ctx context.Context, sel ast.Selec ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ConsoleVPNDevice_wireguardConfig(ctx, field, obj) + res = ec._Config_updateTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -44422,24 +43552,24 @@ func (ec *executionContext) _ConsoleVPNDevice(ctx context.Context, sel ast.Selec return out } -var consoleVPNDeviceEdgeImplementors = []string{"ConsoleVPNDeviceEdge"} +var configEdgeImplementors = []string{"ConfigEdge"} -func (ec *executionContext) _ConsoleVPNDeviceEdge(ctx context.Context, sel ast.SelectionSet, obj *model.ConsoleVPNDeviceEdge) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, consoleVPNDeviceEdgeImplementors) +func (ec *executionContext) _ConfigEdge(ctx context.Context, sel ast.SelectionSet, obj *model.ConfigEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, configEdgeImplementors) 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("ConsoleVPNDeviceEdge") + out.Values[i] = graphql.MarshalString("ConfigEdge") case "cursor": - out.Values[i] = ec._ConsoleVPNDeviceEdge_cursor(ctx, field, obj) + out.Values[i] = ec._ConfigEdge_cursor(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "node": - out.Values[i] = ec._ConsoleVPNDeviceEdge_node(ctx, field, obj) + out.Values[i] = ec._ConfigEdge_node(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -44466,29 +43596,122 @@ func (ec *executionContext) _ConsoleVPNDeviceEdge(ctx context.Context, sel ast.S return out } -var consoleVPNDevicePaginatedRecordsImplementors = []string{"ConsoleVPNDevicePaginatedRecords"} +var configKeyRefImplementors = []string{"ConfigKeyRef"} -func (ec *executionContext) _ConsoleVPNDevicePaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.ConsoleVPNDevicePaginatedRecords) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, consoleVPNDevicePaginatedRecordsImplementors) +func (ec *executionContext) _ConfigKeyRef(ctx context.Context, sel ast.SelectionSet, obj *model.ConfigKeyRef) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, configKeyRefImplementors) 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("ConsoleVPNDevicePaginatedRecords") + out.Values[i] = graphql.MarshalString("ConfigKeyRef") + case "configName": + out.Values[i] = ec._ConfigKeyRef_configName(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "key": + out.Values[i] = ec._ConfigKeyRef_key(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 configKeyValueRefImplementors = []string{"ConfigKeyValueRef"} + +func (ec *executionContext) _ConfigKeyValueRef(ctx context.Context, sel ast.SelectionSet, obj *domain.ConfigKeyValueRef) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, configKeyValueRefImplementors) + + 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("ConfigKeyValueRef") + case "configName": + out.Values[i] = ec._ConfigKeyValueRef_configName(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "key": + out.Values[i] = ec._ConfigKeyValueRef_key(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "value": + out.Values[i] = ec._ConfigKeyValueRef_value(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 configPaginatedRecordsImplementors = []string{"ConfigPaginatedRecords"} + +func (ec *executionContext) _ConfigPaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.ConfigPaginatedRecords) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, configPaginatedRecordsImplementors) + + 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("ConfigPaginatedRecords") case "edges": - out.Values[i] = ec._ConsoleVPNDevicePaginatedRecords_edges(ctx, field, obj) + out.Values[i] = ec._ConfigPaginatedRecords_edges(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "pageInfo": - out.Values[i] = ec._ConsoleVPNDevicePaginatedRecords_pageInfo(ctx, field, obj) + out.Values[i] = ec._ConfigPaginatedRecords_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "totalCount": - out.Values[i] = ec._ConsoleVPNDevicePaginatedRecords_totalCount(ctx, field, obj) + out.Values[i] = ec._ConfigPaginatedRecords_totalCount(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -44515,6 +43738,47 @@ func (ec *executionContext) _ConsoleVPNDevicePaginatedRecords(ctx context.Contex return out } +var consoleCheckNameAvailabilityOutputImplementors = []string{"ConsoleCheckNameAvailabilityOutput"} + +func (ec *executionContext) _ConsoleCheckNameAvailabilityOutput(ctx context.Context, sel ast.SelectionSet, obj *domain.CheckNameAvailabilityOutput) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, consoleCheckNameAvailabilityOutputImplementors) + + 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("ConsoleCheckNameAvailabilityOutput") + case "result": + out.Values[i] = ec._ConsoleCheckNameAvailabilityOutput_result(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "suggestedNames": + out.Values[i] = ec._ConsoleCheckNameAvailabilityOutput_suggestedNames(ctx, field, obj) + 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 cursorPaginationImplementors = []string{"CursorPagination"} func (ec *executionContext) _CursorPagination(ctx context.Context, sel ast.SelectionSet, obj *repos.CursorPagination) graphql.Marshaler { @@ -45240,158 +44504,34 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___console___in return out } -var github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedForImplementors = []string{"Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor"} - -func (ec *executionContext) _Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteAPIAppsConsoleInternalEntitiesSecretCreatedFor) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedForImplementors) - - 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("Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor") - case "name": - out.Values[i] = ec._Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "namespace": - out.Values[i] = ec._Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_namespace(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "refId": - out.Values[i] = ec._Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_refId(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "resourceType": - out.Values[i] = ec._Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_resourceType(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 github__com___kloudlite___api___common__CreatedOrUpdatedByImplementors = []string{"Github__com___kloudlite___api___common__CreatedOrUpdatedBy"} - -func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUpdatedBy(ctx context.Context, sel ast.SelectionSet, obj *common.CreatedOrUpdatedBy) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___api___common__CreatedOrUpdatedByImplementors) - - 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("Github__com___kloudlite___api___common__CreatedOrUpdatedBy") - case "userEmail": - out.Values[i] = ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "userId": - 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._Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(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 "userName": - out.Values[i] = ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - 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 github__com___kloudlite___api___pkg___types__EncodedStringImplementors = []string{"Github__com___kloudlite___api___pkg___types__EncodedString"} +var github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedForImplementors = []string{"Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor"} -func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__EncodedString(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteAPIPkgTypesEncodedString) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___api___pkg___types__EncodedStringImplementors) +func (ec *executionContext) _Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteAPIAppsConsoleInternalEntitiesSecretCreatedFor) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedForImplementors) 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("Github__com___kloudlite___api___pkg___types__EncodedString") - case "encoding": - out.Values[i] = ec._Github__com___kloudlite___api___pkg___types__EncodedString_encoding(ctx, field, obj) + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor") + case "name": + out.Values[i] = ec._Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "value": - out.Values[i] = ec._Github__com___kloudlite___api___pkg___types__EncodedString_value(ctx, field, obj) + case "namespace": + out.Values[i] = ec._Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_namespace(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "refId": + out.Values[i] = ec._Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_refId(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "resourceType": + out.Values[i] = ec._Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_resourceType(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -45418,6 +44558,86 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__Encode return out } +var github__com___kloudlite___api___common__CreatedOrUpdatedByImplementors = []string{"Github__com___kloudlite___api___common__CreatedOrUpdatedBy"} + +func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUpdatedBy(ctx context.Context, sel ast.SelectionSet, obj *common.CreatedOrUpdatedBy) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___api___common__CreatedOrUpdatedByImplementors) + + 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("Github__com___kloudlite___api___common__CreatedOrUpdatedBy") + case "userEmail": + out.Values[i] = ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "userId": + 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._Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(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 "userName": + out.Values[i] = ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + 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 github__com___kloudlite___api___pkg___types__SyncStatusImplementors = []string{"Github__com___kloudlite___api___pkg___types__SyncStatus"} func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncStatus(ctx context.Context, sel ast.SelectionSet, obj *types.SyncStatus) graphql.Marshaler { @@ -45934,6 +45154,50 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return out } +var github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecImplementors) + + 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("Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec") + case "msvcSpec": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "targetNamespace": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(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 github__com___kloudlite___operator___apis___crds___v1__ContainerEnvImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv"} func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) graphql.Marshaler { @@ -46544,6 +45808,49 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return out } +var github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecImplementors) + + 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("Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec") + case "nodeSelector": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(ctx, field, obj) + case "serviceTemplate": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "tolerations": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(ctx, field, obj) + 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 github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplateImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate"} func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1MresResourceTemplate) graphql.Marshaler { @@ -46739,113 +46046,38 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return out } -var github__com___kloudlite___operator___apis___crds___v1__RouterSpecImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__RouterSpec"} - -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__RouterSpec(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1RouterSpec) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__RouterSpecImplementors) - - 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("Github__com___kloudlite___operator___apis___crds___v1__RouterSpec") - case "backendProtocol": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_backendProtocol(ctx, field, obj) - case "basicAuth": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_basicAuth(ctx, field, obj) - case "cors": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_cors(ctx, field, obj) - case "domains": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_domains(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "https": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_https(ctx, field, obj) - case "ingressClass": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_ingressClass(ctx, field, obj) - case "maxBodySizeInMB": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_maxBodySizeInMB(ctx, field, obj) - case "rateLimit": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_rateLimit(ctx, field, obj) - case "routes": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_routes(ctx, field, obj) - 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 github__com___kloudlite___operator___apis___crds___v1__ShellProbeImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ShellProbe"} - -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ShellProbe(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ShellProbe) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ShellProbeImplementors) - - 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("Github__com___kloudlite___operator___apis___crds___v1__ShellProbe") - case "command": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx, field, obj) - 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 github__com___kloudlite___operator___apis___crds___v1__TcpProbeImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__TcpProbe"} +var github__com___kloudlite___operator___apis___crds___v1__RouterSpecImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__RouterSpec"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__TcpProbe(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1TCPProbe) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__TcpProbeImplementors) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__RouterSpec(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1RouterSpec) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__RouterSpecImplementors) 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("Github__com___kloudlite___operator___apis___crds___v1__TcpProbe") - case "port": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx, field, obj) + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__RouterSpec") + case "backendProtocol": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_backendProtocol(ctx, field, obj) + case "basicAuth": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_basicAuth(ctx, field, obj) + case "cors": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_cors(ctx, field, obj) + case "domains": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_domains(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } + case "https": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_https(ctx, field, obj) + case "ingressClass": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_ingressClass(ctx, field, obj) + case "maxBodySizeInMB": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_maxBodySizeInMB(ctx, field, obj) + case "rateLimit": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_rateLimit(ctx, field, obj) + case "routes": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_routes(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -46869,21 +46101,29 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return out } -var github__com___kloudlite___operator___apis___wireguard___v1__CNameRecordImplementors = []string{"Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord"} +var github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisWireguardV1CNameRecord) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___wireguard___v1__CNameRecordImplementors) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateImplementors) 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("Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord") - case "host": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord_host(ctx, field, obj) - case "target": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord_target(ctx, field, obj) + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate") + case "apiVersion": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_apiVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "kind": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_kind(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "spec": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -46907,29 +46147,19 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___wiregua return out } -var github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpecImplementors = []string{"Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec"} +var github__com___kloudlite___operator___apis___crds___v1__ShellProbeImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ShellProbe"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisWireguardV1DeviceSpec) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpecImplementors) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ShellProbe(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ShellProbe) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ShellProbeImplementors) 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("Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec") - case "activeNamespace": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_activeNamespace(ctx, field, obj) - case "cnameRecords": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_cnameRecords(ctx, field, obj) - case "disabled": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_disabled(ctx, field, obj) - case "nodeSelector": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_nodeSelector(ctx, field, obj) - case "noExternalService": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_noExternalService(ctx, field, obj) - case "ports": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec_ports(ctx, field, obj) + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__ShellProbe") + case "command": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -46953,21 +46183,22 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___wiregua return out } -var github__com___kloudlite___operator___apis___wireguard___v1__PortImplementors = []string{"Github__com___kloudlite___operator___apis___wireguard___v1__Port"} +var github__com___kloudlite___operator___apis___crds___v1__TcpProbeImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__TcpProbe"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___wireguard___v1__Port(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisWireguardV1Port) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___wireguard___v1__PortImplementors) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__TcpProbe(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1TCPProbe) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__TcpProbeImplementors) 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("Github__com___kloudlite___operator___apis___wireguard___v1__Port") + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__TcpProbe") case "port": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___wireguard___v1__Port_port(ctx, field, obj) - case "targetPort": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___wireguard___v1__Port_targetPort(ctx, field, obj) + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -48061,7 +47292,7 @@ func (ec *executionContext) _ImportedManagedResourcePaginatedRecords(ctx context var k8s__io___api___core___v1__SecretImplementors = []string{"K8s__io___api___core___v1__Secret"} -func (ec *executionContext) _K8s__io___api___core___v1__Secret(ctx context.Context, sel ast.SelectionSet, obj *v12.Secret) graphql.Marshaler { +func (ec *executionContext) _K8s__io___api___core___v1__Secret(ctx context.Context, sel ast.SelectionSet, obj *v11.Secret) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__SecretImplementors) out := graphql.NewFieldSet(fields) @@ -48838,7 +48069,7 @@ func (ec *executionContext) _MatchFilter(ctx context.Context, sel ast.SelectionS var metadataImplementors = []string{"Metadata"} -func (ec *executionContext) _Metadata(ctx context.Context, sel ast.SelectionSet, obj *v13.ObjectMeta) graphql.Marshaler { +func (ec *executionContext) _Metadata(ctx context.Context, sel ast.SelectionSet, obj *v12.ObjectMeta) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, metadataImplementors) out := graphql.NewFieldSet(fields) @@ -49166,71 +48397,47 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) if out.Values[i] == graphql.Null { out.Invalids++ } - case "core_createManagedResource": + case "infra_createClusterManagedService": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_createManagedResource(ctx, field) + return ec._Mutation_infra_createClusterManagedService(ctx, field) }) - case "core_updateManagedResource": + case "infra_updateClusterManagedService": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_updateManagedResource(ctx, field) + return ec._Mutation_infra_updateClusterManagedService(ctx, field) }) - case "core_deleteManagedResource": + case "infra_deleteClusterManagedService": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_deleteManagedResource(ctx, field) + return ec._Mutation_infra_deleteClusterManagedService(ctx, field) }) if out.Values[i] == graphql.Null { out.Invalids++ } - case "core_importManagedResource": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_importManagedResource(ctx, field) - }) - case "core_deleteImportedManagedResource": + case "infra_cloneClusterManagedService": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_deleteImportedManagedResource(ctx, field) + return ec._Mutation_infra_cloneClusterManagedService(ctx, field) }) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "core_createVPNDevice": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_createVPNDevice(ctx, field) - }) - case "core_updateVPNDevice": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_updateVPNDevice(ctx, field) - }) - case "core_updateVPNDevicePorts": + case "core_createManagedResource": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_updateVPNDevicePorts(ctx, field) + return ec._Mutation_core_createManagedResource(ctx, field) }) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "core_updateVPNDeviceEnv": + case "core_updateManagedResource": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_updateVPNDeviceEnv(ctx, field) + return ec._Mutation_core_updateManagedResource(ctx, field) }) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "core_updateVpnDeviceNs": + case "core_deleteManagedResource": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_updateVpnDeviceNs(ctx, field) + return ec._Mutation_core_deleteManagedResource(ctx, field) }) if out.Values[i] == graphql.Null { out.Invalids++ } - case "core_updateVpnClusterName": + case "core_importManagedResource": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_updateVpnClusterName(ctx, field) + return ec._Mutation_core_importManagedResource(ctx, field) }) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "core_deleteVPNDevice": + case "core_deleteImportedManagedResource": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_core_deleteVPNDevice(ctx, field) + return ec._Mutation_core_deleteImportedManagedResource(ctx, field) }) if out.Values[i] == graphql.Null { out.Invalids++ @@ -49903,26 +49110,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "core_listManagedResources": - 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_listManagedResources(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_getManagedResource": + case "infra_listClusterManagedServices": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -49931,7 +49119,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_core_getManagedResource(ctx, field) + res = ec._Query_infra_listClusterManagedServices(ctx, field) return res } @@ -49941,7 +49129,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "core_resyncManagedResource": + case "infra_getClusterManagedService": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -49950,10 +49138,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_core_resyncManagedResource(ctx, field) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } + res = ec._Query_infra_getClusterManagedService(ctx, field) return res } @@ -49963,7 +49148,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "core_listImportedManagedResources": + case "core_listManagedResources": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -49972,7 +49157,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_core_listImportedManagedResources(ctx, field) + res = ec._Query_core_listManagedResources(ctx, field) return res } @@ -49982,7 +49167,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "core_listVPNDevices": + case "core_getManagedResource": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -49991,7 +49176,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_core_listVPNDevices(ctx, field) + res = ec._Query_core_getManagedResource(ctx, field) return res } @@ -50001,7 +49186,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "core_listVPNDevicesForUser": + case "core_resyncManagedResource": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -50010,7 +49195,10 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_core_listVPNDevicesForUser(ctx, field) + res = ec._Query_core_resyncManagedResource(ctx, field) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -50020,7 +49208,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "core_getVPNDevice": + case "core_listImportedManagedResources": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -50029,7 +49217,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_core_getVPNDevice(ctx, field) + res = ec._Query_core_listImportedManagedResources(ctx, field) return res } @@ -51392,17 +50580,17 @@ func (ec *executionContext) marshalNBuild2ᚖgithubᚗcomᚋkloudliteᚋapiᚋap return ec._Build(ctx, sel, v) } -func (ec *executionContext) marshalNConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx context.Context, sel ast.SelectionSet, v *entities.Config) graphql.Marshaler { +func (ec *executionContext) marshalNClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx context.Context, sel ast.SelectionSet, v *entities.ClusterManagedService) 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._Config(ctx, sel, v) + return ec._ClusterManagedService(ctx, sel, v) } -func (ec *executionContext) marshalNConfigEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConfigEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ConfigEdge) graphql.Marshaler { +func (ec *executionContext) marshalNClusterManagedServiceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ClusterManagedServiceEdge) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -51426,7 +50614,7 @@ func (ec *executionContext) marshalNConfigEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNConfigEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConfigEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNClusterManagedServiceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -51446,72 +50634,32 @@ func (ec *executionContext) marshalNConfigEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋ return ret } -func (ec *executionContext) marshalNConfigEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConfigEdge(ctx context.Context, sel ast.SelectionSet, v *model.ConfigEdge) graphql.Marshaler { +func (ec *executionContext) marshalNClusterManagedServiceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdge(ctx context.Context, sel ast.SelectionSet, v *model.ClusterManagedServiceEdge) 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._ConfigEdge(ctx, sel, v) + return ec._ClusterManagedServiceEdge(ctx, sel, v) } -func (ec *executionContext) unmarshalNConfigIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx context.Context, v interface{}) (entities.Config, error) { - res, err := ec.unmarshalInputConfigIn(ctx, v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNConfigKeyValueRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐConfigKeyValueRef(ctx context.Context, sel ast.SelectionSet, v *domain.ConfigKeyValueRef) 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._ConfigKeyValueRef(ctx, sel, v) -} - -func (ec *executionContext) marshalNConsoleCheckNameAvailabilityOutput2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐCheckNameAvailabilityOutput(ctx context.Context, sel ast.SelectionSet, v domain.CheckNameAvailabilityOutput) graphql.Marshaler { - return ec._ConsoleCheckNameAvailabilityOutput(ctx, sel, &v) -} - -func (ec *executionContext) marshalNConsoleCheckNameAvailabilityOutput2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐCheckNameAvailabilityOutput(ctx context.Context, sel ast.SelectionSet, v *domain.CheckNameAvailabilityOutput) 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._ConsoleCheckNameAvailabilityOutput(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNConsoleResType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐResourceType(ctx context.Context, v interface{}) (entities.ResourceType, error) { - tmp, err := graphql.UnmarshalString(v) - res := entities.ResourceType(tmp) +func (ec *executionContext) unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx context.Context, v interface{}) (entities.ClusterManagedService, error) { + res, err := ec.unmarshalInputClusterManagedServiceIn(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNConsoleResType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐResourceType(ctx context.Context, sel ast.SelectionSet, v entities.ResourceType) 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) marshalNConsoleVPNDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDevice(ctx context.Context, sel ast.SelectionSet, v *entities.ConsoleVPNDevice) graphql.Marshaler { +func (ec *executionContext) marshalNConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx context.Context, sel ast.SelectionSet, v *entities.Config) 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._ConsoleVPNDevice(ctx, sel, v) + return ec._Config(ctx, sel, v) } -func (ec *executionContext) marshalNConsoleVPNDeviceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConsoleVPNDeviceEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ConsoleVPNDeviceEdge) graphql.Marshaler { +func (ec *executionContext) marshalNConfigEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConfigEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ConfigEdge) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -51535,7 +50683,7 @@ func (ec *executionContext) marshalNConsoleVPNDeviceEdge2ᚕᚖgithubᚗcomᚋkl if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNConsoleVPNDeviceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConsoleVPNDeviceEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNConfigEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConfigEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -51555,21 +50703,61 @@ func (ec *executionContext) marshalNConsoleVPNDeviceEdge2ᚕᚖgithubᚗcomᚋkl return ret } -func (ec *executionContext) marshalNConsoleVPNDeviceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConsoleVPNDeviceEdge(ctx context.Context, sel ast.SelectionSet, v *model.ConsoleVPNDeviceEdge) graphql.Marshaler { +func (ec *executionContext) marshalNConfigEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConfigEdge(ctx context.Context, sel ast.SelectionSet, v *model.ConfigEdge) 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._ConfigEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNConfigIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx context.Context, v interface{}) (entities.Config, error) { + res, err := ec.unmarshalInputConfigIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNConfigKeyValueRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐConfigKeyValueRef(ctx context.Context, sel ast.SelectionSet, v *domain.ConfigKeyValueRef) 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._ConfigKeyValueRef(ctx, sel, v) +} + +func (ec *executionContext) marshalNConsoleCheckNameAvailabilityOutput2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐCheckNameAvailabilityOutput(ctx context.Context, sel ast.SelectionSet, v domain.CheckNameAvailabilityOutput) graphql.Marshaler { + return ec._ConsoleCheckNameAvailabilityOutput(ctx, sel, &v) +} + +func (ec *executionContext) marshalNConsoleCheckNameAvailabilityOutput2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐCheckNameAvailabilityOutput(ctx context.Context, sel ast.SelectionSet, v *domain.CheckNameAvailabilityOutput) 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._ConsoleVPNDeviceEdge(ctx, sel, v) + return ec._ConsoleCheckNameAvailabilityOutput(ctx, sel, v) } -func (ec *executionContext) unmarshalNConsoleVPNDeviceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDevice(ctx context.Context, v interface{}) (entities.ConsoleVPNDevice, error) { - res, err := ec.unmarshalInputConsoleVPNDeviceIn(ctx, v) +func (ec *executionContext) unmarshalNConsoleResType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐResourceType(ctx context.Context, v interface{}) (entities.ResourceType, error) { + tmp, err := graphql.UnmarshalString(v) + res := entities.ResourceType(tmp) return res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) marshalNConsoleResType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐResourceType(ctx context.Context, sel ast.SelectionSet, v entities.ResourceType) 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) unmarshalNDate2string(ctx context.Context, v interface{}) (string, error) { res, err := graphql.UnmarshalString(v) return res, graphql.ErrorOnPath(ctx, err) @@ -52122,6 +51310,21 @@ func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis_ 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)) { @@ -52176,33 +51379,18 @@ func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis_ return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___wireguard___v1__CNameRecord2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1CNameRecord(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisWireguardV1CNameRecord) graphql.Marshaler { +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___wireguard___v1__CNameRecord(ctx, sel, v) + return ec._Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate(ctx, sel, v) } -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___wireguard___v1__CNameRecordIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1CNameRecordIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisWireguardV1CNameRecordIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___wireguard___v1__CNameRecordIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___wireguard___v1__Port2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1Port(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisWireguardV1Port) 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___wireguard___v1__Port(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___wireguard___v1__PortIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1PortIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisWireguardV1PortIn, error) { - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___wireguard___v1__PortIn(ctx, 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) } @@ -52603,16 +51791,16 @@ func (ec *executionContext) marshalNManagedResourceKeyValueRef2ᚖgithubᚗcom return ec._ManagedResourceKeyValueRef(ctx, sel, v) } -func (ec *executionContext) marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, sel ast.SelectionSet, v v13.ObjectMeta) graphql.Marshaler { +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{}) (v13.ObjectMeta, error) { +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{}) (*v13.ObjectMeta, error) { +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) } @@ -52627,28 +51815,6 @@ func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapi return ec._PageInfo(ctx, sel, v) } -func (ec *executionContext) unmarshalNPortIn2ᚕᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋwireguardᚋv1ᚐPortᚄ(ctx context.Context, v interface{}) ([]*v11.Port, error) { - var vSlice []interface{} - if v != nil { - vSlice = graphql.CoerceList(v) - } - var err error - res := make([]*v11.Port, len(vSlice)) - for i := range vSlice { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNPortIn2ᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋwireguardᚋv1ᚐPort(ctx, vSlice[i]) - if err != nil { - return nil, err - } - } - return res, nil -} - -func (ec *executionContext) unmarshalNPortIn2ᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋwireguardᚋv1ᚐPort(ctx context.Context, v interface{}) (*v11.Port, error) { - res, err := ec.unmarshalInputPortIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - 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)) { @@ -53456,6 +52622,20 @@ func (ec *executionContext) marshalOBuild2ᚖgithubᚗcomᚋkloudliteᚋapiᚋap return ec._Build(ctx, sel, v) } +func (ec *executionContext) marshalOClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx context.Context, sel ast.SelectionSet, v *entities.ClusterManagedService) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._ClusterManagedService(ctx, sel, v) +} + +func (ec *executionContext) marshalOClusterManagedServicePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServicePaginatedRecords(ctx context.Context, sel ast.SelectionSet, v *model.ClusterManagedServicePaginatedRecords) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._ClusterManagedServicePaginatedRecords(ctx, sel, v) +} + func (ec *executionContext) marshalOConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx context.Context, sel ast.SelectionSet, v *entities.Config) graphql.Marshaler { if v == nil { return graphql.Null @@ -53545,75 +52725,6 @@ func (ec *executionContext) marshalOConfigPaginatedRecords2ᚖgithubᚗcomᚋklo return ec._ConfigPaginatedRecords(ctx, sel, v) } -func (ec *executionContext) marshalOConsoleVPNDevice2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDeviceᚄ(ctx context.Context, sel ast.SelectionSet, v []*entities.ConsoleVPNDevice) graphql.Marshaler { - if v == nil { - return graphql.Null - } - 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.marshalNConsoleVPNDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDevice(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) marshalOConsoleVPNDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConsoleVPNDevice(ctx context.Context, sel ast.SelectionSet, v *entities.ConsoleVPNDevice) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._ConsoleVPNDevice(ctx, sel, v) -} - -func (ec *executionContext) marshalOConsoleVPNDevicePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConsoleVPNDevicePaginatedRecords(ctx context.Context, sel ast.SelectionSet, v *model.ConsoleVPNDevicePaginatedRecords) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._ConsoleVPNDevicePaginatedRecords(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOCoreSearchVPNDevices2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐCoreSearchVPNDevices(ctx context.Context, v interface{}) (*model.CoreSearchVPNDevices, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputCoreSearchVPNDevices(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - func (ec *executionContext) unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx context.Context, v interface{}) (*repos.CursorPagination, error) { if v == nil { return nil, nil @@ -53684,13 +52795,6 @@ func (ec *executionContext) marshalOGithub__com___kloudlite___api___apps___conso return ec._Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor(ctx, sel, v) } -func (ec *executionContext) marshalOGithub__com___kloudlite___api___pkg___types__EncodedString2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIPkgTypesEncodedString(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteAPIPkgTypesEncodedString) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___api___pkg___types__EncodedString(ctx, sel, v) -} - func (ec *executionContext) marshalOGithub__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 { return graphql.Null @@ -53855,6 +52959,21 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret, error) { if v == nil { return nil, nil @@ -53980,375 +53099,7 @@ func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolume2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolume(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) unmarshalOGithub__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) { - if v == nil { - return nil, nil - } - var vSlice []interface{} - if v != nil { - vSlice = graphql.CoerceList(v) - } - var err error - res := make([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn, len(vSlice)) - for i := range vSlice { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn(ctx, vSlice[i]) - if err != nil { - return nil, err - } - } - return res, nil -} - -func (ec *executionContext) marshalOGithub__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 { - return graphql.Null - } - 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.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem(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) unmarshalOGithub__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) { - if v == nil { - return nil, nil - } - var vSlice []interface{} - if v != nil { - vSlice = graphql.CoerceList(v) - } - var err error - res := make([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn, len(vSlice)) - for i := range vSlice { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn(ctx, vSlice[i]) - if err != nil { - return nil, err - } - } - return res, nil -} - -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__Cors2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Cors(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Cors) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__Cors(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__CorsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1CorsIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1CorsIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__CorsIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOGithub__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 { - return graphql.Null - } - 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.marshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFrom2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFrom(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) unmarshalOGithub__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) { - if v == nil { - return nil, nil - } - var vSlice []interface{} - if v != nil { - vSlice = graphql.CoerceList(v) - } - var err error - res := make([]*model.GithubComKloudliteOperatorApisCrdsV1EnvFromIn, len(vSlice)) - for i := range vSlice { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromIn(ctx, vSlice[i]) - if err != nil { - return nil, err - } - } - return res, nil -} - -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvironmentRouting(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1EnvironmentRouting) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvironmentRoutingIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1EnvironmentRoutingIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode2ᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐEnvironmentRoutingMode(ctx context.Context, v interface{}) (*v1.EnvironmentRoutingMode, error) { - if v == nil { - return nil, nil - } - tmp, err := graphql.UnmarshalString(v) - res := v1.EnvironmentRoutingMode(tmp) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode2ᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐEnvironmentRoutingMode(ctx context.Context, sel ast.SelectionSet, v *v1.EnvironmentRoutingMode) graphql.Marshaler { - if v == nil { - return graphql.Null - } - res := graphql.MarshalString(string(*v)) - return res -} - -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvironmentSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1EnvironmentSpec) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvironmentSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1EnvironmentSpecIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentSpecIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ExternalAppSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ExternalAppSpec) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ExternalAppSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ExternalAppSpecIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppSpecIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__HPA2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Hpa(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Hpa) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__HPA(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HPAIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HPAIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1HPAIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HPAIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPGetProbe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbe) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__Https2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPS(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1HTTPS) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__Https(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPSIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1HTTPSIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HttpsIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__Intercept2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Intercept(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Intercept) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__Intercept(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__InterceptIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1InterceptIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1InterceptIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__InterceptIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__Probe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Probe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Probe) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__Probe(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ProbeIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__RateLimit2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RateLimit(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1RateLimit) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__RateLimit(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__RateLimitIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RateLimitIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1RateLimitIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__RateLimitIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOGithub__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 { - return graphql.Null - } - 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.marshalNGithub__com___kloudlite___operator___apis___crds___v1__Route2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Route(ctx, sel, v[i]) + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolume2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolume(ctx, sel, v[i]) } if isLen1 { f(i) @@ -54368,7 +53119,7 @@ func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___ return ret } -func (ec *executionContext) unmarshalOGithub__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) { +func (ec *executionContext) unmarshalOGithub__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) { if v == nil { return nil, nil } @@ -54377,10 +53128,10 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ vSlice = graphql.CoerceList(v) } var err error - res := make([]*model.GithubComKloudliteOperatorApisCrdsV1RouteIn, len(vSlice)) + res := make([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__RouteIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouteIn(ctx, vSlice[i]) + res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn(ctx, vSlice[i]) if err != nil { return nil, err } @@ -54388,37 +53139,89 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ return res, nil } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ShellProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ShellProbe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ShellProbe) graphql.Marshaler { +func (ec *executionContext) marshalOGithub__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 { return graphql.Null } - return ec._Github__com___kloudlite___operator___apis___crds___v1__ShellProbe(ctx, sel, v) + 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.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem(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) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ShellProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ShellProbeIn, error) { +func (ec *executionContext) unmarshalOGithub__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) { if v == nil { return nil, nil } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__TcpProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1TCPProbe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1TCPProbe) graphql.Marshaler { +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__Cors2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Cors(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Cors) graphql.Marshaler { if v == nil { return graphql.Null } - return ec._Github__com___kloudlite___operator___apis___crds___v1__TcpProbe(ctx, sel, v) + return ec._Github__com___kloudlite___operator___apis___crds___v1__Cors(ctx, sel, v) } -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1TCPProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1TCPProbeIn, error) { +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__CorsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1CorsIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1CorsIn, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn(ctx, v) + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__CorsIn(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___wireguard___v1__CNameRecord2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1CNameRecordᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorApisWireguardV1CNameRecord) graphql.Marshaler { +func (ec *executionContext) marshalOGithub__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 { return graphql.Null } @@ -54445,7 +53248,7 @@ func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___wireguard___v1__CNameRecord2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1CNameRecord(ctx, sel, v[i]) + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFrom2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFrom(ctx, sel, v[i]) } if isLen1 { f(i) @@ -54465,7 +53268,7 @@ func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___ return ret } -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___wireguard___v1__CNameRecordIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1CNameRecordInᚄ(ctx context.Context, v interface{}) ([]*model.GithubComKloudliteOperatorApisWireguardV1CNameRecordIn, error) { +func (ec *executionContext) unmarshalOGithub__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) { if v == nil { return nil, nil } @@ -54474,10 +53277,10 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ vSlice = graphql.CoerceList(v) } var err error - res := make([]*model.GithubComKloudliteOperatorApisWireguardV1CNameRecordIn, len(vSlice)) + res := make([]*model.GithubComKloudliteOperatorApisCrdsV1EnvFromIn, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___wireguard___v1__CNameRecordIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1CNameRecordIn(ctx, vSlice[i]) + res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromIn(ctx, vSlice[i]) if err != nil { return nil, err } @@ -54485,22 +53288,159 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ return res, nil } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1DeviceSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisWireguardV1DeviceSpec) graphql.Marshaler { +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvironmentRouting(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1EnvironmentRouting) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvironmentRoutingIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1EnvironmentRoutingIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode2ᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐEnvironmentRoutingMode(ctx context.Context, v interface{}) (*v1.EnvironmentRoutingMode, error) { + if v == nil { + return nil, nil + } + tmp, err := graphql.UnmarshalString(v) + res := v1.EnvironmentRoutingMode(tmp) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode2ᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐEnvironmentRoutingMode(ctx context.Context, sel ast.SelectionSet, v *v1.EnvironmentRoutingMode) graphql.Marshaler { if v == nil { return graphql.Null } - return ec._Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec(ctx, sel, v) + res := graphql.MarshalString(string(*v)) + return res } -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___wireguard___v1__DeviceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1DeviceSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisWireguardV1DeviceSpecIn, error) { +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvironmentSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1EnvironmentSpec) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvironmentSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1EnvironmentSpecIn, error) { if v == nil { return nil, nil } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___wireguard___v1__DeviceSpecIn(ctx, v) + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentSpecIn(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___wireguard___v1__Port2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1Portᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorApisWireguardV1Port) graphql.Marshaler { +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ExternalAppSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ExternalAppSpec) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ExternalAppSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ExternalAppSpecIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppSpecIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__HPA2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Hpa(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Hpa) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__HPA(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HPAIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HPAIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1HPAIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HPAIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPGetProbe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbe) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__Https2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPS(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1HTTPS) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__Https(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPSIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1HTTPSIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HttpsIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__Intercept2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Intercept(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Intercept) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__Intercept(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__InterceptIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1InterceptIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1InterceptIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__InterceptIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__Probe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Probe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Probe) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__Probe(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ProbeIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__RateLimit2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RateLimit(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1RateLimit) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__RateLimit(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__RateLimitIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RateLimitIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1RateLimitIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__RateLimitIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__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 { return graphql.Null } @@ -54527,7 +53467,7 @@ func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___wireguard___v1__Port2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1Port(ctx, sel, v[i]) + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__Route2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Route(ctx, sel, v[i]) } if isLen1 { f(i) @@ -54547,7 +53487,7 @@ func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___ return ret } -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___wireguard___v1__PortIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1PortInᚄ(ctx context.Context, v interface{}) ([]*model.GithubComKloudliteOperatorApisWireguardV1PortIn, error) { +func (ec *executionContext) unmarshalOGithub__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) { if v == nil { return nil, nil } @@ -54556,10 +53496,10 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ vSlice = graphql.CoerceList(v) } var err error - res := make([]*model.GithubComKloudliteOperatorApisWireguardV1PortIn, len(vSlice)) + res := make([]*model.GithubComKloudliteOperatorApisCrdsV1RouteIn, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___wireguard___v1__PortIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisWireguardV1PortIn(ctx, vSlice[i]) + res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__RouteIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouteIn(ctx, vSlice[i]) if err != nil { return nil, err } @@ -54567,6 +53507,36 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ return res, nil } +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ShellProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ShellProbe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ShellProbe) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ShellProbe(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ShellProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ShellProbeIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__TcpProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1TCPProbe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1TCPProbe) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__TcpProbe(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1TCPProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1TCPProbeIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalOGithub__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 { return graphql.Null @@ -54841,7 +53811,7 @@ func (ec *executionContext) marshalOInt2ᚖint64(ctx context.Context, sel ast.Se return res } -func (ec *executionContext) marshalOK8s__io___api___core___v1__Secret2ᚖk8sᚗioᚋapiᚋcoreᚋv1ᚐSecret(ctx context.Context, sel ast.SelectionSet, v *v12.Secret) graphql.Marshaler { +func (ec *executionContext) marshalOK8s__io___api___core___v1__Secret2ᚖk8sᚗioᚋapiᚋcoreᚋv1ᚐSecret(ctx context.Context, sel ast.SelectionSet, v *v11.Secret) graphql.Marshaler { if v == nil { return graphql.Null } @@ -55178,11 +54148,11 @@ func (ec *executionContext) unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudlite return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, sel ast.SelectionSet, v v13.ObjectMeta) graphql.Marshaler { +func (ec *executionContext) marshalOMetadata2k8sᚗ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) unmarshalOMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, v interface{}) (*v13.ObjectMeta, error) { +func (ec *executionContext) unmarshalOMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, v interface{}) (*v12.ObjectMeta, error) { if v == nil { return nil, nil } @@ -55212,6 +54182,14 @@ func (ec *executionContext) unmarshalOSearchApps2ᚖgithubᚗcomᚋkloudliteᚋa return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalOSearchClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchClusterManagedService(ctx context.Context, v interface{}) (*model.SearchClusterManagedService, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputSearchClusterManagedService(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalOSearchConfigs2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchConfigs(ctx context.Context, v interface{}) (*model.SearchConfigs, error) { if v == nil { return nil, nil diff --git a/apps/console/internal/app/graph/model/models_gen.go b/apps/console/internal/app/graph/model/models_gen.go index 900fa6a40..a686801dd 100644 --- a/apps/console/internal/app/graph/model/models_gen.go +++ b/apps/console/internal/app/graph/model/models_gen.go @@ -30,6 +30,17 @@ type Build struct { func (Build) IsEntity() {} +type ClusterManagedServiceEdge struct { + Cursor string `json:"cursor"` + Node *entities.ClusterManagedService `json:"node"` +} + +type ClusterManagedServicePaginatedRecords struct { + Edges []*ClusterManagedServiceEdge `json:"edges"` + PageInfo *PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` +} + type ConfigEdge struct { Cursor string `json:"cursor"` Node *entities.Config `json:"node"` @@ -52,17 +63,6 @@ type ConfigPaginatedRecords struct { TotalCount int `json:"totalCount"` } -type ConsoleVPNDeviceEdge struct { - Cursor string `json:"cursor"` - Node *entities.ConsoleVPNDevice `json:"node"` -} - -type ConsoleVPNDevicePaginatedRecords struct { - Edges []*ConsoleVPNDeviceEdge `json:"edges"` - PageInfo *PageInfo `json:"pageInfo"` - TotalCount int `json:"totalCount"` -} - type CoreSearchVPNDevices struct { Text *repos.MatchFilter `json:"text,omitempty"` IsReady *repos.MatchFilter `json:"isReady,omitempty"` @@ -110,11 +110,6 @@ type GithubComKloudliteAPIAppsConsoleInternalEntitiesSecretCreatedFor struct { ResourceType GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType `json:"resourceType"` } -type GithubComKloudliteAPIPkgTypesEncodedString struct { - Encoding string `json:"encoding"` - Value string `json:"value"` -} - type GithubComKloudliteOperatorApisCommonTypesMsvcRef struct { APIVersion *string `json:"apiVersion,omitempty"` Kind *string `json:"kind,omitempty"` @@ -252,6 +247,15 @@ type GithubComKloudliteOperatorApisCrdsV1BasicAuthIn struct { Username *string `json:"username,omitempty"` } +type GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec struct { + MsvcSpec *GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec `json:"msvcSpec"` + TargetNamespace string `json:"targetNamespace"` +} + +type GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn struct { + MsvcSpec *GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn `json:"msvcSpec"` +} + type GithubComKloudliteOperatorApisCrdsV1ContainerEnv struct { Key string `json:"key"` Optional *bool `json:"optional,omitempty"` @@ -420,6 +424,18 @@ type GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpecIn struct { ResourceTemplate *GithubComKloudliteOperatorApisCrdsV1MresResourceTemplateIn `json:"resourceTemplate"` } +type GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec struct { + NodeSelector map[string]interface{} `json:"nodeSelector,omitempty"` + ServiceTemplate *GithubComKloudliteOperatorApisCrdsV1ServiceTemplate `json:"serviceTemplate"` + Tolerations []*K8sIoAPICoreV1Toleration `json:"tolerations,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn struct { + NodeSelector map[string]interface{} `json:"nodeSelector,omitempty"` + ServiceTemplate *GithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn `json:"serviceTemplate"` + Tolerations []*K8sIoAPICoreV1TolerationIn `json:"tolerations,omitempty"` +} + type GithubComKloudliteOperatorApisCrdsV1MresResourceTemplate struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` @@ -506,6 +522,18 @@ type GithubComKloudliteOperatorApisCrdsV1RouterSpecIn struct { Routes []*GithubComKloudliteOperatorApisCrdsV1RouteIn `json:"routes,omitempty"` } +type GithubComKloudliteOperatorApisCrdsV1ServiceTemplate struct { + APIVersion string `json:"apiVersion"` + Kind string `json:"kind"` + Spec map[string]interface{} `json:"spec,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn struct { + APIVersion string `json:"apiVersion"` + Kind string `json:"kind"` + Spec map[string]interface{} `json:"spec,omitempty"` +} + type GithubComKloudliteOperatorApisCrdsV1ShellProbe struct { Command []string `json:"command,omitempty"` } @@ -522,41 +550,6 @@ type GithubComKloudliteOperatorApisCrdsV1TCPProbeIn struct { Port int `json:"port"` } -type GithubComKloudliteOperatorApisWireguardV1CNameRecord struct { - Host *string `json:"host,omitempty"` - Target *string `json:"target,omitempty"` -} - -type GithubComKloudliteOperatorApisWireguardV1CNameRecordIn struct { - Host *string `json:"host,omitempty"` - Target *string `json:"target,omitempty"` -} - -type GithubComKloudliteOperatorApisWireguardV1DeviceSpec struct { - ActiveNamespace *string `json:"activeNamespace,omitempty"` - CnameRecords []*GithubComKloudliteOperatorApisWireguardV1CNameRecord `json:"cnameRecords,omitempty"` - Disabled *bool `json:"disabled,omitempty"` - NodeSelector map[string]interface{} `json:"nodeSelector,omitempty"` - NoExternalService *bool `json:"noExternalService,omitempty"` - Ports []*GithubComKloudliteOperatorApisWireguardV1Port `json:"ports,omitempty"` -} - -type GithubComKloudliteOperatorApisWireguardV1DeviceSpecIn struct { - ActiveNamespace *string `json:"activeNamespace,omitempty"` - CnameRecords []*GithubComKloudliteOperatorApisWireguardV1CNameRecordIn `json:"cnameRecords,omitempty"` - Ports []*GithubComKloudliteOperatorApisWireguardV1PortIn `json:"ports,omitempty"` -} - -type GithubComKloudliteOperatorApisWireguardV1Port struct { - Port *int `json:"port,omitempty"` - TargetPort *int `json:"targetPort,omitempty"` -} - -type GithubComKloudliteOperatorApisWireguardV1PortIn struct { - Port *int `json:"port,omitempty"` - TargetPort *int `json:"targetPort,omitempty"` -} - type GithubComKloudliteOperatorPkgOperatorCheck struct { Debug *string `json:"debug,omitempty"` Error *string `json:"error,omitempty"` @@ -775,6 +768,11 @@ type SearchApps struct { MarkedForDeletion *repos.MatchFilter `json:"markedForDeletion,omitempty"` } +type SearchClusterManagedService struct { + IsReady *repos.MatchFilter `json:"isReady,omitempty"` + Text *repos.MatchFilter `json:"text,omitempty"` +} + type SearchConfigs struct { Text *repos.MatchFilter `json:"text,omitempty"` IsReady *repos.MatchFilter `json:"isReady,omitempty"` @@ -905,6 +903,7 @@ type GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType string const ( GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeApp GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "app" + GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeClusterManagedService GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "cluster_managed_service" GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeConfig GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "config" GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeEnvironment GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "environment" GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeExternalApp GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "external_app" @@ -914,11 +913,11 @@ const ( GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeRouter GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "router" GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeSecret GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "secret" GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeServiceBinding GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "service_binding" - GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeVpnDevice GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = "vpn_device" ) var AllGithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = []GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType{ GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeApp, + GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeClusterManagedService, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeConfig, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeEnvironment, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeExternalApp, @@ -928,12 +927,11 @@ var AllGithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType = []GithubCo GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeRouter, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeSecret, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeServiceBinding, - GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeVpnDevice, } func (e GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType) IsValid() bool { switch e { - case GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeApp, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeConfig, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeEnvironment, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeExternalApp, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeImagePullSecret, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeImportedManagedResource, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeManagedResource, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeRouter, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeSecret, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeServiceBinding, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeVpnDevice: + case GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeApp, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeClusterManagedService, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeConfig, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeEnvironment, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeExternalApp, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeImagePullSecret, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeImportedManagedResource, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeManagedResource, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeRouter, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeSecret, GithubComKloudliteAPIAppsConsoleInternalEntitiesResourceTypeServiceBinding: return true } return false diff --git a/apps/console/internal/app/graph/resolver-utils.go b/apps/console/internal/app/graph/resolver-utils.go index 44ebc606d..86bb6894b 100644 --- a/apps/console/internal/app/graph/resolver-utils.go +++ b/apps/console/internal/app/graph/resolver-utils.go @@ -94,6 +94,7 @@ var ( errNilVPNDevice = errors.Newf("vpn device obj is nil") errNilImagePullSecret = errors.Newf("imagePullSecret obj is nil") errNilManagedResource = errors.Newf("managed resource obj is nil") + errNilClusterManagedService = errors.Newf("cluster managed service obj is nil") errNilImportedManagedResource = errors.Newf("imported managed resource obj is nil") errNilProject = errors.Newf("project obj is nil") errNilProjectManagedService = errors.Newf("project manged svc obj is nil") diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index b8f14d573..5d3a53cb5 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -9,6 +9,7 @@ enum ConsoleResType { router managed_service managed_resource + imported_managed_resource environment vpn_device } @@ -74,6 +75,11 @@ input SearchManagedResources { markedForDeletion: MatchFilterIn } +input SearchClusterManagedService { + isReady: MatchFilterIn + text: MatchFilterIn +} + input SearchImportedManagedResources { text: MatchFilterIn isReady: MatchFilterIn @@ -131,14 +137,13 @@ type Query { core_getManagedResouceOutputKeys(msvcName: String, envName:String , name: String!): [String!]! @isLoggedInAndVerified @hasAccount core_getManagedResouceOutputKeyValues(msvcName: String, envName:String, keyrefs: [ManagedResourceKeyRefIn]): [ManagedResourceKeyValueRef!]! @isLoggedInAndVerified @hasAccount + infra_listClusterManagedServices(search: SearchClusterManagedService, pagination: CursorPaginationIn): ClusterManagedServicePaginatedRecords @isLoggedInAndVerified @hasAccount + infra_getClusterManagedService(name: String!): ClusterManagedService @isLoggedInAndVerified @hasAccount + core_listManagedResources(search: SearchManagedResources, pq: CursorPaginationIn): ManagedResourcePaginatedRecords @isLoggedInAndVerified @hasAccount core_getManagedResource(msvcName: String, envName: String, name: String!): ManagedResource @isLoggedInAndVerified @hasAccount core_resyncManagedResource(msvcName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount core_listImportedManagedResources(envName: String!, search: SearchImportedManagedResources, pq: CursorPaginationIn): ImportedManagedResourcePaginatedRecords @isLoggedInAndVerified @hasAccount - - core_listVPNDevices(search: CoreSearchVPNDevices, pq: CursorPaginationIn): ConsoleVPNDevicePaginatedRecords @isLoggedInAndVerified @hasAccount - core_listVPNDevicesForUser: [ConsoleVPNDevice!] @isLoggedInAndVerified @hasAccount - core_getVPNDevice(name: String!): ConsoleVPNDevice @isLoggedInAndVerified @hasAccount } type Mutation { @@ -175,22 +180,17 @@ type Mutation { core_updateRouter(envName: String!, router: RouterIn!): Router @isLoggedInAndVerified @hasAccount core_deleteRouter(envName: String!, routerName: String!): Boolean! @isLoggedInAndVerified @hasAccount + infra_createClusterManagedService(service: ClusterManagedServiceIn!): ClusterManagedService @isLoggedInAndVerified @hasAccount + infra_updateClusterManagedService(service: ClusterManagedServiceIn!): ClusterManagedService @isLoggedInAndVerified @hasAccount + infra_deleteClusterManagedService(name: String!): Boolean! @isLoggedInAndVerified @hasAccount + infra_cloneClusterManagedService(clusterName: String!, sourceMsvcName: String!, destinationMsvcName: String!, displayName: String!): ClusterManagedService @isLoggedInAndVerified @hasAccount + core_createManagedResource(msvcName: String! ,mres: ManagedResourceIn!): ManagedResource @isLoggedInAndVerified @hasAccount core_updateManagedResource(msvcName: String!, mres: ManagedResourceIn!): ManagedResource @isLoggedInAndVerified @hasAccount core_deleteManagedResource(msvcName: String!, mresName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_importManagedResource(envName: String!, msvcName: String!, mresName: String!, importName: String!): ImportedManagedResource @isLoggedInAndVerified @hasAccount core_deleteImportedManagedResource(envName: String!, importName: String!): Boolean! @isLoggedInAndVerified @hasAccount - - core_createVPNDevice(vpnDevice: ConsoleVPNDeviceIn!): ConsoleVPNDevice @isLoggedInAndVerified @hasAccount - core_updateVPNDevice(vpnDevice: ConsoleVPNDeviceIn!): ConsoleVPNDevice @isLoggedInAndVerified @hasAccount - - core_updateVPNDevicePorts(deviceName: String!,ports: [PortIn!]!): Boolean! @isLoggedInAndVerified @hasAccount - core_updateVPNDeviceEnv(deviceName: String!,envName: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_updateVpnDeviceNs(deviceName: String!,ns: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_updateVpnClusterName(deviceName: String!,clusterName: String!): Boolean! @isLoggedInAndVerified @hasAccount - - core_deleteVPNDevice(deviceName: String!): Boolean! @isLoggedInAndVerified @hasAccount } type Build @key(fields: "id") { diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index 75be7f019..2ddf049d7 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -7,7 +7,6 @@ package graph import ( "context" "fmt" - "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/apps/console/internal/app/graph/generated" @@ -18,7 +17,6 @@ import ( fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/repos" v11 "github.com/kloudlite/operator/apis/crds/v1" - "github.com/kloudlite/operator/apis/wireguard/v1" ) // Build is the resolver for the build field. @@ -312,149 +310,91 @@ func (r *mutationResolver) CoreDeleteRouter(ctx context.Context, envName string, return true, nil } -// CoreCreateManagedResource is the resolver for the core_createManagedResource field. -func (r *mutationResolver) CoreCreateManagedResource(ctx context.Context, msvcName string, mres entities.ManagedResource) (*entities.ManagedResource, error) { - cc, err := toConsoleContext(ctx) +// InfraCreateClusterManagedService is the resolver for the infra_createClusterManagedService field. +func (r *mutationResolver) InfraCreateClusterManagedService(ctx context.Context, service entities.ClusterManagedService) (*entities.ClusterManagedService, error) { + ictx, err := toConsoleContext(ctx) if err != nil { return nil, errors.NewE(err) } - return r.Domain.CreateManagedResource(newMresContext(cc, &msvcName, nil), mres) -} - -// CoreUpdateManagedResource is the resolver for the core_updateManagedResource field. -func (r *mutationResolver) CoreUpdateManagedResource(ctx context.Context, msvcName string, mres entities.ManagedResource) (*entities.ManagedResource, error) { - cc, err := toConsoleContext(ctx) - if err != nil { - return nil, errors.NewE(err) - } - return r.Domain.UpdateManagedResource(newMresContext(cc, &msvcName, nil), mres) -} - -// CoreDeleteManagedResource is the resolver for the core_deleteManagedResource field. -func (r *mutationResolver) CoreDeleteManagedResource(ctx context.Context, msvcName string, mresName string) (bool, error) { - cc, err := toConsoleContext(ctx) - if err != nil { - return false, errors.NewE(err) - } - if err := r.Domain.DeleteManagedResource(newMresContext(cc, &msvcName, nil), mresName); err != nil { - return false, errors.NewE(err) - } - return true, nil + return r.Domain.CreateClusterManagedService(ictx, service) } -// CoreImportManagedResource is the resolver for the core_importManagedResource field. -func (r *mutationResolver) CoreImportManagedResource(ctx context.Context, envName string, msvcName string, mresName string, importName string) (*entities.ImportedManagedResource, error) { - cc, err := toConsoleContext(ctx) +// InfraUpdateClusterManagedService is the resolver for the infra_updateClusterManagedService field. +func (r *mutationResolver) InfraUpdateClusterManagedService(ctx context.Context, service entities.ClusterManagedService) (*entities.ClusterManagedService, error) { + ictx, err := toConsoleContext(ctx) if err != nil { return nil, errors.NewE(err) } - return r.Domain.ImportManagedResource(newMresContext(cc, &msvcName, &envName), mresName, importName) + return r.Domain.UpdateClusterManagedService(ictx, service) } -// CoreDeleteImportedManagedResource is the resolver for the core_deleteImportedManagedResource field. -func (r *mutationResolver) CoreDeleteImportedManagedResource(ctx context.Context, envName string, importName string) (bool, error) { - cc, err := toConsoleContext(ctx) +// InfraDeleteClusterManagedService is the resolver for the infra_deleteClusterManagedService field. +func (r *mutationResolver) InfraDeleteClusterManagedService(ctx context.Context, name string) (bool, error) { + ictx, err := toConsoleContext(ctx) if err != nil { return false, errors.NewE(err) } - if err := r.Domain.DeleteImportedManagedResource(newResourceContext(cc, envName), importName); err != nil { + if err := r.Domain.DeleteClusterManagedService(ictx, name); err != nil { return false, errors.NewE(err) } return true, nil } -// CoreCreateVPNDevice is the resolver for the core_createVPNDevice field. -func (r *mutationResolver) CoreCreateVPNDevice(ctx context.Context, vpnDevice entities.ConsoleVPNDevice) (*entities.ConsoleVPNDevice, error) { - cc, err := toConsoleContext(ctx) - if err != nil { - return nil, errors.NewE(err) - } - - return r.Domain.CreateVPNDevice(cc, vpnDevice) +// InfraCloneClusterManagedService is the resolver for the infra_cloneClusterManagedService field. +func (r *mutationResolver) InfraCloneClusterManagedService(ctx context.Context, clusterName string, sourceMsvcName string, destinationMsvcName string, displayName string) (*entities.ClusterManagedService, error) { + panic(fmt.Errorf("not implemented: InfraCloneClusterManagedService - infra_cloneClusterManagedService")) } -// CoreUpdateVPNDevice is the resolver for the core_updateVPNDevice field. -func (r *mutationResolver) CoreUpdateVPNDevice(ctx context.Context, vpnDevice entities.ConsoleVPNDevice) (*entities.ConsoleVPNDevice, error) { +// CoreCreateManagedResource is the resolver for the core_createManagedResource field. +func (r *mutationResolver) CoreCreateManagedResource(ctx context.Context, msvcName string, mres entities.ManagedResource) (*entities.ManagedResource, error) { cc, err := toConsoleContext(ctx) if err != nil { return nil, errors.NewE(err) } - - return r.Domain.UpdateVPNDevice(cc, vpnDevice) -} - -// CoreUpdateVPNDevicePorts is the resolver for the core_updateVPNDevicePorts field. -func (r *mutationResolver) CoreUpdateVPNDevicePorts(ctx context.Context, deviceName string, ports []*v1.Port) (bool, error) { - cc, err := toConsoleContext(ctx) - if err != nil { - return false, errors.NewE(err) - } - - if err := r.Domain.UpdateVpnDevicePorts(cc, deviceName, ports); err != nil { - return false, errors.NewE(err) - } - - return true, nil + return r.Domain.CreateManagedResource(newMresContext(cc, &msvcName, nil), mres) } -// CoreUpdateVPNDeviceEnv is the resolver for the core_updateVPNDeviceEnv field. -func (r *mutationResolver) CoreUpdateVPNDeviceEnv(ctx context.Context, deviceName string, envName string) (bool, error) { - if envName == "" { - return false, fmt.Errorf("envName cannot be empty") - } - +// CoreUpdateManagedResource is the resolver for the core_updateManagedResource field. +func (r *mutationResolver) CoreUpdateManagedResource(ctx context.Context, msvcName string, mres entities.ManagedResource) (*entities.ManagedResource, error) { cc, err := toConsoleContext(ctx) if err != nil { - return false, errors.NewE(err) - } - - if err := r.Domain.ActivateVpnDeviceOnEnvironment(cc, deviceName, envName); err != nil { - return false, errors.NewE(err) + return nil, errors.NewE(err) } - - return true, nil + return r.Domain.UpdateManagedResource(newMresContext(cc, &msvcName, nil), mres) } -// CoreUpdateVpnDeviceNs is the resolver for the core_updateVpnDeviceNs field. -func (r *mutationResolver) CoreUpdateVpnDeviceNs(ctx context.Context, deviceName string, ns string) (bool, error) { +// CoreDeleteManagedResource is the resolver for the core_deleteManagedResource field. +func (r *mutationResolver) CoreDeleteManagedResource(ctx context.Context, msvcName string, mresName string) (bool, error) { cc, err := toConsoleContext(ctx) if err != nil { return false, errors.NewE(err) } - - if err := r.Domain.ActivateVPNDeviceOnNamespace(cc, deviceName, ns); err != nil { + if err := r.Domain.DeleteManagedResource(newMresContext(cc, &msvcName, nil), mresName); err != nil { return false, errors.NewE(err) } - return true, nil } -// CoreUpdateVpnClusterName is the resolver for the core_updateVpnClusterName field. -func (r *mutationResolver) CoreUpdateVpnClusterName(ctx context.Context, deviceName string, clusterName string) (bool, error) { +// CoreImportManagedResource is the resolver for the core_importManagedResource field. +func (r *mutationResolver) CoreImportManagedResource(ctx context.Context, envName string, msvcName string, mresName string, importName string) (*entities.ImportedManagedResource, error) { cc, err := toConsoleContext(ctx) if err != nil { - return false, errors.NewE(err) - } - - if err := r.Domain.ActivateVpnDeviceOnCluster(cc, deviceName, clusterName); err != nil { - return false, errors.NewE(err) + return nil, errors.NewE(err) } - return true, nil + return r.Domain.ImportManagedResource(newMresContext(cc, &msvcName, &envName), mresName, importName) } -// CoreDeleteVPNDevice is the resolver for the core_deleteVPNDevice field. -func (r *mutationResolver) CoreDeleteVPNDevice(ctx context.Context, deviceName string) (bool, error) { +// CoreDeleteImportedManagedResource is the resolver for the core_deleteImportedManagedResource field. +func (r *mutationResolver) CoreDeleteImportedManagedResource(ctx context.Context, envName string, importName string) (bool, error) { cc, err := toConsoleContext(ctx) if err != nil { return false, errors.NewE(err) } - - if err := r.Domain.DeleteVPNDevice(cc, deviceName); err != nil { + if err := r.Domain.DeleteImportedManagedResource(newResourceContext(cc, envName), importName); err != nil { return false, errors.NewE(err) } - return true, nil } @@ -889,6 +829,47 @@ func (r *queryResolver) CoreGetManagedResouceOutputKeyValues(ctx context.Context return r.Domain.GetManagedResourceOutputKVs(newMresContext(cc, msvcName, envName), m) } +// InfraListClusterManagedServices is the resolver for the infra_listClusterManagedServices field. +func (r *queryResolver) InfraListClusterManagedServices(ctx context.Context, search *model.SearchClusterManagedService, pagination *repos.CursorPagination) (*model.ClusterManagedServicePaginatedRecords, error) { + ictx, err := toConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + + if pagination == nil { + pagination = &repos.DefaultCursorPagination + } + + filter := map[string]repos.MatchFilter{} + + if search != nil { + if search.IsReady != nil { + filter["status.isReady"] = *search.IsReady + } + + if search.Text != nil { + filter["metadata.name"] = *search.Text + } + } + + pClusters, err := r.Domain.ListClusterManagedServices(ictx, filter, *pagination) + if err != nil { + return nil, errors.NewE(err) + } + + return fn.JsonConvertP[model.ClusterManagedServicePaginatedRecords](pClusters) +} + +// InfraGetClusterManagedService is the resolver for the infra_getClusterManagedService field. +func (r *queryResolver) InfraGetClusterManagedService(ctx context.Context, name string) (*entities.ClusterManagedService, error) { + ictx, err := toConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + + return r.Domain.GetClusterManagedService(ictx, name) +} + // CoreListManagedResources is the resolver for the core_listManagedResources field. func (r *queryResolver) CoreListManagedResources(ctx context.Context, search *model.SearchManagedResources, pq *repos.CursorPagination) (*model.ManagedResourcePaginatedRecords, error) { cc, err := toConsoleContext(ctx) @@ -990,59 +971,11 @@ func (r *queryResolver) CoreListImportedManagedResources(ctx context.Context, en return fn.JsonConvertP[model.ImportedManagedResourcePaginatedRecords](pr) } -// CoreListVPNDevices is the resolver for the core_listVPNDevices field. -func (r *queryResolver) CoreListVPNDevices(ctx context.Context, search *model.CoreSearchVPNDevices, pq *repos.CursorPagination) (*model.ConsoleVPNDevicePaginatedRecords, error) { - filter := map[string]repos.MatchFilter{} - if search != nil { - if search.Text != nil { - filter["metadata.name"] = *search.Text - } - if search.IsReady != nil { - filter["status.isReady"] = *search.IsReady - } - if search.MarkedForDeletion != nil { - filter["markedForDeletion"] = *search.MarkedForDeletion - } - } - - cc, err := toConsoleContext(ctx) - if err != nil { - return nil, errors.NewE(err) - } - - p, err := r.Domain.ListVPNDevices(cc, filter, fn.DefaultIfNil(pq, repos.DefaultCursorPagination)) - if err != nil { - return nil, errors.NewE(err) - } - - return fn.JsonConvertP[model.ConsoleVPNDevicePaginatedRecords](p) -} - -// CoreListVPNDevicesForUser is the resolver for the core_listVPNDevicesForUser field. -func (r *queryResolver) CoreListVPNDevicesForUser(ctx context.Context) ([]*entities.ConsoleVPNDevice, error) { - cc, err := toConsoleContext(ctx) - if err != nil { - return nil, err - } - return r.Domain.ListVPNDevicesForUser(cc) -} - -// CoreGetVPNDevice is the resolver for the core_getVPNDevice field. -func (r *queryResolver) CoreGetVPNDevice(ctx context.Context, name string) (*entities.ConsoleVPNDevice, error) { - cc, err := toConsoleContext(ctx) - if err != nil { - return nil, errors.NewE(err) - } - return r.Domain.GetVPNDevice(cc, name) -} - // Mutation returns generated.MutationResolver implementation. func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResolver{r} } // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type ( - mutationResolver struct{ *Resolver } - queryResolver struct{ *Resolver } -) +type mutationResolver struct{ *Resolver } +type queryResolver struct{ *Resolver } diff --git a/apps/infra/internal/app/graph/struct-to-graphql/clustermanagedservice.graphqls b/apps/console/internal/app/graph/struct-to-graphql/clustermanagedservice.graphqls similarity index 100% rename from apps/infra/internal/app/graph/struct-to-graphql/clustermanagedservice.graphqls rename to apps/console/internal/app/graph/struct-to-graphql/clustermanagedservice.graphqls diff --git a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls index 3af43e405..3eb06e2cf 100644 --- a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -17,11 +17,6 @@ type Github__com___kloudlite___api___common__CreatedOrUpdatedBy @shareable { userName: String! } -type Github__com___kloudlite___api___pkg___types__EncodedString @shareable { - encoding: String! - value: String! -} - type Github__com___kloudlite___api___pkg___types__SyncStatus @shareable { action: Github__com___kloudlite___api___pkg___types__SyncAction! error: String @@ -102,6 +97,11 @@ type Github__com___kloudlite___operator___apis___crds___v1__BasicAuth @shareable username: String } +type Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec @shareable { + msvcSpec: Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec! + targetNamespace: String! +} + type Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv @shareable { key: String! optional: Boolean @@ -187,6 +187,12 @@ type Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec resourceTemplate: Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate! } +type Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec @shareable { + nodeSelector: Map + serviceTemplate: Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate! + tolerations: [K8s__io___api___core___v1__Toleration!] +} + type Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate @shareable { apiVersion: String! kind: String! @@ -230,6 +236,12 @@ type Github__com___kloudlite___operator___apis___crds___v1__RouterSpec @shareabl routes: [Github__com___kloudlite___operator___apis___crds___v1__Route!] } +type Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate @shareable { + apiVersion: String! + kind: String! + spec: Map +} + type Github__com___kloudlite___operator___apis___crds___v1__ShellProbe @shareable { command: [String!] } @@ -238,25 +250,6 @@ type Github__com___kloudlite___operator___apis___crds___v1__TcpProbe @shareable port: Int! } -type Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord @shareable { - host: String - target: String -} - -type Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec @shareable { - activeNamespace: String - cnameRecords: [Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecord!] - disabled: Boolean - nodeSelector: Map - noExternalService: Boolean - ports: [Github__com___kloudlite___operator___apis___wireguard___v1__Port!] -} - -type Github__com___kloudlite___operator___apis___wireguard___v1__Port @shareable { - port: Int - targetPort: Int -} - type Github__com___kloudlite___operator___pkg___operator__Check @shareable { debug: String error: String @@ -440,6 +433,10 @@ input Github__com___kloudlite___operator___apis___crds___v1__BasicAuthIn { username: String } +input Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn { + msvcSpec: Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn! +} + input Github__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn { key: String! optional: Boolean @@ -523,6 +520,12 @@ input Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec resourceTemplate: Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplateIn! } +input Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn { + nodeSelector: Map + serviceTemplate: Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn! + tolerations: [K8s__io___api___core___v1__TolerationIn!] +} + input Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplateIn { apiVersion: String! kind: String! @@ -566,6 +569,12 @@ input Github__com___kloudlite___operator___apis___crds___v1__RouterSpecIn { routes: [Github__com___kloudlite___operator___apis___crds___v1__RouteIn!] } +input Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn { + apiVersion: String! + kind: String! + spec: Map +} + input Github__com___kloudlite___operator___apis___crds___v1__ShellProbeIn { command: [String!] } @@ -574,22 +583,6 @@ input Github__com___kloudlite___operator___apis___crds___v1__TcpProbeIn { port: Int! } -input Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecordIn { - host: String - target: String -} - -input Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpecIn { - activeNamespace: String - cnameRecords: [Github__com___kloudlite___operator___apis___wireguard___v1__CNameRecordIn!] - ports: [Github__com___kloudlite___operator___apis___wireguard___v1__PortIn!] -} - -input Github__com___kloudlite___operator___apis___wireguard___v1__PortIn { - port: Int - targetPort: Int -} - input Github__com___kloudlite___operator___pkg___operator__CheckIn { debug: String error: String @@ -674,6 +667,7 @@ enum Github__com___kloudlite___api___apps___console___internal___entities__PullS enum Github__com___kloudlite___api___apps___console___internal___entities__ResourceType { app + cluster_managed_service config environment external_app @@ -683,7 +677,6 @@ enum Github__com___kloudlite___api___apps___console___internal___entities__Resou router secret service_binding - vpn_device } enum Github__com___kloudlite___api___pkg___repos__MatchType { diff --git a/apps/console/internal/app/graph/struct-to-graphql/consolevpndevice.graphqls b/apps/console/internal/app/graph/struct-to-graphql/consolevpndevice.graphqls deleted file mode 100644 index efa0157f4..000000000 --- a/apps/console/internal/app/graph/struct-to-graphql/consolevpndevice.graphqls +++ /dev/null @@ -1,43 +0,0 @@ -type ConsoleVPNDevice @shareable { - accountName: String! - apiVersion: String - clusterName: String - createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! - creationTime: Date! - displayName: String! - environmentName: String - id: ID! - kind: String - lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! - linkedClusters: [String!] - markedForDeletion: Boolean - metadata: Metadata @goField(name: "objectMeta") - recordVersion: Int! - spec: Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpec - status: Github__com___kloudlite___operator___pkg___operator__Status - syncStatus: Github__com___kloudlite___api___pkg___types__SyncStatus! - updateTime: Date! - wireguardConfig: Github__com___kloudlite___api___pkg___types__EncodedString -} - -type ConsoleVPNDeviceEdge @shareable { - cursor: String! - node: ConsoleVPNDevice! -} - -type ConsoleVPNDevicePaginatedRecords @shareable { - edges: [ConsoleVPNDeviceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ConsoleVPNDeviceIn { - apiVersion: String - clusterName: String - displayName: String! - environmentName: String - kind: String - metadata: MetadataIn - spec: Github__com___kloudlite___operator___apis___wireguard___v1__DeviceSpecIn -} - diff --git a/apps/console/internal/app/grpc-server.go b/apps/console/internal/app/grpc-server.go index d0caa937f..3cd2fd63e 100644 --- a/apps/console/internal/app/grpc-server.go +++ b/apps/console/internal/app/grpc-server.go @@ -2,21 +2,11 @@ package app import ( "context" - "encoding/json" - "fmt" "github.com/kloudlite/api/apps/console/internal/domain" - "github.com/kloudlite/api/apps/console/internal/entities" - "github.com/kloudlite/api/common" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/console" "github.com/kloudlite/api/pkg/k8s" "github.com/kloudlite/api/pkg/repos" - common_types "github.com/kloudlite/operator/apis/common-types" - crdsv1 "github.com/kloudlite/operator/apis/crds/v1" - operator "github.com/kloudlite/operator/pkg/operator" - corev1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) type grpcServer struct { @@ -42,78 +32,6 @@ func (g *grpcServer) ArchiveEnvironmentsForCluster(ctx context.Context, in *cons return &console.ArchiveEnvironmentsForClusterOut{Archived: archiveStatus}, nil } -// CreateManagedResource implements console.ConsoleServer. -func (g *grpcServer) CreateManagedResource(ctx context.Context, in *console.CreateManagedResourceIn) (*console.CreateManagedResourceOut, error) { - consoleCtx := domain.ConsoleContext{ - Context: ctx, - UserId: repos.ID(in.UserId), - UserName: in.UserName, - UserEmail: in.UserEmail, - AccountName: in.AccountName, - } - - // domain.ManagedResourceContext{ - // ConsoleContext: ctx, - // ManagedServiceName: new(string), - // EnvironmentName: new(string), - // } - - var outputSecret corev1.Secret - if err := json.Unmarshal(in.OutputSecret, &outputSecret); err != nil { - return nil, err - } - - createdBy := common.CreatedOrUpdatedBy{ - UserId: repos.ID(in.UserId), - UserName: in.UserName, - UserEmail: in.UserEmail, - } - - _, err := g.d.CreateRootManagedResource(consoleCtx, in.AccountNamespace, &entities.ManagedResource{ - ManagedResource: crdsv1.ManagedResource{ - ObjectMeta: metav1.ObjectMeta{ - Name: in.MresName, - Namespace: in.MsvcTargetNamespace, - }, - Spec: crdsv1.ManagedResourceSpec{ - ResourceTemplate: crdsv1.MresResourceTemplate{ - TypeMeta: metav1.TypeMeta{ - Kind: "RootCredentials", - APIVersion: in.MsvcApiVersion, - }, - MsvcRef: common_types.MsvcRef{ - Name: in.MsvcName, - Namespace: "", - }, - Spec: map[string]apiextensionsv1.JSON{}, - }, - }, - Status: operator.Status{ - IsReady: true, - }, - Output: common_types.ManagedResourceOutput{ - CredentialsRef: common_types.LocalObjectReference{ - Name: outputSecret.Name, - }, - }, - }, - AccountName: in.AccountName, - ManagedServiceName: in.MsvcName, - ClusterName: in.ClusterName, - SyncedOutputSecretRef: &outputSecret, - ResourceMetadata: common.ResourceMetadata{ - DisplayName: fmt.Sprintf("%s/%s", in.MsvcName, in.MresName), - CreatedBy: createdBy, - LastUpdatedBy: createdBy, - }, - // SyncStatus: types.SyncStatus{}, - }) - if err != nil { - return nil, err - } - return &console.CreateManagedResourceOut{Ok: true}, nil -} - func newConsoleGrpcServer(d domain.Domain, kcli k8s.Client) console.ConsoleServer { return &grpcServer{ d: d, diff --git a/apps/console/internal/app/process-error-on-apply.go b/apps/console/internal/app/process-error-on-apply.go index 4bb931fc5..22d2bd5de 100644 --- a/apps/console/internal/app/process-error-on-apply.go +++ b/apps/console/internal/app/process-error-on-apply.go @@ -16,6 +16,7 @@ import ( "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/api/pkg/messaging" msgTypes "github.com/kloudlite/api/pkg/messaging/types" + crdsv1 "github.com/kloudlite/operator/apis/crds/v1" ) type ErrorOnApplyConsumer messaging.Consumer @@ -69,20 +70,6 @@ func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, d domain.Domain, logger gvkStr := obj.GroupVersionKind().String() switch gvkStr { - case deviceGVK.String(): - { - if errObj.Action == t.ActionApply { - return d.OnVPNDeviceApplyError(dctx, errObj.Error, obj.GetName(), opts) - } - - p, err := fn.JsonConvert[entities.ConsoleVPNDevice](obj.Object) - if err != nil { - return err - } - - return d.OnVPNDeviceDeleteMessage(dctx, p) - } - case environmentGVK.String(): { if errObj.Action == t.ActionApply { @@ -185,15 +172,27 @@ func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, d domain.Domain, logger } case managedResourceGVK.String(): { - mres, err := fn.JsonConvert[entities.ManagedResource](obj.Object) + mres, err := fn.JsonConvert[crdsv1.ManagedResource](obj.Object) + if err != nil { + return err + } + + if errObj.Action == t.ActionApply { + return d.OnManagedResourceApplyError(dctx, errObj.Error, mres.Spec.ResourceTemplate.MsvcRef.Name, obj.GetName(), opts) + } + return d.OnManagedResourceDeleteMessage(dctx, mres.Spec.ResourceTemplate.MsvcRef.Name, mres) + } + case clusterMsvcGVK.String(): + { + cmsvc, err := fn.JsonConvert[entities.ClusterManagedService](obj.Object) if err != nil { return err } if errObj.Action == t.ActionApply { - return d.OnManagedResourceApplyError(dctx, errObj.Error, mres.ManagedResource.Spec.ResourceTemplate.MsvcRef.Name, obj.GetName(), opts) + return d.OnClusterManagedServiceApplyError(dctx, em.ClusterName, obj.GetName(), errObj.Error, opts) } - return d.OnManagedResourceDeleteMessage(dctx, mres.ManagedResource.Spec.ResourceTemplate.MsvcRef.Name, mres) + return d.OnClusterManagedServiceDeleteMessage(dctx, em.ClusterName, cmsvc) } default: diff --git a/apps/console/internal/app/process-resource-updates.go b/apps/console/internal/app/process-resource-updates.go index 56c51d070..306fa32d1 100644 --- a/apps/console/internal/app/process-resource-updates.go +++ b/apps/console/internal/app/process-resource-updates.go @@ -14,7 +14,7 @@ import ( "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/api/pkg/messaging" msgTypes "github.com/kloudlite/api/pkg/messaging/types" - t "github.com/kloudlite/api/pkg/types" + crdsv1 "github.com/kloudlite/operator/apis/crds/v1" networkingv1 "github.com/kloudlite/operator/apis/networking/v1" "github.com/kloudlite/operator/operators/resource-watcher/types" corev1 "k8s.io/api/core/v1" @@ -39,6 +39,7 @@ var ( secretGVK = fn.GVK("v1", "Secret") routerGVK = fn.GVK("crds.kloudlite.io/v1", "Router") managedResourceGVK = fn.GVK("crds.kloudlite.io/v1", "ManagedResource") + clusterMsvcGVK = fn.GVK("crds.kloudlite.io/v1", "ClusterManagedService") serviceBindingGVK = fn.GVK("networking.kloudlite.io/v1", "ServiceBinding") ) @@ -128,33 +129,6 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo opts := domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp, ClusterName: ru.ClusterName} switch gvkStr { - case deviceGVK.String(): - { - - dev, err := fn.JsonConvert[entities.ConsoleVPNDevice](rwu.Object) - if err != nil { - return errors.NewE(err) - } - - if v, ok := rwu.Object[types.KeyVPNDeviceConfig]; ok { - b, err := json.Marshal(v) - if err != nil { - return errors.NewE(err) - } - var encodedStr t.EncodedString - if err := json.Unmarshal(b, &encodedStr); err != nil { - return errors.NewE(err) - } - dev.WireguardConfig = encodedStr - } - - if resStatus == types.ResourceStatusDeleted { - return d.OnVPNDeviceDeleteMessage(dctx, dev) - } - - return d.OnVPNDeviceUpdateMessage(dctx, dev, resStatus, opts, ru.ClusterName) - } - case environmentGVK.String(): { var ws entities.Environment @@ -264,16 +238,12 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo } case managedResourceGVK.String(): { - var mres entities.ManagedResource + var mres crdsv1.ManagedResource if err := fn.JsonConversion(rwu.Object, &mres); err != nil { return errors.NewE(err) } - //rctx, err := getResourceContext(dctx, entities.ResourceTypeManagedResource, ru.ClusterName, obj) - //if err != nil { - // return errors.NewE(err) - //} - + var outputSecret *corev1.Secret if v, ok := rwu.Object[types.KeyManagedResSecret]; ok { s, err := fn.JsonConvertP[corev1.Secret](v) if err != nil { @@ -282,13 +252,13 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo } s.SetManagedFields(nil) mLogger.Infof("seting managed resource output secret") - mres.SyncedOutputSecretRef = s + outputSecret = s } if resStatus == types.ResourceStatusDeleted { - return d.OnManagedResourceDeleteMessage(dctx, mres.ManagedResource.Spec.ResourceTemplate.MsvcRef.Name, mres) + return d.OnManagedResourceDeleteMessage(dctx, mres.Spec.ResourceTemplate.MsvcRef.Name, mres) } - return d.OnManagedResourceUpdateMessage(dctx, mres.ManagedResource.Spec.ResourceTemplate.MsvcRef.Name, mres, resStatus, opts) + return d.OnManagedResourceUpdateMessage(dctx, mres.Spec.ResourceTemplate.MsvcRef.Name, mres, outputSecret, resStatus, opts) } case serviceBindingGVK.String(): @@ -303,6 +273,29 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo } return d.OnServiceBindingUpdateMessage(dctx, &svcb, resStatus, opts) } + + case clusterMsvcGVK.String(): + { + var cmsvc entities.ClusterManagedService + if err := fn.JsonConversion(rwu.Object, &cmsvc); err != nil { + return errors.NewE(err) + } + + if v, ok := rwu.Object[types.KeyClusterManagedSvcSecret]; ok { + v2, err := fn.JsonConvertP[corev1.Secret](v) + if err != nil { + mLogger.Infof("managed resource, invalid output secret received") + return errors.NewE(err) + } + v2.SetManagedFields(nil) + cmsvc.SyncedOutputSecretRef = v2 + } + + if resStatus == types.ResourceStatusDeleted { + return d.OnClusterManagedServiceDeleteMessage(dctx, ru.ClusterName, cmsvc) + } + return d.OnClusterManagedServiceUpdateMessage(dctx, ru.ClusterName, cmsvc, resStatus, domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp}) + } } return nil } diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index a99166140..a941ec988 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -9,7 +9,6 @@ import ( "github.com/kloudlite/api/common/fields" crdsv1 "github.com/kloudlite/operator/apis/crds/v1" - wgv1 "github.com/kloudlite/operator/apis/wireguard/v1" "github.com/kloudlite/operator/operators/resource-watcher/types" @@ -17,6 +16,7 @@ import ( "github.com/kloudlite/api/pkg/repos" networkingv1 "github.com/kloudlite/operator/apis/networking/v1" + corev1 "k8s.io/api/core/v1" ) type ConsoleContext struct { @@ -238,7 +238,6 @@ type Domain interface { GetManagedResourceOutputKVs(ctx ManagedResourceContext, keyrefs []ManagedResourceKeyRef) ([]*ManagedResourceKeyValueRef, error) GetImportedManagedResourceOutputKVs(ctx ResourceContext, keyrefs []ManagedResourceKeyRef) ([]*ManagedResourceKeyValueRef, error) - CreateRootManagedResource(ctx ConsoleContext, accountNamespace string, mres *entities.ManagedResource) (*entities.ManagedResource, error) CreateManagedResource(ctx ManagedResourceContext, mres entities.ManagedResource) (*entities.ManagedResource, error) UpdateManagedResource(ctx ManagedResourceContext, mres entities.ManagedResource) (*entities.ManagedResource, error) DeleteManagedResource(ctx ManagedResourceContext, name string) error @@ -256,8 +255,8 @@ type Domain interface { // OnImportedManagedResourceUpdateMessage(ctx ConsoleContext, secret *corev1.Secret, status types.ResourceStatus, opts UpdateAndDeleteOpts) error OnManagedResourceApplyError(ctx ConsoleContext, errMsg string, msvcName string, name string, opts UpdateAndDeleteOpts) error - OnManagedResourceDeleteMessage(ctx ConsoleContext, msvcName string, mres entities.ManagedResource) error - OnManagedResourceUpdateMessage(ctx ConsoleContext, msvcName string, mres entities.ManagedResource, status types.ResourceStatus, opts UpdateAndDeleteOpts) error + OnManagedResourceDeleteMessage(ctx ConsoleContext, msvcName string, mres crdsv1.ManagedResource) error + OnManagedResourceUpdateMessage(ctx ConsoleContext, msvcName string, mres crdsv1.ManagedResource, outputSecret *corev1.Secret, status types.ResourceStatus, opts UpdateAndDeleteOpts) error ResyncManagedResource(ctx ConsoleContext, msvcName string, name string) error @@ -291,38 +290,9 @@ type Domain interface { ResyncImagePullSecret(ctx ConsoleContext, name string) error GetEnvironmentResourceMapping(ctx ConsoleContext, resType entities.ResourceType, clusterName string, namespace string, name string) (*entities.ResourceMapping, error) - // GetProjectResourceMapping(ctx ConsoleContext, resType entities.ResourceType, clusterName string, namespace string, name string) (*entities.ResourceMapping, error) - - // ListProjectManagedServices(ctx ConsoleContext, projectName string, mf map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.ProjectManagedService], error) - // GetProjectManagedService(ctx ConsoleContext, projectName string, serviceName string) (*entities.ProjectManagedService, error) - // CreateProjectManagedService(ctx ConsoleContext, projectName string, service entities.ProjectManagedService) (*entities.ProjectManagedService, error) - // UpdateProjectManagedService(ctx ConsoleContext, projectName string, service entities.ProjectManagedService) (*entities.ProjectManagedService, error) - // DeleteProjectManagedService(ctx ConsoleContext, projectName string, name string) error - - //RestartProjectManagedService(ctx ConsoleContext, projectName string, name string) error - // - //OnProjectManagedServiceApplyError(ctx ConsoleContext, projectName, name, errMsg string, opts UpdateAndDeleteOpts) error - //OnProjectManagedServiceDeleteMessage(ctx ConsoleContext, projectName string, service entities.ProjectManagedService) error - //OnProjectManagedServiceUpdateMessage(ctx ConsoleContext, projectName string, service entities.ProjectManagedService, status types.ResourceStatus, opts UpdateAndDeleteOpts) error - //ResyncProjectManagedService(ctx ConsoleContext, projectName, name string) error - - ListVPNDevices(ctx ConsoleContext, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.ConsoleVPNDevice], error) - ListVPNDevicesForUser(ctx ConsoleContext) ([]*entities.ConsoleVPNDevice, error) - GetVPNDevice(ctx ConsoleContext, name string) (*entities.ConsoleVPNDevice, error) - CreateVPNDevice(ctx ConsoleContext, device entities.ConsoleVPNDevice) (*entities.ConsoleVPNDevice, error) - UpdateVPNDevice(ctx ConsoleContext, device entities.ConsoleVPNDevice) (*entities.ConsoleVPNDevice, error) - DeleteVPNDevice(ctx ConsoleContext, name string) error - UpdateVpnDevicePorts(ctx ConsoleContext, devName string, ports []*wgv1.Port) error - ActivateVpnDeviceOnEnvironment(ctx ConsoleContext, devName string, envName string) error - - OnVPNDeviceApplyError(ctx ConsoleContext, errMsg string, name string, opts UpdateAndDeleteOpts) error - OnVPNDeviceDeleteMessage(ctx ConsoleContext, device entities.ConsoleVPNDevice) error - OnVPNDeviceUpdateMessage(ctx ConsoleContext, device entities.ConsoleVPNDevice, status types.ResourceStatus, opts UpdateAndDeleteOpts, clusterName string) error - - ActivateVpnDeviceOnCluster(ctx ConsoleContext, devName string, clusterName string) error - ActivateVPNDeviceOnNamespace(ctx ConsoleContext, devName string, namespace string) error ServiceBinding + ClusterManagedService } type ServiceBinding interface { @@ -330,6 +300,22 @@ type ServiceBinding interface { OnServiceBindingDeleteMessage(ctx ConsoleContext, svcb *networkingv1.ServiceBinding) error } +type ClusterManagedService interface { + ListClusterManagedServices(ctx ConsoleContext, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.ClusterManagedService], error) + + GetClusterManagedService(ctx ConsoleContext, serviceName string) (*entities.ClusterManagedService, error) + + CreateClusterManagedService(ctx ConsoleContext, cmsvc entities.ClusterManagedService) (*entities.ClusterManagedService, error) + // CloneClusterManagedService(ctx ConsoleContext, args CloneManagedServiceArgs) (*entities.ClusterManagedService, error) + UpdateClusterManagedService(ctx ConsoleContext, cmsvc entities.ClusterManagedService) (*entities.ClusterManagedService, error) + DeleteClusterManagedService(ctx ConsoleContext, name string) error + ArchiveClusterManagedService(ctx ConsoleContext, clusterName string) error + + OnClusterManagedServiceApplyError(ctx ConsoleContext, clusterName, name, errMsg string, opts UpdateAndDeleteOpts) error + OnClusterManagedServiceDeleteMessage(ctx ConsoleContext, clusterName string, service entities.ClusterManagedService) error + OnClusterManagedServiceUpdateMessage(ctx ConsoleContext, clusterName string, service entities.ClusterManagedService, status types.ResourceStatus, opts UpdateAndDeleteOpts) error +} + type PublishMsg string const ( diff --git a/apps/infra/internal/domain/cluster-managed-service.go b/apps/console/internal/domain/cluster-managed-service.go similarity index 58% rename from apps/infra/internal/domain/cluster-managed-service.go rename to apps/console/internal/domain/cluster-managed-service.go index 6df0a1197..613f1f5bf 100644 --- a/apps/infra/internal/domain/cluster-managed-service.go +++ b/apps/console/internal/domain/cluster-managed-service.go @@ -1,24 +1,24 @@ package domain import ( - "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/apps/infra/internal/entities" - fc "github.com/kloudlite/api/apps/infra/internal/entities/field-constants" "github.com/kloudlite/api/common" "github.com/kloudlite/api/common/fields" - "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/console" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/pkg/repos" t "github.com/kloudlite/api/pkg/types" + common_types "github.com/kloudlite/operator/apis/common-types" crdsv1 "github.com/kloudlite/operator/apis/crds/v1" "github.com/kloudlite/operator/operators/resource-watcher/types" + "github.com/kloudlite/operator/pkg/operator" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -func (d *domain) ListClusterManagedServices(ctx InfraContext, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.ClusterManagedService], error) { +func (d *domain) ListClusterManagedServices(ctx ConsoleContext, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.ClusterManagedService], error) { if err := d.canPerformActionInAccount(ctx, iamT.ListClusterManagedServices); err != nil { return nil, errors.NewE(err) } @@ -35,7 +35,7 @@ func (d *domain) ListClusterManagedServices(ctx InfraContext, search map[string] return pr, nil } -func (d *domain) findClusterManagedService(ctx InfraContext, name string) (*entities.ClusterManagedService, error) { +func (d *domain) findClusterManagedService(ctx ConsoleContext, name string) (*entities.ClusterManagedService, error) { cmsvc, err := d.clusterManagedServiceRepo.FindOne(ctx, repos.Filter{ fields.AccountName: ctx.AccountName, fields.MetadataName: name, @@ -50,7 +50,7 @@ func (d *domain) findClusterManagedService(ctx InfraContext, name string) (*enti return cmsvc, nil } -func (d *domain) GetClusterManagedService(ctx InfraContext, serviceName string) (*entities.ClusterManagedService, error) { +func (d *domain) GetClusterManagedService(ctx ConsoleContext, serviceName string) (*entities.ClusterManagedService, error) { if err := d.canPerformActionInAccount(ctx, iamT.GetClusterManagedService); err != nil { return nil, errors.NewE(err) } @@ -63,12 +63,14 @@ func (d *domain) GetClusterManagedService(ctx InfraContext, serviceName string) return c, nil } -func (d *domain) applyClusterManagedService(ctx InfraContext, cmsvc *entities.ClusterManagedService) error { +func (d *domain) applyClusterManagedService(ctx ConsoleContext, cmsvc *entities.ClusterManagedService) error { addTrackingId(&cmsvc.ClusterManagedService, cmsvc.Id) - return d.resDispatcher.ApplyToTargetCluster(ctx, cmsvc.ClusterName, &cmsvc.ClusterManagedService, cmsvc.RecordVersion) + + // return d.applyK8sResource(ctx, envName string, obj client.Object, recordVersion int) + return d.applyK8sResourceOnCluster(ctx, cmsvc.ClusterName, &cmsvc.ClusterManagedService, cmsvc.RecordVersion) } -func (d *domain) CreateClusterManagedService(ctx InfraContext, cmsvc entities.ClusterManagedService) (*entities.ClusterManagedService, error) { +func (d *domain) CreateClusterManagedService(ctx ConsoleContext, cmsvc entities.ClusterManagedService) (*entities.ClusterManagedService, error) { if err := d.canPerformActionInAccount(ctx, iamT.CreateClusterManagedService); err != nil { return nil, errors.NewE(err) } @@ -115,7 +117,7 @@ func (d *domain) CreateClusterManagedService(ctx InfraContext, cmsvc entities.Cl return nil, errors.NewE(err) } - d.resourceEventPublisher.PublishResourceEvent(ctx, cmsvc.ClusterName, ResourceTypeClusterManagedService, ncms.Name, PublishAdd) + d.resourceEventPublisher.PublishClusterManagedServiceEvent(ctx, ncms.Name, entities.ResourceTypeClusterManagedService, ncms.Name, PublishAdd) return ncms, nil } @@ -131,7 +133,7 @@ func (d *domain) getClusterManagedServiceTargetNamespace(msvcName string) string return fmt.Sprintf("cmsvc-%s", msvcName) } -func (d *domain) CloneClusterManagedService(ctx InfraContext, args CloneManagedServiceArgs) (*entities.ClusterManagedService, error) { +func (d *domain) CloneClusterManagedService(ctx ConsoleContext, args CloneManagedServiceArgs) (*entities.ClusterManagedService, error) { if err := d.canPerformActionInAccount(ctx, iamT.CloneClusterManagedService); err != nil { return nil, errors.NewE(err) } @@ -188,7 +190,7 @@ func (d *domain) CloneClusterManagedService(ctx InfraContext, args CloneManagedS return destMsvc, nil } -func (d *domain) ArchiveClusterManagedService(ctx InfraContext, clusterName string) error { +func (d *domain) ArchiveClusterManagedService(ctx ConsoleContext, clusterName string) error { filter := repos.Filter{ fields.AccountName: ctx.AccountName, fields.ClusterName: clusterName, @@ -220,7 +222,7 @@ func (d *domain) ArchiveClusterManagedService(ctx InfraContext, clusterName stri return nil } -func (d *domain) UpdateClusterManagedService(ctx InfraContext, cmsvc entities.ClusterManagedService) (*entities.ClusterManagedService, error) { +func (d *domain) UpdateClusterManagedService(ctx ConsoleContext, cmsvc entities.ClusterManagedService) (*entities.ClusterManagedService, error) { if err := d.canPerformActionInAccount(ctx, iamT.UpdateClusterManagedService); err != nil { return nil, errors.NewE(err) } @@ -230,21 +232,18 @@ func (d *domain) UpdateClusterManagedService(ctx InfraContext, cmsvc entities.Cl return nil, errors.NewE(err) } - patchForUpdate := common.PatchForUpdate( - ctx, - &cmsvc, - common.PatchOpts{ - XPatch: repos.Document{ - fc.ClusterManagedServiceSpecMsvcSpec: cmsvc.Spec.MSVCSpec, - }, - }) + patchForUpdate := common.PatchForUpdate(ctx, &cmsvc, common.PatchOpts{ + XPatch: repos.Document{ + fc.ClusterManagedServiceSpecMsvcSpec: cmsvc.Spec.MSVCSpec, + }, + }) ucmsvc, err := d.clusterManagedServiceRepo.Patch(ctx, repos.Filter{fields.AccountName: ctx.AccountName, fields.MetadataName: cmsvc.Name}, patchForUpdate) if err != nil { return nil, errors.NewE(err) } - d.resourceEventPublisher.PublishResourceEvent(ctx, ucmsvc.ClusterName, ResourceTypeClusterManagedService, ucmsvc.Name, PublishUpdate) + d.resourceEventPublisher.PublishClusterManagedServiceEvent(ctx, ucmsvc.Name, entities.ResourceTypeClusterManagedService, ucmsvc.Name, PublishUpdate) if err := d.applyClusterManagedService(ctx, ucmsvc); err != nil { return nil, errors.NewE(err) @@ -253,7 +252,7 @@ func (d *domain) UpdateClusterManagedService(ctx InfraContext, cmsvc entities.Cl return ucmsvc, nil } -func (d *domain) DeleteClusterManagedService(ctx InfraContext, name string) error { +func (d *domain) DeleteClusterManagedService(ctx ConsoleContext, name string) error { if err := d.canPerformActionInAccount(ctx, iamT.DeleteClusterManagedService); err != nil { return errors.NewE(err) } @@ -267,12 +266,12 @@ func (d *domain) DeleteClusterManagedService(ctx InfraContext, name string) erro return d.clusterManagedServiceRepo.DeleteById(ctx, ucmsvc.Id) } - d.resourceEventPublisher.PublishResourceEvent(ctx, ucmsvc.ClusterName, ResourceTypeClusterManagedService, ucmsvc.Name, PublishUpdate) + d.resourceEventPublisher.PublishClusterManagedServiceEvent(ctx, ucmsvc.Name, entities.ResourceTypeClusterManagedService, ucmsvc.Name, PublishUpdate) - return d.resDispatcher.DeleteFromTargetCluster(ctx, ucmsvc.ClusterName, &ucmsvc.ClusterManagedService) + return d.deleteK8sResourceOfCluster(ctx, ucmsvc.ClusterName, &ucmsvc.ClusterManagedService) } -func (d *domain) OnClusterManagedServiceApplyError(ctx InfraContext, clusterName, name, errMsg string, opts UpdateAndDeleteOpts) error { +func (d *domain) OnClusterManagedServiceApplyError(ctx ConsoleContext, clusterName, name, errMsg string, opts UpdateAndDeleteOpts) error { ucmsvc, err := d.clusterManagedServiceRepo.Patch( ctx, repos.Filter{ @@ -291,27 +290,41 @@ func (d *domain) OnClusterManagedServiceApplyError(ctx InfraContext, clusterName return errors.NewE(err) } - d.resourceEventPublisher.PublishResourceEvent(ctx, clusterName, ResourceTypeClusterManagedService, ucmsvc.Name, PublishDelete) + d.resourceEventPublisher.PublishClusterManagedServiceEvent(ctx, ucmsvc.Name, entities.ResourceTypeClusterManagedService, ucmsvc.Name, PublishUpdate) return errors.NewE(err) } -func (d *domain) OnClusterManagedServiceDeleteMessage(ctx InfraContext, clusterName string, service entities.ClusterManagedService) error { - err := d.clusterManagedServiceRepo.DeleteOne( - ctx, - repos.Filter{ - fields.ClusterName: clusterName, - fields.AccountName: ctx.AccountName, - fields.MetadataName: service.Name, - }, - ) +func (d *domain) OnClusterManagedServiceDeleteMessage(ctx ConsoleContext, clusterName string, service entities.ClusterManagedService) error { + xService, err := d.findClusterManagedService(ctx, service.Name) if err != nil { return errors.NewE(err) } - d.resourceEventPublisher.PublishResourceEvent(ctx, clusterName, ResourceTypeClusterManagedService, service.Name, PublishDelete) + + if xService == nil { + return errors.Newf("no cluster manage service found") + } + + if _, err := d.MatchRecordVersion(service.Annotations, xService.RecordVersion); err != nil { + return nil + } + + if err := d.clusterManagedServiceRepo.DeleteById(ctx, xService.Id); err != nil { + return errors.NewE(err) + } + + if err := d.deleteAllManagedResources(ctx, xService.Name); err != nil { + return errors.NewE(err) + } + + if err := d.deleteImportedManagedResources(ctx, xService.Spec.TargetNamespace); err != nil { + return errors.NewE(err) + } + + d.resourceEventPublisher.PublishClusterManagedServiceEvent(ctx, service.Name, entities.ResourceTypeClusterManagedService, service.Name, PublishUpdate) return err } -func (d *domain) OnClusterManagedServiceUpdateMessage(ctx InfraContext, clusterName string, service entities.ClusterManagedService, status types.ResourceStatus, opts UpdateAndDeleteOpts) error { +func (d *domain) OnClusterManagedServiceUpdateMessage(ctx ConsoleContext, clusterName string, service entities.ClusterManagedService, status types.ResourceStatus, opts UpdateAndDeleteOpts) error { xService, err := d.findClusterManagedService(ctx, service.Name) if err != nil { return errors.NewE(err) @@ -321,13 +334,8 @@ func (d *domain) OnClusterManagedServiceUpdateMessage(ctx InfraContext, clusterN return errors.Newf("no cluster manage service found") } - if _, err := d.matchRecordVersion(service.Annotations, xService.RecordVersion); err != nil { - return d.resyncToTargetCluster(ctx, xService.SyncStatus.Action, clusterName, xService, xService.RecordVersion) - } - - recordVersion, err := d.matchRecordVersion(service.Annotations, xService.RecordVersion) - if err != nil { - return errors.NewE(err) + if _, err := d.MatchRecordVersion(service.Annotations, xService.RecordVersion); err != nil { + return nil } patch := repos.Document{ @@ -336,32 +344,50 @@ func (d *domain) OnClusterManagedServiceUpdateMessage(ctx InfraContext, clusterN } if service.SyncedOutputSecretRef != nil { - b, err := json.Marshal(service.SyncedOutputSecretRef) - if err != nil { - return errors.NewE(err) - } - accNs, err := d.getAccNamespace(ctx) - if err != nil { + service.SyncedOutputSecretRef.Namespace = xService.Spec.TargetNamespace + + if _, err := d.createRootManagedResource(ctx, &entities.ManagedResource{ + ManagedResource: crdsv1.ManagedResource{ + ObjectMeta: metav1.ObjectMeta{ + Name: "root-credentials", + Namespace: xService.Spec.TargetNamespace, + }, + Spec: crdsv1.ManagedResourceSpec{ + ResourceTemplate: crdsv1.MresResourceTemplate{ + TypeMeta: metav1.TypeMeta{ + Kind: "RootCredentials", + APIVersion: xService.Spec.MSVCSpec.ServiceTemplate.APIVersion, + }, + MsvcRef: common_types.MsvcRef{ + Name: xService.Name, + Namespace: xService.Spec.TargetNamespace, + }, + }, + }, + Status: operator.Status{ + IsReady: true, + }, + Output: common_types.ManagedResourceOutput{ + CredentialsRef: common_types.LocalObjectReference{ + Name: service.SyncedOutputSecretRef.Name, + }, + }, + }, + ResourceMetadata: common.ResourceMetadata{ + DisplayName: fmt.Sprintf("%s/%s", xService.Name, "root-credentials"), + CreatedBy: xService.CreatedBy, + LastUpdatedBy: xService.LastUpdatedBy, + }, + AccountName: ctx.AccountName, + ManagedServiceName: xService.Name, + ClusterName: xService.ClusterName, + SyncedOutputSecretRef: service.SyncedOutputSecretRef, + }); err != nil { return errors.NewE(err) } + } - d.consoleClient.CreateManagedResource(ctx, &console.CreateManagedResourceIn{ - UserId: string(ctx.UserId), - UserName: string(ctx.UserName), - UserEmail: string(ctx.UserEmail), - AccountName: ctx.AccountName, - ClusterName: xService.ClusterName, - MsvcName: xService.Name, - AccountNamespace: accNs, - MsvcTargetNamespace: xService.Spec.TargetNamespace, - MresName: "root-credentials", - MresType: "root-credentials", - OutputSecret: b, - MsvcApiVersion: xService.Spec.MSVCSpec.ServiceTemplate.APIVersion, - }) - } - - ucmsvc, err := d.clusterManagedServiceRepo.PatchById(ctx, xService.Id, common.PatchForSyncFromAgent(&service, recordVersion, status, common.PatchOpts{ + ucmsvc, err := d.clusterManagedServiceRepo.PatchById(ctx, xService.Id, common.PatchForSyncFromAgent(&service, xService.RecordVersion, status, common.PatchOpts{ MessageTimestamp: opts.MessageTimestamp, XPatch: patch, })) @@ -369,6 +395,7 @@ func (d *domain) OnClusterManagedServiceUpdateMessage(ctx InfraContext, clusterN return errors.NewE(err) } - d.resourceEventPublisher.PublishResourceEvent(ctx, clusterName, ResourceTypeClusterManagedService, ucmsvc.GetName(), PublishUpdate) + d.resourceEventPublisher.PublishClusterManagedServiceEvent(ctx, ucmsvc.Name, entities.ResourceTypeClusterManagedService, ucmsvc.Name, PublishAdd) + return nil } diff --git a/apps/console/internal/domain/domain.go b/apps/console/internal/domain/domain.go index 99f081f4f..855af2d0c 100644 --- a/apps/console/internal/domain/domain.go +++ b/apps/console/internal/domain/domain.go @@ -47,7 +47,6 @@ type domain struct { infraClient infra.InfraClient environmentRepo repos.DbRepo[*entities.Environment] - vpnDeviceRepo repos.DbRepo[*entities.ConsoleVPNDevice] appRepo repos.DbRepo[*entities.App] externalAppRepo repos.DbRepo[*entities.ExternalApp] @@ -58,7 +57,8 @@ type domain struct { importedMresRepo repos.DbRepo[*entities.ImportedManagedResource] pullSecretsRepo repos.DbRepo[*entities.ImagePullSecret] - serviceBindingRepo repos.DbRepo[*entities.ServiceBinding] + serviceBindingRepo repos.DbRepo[*entities.ServiceBinding] + clusterManagedServiceRepo repos.DbRepo[*entities.ClusterManagedService] envVars *env.Env @@ -140,6 +140,8 @@ func (d *domain) applyK8sResourceOnCluster(ctx K8sContext, clusterName string, o return errors.NewE(err) } +// func (d *domain) applyK8sResource(ctx K8sContext, clusterName string, obj client.Object, recordVersion int) error {|} + func (d *domain) applyK8sResource(ctx K8sContext, envName string, obj client.Object, recordVersion int) error { clusterName, err := d.getClusterAttachedToEnvironment(ctx, envName) if err != nil { @@ -226,10 +228,7 @@ func applyK8sResource(ctx K8sContext, args ApplyK8sResourceArgs) error { subject := common.GetTenantClusterMessagingTopic(ctx.GetAccountName(), args.ClusterName) - err = args.Dispatcher.Produce(ctx, msgTypes.ProduceMsg{ - Subject: subject, - Payload: b, - }) + err = args.Dispatcher.Produce(ctx, msgTypes.ProduceMsg{Subject: subject, Payload: b}) return errors.NewE(err) } @@ -563,8 +562,8 @@ var Module = fx.Module("domain", importedMresRepo repos.DbRepo[*entities.ImportedManagedResource], ipsRepo repos.DbRepo[*entities.ImagePullSecret], resourceMappingRepo repos.DbRepo[*entities.ResourceMapping], - vpnDeviceRepo repos.DbRepo[*entities.ConsoleVPNDevice], serviceBindingRepo repos.DbRepo[*entities.ServiceBinding], + clusterManagedServiceRepo repos.DbRepo[*entities.ClusterManagedService], logger logging.Logger, resourceEventPublisher ResourceEventPublisher, @@ -582,18 +581,18 @@ var Module = fx.Module("domain", infraClient: infraClient, logger: logger, - environmentRepo: environmentRepo, - appRepo: appRepo, - externalAppRepo: externalAppRepo, - configRepo: configRepo, - routerRepo: routerRepo, - secretRepo: secretRepo, - mresRepo: mresRepo, - importedMresRepo: importedMresRepo, - pullSecretsRepo: ipsRepo, - resourceMappingRepo: resourceMappingRepo, - vpnDeviceRepo: vpnDeviceRepo, - serviceBindingRepo: serviceBindingRepo, + environmentRepo: environmentRepo, + appRepo: appRepo, + externalAppRepo: externalAppRepo, + configRepo: configRepo, + routerRepo: routerRepo, + secretRepo: secretRepo, + mresRepo: mresRepo, + importedMresRepo: importedMresRepo, + pullSecretsRepo: ipsRepo, + resourceMappingRepo: resourceMappingRepo, + serviceBindingRepo: serviceBindingRepo, + clusterManagedServiceRepo: clusterManagedServiceRepo, envVars: ev, diff --git a/apps/console/internal/domain/imported-managed-resource.go b/apps/console/internal/domain/imported-managed-resource.go index 48168688b..810850f82 100644 --- a/apps/console/internal/domain/imported-managed-resource.go +++ b/apps/console/internal/domain/imported-managed-resource.go @@ -105,6 +105,34 @@ func (d *domain) DeleteImportedManagedResource(ctx ResourceContext, importName s return nil } +func (d *domain) deleteImportedManagedResources(ctx ConsoleContext, mresNamespace string) error { + if err := d.canPerformActionInAccount(ctx, iamT.DeleteManagedResource); err != nil { + return errors.NewE(err) + } + + records, err := d.importedMresRepo.Find(ctx, repos.Query{ + Filter: repos.Filter{ + fc.AccountName: ctx.AccountName, + fc.ImportedManagedResourceManagedResourceRefNamespace: mresNamespace, + }, + }) + if err != nil { + return errors.NewE(err) + } + + for i := range records { + if err := d.deleteSecret(ResourceContext{ConsoleContext: ctx, EnvironmentName: records[i].EnvironmentName}, records[i].SecretRef.Name); err != nil { + return errors.NewE(err) + } + + if err := d.importedMresRepo.DeleteById(ctx, records[i].Id); err != nil { + return errors.NewE(err) + } + } + + return nil +} + func (d *domain) findImportedMRes(ctx ResourceContext, importName string) (*entities.ImportedManagedResource, error) { imr, err := d.importedMresRepo.FindOne(ctx, repos.Filter{ fc.AccountName: ctx.AccountName, diff --git a/apps/console/internal/domain/mres.go b/apps/console/internal/domain/mres.go index cf0565e1f..88f512aa1 100644 --- a/apps/console/internal/domain/mres.go +++ b/apps/console/internal/domain/mres.go @@ -9,11 +9,11 @@ import ( iamT "github.com/kloudlite/api/apps/iam/types" "github.com/kloudlite/api/common" "github.com/kloudlite/api/common/fields" - "github.com/kloudlite/api/grpc-interfaces/infra" "github.com/kloudlite/api/pkg/errors" fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/repos" t "github.com/kloudlite/api/pkg/types" + crdsv1 "github.com/kloudlite/operator/apis/crds/v1" "github.com/kloudlite/operator/operators/resource-watcher/types" corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -150,7 +150,7 @@ func (d *domain) GetManagedResourceOutputKeys(ctx ManagedResourceContext, name s } // mutations -func (d *domain) CreateRootManagedResource(ctx ConsoleContext, accountNamespace string, mres *entities.ManagedResource) (*entities.ManagedResource, error) { +func (d *domain) createRootManagedResource(ctx ConsoleContext, mres *entities.ManagedResource) (*entities.ManagedResource, error) { if err := d.canPerformActionInAccount(ctx, iamT.CreateManagedResource); err != nil { return nil, errors.NewE(err) } @@ -168,8 +168,17 @@ func (d *domain) CreateRootManagedResource(ctx ConsoleContext, accountNamespace return nil, errors.Newf("managed resource (%s), not ready yet, please try again", mres.Name) } + rootMres, err := d.mresRepo.Upsert(ctx, repos.Filter{ + fc.AccountName: ctx.AccountName, + fc.ManagedResourceManagedServiceName: mres.ManagedServiceName, + fc.MetadataName: mres.Name, + fc.ClusterName: mres.ClusterName, + }, mres) + if err != nil { + return nil, errors.NewE(err) + } + secret := *mres.SyncedOutputSecretRef - secret.Namespace = accountNamespace if _, err := d.secretRepo.Upsert(ctx, repos.Filter{ fc.AccountName: ctx.AccountName, @@ -184,17 +193,18 @@ func (d *domain) CreateRootManagedResource(ctx ConsoleContext, accountNamespace LastUpdatedBy: mres.LastUpdatedBy, }, SyncStatus: mres.SyncStatus, + For: &entities.SecretCreatedFor{ + RefId: rootMres.Id, + ResourceType: entities.ResourceTypeManagedResource, + Name: rootMres.Name, + Namespace: rootMres.Namespace, + }, IsReadOnly: true, }); err != nil { return nil, errors.NewE(err) } - return d.mresRepo.Upsert(ctx, repos.Filter{ - fields.AccountName: ctx.AccountName, - fc.ManagedResourceManagedServiceName: mres.ManagedServiceName, - fc.MetadataName: mres.Name, - fc.ClusterName: mres.ClusterName, - }, mres) + return rootMres, nil } func (d *domain) CreateManagedResource(ctx ManagedResourceContext, mres entities.ManagedResource) (*entities.ManagedResource, error) { @@ -206,13 +216,7 @@ func (d *domain) CreateManagedResource(ctx ManagedResourceContext, mres entities return nil, errors.Newf("managed service name is required") } - msvcOut, err := d.infraClient.GetClusterManagedService(ctx, &infra.GetClusterManagedServiceIn{ - UserId: string(ctx.UserId), - UserName: ctx.UserName, - UserEmail: ctx.UserEmail, - AccountName: ctx.AccountName, - MsvcName: *ctx.ManagedServiceName, - }) + cms, err := d.GetClusterManagedService(ctx.ConsoleContext, *ctx.ManagedServiceName) if err != nil { return nil, errors.NewE(err) } @@ -221,10 +225,7 @@ func (d *domain) CreateManagedResource(ctx ManagedResourceContext, mres entities return nil, errors.New(".spec.resourceTemplate.apiVersion, and .spec.resourceTemplate.kind must be set") } - mres.Namespace = msvcOut.TargetNamespace - // if mres.ManagedResource.Spec.ResourceTemplate.MsvcRef.ClusterName == nil { - // mres.ManagedResource.Spec.ResourceTemplate.MsvcRef.ClusterName = &msvcOut.ClusterName - // } + mres.Namespace = cms.Spec.TargetNamespace mres.EnsureGVK() if err := d.k8sClient.ValidateObject(ctx, &mres.ManagedResource); err != nil { @@ -244,9 +245,9 @@ func (d *domain) CreateManagedResource(ctx ManagedResourceContext, mres entities mres.EnvironmentName = "" mres.ManagedServiceName = *ctx.ManagedServiceName mres.IsImported = false - mres.ClusterName = msvcOut.ClusterName + mres.ClusterName = cms.ClusterName - return d.createAndApplyManagedResource(ctx, msvcOut.ClusterName, &mres) + return d.createAndApplyManagedResource(ctx, cms.ClusterName, &mres) } func genMresResourceName(envName string, mresName string) string { @@ -405,15 +406,13 @@ func (d *domain) DeleteManagedResource(ctx ManagedResourceContext, name string) return errors.NewE(err) } - umres, err := d.mresRepo.Patch( - ctx, - f.Add(fields.MetadataName, name), - common.PatchForMarkDeletion(), - ) + umres, err := d.mresRepo.Patch(ctx, f.Add(fields.MetadataName, name), common.PatchForMarkDeletion()) if err != nil { return errors.NewE(err) } + d.resourceEventPublisher.PublishClusterManagedServiceEvent(ctx.ConsoleContext, umres.ManagedServiceName, entities.ResourceTypeManagedResource, umres.Name, PublishUpdate) + if err := d.deleteK8sResourceOfCluster(ctx, umres.ClusterName, &umres.ManagedResource); err != nil { if errors.Is(err, ErrNoClusterAttached) { return d.mresRepo.DeleteById(ctx, umres.Id) @@ -422,23 +421,59 @@ func (d *domain) DeleteManagedResource(ctx ManagedResourceContext, name string) } return nil } -func (d *domain) OnManagedResourceDeleteMessage(ctx ConsoleContext, msvcName string, mres entities.ManagedResource) error { - err := d.mresRepo.DeleteOne( - ctx, - repos.Filter{ + +func (d *domain) deleteAllManagedResources(ctx ConsoleContext, msvcName string) error { + if err := d.canPerformActionInAccount(ctx, iamT.DeleteManagedResource); err != nil { + return errors.NewE(err) + } + + services, err := d.mresRepo.Find(ctx, repos.Query{ + Filter: repos.Filter{ fields.AccountName: ctx.AccountName, fc.ManagedResourceManagedServiceName: msvcName, - fields.MetadataName: mres.Name, }, - ) + }) if err != nil { return errors.NewE(err) } + + serviceIds := make([]any, 0, len(services)) + for i := range services { + serviceIds = append(serviceIds, services[i].Id) + } + + if err := d.secretRepo.DeleteMany(ctx, d.secretRepo.MergeMatchFilters(repos.Filter{}, map[string]repos.MatchFilter{ + fc.SecretForRefId: { + MatchType: repos.MatchTypeArray, + Array: serviceIds, + }, + })); err != nil { + return errors.NewE(err) + } + + if err := d.mresRepo.DeleteMany(ctx, repos.Filter{ + fields.AccountName: ctx.AccountName, + fc.ManagedResourceManagedServiceName: msvcName, + }); err != nil { + return errors.NewE(err) + } + + return nil +} + +func (d *domain) OnManagedResourceDeleteMessage(ctx ConsoleContext, msvcName string, mres crdsv1.ManagedResource) error { + if err := d.mresRepo.DeleteOne(ctx, repos.Filter{ + fields.AccountName: ctx.AccountName, + fc.ManagedResourceManagedServiceName: msvcName, + fields.MetadataName: mres.Name, + }); err != nil { + return errors.NewE(err) + } d.resourceEventPublisher.PublishClusterManagedServiceEvent(ctx, msvcName, entities.ResourceTypeManagedResource, mres.Name, PublishDelete) return nil } -func (d *domain) OnManagedResourceUpdateMessage(ctx ConsoleContext, msvcName string, mres entities.ManagedResource, status types.ResourceStatus, opts UpdateAndDeleteOpts) error { +func (d *domain) OnManagedResourceUpdateMessage(ctx ConsoleContext, msvcName string, mres crdsv1.ManagedResource, outputSecret *corev1.Secret, status types.ResourceStatus, opts UpdateAndDeleteOpts) error { xmres, err := d.findMRes(NewManagedResourceContext(ctx, msvcName), mres.Name) if err != nil { return errors.NewE(err) @@ -450,16 +485,15 @@ func (d *domain) OnManagedResourceUpdateMessage(ctx ConsoleContext, msvcName str recordVersion, err := d.MatchRecordVersion(mres.Annotations, xmres.RecordVersion) if err != nil { - return d.resyncK8sResourceToCluster(ctx, xmres.ClusterName, mres.SyncStatus.Action, &mres.ManagedResource, mres.RecordVersion) + return d.resyncK8sResourceToCluster(ctx, xmres.ClusterName, xmres.SyncStatus.Action, &xmres.ManagedResource, xmres.RecordVersion) } - umres, err := d.mresRepo.PatchById( - ctx, - xmres.Id, - common.PatchForSyncFromAgent(&mres, recordVersion, status, common.PatchOpts{ + xmres.ManagedResource = mres + umres, err := d.mresRepo.PatchById(ctx, xmres.Id, + common.PatchForSyncFromAgent(xmres, recordVersion, status, common.PatchOpts{ MessageTimestamp: opts.MessageTimestamp, XPatch: repos.Document{ - fc.ManagedResourceSyncedOutputSecretRef: mres.SyncedOutputSecretRef, + fc.ManagedResourceSyncedOutputSecretRef: outputSecret, }, })) if err != nil { @@ -468,33 +502,39 @@ func (d *domain) OnManagedResourceUpdateMessage(ctx ConsoleContext, msvcName str d.resourceEventPublisher.PublishClusterManagedServiceEvent(ctx, msvcName, umres.GetResourceType(), umres.GetName(), PublishUpdate) - if mres.SyncedOutputSecretRef != nil { - if mres.SyncedOutputSecretRef.Labels == nil { - mres.SyncedOutputSecretRef.Labels = map[string]string{} + if outputSecret != nil { + if outputSecret.Labels == nil { + outputSecret.Labels = make(map[string]string, 1) } - mres.SyncedOutputSecretRef.Labels["kloudlite.io/secret.synced-by"] = fmt.Sprintf("%s/%s", umres.GetNamespace(), umres.GetName()) + outputSecret.Labels["kloudlite.io/secret.synced-by"] = fmt.Sprintf("%s/%s", umres.GetNamespace(), umres.GetName()) - secretData := make(map[string]string, len(mres.SyncedOutputSecretRef.Data)) + secretData := make(map[string]string, len(outputSecret.Data)) - for k, v := range mres.SyncedOutputSecretRef.Data { + for k, v := range outputSecret.Data { secretData[k] = string(v) } - mres.SyncedOutputSecretRef.Data = nil - mres.SyncedOutputSecretRef.StringData = secretData + outputSecret.Data = nil + outputSecret.StringData = secretData if _, err = d.secretRepo.Upsert(ctx, repos.Filter{ fc.AccountName: ctx.AccountName, - fc.MetadataName: mres.SyncedOutputSecretRef.GetName(), - fc.MetadataNamespace: mres.SyncedOutputSecretRef.GetNamespace(), + fc.MetadataName: outputSecret.GetName(), + fc.MetadataNamespace: outputSecret.GetNamespace(), }, &entities.Secret{ - Secret: *mres.SyncedOutputSecretRef, + Secret: *outputSecret, AccountName: ctx.AccountName, ResourceMetadata: common.ResourceMetadata{ DisplayName: umres.GetName(), CreatedBy: common.CreatedOrUpdatedByResourceSync, LastUpdatedBy: common.CreatedOrUpdatedByResourceSync, }, + For: &entities.SecretCreatedFor{ + RefId: xmres.Id, + ResourceType: entities.ResourceTypeManagedResource, + Name: mres.Name, + Namespace: mres.Namespace, + }, SyncStatus: t.SyncStatus{ LastSyncedAt: opts.MessageTimestamp, Action: t.SyncActionApply, @@ -508,11 +548,6 @@ func (d *domain) OnManagedResourceUpdateMessage(ctx ConsoleContext, msvcName str } } - err = d.applyMresSecrets(ctx, &mres) - if err != nil { - return errors.NewE(err) - } - return nil } diff --git a/apps/console/internal/domain/names.go b/apps/console/internal/domain/names.go index 92d296e24..9c19e2081 100644 --- a/apps/console/internal/domain/names.go +++ b/apps/console/internal/domain/names.go @@ -45,10 +45,6 @@ func (d *domain) CheckNameAvailability(ctx context.Context, accountName string, } switch resType { - case entities.ResourceTypeVPNDevice: - { - return checkResourceName(ctx, repos.Filter{fields.AccountName: accountName, fields.MetadataName: name}, d.vpnDeviceRepo) - } case entities.ResourceTypeEnvironment: { return checkResourceName(ctx, repos.Filter{fields.AccountName: accountName, fields.MetadataName: name}, d.environmentRepo) diff --git a/apps/console/internal/domain/secret.go b/apps/console/internal/domain/secret.go index 96358dc4e..492e25c90 100644 --- a/apps/console/internal/domain/secret.go +++ b/apps/console/internal/domain/secret.go @@ -1,6 +1,8 @@ package domain import ( + "strings" + "github.com/kloudlite/api/apps/console/internal/entities" fc "github.com/kloudlite/api/apps/console/internal/entities/field-constants" "github.com/kloudlite/api/common" @@ -26,11 +28,26 @@ func (d *domain) ListSecrets(ctx ResourceContext, search map[string]repos.MatchF for i := range pr.Edges { fromDataToStringData(&pr.Edges[i].Node.Secret) + pr.Edges[i].Node.StringData = filterOutHiddenKeysFromSecret(pr.Edges[i].Node) } return pr, nil } +func filterOutHiddenKeysFromSecret(secret *entities.Secret) map[string]string { + if secret.For != nil { + // means, this is a secret created by something other than a secret + fdata := make(map[string]string, len(secret.StringData)) + for k, v := range secret.StringData { + if !strings.HasPrefix(k, ".") { + fdata[k] = v + } + } + return fdata + } + return secret.StringData +} + func fromDataToStringData(secret *corev1.Secret) { if secret.StringData == nil { secret.StringData = make(map[string]string, len(secret.Data)) @@ -53,7 +70,8 @@ func (d *domain) findSecret(ctx ResourceContext, name string) (*entities.Secret, return nil, errors.Newf("no secret with name (%s) found", name) } - fromDataToStringData(&xSecret.Secret) + fromDataToStringData(&xSecret.Secret) + xSecret.StringData = filterOutHiddenKeysFromSecret(xSecret) return xSecret, nil } @@ -90,11 +108,11 @@ func (d *domain) GetSecretEntries(ctx ResourceContext, keyrefs []SecretKeyRef) ( data := make(map[string]map[string]string) for i := range secrets { - m := make(map[string]string, len(secrets[i].Data)) - for k, v := range secrets[i].Data { - m[k] = string(v) + fromDataToStringData(&secrets[i].Secret) + if secrets[i].For != nil { + secrets[i].StringData = filterOutHiddenKeysFromSecret(secrets[i]) } - + m := make(map[string]string, len(secrets[i].StringData)) for k, v := range secrets[i].StringData { m[k] = v } diff --git a/apps/console/internal/domain/vpn-device.go b/apps/console/internal/domain/vpn-device.go deleted file mode 100644 index 1c22c9f44..000000000 --- a/apps/console/internal/domain/vpn-device.go +++ /dev/null @@ -1,539 +0,0 @@ -package domain - -import ( - "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" - "github.com/kloudlite/api/common/fields" - "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" - "github.com/kloudlite/api/pkg/errors" - "github.com/kloudlite/api/pkg/repos" - t "github.com/kloudlite/api/pkg/types" - wgv1 "github.com/kloudlite/operator/apis/wireguard/v1" - "github.com/kloudlite/operator/operators/resource-watcher/types" - "k8s.io/utils/strings/slices" -) - -func (d *domain) findVPNDevice(ctx ConsoleContext, name string) (*entities.ConsoleVPNDevice, error) { - device, err := d.vpnDeviceRepo.FindOne(ctx, repos.Filter{ - fields.AccountName: ctx.AccountName, - fields.MetadataName: name, - }) - if err != nil { - return nil, errors.NewE(err) - } - - if device == nil { - return nil, errors.Newf("no vpn device with name=%q found", name) - } - - return device, nil -} - -func (d *domain) getClusterFromDevice(ctx ConsoleContext, device *entities.ConsoleVPNDevice) (string, error) { - if device == nil { - return "", errors.Newf("device is nil") - } - - if device.ClusterName != nil { - return *device.ClusterName, nil - } - - if device.EnvironmentName == nil { - return "", errors.NewE(errors.Newf("environment name is nil")) - } - - cluster, err := d.getClusterAttachedToEnvironment(ctx, *device.EnvironmentName) - if err != nil { - return "", errors.NewE(err) - } - if cluster == nil { - return "", errors.NewE(errors.Newf("no cluster attached to env %s", *device.EnvironmentName)) - } - return *cluster, nil -} - -func (d *domain) updateVpnOnCluster(ctx ConsoleContext, ndev, xdev *entities.ConsoleVPNDevice) error { - ndev.Namespace = d.envVars.DeviceNamespace - ndev.EnsureGVK() - if err := d.k8sClient.ValidateObject(ctx, &ndev.Device); err != nil { - return errors.NewE(err) - } - - if (ndev.EnvironmentName != nil) || ndev.ClusterName != nil { - if err := d.applyVPNDevice(ctx, ndev); err != nil { - return errors.NewE(err) - } - } - - if (xdev.EnvironmentName != nil && (ndev.EnvironmentName == nil || *xdev.EnvironmentName != *ndev.EnvironmentName)) || - (xdev.ClusterName != nil && (ndev.ClusterName == nil || *xdev.ClusterName != *ndev.ClusterName)) { - xdev.Spec.Disabled = true - if err := d.applyVPNDevice(ctx, xdev); err != nil { - return errors.NewE(err) - } - } - - return nil -} - -func (d *domain) ListVPNDevices(ctx ConsoleContext, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.ConsoleVPNDevice], error) { - if err := d.canPerformActionInAccount(ctx, iamT.ListVPNDevices); err != nil { - return nil, errors.NewE(err) - } - - filter := repos.Filter{"accountName": ctx.AccountName} - return d.vpnDeviceRepo.FindPaginated(ctx, d.vpnDeviceRepo.MergeMatchFilters(filter, search), pagination) -} - -func (d *domain) ListVPNDevicesForUser(ctx ConsoleContext) ([]*entities.ConsoleVPNDevice, error) { - if err := d.canPerformActionInAccount(ctx, iamT.ListVPNDevices); err != nil { - return nil, errors.NewE(err) - } - - return d.vpnDeviceRepo.Find(ctx, repos.Query{ - Filter: repos.Filter{ - "createdBy.userId": ctx.UserId, - }, - }) -} - -func (d *domain) GetVPNDevice(ctx ConsoleContext, name string) (*entities.ConsoleVPNDevice, error) { - if err := d.canPerformActionInAccount(ctx, iamT.GetVPNDevice); err != nil { - return nil, errors.NewE(err) - } - - device, err := d.findVPNDevice(ctx, name) - if err != nil { - return nil, errors.NewE(err) - } - - clusterName, err := d.getClusterFromDevice(ctx, device) - if err != nil { - return device, nil - } - - if device.WireguardConfigs == nil || device.WireguardConfigs[clusterName].Value == "" { - return device, nil - } - - device.WireguardConfig = device.WireguardConfigs[clusterName] - - return device, nil -} - -func (d *domain) applyVPNDevice(ctx ConsoleContext, device *entities.ConsoleVPNDevice) error { - if device.EnvironmentName != nil { - if err := d.applyK8sResource(ctx, *device.EnvironmentName, &device.Device, device.RecordVersion); err != nil { - return errors.NewE(err) - } - - return nil - } - - if device.ClusterName != nil { - if err := d.applyK8sResourceOnCluster(ctx, *device.ClusterName, &device.Device, device.RecordVersion); err != nil { - return errors.NewE(err) - } - } - - return nil -} - -func (d *domain) CreateVPNDevice(ctx ConsoleContext, device entities.ConsoleVPNDevice) (*entities.ConsoleVPNDevice, error) { - if err := d.canPerformActionInAccount(ctx, iamT.CreateVPNDevice); err != nil { - return nil, errors.NewE(err) - } - - device.Namespace = d.envVars.DeviceNamespace - - device.EnsureGVK() - if err := d.k8sClient.ValidateObject(ctx, &device.Device); err != nil { - return nil, errors.NewE(err) - } - - device.IncrementRecordVersion() - device.CreatedBy = common.CreatedOrUpdatedBy{ - UserId: ctx.UserId, - UserName: ctx.UserName, - UserEmail: ctx.UserEmail, - } - device.LastUpdatedBy = device.CreatedBy - - device.AccountName = ctx.AccountName - device.LinkedClusters = []string{} - - device.SyncStatus = t.GenSyncStatus(t.SyncActionApply, device.RecordVersion) - - if device.EnvironmentName != nil { - s, err := d.envTargetNamespace(ctx, *device.EnvironmentName) - if err != nil { - return nil, errors.NewE(err) - } - - device.Spec.ActiveNamespace = &s - - clusterName, err := d.getClusterFromDevice(ctx, &device) - if err != nil { - return nil, errors.NewE(err) - } - - device.LinkedClusters = append(device.LinkedClusters, clusterName) - } - - if _, err := d.iamClient.AddMembership(ctx, &iam.AddMembershipIn{ - UserId: string(ctx.UserId), - ResourceType: string(iamT.ResourceConsoleVPNDevice), - ResourceRef: iamT.NewResourceRef(ctx.AccountName, iamT.ResourceConsoleVPNDevice, device.Name), - Role: string(iamT.RoleResourceOwner), - }); err != nil { - return nil, errors.NewE(err) - } - - nDevice, err := d.vpnDeviceRepo.Create(ctx, &device) - if err != nil { - if d.vpnDeviceRepo.ErrAlreadyExists(err) { - // TODO: better insights into error, when it is being caused by duplicated indexes - return nil, errors.NewE(err) - } - return nil, errors.NewE(err) - } - - d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeVPNDevice, nDevice.Name, PublishAdd) - - if device.EnvironmentName == nil { - return nDevice, nil - } - - if err := d.applyVPNDevice(ctx, nDevice); err != nil { - return nDevice, err - } - return nDevice, nil -} - -func (d *domain) ActivateVPNDeviceOnNamespace(ctx ConsoleContext, devName string, namespace string) (device error) { - if err := d.canPerformActionInDevice(ctx, iamT.UpdateVPNDevice, devName); err != nil { - return errors.NewE(err) - } - - xDevice, err := d.findVPNDevice(ctx, devName) - if err != nil { - return errors.NewE(err) - } - - patchForUpdate := common.PatchForUpdate( - ctx, - xDevice, - common.PatchOpts{ - XPatch: repos.Document{ - fc.ConsoleVPNDeviceSpecActiveNamespace: namespace, - }, - }) - - upDevice, err := d.vpnDeviceRepo.PatchById(ctx, xDevice.Id, patchForUpdate) - if err != nil { - return errors.NewE(err) - } - d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeVPNDevice, devName, PublishUpdate) - - if err := d.applyVPNDevice(ctx, upDevice); err != nil { - return errors.NewE(err) - } - - return nil -} - -func (d *domain) updateVpnDevice(ctx ConsoleContext, device entities.ConsoleVPNDevice, envName, clusterName *string) (*entities.ConsoleVPNDevice, error) { - if err := d.canPerformActionInDevice(ctx, iamT.UpdateVPNDevice, device.Name); err != nil { - return nil, errors.NewE(err) - } - - xdevice, err := d.findVPNDevice(ctx, device.Name) - if err != nil { - return nil, errors.NewE(err) - } - - linkedClusters := xdevice.LinkedClusters - - device.Spec.ActiveNamespace = nil - - if clusterName != nil && !slices.Contains(linkedClusters, *clusterName) { - linkedClusters = append(linkedClusters, *clusterName) - } - - if envName != nil { - activeNamespace, err := d.envTargetNamespace(ctx, *envName) - if err != nil { - return nil, errors.NewE(err) - } - device.Spec.ActiveNamespace = &activeNamespace - - cName, err := d.getClusterAttachedToEnvironment(ctx, *envName) - if err != nil { - return nil, errors.NewE(err) - } - - if cName != nil && !slices.Contains(linkedClusters, *cName) { - linkedClusters = append(linkedClusters, *cName) - } - } - - device.ClusterName = nil - if clusterName != nil { - device.ClusterName = clusterName - - device.EnvironmentName = nil - device.EnvironmentName = nil - } - - patchForUpdate := common.PatchForUpdate( - ctx, - &device, - common.PatchOpts{ - XPatch: repos.Document{ - fc.ConsoleVPNDeviceSpec: device.Spec, - fields.EnvironmentName: device.EnvironmentName, - fields.ClusterName: device.ClusterName, - fc.ConsoleVPNDeviceLinkedClusters: linkedClusters, - }, - }) - - upDevice, err := d.vpnDeviceRepo.Patch(ctx, repos.Filter{ - fields.AccountName: ctx.AccountName, - fields.MetadataName: device.Name, - }, patchForUpdate) - if err != nil { - return nil, errors.NewE(err) - } - - d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeVPNDevice, device.Name, PublishUpdate) - - if err := d.updateVpnOnCluster(ctx, upDevice, xdevice); err != nil { - return nil, errors.NewE(err) - } - - return upDevice, nil -} - -func (d *domain) UpdateVPNDevice(ctx ConsoleContext, device entities.ConsoleVPNDevice) (*entities.ConsoleVPNDevice, error) { - return d.updateVpnDevice(ctx, device, device.EnvironmentName, nil) -} - -func (d *domain) DeleteVPNDevice(ctx ConsoleContext, name string) error { - if err := d.canPerformActionInDevice(ctx, iamT.DeleteVPNDevice, name); err != nil { - return errors.NewE(err) - } - - upDevice, err := d.vpnDeviceRepo.Patch( - ctx, - repos.Filter{ - fields.AccountName: ctx.AccountName, - fields.MetadataName: name, - }, - common.PatchForMarkDeletion(), - ) - if err != nil { - return errors.NewE(err) - } - - d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeVPNDevice, name, PublishUpdate) - - for _, v := range upDevice.LinkedClusters { - if err := d.deleteK8sResourceOfCluster(ctx, v, &upDevice.Device); err != nil { - return errors.NewE(err) - } - } - - return nil -} - -func (d *domain) UpdateVpnDevicePorts(ctx ConsoleContext, devName string, ports []*wgv1.Port) error { - if err := d.canPerformActionInDevice(ctx, iamT.UpdateVPNDevice, devName); err != nil { - return errors.NewE(err) - } - - xdevice, err := d.findVPNDevice(ctx, devName) - if err != nil { - return errors.NewE(err) - } - - var p []wgv1.Port - for _, port := range ports { - p = append(p, *port) - } - - patchForUpdate := common.PatchForUpdate( - ctx, - xdevice, - common.PatchOpts{ - XPatch: repos.Document{ - fc.ConsoleVPNDeviceSpecPorts: p, - }, - }) - - upDevice, err := d.vpnDeviceRepo.Patch(ctx, repos.Filter{ - fields.AccountName: ctx.AccountName, - fields.MetadataName: devName, - }, patchForUpdate) - if err != nil { - return errors.NewE(err) - } - - if err := d.applyVPNDevice(ctx, upDevice); err != nil { - return errors.NewE(err) - } - - d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeVPNDevice, devName, PublishUpdate) - return nil -} - -func (d *domain) ActivateVpnDeviceOnEnvironment(ctx ConsoleContext, devName string, envName string) error { - xdevice, err := d.findVPNDevice(ctx, devName) - if err != nil { - return errors.NewE(err) - } - - xdevice.EnvironmentName = &envName - - _, err = d.updateVpnDevice(ctx, *xdevice, xdevice.EnvironmentName, nil) - if err != nil { - return errors.NewE(err) - } - return nil -} - -func (d *domain) ActivateVpnDeviceOnCluster(ctx ConsoleContext, devName string, clusterName string) error { - if err := d.canPerformActionInAccount(ctx, iamT.GetCluster); err != nil { - return errors.NewE(err) - } - - xdevice, err := d.findVPNDevice(ctx, devName) - if err != nil { - return errors.NewE(err) - } - - // TODO: check if cluster exists in account - - xdevice.ClusterName = &clusterName - _, err = d.updateVpnDevice(ctx, *xdevice, nil, &clusterName) - if err != nil { - return errors.NewE(err) - } - - return nil -} - -func (d *domain) OnVPNDeviceUpdateMessage(ctx ConsoleContext, device entities.ConsoleVPNDevice, status types.ResourceStatus, opts UpdateAndDeleteOpts, clusterName string) error { - xdevice, err := d.findVPNDevice(ctx, device.Name) - if err != nil { - return errors.NewE(err) - } - - recordVersion, err := d.MatchRecordVersion(device.Annotations, xdevice.RecordVersion) - if err != nil { - if xdevice.EnvironmentName != nil { - return d.resyncK8sResource(ctx, *xdevice.EnvironmentName, xdevice.SyncStatus.Action, &xdevice.Device, xdevice.RecordVersion) - } - } - - upDevice, err := d.vpnDeviceRepo.PatchById( - ctx, - xdevice.Id, - common.PatchForSyncFromAgent( - &device, - recordVersion, - status, - common.PatchOpts{ - MessageTimestamp: opts.MessageTimestamp, - XPatch: repos.Document{ - fmt.Sprintf("%s.%s", fc.ConsoleVPNDeviceWireguardConfigs, clusterName): device.WireguardConfig, - }, - })) - if err != nil { - return errors.NewE(err) - } - - d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeVPNDevice, upDevice.Name, PublishUpdate) - - return nil -} - -func (d *domain) OnVPNDeviceDeleteMessage(ctx ConsoleContext, device entities.ConsoleVPNDevice) error { - xdevice, err := d.findVPNDevice(ctx, device.Name) - if err != nil { - return errors.NewE(err) - } - - var linkedClusters []string - if device.EnvironmentName != nil { - clusterName, err := d.getClusterAttachedToEnvironment(ctx, *device.EnvironmentName) - if err != nil { - return errors.NewE(err) - } - if clusterName == nil { - return errors.Newf("No Cluster found") - } - var linkedClusters []string - slices.Filter(linkedClusters, xdevice.LinkedClusters, func(item string) bool { - return item != *clusterName - }) - } - - if len(linkedClusters) == 0 { - err := d.vpnDeviceRepo.DeleteOne( - ctx, - repos.Filter{ - fields.AccountName: ctx.AccountName, - fields.MetadataName: device.Name, - }, - ) - if err != nil { - return errors.NewE(err) - } - - if _, err = d.iamClient.RemoveResource(ctx, &iam.RemoveResourceIn{ - ResourceRef: iamT.NewResourceRef(ctx.AccountName, iamT.ResourceConsoleVPNDevice, device.Name), - }); err != nil { - return errors.NewE(err) - } - - d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeVPNDevice, device.Name, PublishDelete) - return nil - } - - patchForUpdate := common.PatchForUpdate( - ctx, - xdevice, - common.PatchOpts{ - XPatch: repos.Document{ - fc.ConsoleVPNDeviceLinkedClusters: linkedClusters, - }, - }) - _, err = d.vpnDeviceRepo.PatchById(ctx, xdevice.Id, patchForUpdate) - - return errors.NewE(err) -} - -func (d *domain) OnVPNDeviceApplyError(ctx ConsoleContext, errMsg string, name string, opts UpdateAndDeleteOpts) error { - udevice, err := d.vpnDeviceRepo.Patch( - ctx, - repos.Filter{ - fields.AccountName: ctx.AccountName, - fields.MetadataName: name, - }, - common.PatchForErrorFromAgent( - errMsg, - common.PatchOpts{ - MessageTimestamp: opts.MessageTimestamp, - }, - ), - ) - if err != nil { - return errors.NewE(err) - } - d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeVPNDevice, udevice.Name, PublishDelete) - return errors.NewE(err) -} diff --git a/apps/infra/internal/entities/cluster-managed-service.go b/apps/console/internal/entities/cluster-managed-service.go similarity index 100% rename from apps/infra/internal/entities/cluster-managed-service.go rename to apps/console/internal/entities/cluster-managed-service.go diff --git a/apps/console/internal/entities/config.go b/apps/console/internal/entities/config.go index 671bd6a2f..78086ac9b 100644 --- a/apps/console/internal/entities/config.go +++ b/apps/console/internal/entities/config.go @@ -11,7 +11,6 @@ import ( type Config struct { repos.BaseEntity `json:",inline" graphql:"noinput"` - corev1.ConfigMap `json:",inline"` AccountName string `json:"accountName" graphql:"noinput"` diff --git a/apps/console/internal/entities/field-constants/generated_constants.go b/apps/console/internal/entities/field-constants/generated_constants.go index 9cd21ed16..7902670b4 100644 --- a/apps/console/internal/entities/field-constants/generated_constants.go +++ b/apps/console/internal/entities/field-constants/generated_constants.go @@ -53,6 +53,48 @@ const ( AppSpecTopologySpreadConstraints = "spec.topologySpreadConstraints" ) +// constant vars generated for struct ClusterManagedService +const ( + ClusterManagedServiceIsArchived = "isArchived" + ClusterManagedServiceOutput = "output" + ClusterManagedServiceOutputCredentialsRef = "output.credentialsRef" + ClusterManagedServiceOutputCredentialsRefName = "output.credentialsRef.name" + ClusterManagedServiceSpec = "spec" + ClusterManagedServiceSpecMsvcSpec = "spec.msvcSpec" + ClusterManagedServiceSpecMsvcSpecNodeSelector = "spec.msvcSpec.nodeSelector" + ClusterManagedServiceSpecMsvcSpecServiceTemplate = "spec.msvcSpec.serviceTemplate" + ClusterManagedServiceSpecMsvcSpecServiceTemplateApiVersion = "spec.msvcSpec.serviceTemplate.apiVersion" + ClusterManagedServiceSpecMsvcSpecServiceTemplateKind = "spec.msvcSpec.serviceTemplate.kind" + ClusterManagedServiceSpecMsvcSpecServiceTemplateSpec = "spec.msvcSpec.serviceTemplate.spec" + ClusterManagedServiceSpecMsvcSpecSharedSecret = "spec.msvcSpec.sharedSecret" + ClusterManagedServiceSpecMsvcSpecTolerations = "spec.msvcSpec.tolerations" + ClusterManagedServiceSpecSharedSecret = "spec.sharedSecret" + ClusterManagedServiceSpecTargetNamespace = "spec.targetNamespace" + ClusterManagedServiceSyncedOutputSecretRef = "syncedOutputSecretRef" + ClusterManagedServiceSyncedOutputSecretRefApiVersion = "syncedOutputSecretRef.apiVersion" + ClusterManagedServiceSyncedOutputSecretRefData = "syncedOutputSecretRef.data" + ClusterManagedServiceSyncedOutputSecretRefImmutable = "syncedOutputSecretRef.immutable" + ClusterManagedServiceSyncedOutputSecretRefKind = "syncedOutputSecretRef.kind" + ClusterManagedServiceSyncedOutputSecretRefMetadata = "syncedOutputSecretRef.metadata" + ClusterManagedServiceSyncedOutputSecretRefMetadataAnnotations = "syncedOutputSecretRef.metadata.annotations" + ClusterManagedServiceSyncedOutputSecretRefMetadataCreationTimestamp = "syncedOutputSecretRef.metadata.creationTimestamp" + ClusterManagedServiceSyncedOutputSecretRefMetadataDeletionGracePeriodSeconds = "syncedOutputSecretRef.metadata.deletionGracePeriodSeconds" + ClusterManagedServiceSyncedOutputSecretRefMetadataDeletionTimestamp = "syncedOutputSecretRef.metadata.deletionTimestamp" + ClusterManagedServiceSyncedOutputSecretRefMetadataFinalizers = "syncedOutputSecretRef.metadata.finalizers" + ClusterManagedServiceSyncedOutputSecretRefMetadataGenerateName = "syncedOutputSecretRef.metadata.generateName" + ClusterManagedServiceSyncedOutputSecretRefMetadataGeneration = "syncedOutputSecretRef.metadata.generation" + ClusterManagedServiceSyncedOutputSecretRefMetadataLabels = "syncedOutputSecretRef.metadata.labels" + ClusterManagedServiceSyncedOutputSecretRefMetadataManagedFields = "syncedOutputSecretRef.metadata.managedFields" + ClusterManagedServiceSyncedOutputSecretRefMetadataName = "syncedOutputSecretRef.metadata.name" + ClusterManagedServiceSyncedOutputSecretRefMetadataNamespace = "syncedOutputSecretRef.metadata.namespace" + ClusterManagedServiceSyncedOutputSecretRefMetadataOwnerReferences = "syncedOutputSecretRef.metadata.ownerReferences" + ClusterManagedServiceSyncedOutputSecretRefMetadataResourceVersion = "syncedOutputSecretRef.metadata.resourceVersion" + ClusterManagedServiceSyncedOutputSecretRefMetadataSelfLink = "syncedOutputSecretRef.metadata.selfLink" + ClusterManagedServiceSyncedOutputSecretRefMetadataUid = "syncedOutputSecretRef.metadata.uid" + ClusterManagedServiceSyncedOutputSecretRefStringData = "syncedOutputSecretRef.stringData" + ClusterManagedServiceSyncedOutputSecretRefType = "syncedOutputSecretRef.type" +) + // constant vars generated for struct Config const ( ConfigBinaryData = "binaryData" @@ -60,20 +102,6 @@ const ( ConfigImmutable = "immutable" ) -// constant vars generated for struct ConsoleVPNDevice -const ( - ConsoleVPNDeviceLinkedClusters = "linkedClusters" - ConsoleVPNDeviceSpec = "spec" - ConsoleVPNDeviceSpecActiveNamespace = "spec.activeNamespace" - ConsoleVPNDeviceSpecCnameRecords = "spec.cnameRecords" - ConsoleVPNDeviceSpecDisabled = "spec.disabled" - ConsoleVPNDeviceSpecNoExternalService = "spec.noExternalService" - ConsoleVPNDeviceSpecNodeSelector = "spec.nodeSelector" - ConsoleVPNDeviceSpecPorts = "spec.ports" - ConsoleVPNDeviceWireguardConfig = "wireguardConfig" - ConsoleVPNDeviceWireguardConfigs = "wireguardConfigs" -) - // constant vars generated for struct Environment const ( EnvironmentIsArchived = "isArchived" diff --git a/apps/console/internal/entities/imported-managed-resource.go b/apps/console/internal/entities/imported-managed-resource.go index 3c902b6d4..379fde8d4 100644 --- a/apps/console/internal/entities/imported-managed-resource.go +++ b/apps/console/internal/entities/imported-managed-resource.go @@ -52,4 +52,9 @@ var ImportedManagedResourceIndexes = []repos.IndexField{ }, Unique: true, }, + { + Field: []repos.IndexKey{ + {Key: fc.ImportedManagedResourceManagedResourceRefId, Value: repos.IndexAsc}, + }, + }, } diff --git a/apps/console/internal/entities/resource-mapping.go b/apps/console/internal/entities/resource-mapping.go index dcb960e6b..58b367c25 100644 --- a/apps/console/internal/entities/resource-mapping.go +++ b/apps/console/internal/entities/resource-mapping.go @@ -18,7 +18,7 @@ const ( ResourceTypeRouter ResourceType = "router" ResourceTypeManagedResource ResourceType = "managed_resource" ResourceTypeImportedManagedResource ResourceType = "imported_managed_resource" - ResourceTypeVPNDevice ResourceType = "vpn_device" + ResourceTypeClusterManagedService ResourceType = "cluster_managed_service" ResourceTypeServiceBinding ResourceType = "service_binding" ) diff --git a/apps/console/internal/entities/vpn-device.go b/apps/console/internal/entities/vpn-device.go deleted file mode 100644 index af90d6f5b..000000000 --- a/apps/console/internal/entities/vpn-device.go +++ /dev/null @@ -1,67 +0,0 @@ -package entities - -import ( - "github.com/kloudlite/api/common" - "github.com/kloudlite/api/common/fields" - "github.com/kloudlite/api/pkg/errors" - "github.com/kloudlite/api/pkg/repos" - t "github.com/kloudlite/api/pkg/types" - wireguardV1 "github.com/kloudlite/operator/apis/wireguard/v1" - "github.com/kloudlite/operator/pkg/operator" -) - -type ConsoleVPNDevice struct { - repos.BaseEntity `json:",inline" graphql:"noinput"` - - wireguardV1.Device `json:",inline"` - - common.ResourceMetadata `json:",inline"` - - AccountName string `json:"accountName" graphql:"noinput"` - EnvironmentName *string `json:"environmentName,omitempty"` - ClusterName *string `json:"clusterName,omitempty"` - - WireguardConfig t.EncodedString `json:"wireguardConfig,omitempty" graphql:"noinput" struct-json-path:",ignore-nesting"` - - WireguardConfigs map[string]t.EncodedString `json:"wireguardConfigs,omitempty" graphql:"ignore" struct-json-path:",ignore-nesting"` - - LinkedClusters []string `json:"linkedClusters,omitempty" graphql:"noinput"` - SyncStatus t.SyncStatus `json:"syncStatus" graphql:"noinput"` -} - -func (c *ConsoleVPNDevice) GetDisplayName() string { - return c.ResourceMetadata.DisplayName -} - -func (c *ConsoleVPNDevice) GetStatus() operator.Status { - return c.Device.Status -} - -var VPNDeviceIndexes = []repos.IndexField{ - { - Field: []repos.IndexKey{ - {Key: fields.Id, Value: repos.IndexAsc}, - }, - Unique: true, - }, - { - Field: []repos.IndexKey{ - {Key: fields.MetadataName, Value: repos.IndexAsc}, - {Key: fields.AccountName, Value: repos.IndexAsc}, - }, - Unique: true, - }, -} - -func ValidateVPNDevice(d *ConsoleVPNDevice) error { - errMsgs := []string{} - - if d.DisplayName == "" { - errMsgs = append(errMsgs, "displayName is required") - } - - if len(errMsgs) > 0 { - return errors.Newf("%v", errMsgs) - } - return nil -} diff --git a/apps/console/internal/env/env.go b/apps/console/internal/env/env.go index bf1f25cc6..6ad55b3e0 100644 --- a/apps/console/internal/env/env.go +++ b/apps/console/internal/env/env.go @@ -9,7 +9,8 @@ type Env struct { Port uint16 `env:"HTTP_PORT" required:"true"` GrpcPort uint16 `env:"GRPC_PORT" required:"true"` - DNSAddr string `env:"DNS_ADDR" required:"true"` + DNSAddr string `env:"DNS_ADDR" required:"true"` + KloudliteDNSSuffix string `env:"KLOUDLITE_DNS_SUFFIX" required:"true"` ConsoleDBUri string `env:"MONGO_URI" required:"true"` ConsoleDBName string `env:"MONGO_DB_NAME" required:"true"` @@ -25,8 +26,6 @@ type Env struct { IAMGrpcAddr string `env:"IAM_GRPC_ADDR" required:"true"` InfraGrpcAddr string `env:"INFRA_GRPC_ADDR" required:"true"` - // DefaultProjectWorkspaceName string `env:"DEFAULT_PROJECT_WORKSPACE_NAME" required:"true"` - PromHttpAddr string `env:"PROM_HTTP_ADDR" required:"true"` SessionKVBucket string `env:"SESSION_KV_BUCKET" required:"true"` ConsoleCacheKVBucket string `env:"CONSOLE_CACHE_KV_BUCKET" required:"true"` diff --git a/apps/console/main.go b/apps/console/main.go index 4befedbde..88c40b496 100644 --- a/apps/console/main.go +++ b/apps/console/main.go @@ -4,6 +4,7 @@ import ( "context" "flag" "os" + "strings" "time" "github.com/kloudlite/api/pkg/errors" @@ -23,8 +24,7 @@ func main() { flag.BoolVar(&isDev, "dev", false, "--dev") flag.Parse() - - logger, err := logging.New(&logging.Options{Name: "console", Dev: isDev}) + logger, err := logging.New(&logging.Options{Name: "console", ShowDebugLog: isDev || strings.ToLower(os.Getenv("LOG_LEVEL")) == "debug"}) if err != nil { panic(err) } diff --git a/apps/infra/Taskfile.yml b/apps/infra/Taskfile.yml index 548a4116c..f06c4d83f 100644 --- a/apps/infra/Taskfile.yml +++ b/apps/infra/Taskfile.yml @@ -29,7 +29,6 @@ tasks: --struct github.com/kloudlite/api/apps/infra/internal/entities.CloudProviderSecret --struct github.com/kloudlite/api/apps/infra/internal/entities.DomainEntry --struct github.com/kloudlite/api/apps/infra/internal/entities.HelmRelease - --struct github.com/kloudlite/api/apps/infra/internal/entities.ClusterManagedService --struct github.com/kloudlite/api/apps/infra/internal/entities.PersistentVolumeClaim --struct github.com/kloudlite/api/apps/infra/internal/entities.PersistentVolume --struct github.com/kloudlite/api/apps/infra/internal/entities.Namespace @@ -40,7 +39,7 @@ tasks: > ./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 Cluster,BYOKCluster,Node,NodePool,GlobalVPN,GlobalVPNDevice,CloudProviderSecret,DomainEntry,PersistentVolumeClaim,ClusterManagedService,HelmRelease,Namespace,VolumeAttachment,PersistentVolume + go run main.go --dev --out-dir ../graph/struct-to-graphql --with-pagination Cluster,BYOKCluster,Node,NodePool,GlobalVPN,GlobalVPNDevice,CloudProviderSecret,DomainEntry,PersistentVolumeClaim,HelmRelease,Namespace,VolumeAttachment,PersistentVolume popd - rm -rf ./internal/app/_struct-to-graphql diff --git a/apps/infra/internal/app/app.go b/apps/infra/internal/app/app.go index 28b4b313a..7f83ebedc 100644 --- a/apps/infra/internal/app/app.go +++ b/apps/infra/internal/app/app.go @@ -57,7 +57,6 @@ var Module = fx.Module( // repos.NewFxMongoRepo[*entities.BYOKCluster]("byok_clusters", "byok", entities.BYOKClusterIndices), repos.NewFxMongoRepo[*entities.BYOKCluster]("byok_cluster", "byok", entities.BYOKClusterIndices), - repos.NewFxMongoRepo[*entities.ClusterManagedService]("cmsvcs", "cmsvc", entities.ClusterManagedServiceIndices), repos.NewFxMongoRepo[*entities.DomainEntry]("domain_entries", "de", entities.DomainEntryIndices), repos.NewFxMongoRepo[*entities.NodePool]("node_pools", "npool", entities.NodePoolIndices), repos.NewFxMongoRepo[*entities.Node]("node", "node", entities.NodePoolIndices), diff --git a/apps/infra/internal/app/gqlgen.yml b/apps/infra/internal/app/gqlgen.yml index db501a329..0afe52076 100644 --- a/apps/infra/internal/app/gqlgen.yml +++ b/apps/infra/internal/app/gqlgen.yml @@ -109,10 +109,6 @@ models: model: github.com/kloudlite/api/apps/infra/internal/entities.DomainEntry DomainEntryIn: *domain-entry-model - ClusterManagedService: &cluster-managed-service - model: github.com/kloudlite/api/apps/infra/internal/entities.ClusterManagedService - ClusterManagedServiceIn: *cluster-managed-service - PersistentVolumeClaim: &pvc-model model: github.com/kloudlite/api/apps/infra/internal/entities.PersistentVolumeClaim PersistentVolumeClaimIn: *pvc-model diff --git a/apps/infra/internal/app/graph/generated/generated.go b/apps/infra/internal/app/graph/generated/generated.go index 39c5423ac..54eaab288 100644 --- a/apps/infra/internal/app/graph/generated/generated.go +++ b/apps/infra/internal/app/graph/generated/generated.go @@ -49,7 +49,6 @@ type ResolverRoot interface { BYOKCluster() BYOKClusterResolver CloudProviderSecret() CloudProviderSecretResolver Cluster() ClusterResolver - ClusterManagedService() ClusterManagedServiceResolver DomainEntry() DomainEntryResolver Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry() Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntryResolver Github__com___kloudlite___api___common__CreatedOrUpdatedBy() Github__com___kloudlite___api___common__CreatedOrUpdatedByResolver @@ -71,7 +70,6 @@ type ResolverRoot interface { BYOKClusterIn() BYOKClusterInResolver CloudProviderSecretIn() CloudProviderSecretInResolver ClusterIn() ClusterInResolver - ClusterManagedServiceIn() ClusterManagedServiceInResolver GlobalVPNDeviceIn() GlobalVPNDeviceInResolver GlobalVPNIn() GlobalVPNInResolver HelmReleaseIn() HelmReleaseInResolver @@ -190,37 +188,6 @@ type ComplexityRoot struct { Node func(childComplexity int) int } - ClusterManagedService struct { - APIVersion func(childComplexity int) int - AccountName func(childComplexity int) int - ClusterName func(childComplexity int) int - CreatedBy func(childComplexity int) int - CreationTime func(childComplexity int) int - DisplayName func(childComplexity int) int - ID func(childComplexity int) int - IsArchived func(childComplexity int) int - Kind func(childComplexity int) int - LastUpdatedBy func(childComplexity int) int - MarkedForDeletion func(childComplexity int) int - ObjectMeta func(childComplexity int) int - RecordVersion func(childComplexity int) int - Spec func(childComplexity int) int - Status func(childComplexity int) int - SyncStatus func(childComplexity int) int - UpdateTime func(childComplexity int) int - } - - ClusterManagedServiceEdge struct { - Cursor func(childComplexity int) int - Node func(childComplexity int) int - } - - ClusterManagedServicePaginatedRecords struct { - Edges func(childComplexity int) int - PageInfo func(childComplexity int) int - TotalCount func(childComplexity int) int - } - ClusterPaginatedRecords struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int @@ -531,11 +498,6 @@ type ComplexityRoot struct { Namespace func(childComplexity int) int } - Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec struct { - MsvcSpec func(childComplexity int) int - TargetNamespace func(childComplexity int) int - } - Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec struct { ChartName func(childComplexity int) int ChartRepoURL func(childComplexity int) int @@ -568,18 +530,6 @@ type ComplexityRoot struct { Tolerations func(childComplexity int) int } - Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec struct { - NodeSelector func(childComplexity int) int - ServiceTemplate func(childComplexity int) int - Tolerations func(childComplexity int) int - } - - Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate struct { - APIVersion func(childComplexity int) int - Kind func(childComplexity int) int - Spec func(childComplexity int) int - } - Github__com___kloudlite___operator___pkg___operator__Check struct { Debug func(childComplexity int) int Error func(childComplexity int) int @@ -1159,36 +1109,32 @@ type ComplexityRoot struct { } Mutation struct { - InfraCloneClusterManagedService func(childComplexity int, clusterName string, sourceMsvcName string, destinationMsvcName string, displayName string) int - InfraCreateBYOKCluster func(childComplexity int, cluster entities.BYOKCluster) int - InfraCreateCluster func(childComplexity int, cluster entities.Cluster) int - InfraCreateClusterManagedService func(childComplexity int, service entities.ClusterManagedService) int - InfraCreateDomainEntry func(childComplexity int, domainEntry entities.DomainEntry) int - InfraCreateGlobalVPNDevice func(childComplexity int, gvpnDevice entities.GlobalVPNDevice) int - InfraCreateGlobalVpn func(childComplexity int, gvpn entities.GlobalVPN) int - InfraCreateHelmRelease func(childComplexity int, clusterName string, release entities.HelmRelease) int - InfraCreateNodePool func(childComplexity int, clusterName string, pool entities.NodePool) int - InfraCreateProviderSecret func(childComplexity int, secret entities.CloudProviderSecret) int - InfraDeleteBYOKCluster func(childComplexity int, name string) int - InfraDeleteCluster func(childComplexity int, name string) int - InfraDeleteClusterManagedService func(childComplexity int, name string) int - InfraDeleteDomainEntry func(childComplexity int, domainName string) int - InfraDeleteGlobalVPNDevice func(childComplexity int, gvpn string, deviceName string) int - InfraDeleteGlobalVpn func(childComplexity int, name string) int - InfraDeleteHelmRelease func(childComplexity int, clusterName string, releaseName string) int - InfraDeleteNodePool func(childComplexity int, clusterName string, poolName string) int - InfraDeleteProviderSecret func(childComplexity int, secretName string) int - InfraDeletePv func(childComplexity int, clusterName string, pvName string) int - InfraUpdateBYOKCluster func(childComplexity int, clusterName string, displayName string) int - InfraUpdateCluster func(childComplexity int, cluster entities.Cluster) int - InfraUpdateClusterManagedService func(childComplexity int, service entities.ClusterManagedService) int - InfraUpdateDomainEntry func(childComplexity int, domainEntry entities.DomainEntry) int - InfraUpdateGlobalVPNDevice func(childComplexity int, gvpnDevice entities.GlobalVPNDevice) int - InfraUpdateGlobalVpn func(childComplexity int, gvpn entities.GlobalVPN) int - InfraUpdateHelmRelease func(childComplexity int, clusterName string, release entities.HelmRelease) int - InfraUpdateNodePool func(childComplexity int, clusterName string, pool entities.NodePool) int - InfraUpdateProviderSecret func(childComplexity int, secret entities.CloudProviderSecret) int - InfraUpgradeHelmKloudliteAgent func(childComplexity int, clusterName string) int + InfraCreateBYOKCluster func(childComplexity int, cluster entities.BYOKCluster) int + InfraCreateCluster func(childComplexity int, cluster entities.Cluster) int + InfraCreateDomainEntry func(childComplexity int, domainEntry entities.DomainEntry) int + InfraCreateGlobalVPNDevice func(childComplexity int, gvpnDevice entities.GlobalVPNDevice) int + InfraCreateGlobalVpn func(childComplexity int, gvpn entities.GlobalVPN) int + InfraCreateHelmRelease func(childComplexity int, clusterName string, release entities.HelmRelease) int + InfraCreateNodePool func(childComplexity int, clusterName string, pool entities.NodePool) int + InfraCreateProviderSecret func(childComplexity int, secret entities.CloudProviderSecret) int + InfraDeleteBYOKCluster func(childComplexity int, name string) int + InfraDeleteCluster func(childComplexity int, name string) int + InfraDeleteDomainEntry func(childComplexity int, domainName string) int + InfraDeleteGlobalVPNDevice func(childComplexity int, gvpn string, deviceName string) int + InfraDeleteGlobalVpn func(childComplexity int, name string) int + InfraDeleteHelmRelease func(childComplexity int, clusterName string, releaseName string) int + InfraDeleteNodePool func(childComplexity int, clusterName string, poolName string) int + InfraDeleteProviderSecret func(childComplexity int, secretName string) int + InfraDeletePv func(childComplexity int, clusterName string, pvName string) int + InfraUpdateBYOKCluster func(childComplexity int, clusterName string, displayName string) int + InfraUpdateCluster func(childComplexity int, cluster entities.Cluster) int + InfraUpdateDomainEntry func(childComplexity int, domainEntry entities.DomainEntry) int + InfraUpdateGlobalVPNDevice func(childComplexity int, gvpnDevice entities.GlobalVPNDevice) int + InfraUpdateGlobalVpn func(childComplexity int, gvpn entities.GlobalVPN) int + InfraUpdateHelmRelease func(childComplexity int, clusterName string, release entities.HelmRelease) int + InfraUpdateNodePool func(childComplexity int, clusterName string, pool entities.NodePool) int + InfraUpdateProviderSecret func(childComplexity int, secret entities.CloudProviderSecret) int + InfraUpgradeHelmKloudliteAgent func(childComplexity int, clusterName string) int } Namespace struct { @@ -1350,7 +1296,6 @@ type ComplexityRoot struct { InfraCheckNameAvailability func(childComplexity int, resType domain.ResType, clusterName *string, name string) int InfraGetBYOKCluster func(childComplexity int, name string) int InfraGetCluster func(childComplexity int, name string) int - InfraGetClusterManagedService func(childComplexity int, name string) int InfraGetDomainEntry func(childComplexity int, domainName string) int InfraGetGlobalVPNDevice func(childComplexity int, gvpn string, deviceName string) int InfraGetGlobalVpn func(childComplexity int, name string) int @@ -1363,7 +1308,6 @@ type ComplexityRoot struct { InfraGetPvc func(childComplexity int, clusterName string, name string) int InfraGetVolumeAttachment func(childComplexity int, clusterName string, name string) int InfraListBYOKClusters func(childComplexity int, search *model.SearchCluster, pagination *repos.CursorPagination) int - InfraListClusterManagedServices func(childComplexity int, search *model.SearchClusterManagedService, pagination *repos.CursorPagination) int InfraListClusters func(childComplexity int, search *model.SearchCluster, pagination *repos.CursorPagination) int InfraListDomainEntries func(childComplexity int, search *model.SearchDomainEntry, pagination *repos.CursorPagination) int InfraListGlobalVPNDevices func(childComplexity int, gvpn string, search *model.SearchGlobalVPNDevices, pagination *repos.CursorPagination) int @@ -1449,15 +1393,6 @@ type ClusterResolver interface { AdminKubeconfig(ctx context.Context, obj *entities.Cluster) (*model.EncodedValue, error) ClusterDNSSuffix(ctx context.Context, obj *entities.Cluster) (string, error) } -type ClusterManagedServiceResolver interface { - CreationTime(ctx context.Context, obj *entities.ClusterManagedService) (string, error) - - ID(ctx context.Context, obj *entities.ClusterManagedService) (repos.ID, error) - - Spec(ctx context.Context, obj *entities.ClusterManagedService) (*model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec, error) - - UpdateTime(ctx context.Context, obj *entities.ClusterManagedService) (string, error) -} type DomainEntryResolver interface { CreationTime(ctx context.Context, obj *entities.DomainEntry) (string, error) @@ -1547,10 +1482,6 @@ type MutationResolver interface { InfraCreateNodePool(ctx context.Context, clusterName string, pool entities.NodePool) (*entities.NodePool, error) InfraUpdateNodePool(ctx context.Context, clusterName string, pool entities.NodePool) (*entities.NodePool, error) InfraDeleteNodePool(ctx context.Context, clusterName string, poolName string) (bool, error) - InfraCreateClusterManagedService(ctx context.Context, service entities.ClusterManagedService) (*entities.ClusterManagedService, error) - InfraUpdateClusterManagedService(ctx context.Context, service entities.ClusterManagedService) (*entities.ClusterManagedService, error) - InfraDeleteClusterManagedService(ctx context.Context, name string) (bool, error) - InfraCloneClusterManagedService(ctx context.Context, clusterName string, sourceMsvcName string, destinationMsvcName string, displayName string) (*entities.ClusterManagedService, error) InfraCreateHelmRelease(ctx context.Context, clusterName string, release entities.HelmRelease) (*entities.HelmRelease, error) InfraUpdateHelmRelease(ctx context.Context, clusterName string, release entities.HelmRelease) (*entities.HelmRelease, error) InfraDeleteHelmRelease(ctx context.Context, clusterName string, releaseName string) (bool, error) @@ -1621,8 +1552,6 @@ type QueryResolver interface { InfraListDomainEntries(ctx context.Context, search *model.SearchDomainEntry, pagination *repos.CursorPagination) (*model.DomainEntryPaginatedRecords, error) InfraGetDomainEntry(ctx context.Context, domainName string) (*entities.DomainEntry, error) InfraCheckAwsAccess(ctx context.Context, cloudproviderName string) (*model.CheckAwsAccessOutput, error) - InfraListClusterManagedServices(ctx context.Context, search *model.SearchClusterManagedService, pagination *repos.CursorPagination) (*model.ClusterManagedServicePaginatedRecords, error) - InfraGetClusterManagedService(ctx context.Context, name string) (*entities.ClusterManagedService, error) InfraListHelmReleases(ctx context.Context, clusterName string, search *model.SearchHelmRelease, pagination *repos.CursorPagination) (*model.HelmReleasePaginatedRecords, error) InfraGetHelmRelease(ctx context.Context, clusterName string, name string) (*entities.HelmRelease, error) InfraListManagedServiceTemplates(ctx context.Context) ([]*entities.MsvcTemplate, error) @@ -1662,10 +1591,6 @@ type ClusterInResolver interface { Metadata(ctx context.Context, obj *entities.Cluster, data *v1.ObjectMeta) error Spec(ctx context.Context, obj *entities.Cluster, data *model.GithubComKloudliteOperatorApisClustersV1ClusterSpecIn) error } -type ClusterManagedServiceInResolver interface { - Metadata(ctx context.Context, obj *entities.ClusterManagedService, data *v1.ObjectMeta) error - Spec(ctx context.Context, obj *entities.ClusterManagedService, data *model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn) error -} type GlobalVPNDeviceInResolver interface { Metadata(ctx context.Context, obj *entities.GlobalVPNDevice, data *v1.ObjectMeta) error } @@ -2195,160 +2120,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.ClusterEdge.Node(childComplexity), true - case "ClusterManagedService.apiVersion": - if e.complexity.ClusterManagedService.APIVersion == nil { - break - } - - return e.complexity.ClusterManagedService.APIVersion(childComplexity), true - - case "ClusterManagedService.accountName": - if e.complexity.ClusterManagedService.AccountName == nil { - break - } - - return e.complexity.ClusterManagedService.AccountName(childComplexity), true - - case "ClusterManagedService.clusterName": - if e.complexity.ClusterManagedService.ClusterName == nil { - break - } - - return e.complexity.ClusterManagedService.ClusterName(childComplexity), true - - case "ClusterManagedService.createdBy": - if e.complexity.ClusterManagedService.CreatedBy == nil { - break - } - - return e.complexity.ClusterManagedService.CreatedBy(childComplexity), true - - case "ClusterManagedService.creationTime": - if e.complexity.ClusterManagedService.CreationTime == nil { - break - } - - return e.complexity.ClusterManagedService.CreationTime(childComplexity), true - - case "ClusterManagedService.displayName": - if e.complexity.ClusterManagedService.DisplayName == nil { - break - } - - return e.complexity.ClusterManagedService.DisplayName(childComplexity), true - - case "ClusterManagedService.id": - if e.complexity.ClusterManagedService.ID == nil { - break - } - - return e.complexity.ClusterManagedService.ID(childComplexity), true - - case "ClusterManagedService.isArchived": - if e.complexity.ClusterManagedService.IsArchived == nil { - break - } - - return e.complexity.ClusterManagedService.IsArchived(childComplexity), true - - case "ClusterManagedService.kind": - if e.complexity.ClusterManagedService.Kind == nil { - break - } - - return e.complexity.ClusterManagedService.Kind(childComplexity), true - - case "ClusterManagedService.lastUpdatedBy": - if e.complexity.ClusterManagedService.LastUpdatedBy == nil { - break - } - - return e.complexity.ClusterManagedService.LastUpdatedBy(childComplexity), true - - case "ClusterManagedService.markedForDeletion": - if e.complexity.ClusterManagedService.MarkedForDeletion == nil { - break - } - - return e.complexity.ClusterManagedService.MarkedForDeletion(childComplexity), true - - case "ClusterManagedService.metadata": - if e.complexity.ClusterManagedService.ObjectMeta == nil { - break - } - - return e.complexity.ClusterManagedService.ObjectMeta(childComplexity), true - - case "ClusterManagedService.recordVersion": - if e.complexity.ClusterManagedService.RecordVersion == nil { - break - } - - return e.complexity.ClusterManagedService.RecordVersion(childComplexity), true - - case "ClusterManagedService.spec": - if e.complexity.ClusterManagedService.Spec == nil { - break - } - - return e.complexity.ClusterManagedService.Spec(childComplexity), true - - case "ClusterManagedService.status": - if e.complexity.ClusterManagedService.Status == nil { - break - } - - return e.complexity.ClusterManagedService.Status(childComplexity), true - - case "ClusterManagedService.syncStatus": - if e.complexity.ClusterManagedService.SyncStatus == nil { - break - } - - return e.complexity.ClusterManagedService.SyncStatus(childComplexity), true - - case "ClusterManagedService.updateTime": - if e.complexity.ClusterManagedService.UpdateTime == nil { - break - } - - return e.complexity.ClusterManagedService.UpdateTime(childComplexity), true - - case "ClusterManagedServiceEdge.cursor": - if e.complexity.ClusterManagedServiceEdge.Cursor == nil { - break - } - - return e.complexity.ClusterManagedServiceEdge.Cursor(childComplexity), true - - case "ClusterManagedServiceEdge.node": - if e.complexity.ClusterManagedServiceEdge.Node == nil { - break - } - - return e.complexity.ClusterManagedServiceEdge.Node(childComplexity), true - - case "ClusterManagedServicePaginatedRecords.edges": - if e.complexity.ClusterManagedServicePaginatedRecords.Edges == nil { - break - } - - return e.complexity.ClusterManagedServicePaginatedRecords.Edges(childComplexity), true - - case "ClusterManagedServicePaginatedRecords.pageInfo": - if e.complexity.ClusterManagedServicePaginatedRecords.PageInfo == nil { - break - } - - return e.complexity.ClusterManagedServicePaginatedRecords.PageInfo(childComplexity), true - - case "ClusterManagedServicePaginatedRecords.totalCount": - if e.complexity.ClusterManagedServicePaginatedRecords.TotalCount == nil { - break - } - - return e.complexity.ClusterManagedServicePaginatedRecords.TotalCount(childComplexity), true - case "ClusterPaginatedRecords.edges": if e.complexity.ClusterPaginatedRecords.Edges == nil { break @@ -3658,20 +3429,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___common____types__SecretRef.Namespace(childComplexity), true - case "Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.msvcSpec": - if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.MsvcSpec == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.MsvcSpec(childComplexity), true - - case "Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.targetNamespace": - if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.TargetNamespace == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec.TargetNamespace(childComplexity), true - case "Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec.chartName": if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec.ChartName == nil { break @@ -3833,48 +3590,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__JobVars.Tolerations(childComplexity), true - case "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.nodeSelector": - if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.NodeSelector == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.NodeSelector(childComplexity), true - - case "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.serviceTemplate": - if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.ServiceTemplate == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.ServiceTemplate(childComplexity), true - - case "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.tolerations": - if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.Tolerations == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec.Tolerations(childComplexity), true - - case "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.apiVersion": - if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.APIVersion == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.APIVersion(childComplexity), true - - case "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.kind": - if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.Kind == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.Kind(childComplexity), true - - case "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.spec": - if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.Spec == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate.Spec(childComplexity), true - case "Github__com___kloudlite___operator___pkg___operator__Check.debug": if e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Debug == nil { break @@ -6346,18 +6061,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.MsvcTemplate.Items(childComplexity), true - case "Mutation.infra_cloneClusterManagedService": - if e.complexity.Mutation.InfraCloneClusterManagedService == nil { - break - } - - args, err := ec.field_Mutation_infra_cloneClusterManagedService_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Mutation.InfraCloneClusterManagedService(childComplexity, args["clusterName"].(string), args["sourceMsvcName"].(string), args["destinationMsvcName"].(string), args["displayName"].(string)), true - case "Mutation.infra_createBYOKCluster": if e.complexity.Mutation.InfraCreateBYOKCluster == nil { break @@ -6382,18 +6085,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.InfraCreateCluster(childComplexity, args["cluster"].(entities.Cluster)), true - case "Mutation.infra_createClusterManagedService": - if e.complexity.Mutation.InfraCreateClusterManagedService == nil { - break - } - - args, err := ec.field_Mutation_infra_createClusterManagedService_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Mutation.InfraCreateClusterManagedService(childComplexity, args["service"].(entities.ClusterManagedService)), true - case "Mutation.infra_createDomainEntry": if e.complexity.Mutation.InfraCreateDomainEntry == nil { break @@ -6490,18 +6181,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.InfraDeleteCluster(childComplexity, args["name"].(string)), true - case "Mutation.infra_deleteClusterManagedService": - if e.complexity.Mutation.InfraDeleteClusterManagedService == nil { - break - } - - args, err := ec.field_Mutation_infra_deleteClusterManagedService_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Mutation.InfraDeleteClusterManagedService(childComplexity, args["name"].(string)), true - case "Mutation.infra_deleteDomainEntry": if e.complexity.Mutation.InfraDeleteDomainEntry == nil { break @@ -6610,18 +6289,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.InfraUpdateCluster(childComplexity, args["cluster"].(entities.Cluster)), true - case "Mutation.infra_updateClusterManagedService": - if e.complexity.Mutation.InfraUpdateClusterManagedService == nil { - break - } - - args, err := ec.field_Mutation_infra_updateClusterManagedService_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Mutation.InfraUpdateClusterManagedService(childComplexity, args["service"].(entities.ClusterManagedService)), true - case "Mutation.infra_updateDomainEntry": if e.complexity.Mutation.InfraUpdateDomainEntry == nil { break @@ -7496,18 +7163,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.InfraGetCluster(childComplexity, args["name"].(string)), true - case "Query.infra_getClusterManagedService": - if e.complexity.Query.InfraGetClusterManagedService == nil { - break - } - - args, err := ec.field_Query_infra_getClusterManagedService_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Query.InfraGetClusterManagedService(childComplexity, args["name"].(string)), true - case "Query.infra_getDomainEntry": if e.complexity.Query.InfraGetDomainEntry == nil { break @@ -7652,18 +7307,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.InfraListBYOKClusters(childComplexity, args["search"].(*model.SearchCluster), args["pagination"].(*repos.CursorPagination)), true - case "Query.infra_listClusterManagedServices": - if e.complexity.Query.InfraListClusterManagedServices == nil { - break - } - - args, err := ec.field_Query_infra_listClusterManagedServices_args(context.TODO(), rawArgs) - if err != nil { - return 0, false - } - - return e.complexity.Query.InfraListClusterManagedServices(childComplexity, args["search"].(*model.SearchClusterManagedService), args["pagination"].(*repos.CursorPagination)), true - case "Query.infra_listClusters": if e.complexity.Query.InfraListClusters == nil { break @@ -7988,7 +7631,6 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputBYOKSetupInstructionIn, ec.unmarshalInputCloudProviderSecretIn, ec.unmarshalInputClusterIn, - ec.unmarshalInputClusterManagedServiceIn, ec.unmarshalInputCursorPaginationIn, ec.unmarshalInputDomainEntryIn, ec.unmarshalInputGithub__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParamsIn, @@ -8012,11 +7654,8 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__NodeSpecIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___common____types__MinMaxFloatIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___common____types__SecretRefIn, - ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HelmChartSpecIn, ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__JobVarsIn, - ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn, - ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn, ec.unmarshalInputGlobalVPNDeviceIn, ec.unmarshalInputGlobalVPNIn, ec.unmarshalInputHelmReleaseIn, @@ -8083,7 +7722,6 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputNodePoolIn, ec.unmarshalInputPersistentVolumeIn, ec.unmarshalInputSearchCluster, - ec.unmarshalInputSearchClusterManagedService, ec.unmarshalInputSearchDomainEntry, ec.unmarshalInputSearchGlobalVPNDevices, ec.unmarshalInputSearchGlobalVPNs, @@ -8229,11 +7867,6 @@ input SearchGlobalVPNDevices { creationMethod: MatchFilterIn } -input SearchClusterManagedService { - isReady: MatchFilterIn - text: MatchFilterIn -} - input SearchNodepool { text: MatchFilterIn } @@ -8309,9 +7942,6 @@ type Query { infra_checkAwsAccess(cloudproviderName: String!): CheckAwsAccessOutput! @isLoggedInAndVerified @hasAccount - infra_listClusterManagedServices(search: SearchClusterManagedService, pagination: CursorPaginationIn): ClusterManagedServicePaginatedRecords @isLoggedInAndVerified @hasAccount - infra_getClusterManagedService(name: String!): ClusterManagedService @isLoggedInAndVerified @hasAccount - infra_listHelmReleases(clusterName: String!, search: SearchHelmRelease, pagination: CursorPaginationIn): HelmReleasePaginatedRecords @isLoggedInAndVerified @hasAccount infra_getHelmRelease(clusterName: String!, name: String!): HelmRelease @isLoggedInAndVerified @hasAccount @@ -8365,11 +7995,6 @@ type Mutation { infra_updateNodePool(clusterName: String!, pool: NodePoolIn!): NodePool @isLoggedInAndVerified @hasAccount infra_deleteNodePool(clusterName: String!, poolName: String!): Boolean! @isLoggedInAndVerified @hasAccount - infra_createClusterManagedService(service: ClusterManagedServiceIn!): ClusterManagedService @isLoggedInAndVerified @hasAccount - infra_updateClusterManagedService(service: ClusterManagedServiceIn!): ClusterManagedService @isLoggedInAndVerified @hasAccount - infra_deleteClusterManagedService(name: String!): Boolean! @isLoggedInAndVerified @hasAccount - infra_cloneClusterManagedService(clusterName: String!, sourceMsvcName: String!, destinationMsvcName: String!, displayName: String!): ClusterManagedService @isLoggedInAndVerified @hasAccount - infra_createHelmRelease(clusterName: String!, release: HelmReleaseIn!): HelmRelease @isLoggedInAndVerified @hasAccount infra_updateHelmRelease(clusterName: String!, release: HelmReleaseIn!): HelmRelease @isLoggedInAndVerified @hasAccount infra_deleteHelmRelease(clusterName: String!, releaseName: String!): Boolean! @isLoggedInAndVerified @hasAccount @@ -8520,47 +8145,6 @@ input ClusterIn { spec: Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpecIn! } -`, BuiltIn: false}, - {Name: "../struct-to-graphql/clustermanagedservice.graphqls", Input: `type ClusterManagedService @shareable { - accountName: String! - apiVersion: String - clusterName: String! - createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! - creationTime: Date! - displayName: String! - id: ID! - isArchived: Boolean - kind: String - lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! - markedForDeletion: Boolean - metadata: Metadata @goField(name: "objectMeta") - recordVersion: Int! - spec: Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec - status: Github__com___kloudlite___operator___pkg___operator__Status - syncStatus: Github__com___kloudlite___api___pkg___types__SyncStatus! - updateTime: Date! -} - -type ClusterManagedServiceEdge @shareable { - cursor: String! - node: ClusterManagedService! -} - -type ClusterManagedServicePaginatedRecords @shareable { - edges: [ClusterManagedServiceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ClusterManagedServiceIn { - apiVersion: String - clusterName: String! - displayName: String! - kind: String - metadata: MetadataIn - spec: Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn -} - `, BuiltIn: false}, {Name: "../struct-to-graphql/common-types.graphqls", Input: `type Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams @shareable { awsAccountId: String! @@ -8827,11 +8411,6 @@ type Github__com___kloudlite___operator___apis___common____types__SecretRef @sha namespace: String } -type Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec @shareable { - msvcSpec: Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec! - targetNamespace: String! -} - type Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec @shareable { chartName: String! chartRepoURL: String! @@ -8864,18 +8443,6 @@ type Github__com___kloudlite___operator___apis___crds___v1__JobVars @shareable { tolerations: [K8s__io___api___core___v1__Toleration!] } -type Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec @shareable { - nodeSelector: Map - serviceTemplate: Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate! - tolerations: [K8s__io___api___core___v1__Toleration!] -} - -type Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate @shareable { - apiVersion: String! - kind: String! - spec: Map -} - type Github__com___kloudlite___operator___pkg___operator__Check @shareable { debug: String error: String @@ -9457,10 +9024,6 @@ input Github__com___kloudlite___operator___apis___common____types__SecretRefIn { namespace: String } -input Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn { - msvcSpec: Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn! -} - input Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpecIn { chartName: String! chartRepoURL: String! @@ -9480,18 +9043,6 @@ input Github__com___kloudlite___operator___apis___crds___v1__JobVarsIn { tolerations: [K8s__io___api___core___v1__TolerationIn!] } -input Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn { - nodeSelector: Map - serviceTemplate: Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn! - tolerations: [K8s__io___api___core___v1__TolerationIn!] -} - -input Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn { - apiVersion: String! - kind: String! - spec: Map -} - input K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSourceIn { fsType: String partition: Int @@ -10562,48 +10113,6 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...) // region ***************************** args.gotpl ***************************** -func (ec *executionContext) field_Mutation_infra_cloneClusterManagedService_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["clusterName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["sourceMsvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sourceMsvcName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["sourceMsvcName"] = arg1 - var arg2 string - if tmp, ok := rawArgs["destinationMsvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("destinationMsvcName")) - arg2, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["destinationMsvcName"] = arg2 - var arg3 string - if tmp, ok := rawArgs["displayName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - arg3, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["displayName"] = arg3 - return args, nil -} - func (ec *executionContext) field_Mutation_infra_createBYOKCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -10619,21 +10128,6 @@ func (ec *executionContext) field_Mutation_infra_createBYOKCluster_args(ctx cont return args, nil } -func (ec *executionContext) field_Mutation_infra_createClusterManagedService_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 entities.ClusterManagedService - if tmp, ok := rawArgs["service"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("service")) - arg0, err = ec.unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx, tmp) - if err != nil { - return nil, err - } - } - args["service"] = arg0 - return args, nil -} - func (ec *executionContext) field_Mutation_infra_createCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -10772,21 +10266,6 @@ func (ec *executionContext) field_Mutation_infra_deleteBYOKCluster_args(ctx cont return args, nil } -func (ec *executionContext) field_Mutation_infra_deleteClusterManagedService_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["name"] = arg0 - return args, nil -} - func (ec *executionContext) field_Mutation_infra_deleteCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -10967,21 +10446,6 @@ func (ec *executionContext) field_Mutation_infra_updateBYOKCluster_args(ctx cont return args, nil } -func (ec *executionContext) field_Mutation_infra_updateClusterManagedService_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 entities.ClusterManagedService - if tmp, ok := rawArgs["service"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("service")) - arg0, err = ec.unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx, tmp) - if err != nil { - return nil, err - } - } - args["service"] = arg0 - return args, nil -} - func (ec *executionContext) field_Mutation_infra_updateCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -11198,21 +10662,6 @@ func (ec *executionContext) field_Query_infra_getBYOKCluster_args(ctx context.Co return args, nil } -func (ec *executionContext) field_Query_infra_getClusterManagedService_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } - } - args["name"] = arg0 - return args, nil -} - func (ec *executionContext) field_Query_infra_getCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -11489,30 +10938,6 @@ func (ec *executionContext) field_Query_infra_listBYOKClusters_args(ctx context. return args, nil } -func (ec *executionContext) field_Query_infra_listClusterManagedServices_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 *model.SearchClusterManagedService - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg0, err = ec.unmarshalOSearchClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchClusterManagedService(ctx, tmp) - if err != nil { - return nil, err - } - } - args["search"] = arg0 - var arg1 *repos.CursorPagination - if tmp, ok := rawArgs["pagination"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) - arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } - } - args["pagination"] = arg1 - return args, nil -} - func (ec *executionContext) field_Query_infra_listClusters_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -12947,1147 +12372,9 @@ func (ec *executionContext) _BYOKClusterPaginatedRecords_pageInfo(ctx context.Co return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKClusterPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "BYOKClusterPaginatedRecords", - 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 "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(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) _BYOKClusterPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.BYOKClusterPaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BYOKClusterPaginatedRecords_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_BYOKClusterPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "BYOKClusterPaginatedRecords", - 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) _BYOKSetupInstruction_command(ctx context.Context, field graphql.CollectedField, obj *model.BYOKSetupInstruction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BYOKSetupInstruction_command(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.Command, 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_BYOKSetupInstruction_command(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "BYOKSetupInstruction", - 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) _BYOKSetupInstruction_title(ctx context.Context, field graphql.CollectedField, obj *model.BYOKSetupInstruction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BYOKSetupInstruction_title(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.Title, 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_BYOKSetupInstruction_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "BYOKSetupInstruction", - 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) _CheckAwsAccessOutput_result(ctx context.Context, field graphql.CollectedField, obj *model.CheckAwsAccessOutput) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CheckAwsAccessOutput_result(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.Result, 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.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CheckAwsAccessOutput_result(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CheckAwsAccessOutput", - 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) _CheckAwsAccessOutput_installationUrl(ctx context.Context, field graphql.CollectedField, obj *model.CheckAwsAccessOutput) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CheckAwsAccessOutput_installationUrl(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.InstallationURL, 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.marshalOString2ᚖstring(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CheckAwsAccessOutput_installationUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CheckAwsAccessOutput", - 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) _CheckNameAvailabilityOutput_result(ctx context.Context, field graphql.CollectedField, obj *domain.CheckNameAvailabilityOutput) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CheckNameAvailabilityOutput_result(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.Result, 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.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CheckNameAvailabilityOutput_result(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CheckNameAvailabilityOutput", - 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) _CheckNameAvailabilityOutput_suggestedNames(ctx context.Context, field graphql.CollectedField, obj *domain.CheckNameAvailabilityOutput) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CheckNameAvailabilityOutput_suggestedNames(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.SuggestedNames, 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.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CheckNameAvailabilityOutput_suggestedNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CheckNameAvailabilityOutput", - 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) _CloudProviderSecret_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_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_CloudProviderSecret_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - 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) _CloudProviderSecret_aws(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_aws(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.CloudProviderSecret().Aws(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials) - fc.Result = res - return ec.marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CloudProviderSecret_aws(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "assumeRoleParams": - return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_assumeRoleParams(ctx, field) - case "authMechanism": - return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_authMechanism(ctx, field) - case "authSecretKeys": - return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_authSecretKeys(ctx, field) - case "cfParamInstanceProfileName": - return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamInstanceProfileName(ctx, field) - case "cfParamRoleName": - return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamRoleName(ctx, field) - case "cfParamStackName": - return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamStackName(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _CloudProviderSecret_cloudProviderName(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_cloudProviderName(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.CloudProviderSecret().CloudProviderName(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.(model.GithubComKloudliteOperatorApisCommonTypesCloudProvider) - fc.Result = res - return ec.marshalNGithub__com___kloudlite___operator___apis___common____types__CloudProvider2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesCloudProvider(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CloudProviderSecret_cloudProviderName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Github__com___kloudlite___operator___apis___common____types__CloudProvider does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _CloudProviderSecret_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_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_CloudProviderSecret_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - 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) _CloudProviderSecret_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_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.CloudProviderSecret().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_CloudProviderSecret_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - 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) _CloudProviderSecret_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_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_CloudProviderSecret_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - 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) _CloudProviderSecret_gcp(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_gcp(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.CloudProviderSecret().Gcp(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials) - fc.Result = res - return ec.marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CloudProviderSecret_gcp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "serviceAccountJSON": - return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials_serviceAccountJSON(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _CloudProviderSecret_id(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_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 ec.resolvers.CloudProviderSecret().ID(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.(repos.ID) - fc.Result = res - return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CloudProviderSecret_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - Field: field, - IsMethod: true, - IsResolver: true, - 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) _CloudProviderSecret_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_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_CloudProviderSecret_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - 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) _CloudProviderSecret_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_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_CloudProviderSecret_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - 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) _CloudProviderSecret_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_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 { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(v1.ObjectMeta) - fc.Result = res - return ec.marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CloudProviderSecret_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - 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) _CloudProviderSecret_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_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_CloudProviderSecret_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - 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) _CloudProviderSecret_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecret_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.CloudProviderSecret().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_CloudProviderSecret_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecret", - 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) _CloudProviderSecretEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.CloudProviderSecretEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecretEdge_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_CloudProviderSecretEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecretEdge", - 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) _CloudProviderSecretEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.CloudProviderSecretEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecretEdge_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.CloudProviderSecret) - fc.Result = res - return ec.marshalNCloudProviderSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCloudProviderSecret(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CloudProviderSecretEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecretEdge", - 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_CloudProviderSecret_accountName(ctx, field) - case "aws": - return ec.fieldContext_CloudProviderSecret_aws(ctx, field) - case "cloudProviderName": - return ec.fieldContext_CloudProviderSecret_cloudProviderName(ctx, field) - case "createdBy": - return ec.fieldContext_CloudProviderSecret_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_CloudProviderSecret_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_CloudProviderSecret_displayName(ctx, field) - case "gcp": - return ec.fieldContext_CloudProviderSecret_gcp(ctx, field) - case "id": - return ec.fieldContext_CloudProviderSecret_id(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_CloudProviderSecret_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_CloudProviderSecret_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_CloudProviderSecret_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_CloudProviderSecret_recordVersion(ctx, field) - case "updateTime": - return ec.fieldContext_CloudProviderSecret_updateTime(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type CloudProviderSecret", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _CloudProviderSecretPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.CloudProviderSecretPaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecretPaginatedRecords_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.CloudProviderSecretEdge) - fc.Result = res - return ec.marshalNCloudProviderSecretEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐCloudProviderSecretEdgeᚄ(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "CloudProviderSecretPaginatedRecords", - 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_CloudProviderSecretEdge_cursor(ctx, field) - case "node": - return ec.fieldContext_CloudProviderSecretEdge_node(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type CloudProviderSecretEdge", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _CloudProviderSecretPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.CloudProviderSecretPaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecretPaginatedRecords_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ᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKClusterPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CloudProviderSecretPaginatedRecords", + Object: "BYOKClusterPaginatedRecords", Field: field, IsMethod: false, IsResolver: false, @@ -14108,8 +12395,8 @@ func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_pag return fc, nil } -func (ec *executionContext) _CloudProviderSecretPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.CloudProviderSecretPaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CloudProviderSecretPaginatedRecords_totalCount(ctx, field) +func (ec *executionContext) _BYOKClusterPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.BYOKClusterPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BYOKClusterPaginatedRecords_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -14139,9 +12426,9 @@ func (ec *executionContext) _CloudProviderSecretPaginatedRecords_totalCount(ctx return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKClusterPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CloudProviderSecretPaginatedRecords", + Object: "BYOKClusterPaginatedRecords", Field: field, IsMethod: false, IsResolver: false, @@ -14152,8 +12439,8 @@ func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_tot return fc, nil } -func (ec *executionContext) _Cluster_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_accountName(ctx, field) +func (ec *executionContext) _BYOKSetupInstruction_command(ctx context.Context, field graphql.CollectedField, obj *model.BYOKSetupInstruction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BYOKSetupInstruction_command(ctx, field) if err != nil { return graphql.Null } @@ -14166,7 +12453,7 @@ func (ec *executionContext) _Cluster_accountName(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 obj.AccountName, nil + return obj.Command, nil }) if err != nil { ec.Error(ctx, err) @@ -14183,9 +12470,9 @@ func (ec *executionContext) _Cluster_accountName(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKSetupInstruction_command(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "BYOKSetupInstruction", Field: field, IsMethod: false, IsResolver: false, @@ -14196,8 +12483,8 @@ func (ec *executionContext) fieldContext_Cluster_accountName(ctx context.Context return fc, nil } -func (ec *executionContext) _Cluster_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_apiVersion(ctx, field) +func (ec *executionContext) _BYOKSetupInstruction_title(ctx context.Context, field graphql.CollectedField, obj *model.BYOKSetupInstruction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BYOKSetupInstruction_title(ctx, field) if err != nil { return graphql.Null } @@ -14210,23 +12497,26 @@ func (ec *executionContext) _Cluster_apiVersion(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.APIVersion, nil + return obj.Title, 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.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKSetupInstruction_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "BYOKSetupInstruction", Field: field, IsMethod: false, IsResolver: false, @@ -14237,8 +12527,8 @@ func (ec *executionContext) fieldContext_Cluster_apiVersion(ctx context.Context, return fc, nil } -func (ec *executionContext) _Cluster_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_createdBy(ctx, field) +func (ec *executionContext) _CheckAwsAccessOutput_result(ctx context.Context, field graphql.CollectedField, obj *model.CheckAwsAccessOutput) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CheckAwsAccessOutput_result(ctx, field) if err != nil { return graphql.Null } @@ -14251,7 +12541,7 @@ func (ec *executionContext) _Cluster_createdBy(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.CreatedBy, nil + return obj.Result, nil }) if err != nil { ec.Error(ctx, err) @@ -14263,34 +12553,26 @@ func (ec *executionContext) _Cluster_createdBy(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(common.CreatedOrUpdatedBy) + res := resTmp.(bool) fc.Result = res - return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CheckAwsAccessOutput_result(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CheckAwsAccessOutput", 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 Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Cluster_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_creationTime(ctx, field) +func (ec *executionContext) _CheckAwsAccessOutput_installationUrl(ctx context.Context, field graphql.CollectedField, obj *model.CheckAwsAccessOutput) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CheckAwsAccessOutput_installationUrl(ctx, field) if err != nil { return graphql.Null } @@ -14303,38 +12585,35 @@ func (ec *executionContext) _Cluster_creationTime(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 ec.resolvers.Cluster().CreationTime(rctx, obj) + return obj.InstallationURL, 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.(*string) fc.Result = res - return ec.marshalNDate2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CheckAwsAccessOutput_installationUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CheckAwsAccessOutput", 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) _Cluster_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_displayName(ctx, field) +func (ec *executionContext) _CheckNameAvailabilityOutput_result(ctx context.Context, field graphql.CollectedField, obj *domain.CheckNameAvailabilityOutput) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CheckNameAvailabilityOutput_result(ctx, field) if err != nil { return graphql.Null } @@ -14347,7 +12626,7 @@ func (ec *executionContext) _Cluster_displayName(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 obj.DisplayName, nil + return obj.Result, nil }) if err != nil { ec.Error(ctx, err) @@ -14359,26 +12638,26 @@ func (ec *executionContext) _Cluster_displayName(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CheckNameAvailabilityOutput_result(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CheckNameAvailabilityOutput", 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) _Cluster_globalVPN(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_globalVPN(ctx, field) +func (ec *executionContext) _CheckNameAvailabilityOutput_suggestedNames(ctx context.Context, field graphql.CollectedField, obj *domain.CheckNameAvailabilityOutput) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CheckNameAvailabilityOutput_suggestedNames(ctx, field) if err != nil { return graphql.Null } @@ -14391,23 +12670,26 @@ func (ec *executionContext) _Cluster_globalVPN(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.GlobalVPN, nil + return obj.SuggestedNames, 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.([]string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_globalVPN(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CheckNameAvailabilityOutput_suggestedNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CheckNameAvailabilityOutput", Field: field, IsMethod: false, IsResolver: false, @@ -14418,8 +12700,8 @@ func (ec *executionContext) fieldContext_Cluster_globalVPN(ctx context.Context, return fc, nil } -func (ec *executionContext) _Cluster_id(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_id(ctx, field) +func (ec *executionContext) _CloudProviderSecret_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_accountName(ctx, field) if err != nil { return graphql.Null } @@ -14432,7 +12714,7 @@ func (ec *executionContext) _Cluster_id(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.Cluster().ID(rctx, obj) + return obj.AccountName, nil }) if err != nil { ec.Error(ctx, err) @@ -14444,26 +12726,26 @@ func (ec *executionContext) _Cluster_id(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(repos.ID) + res := resTmp.(string) fc.Result = res - return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", 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 ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Cluster_kind(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_kind(ctx, field) +func (ec *executionContext) _CloudProviderSecret_aws(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_aws(ctx, field) if err != nil { return graphql.Null } @@ -14476,7 +12758,7 @@ func (ec *executionContext) _Cluster_kind(ctx context.Context, field graphql.Col }() 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.CloudProviderSecret().Aws(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -14485,26 +12767,40 @@ func (ec *executionContext) _Cluster_kind(ctx context.Context, field graphql.Col if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_aws(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", 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") + switch field.Name { + case "assumeRoleParams": + return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_assumeRoleParams(ctx, field) + case "authMechanism": + return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_authMechanism(ctx, field) + case "authSecretKeys": + return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_authSecretKeys(ctx, field) + case "cfParamInstanceProfileName": + return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamInstanceProfileName(ctx, field) + case "cfParamRoleName": + return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamRoleName(ctx, field) + case "cfParamStackName": + return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamStackName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials", field.Name) }, } return fc, nil } -func (ec *executionContext) _Cluster_lastOnlineAt(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_lastOnlineAt(ctx, field) +func (ec *executionContext) _CloudProviderSecret_cloudProviderName(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_cloudProviderName(ctx, field) if err != nil { return graphql.Null } @@ -14517,35 +12813,38 @@ func (ec *executionContext) _Cluster_lastOnlineAt(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 ec.resolvers.Cluster().LastOnlineAt(rctx, obj) + return ec.resolvers.CloudProviderSecret().CloudProviderName(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) + res := resTmp.(model.GithubComKloudliteOperatorApisCommonTypesCloudProvider) fc.Result = res - return ec.marshalODate2ᚖstring(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___operator___apis___common____types__CloudProvider2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesCloudProvider(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_lastOnlineAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_cloudProviderName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", 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 nil, errors.New("field of type Github__com___kloudlite___operator___apis___common____types__CloudProvider does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Cluster_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_lastUpdatedBy(ctx, field) +func (ec *executionContext) _CloudProviderSecret_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_createdBy(ctx, field) if err != nil { return graphql.Null } @@ -14558,7 +12857,7 @@ func (ec *executionContext) _Cluster_lastUpdatedBy(ctx context.Context, field gr }() 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) @@ -14575,9 +12874,9 @@ func (ec *executionContext) _Cluster_lastUpdatedBy(ctx context.Context, field gr return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", Field: field, IsMethod: false, IsResolver: false, @@ -14596,8 +12895,8 @@ func (ec *executionContext) fieldContext_Cluster_lastUpdatedBy(ctx context.Conte return fc, nil } -func (ec *executionContext) _Cluster_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_markedForDeletion(ctx, field) +func (ec *executionContext) _CloudProviderSecret_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_creationTime(ctx, field) if err != nil { return graphql.Null } @@ -14610,35 +12909,38 @@ func (ec *executionContext) _Cluster_markedForDeletion(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarkedForDeletion, nil + return ec.resolvers.CloudProviderSecret().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.(*bool) + res := resTmp.(string) fc.Result = res - return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) + return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", 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 Boolean does not have child fields") + return nil, errors.New("field of type Date does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Cluster_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_metadata(ctx, field) +func (ec *executionContext) _CloudProviderSecret_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_displayName(ctx, field) if err != nil { return graphql.Null } @@ -14651,7 +12953,7 @@ func (ec *executionContext) _Cluster_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.DisplayName, nil }) if err != nil { ec.Error(ctx, err) @@ -14663,42 +12965,26 @@ func (ec *executionContext) _Cluster_metadata(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(v1.ObjectMeta) + res := resTmp.(string) fc.Result = res - return ec.marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", 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) _Cluster_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_recordVersion(ctx, field) +func (ec *executionContext) _CloudProviderSecret_gcp(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_gcp(ctx, field) if err != nil { return graphql.Null } @@ -14711,38 +12997,39 @@ func (ec *executionContext) _Cluster_recordVersion(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RecordVersion, nil + return ec.resolvers.CloudProviderSecret().Gcp(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.(int) + res := resTmp.(*model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_gcp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", 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 Int does not have child fields") + switch field.Name { + case "serviceAccountJSON": + return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials_serviceAccountJSON(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials", field.Name) }, } return fc, nil } -func (ec *executionContext) _Cluster_spec(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_spec(ctx, field) +func (ec *executionContext) _CloudProviderSecret_id(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_id(ctx, field) if err != nil { return graphql.Null } @@ -14755,7 +13042,7 @@ func (ec *executionContext) _Cluster_spec(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Cluster().Spec(rctx, obj) + return ec.resolvers.CloudProviderSecret().ID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -14767,60 +13054,26 @@ func (ec *executionContext) _Cluster_spec(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1ClusterSpec) + res := resTmp.(repos.ID) fc.Result = res - return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__ClusterSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1ClusterSpec(ctx, field.Selections, res) + return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "accountId": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_accountId(ctx, field) - case "accountName": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_accountName(ctx, field) - case "availabilityMode": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_availabilityMode(ctx, field) - case "aws": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_aws(ctx, field) - case "backupToS3Enabled": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_backupToS3Enabled(ctx, field) - case "cloudflareEnabled": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_cloudflareEnabled(ctx, field) - case "cloudProvider": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_cloudProvider(ctx, field) - case "clusterInternalDnsHost": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterInternalDnsHost(ctx, field) - case "clusterServiceCIDR": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterServiceCIDR(ctx, field) - case "clusterTokenRef": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterTokenRef(ctx, field) - case "gcp": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_gcp(ctx, field) - case "kloudliteRelease": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_kloudliteRelease(ctx, field) - case "messageQueueTopicName": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_messageQueueTopicName(ctx, field) - case "output": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_output(ctx, field) - case "publicDNSHost": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_publicDNSHost(ctx, field) - case "taintMasterNodes": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_taintMasterNodes(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Cluster_status(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_status(ctx, field) +func (ec *executionContext) _CloudProviderSecret_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_lastUpdatedBy(ctx, field) if err != nil { return graphql.Null } @@ -14833,51 +13086,46 @@ func (ec *executionContext) _Cluster_status(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.Status, nil + 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.(operator.Status) + res := resTmp.(common.CreatedOrUpdatedBy) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", 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 "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___operator___pkg___operator__Status", field.Name) + 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) _Cluster_syncStatus(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_syncStatus(ctx, field) +func (ec *executionContext) _CloudProviderSecret_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_markedForDeletion(ctx, field) if err != nil { return graphql.Null } @@ -14890,52 +13138,35 @@ func (ec *executionContext) _Cluster_syncStatus(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.SyncStatus, nil + return obj.MarkedForDeletion, 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.(*bool) fc.Result = res - return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", 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 nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Cluster_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_updateTime(ctx, field) +func (ec *executionContext) _CloudProviderSecret_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_metadata(ctx, field) if err != nil { return graphql.Null } @@ -14948,7 +13179,7 @@ func (ec *executionContext) _Cluster_updateTime(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 ec.resolvers.Cluster().UpdateTime(rctx, obj) + return obj.ObjectMeta, nil }) if err != nil { ec.Error(ctx, err) @@ -14960,26 +13191,42 @@ func (ec *executionContext) _Cluster_updateTime(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(string) + res := resTmp.(v1.ObjectMeta) fc.Result = res - return ec.marshalNDate2string(ctx, field.Selections, res) + return ec.marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", 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") + 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) _Cluster_adminKubeconfig(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_adminKubeconfig(ctx, field) +func (ec *executionContext) _CloudProviderSecret_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_recordVersion(ctx, field) if err != nil { return graphql.Null } @@ -14992,41 +13239,38 @@ func (ec *executionContext) _Cluster_adminKubeconfig(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Cluster().AdminKubeconfig(rctx, obj) + 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.(*model.EncodedValue) + res := resTmp.(int) fc.Result = res - return ec.marshalOEncodedValue2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐEncodedValue(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_adminKubeconfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", 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 "value": - return ec.fieldContext_EncodedValue_value(ctx, field) - case "encoding": - return ec.fieldContext_EncodedValue_encoding(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type EncodedValue", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Cluster_clusterDNSSuffix(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Cluster_clusterDNSSuffix(ctx, field) +func (ec *executionContext) _CloudProviderSecret_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.CloudProviderSecret) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecret_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -15039,7 +13283,7 @@ func (ec *executionContext) _Cluster_clusterDNSSuffix(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Cluster().ClusterDNSSuffix(rctx, obj) + return ec.resolvers.CloudProviderSecret().UpdateTime(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -15053,24 +13297,24 @@ func (ec *executionContext) _Cluster_clusterDNSSuffix(ctx context.Context, field } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_clusterDNSSuffix(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Cluster", + Object: "CloudProviderSecret", 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 Date does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ClusterEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.ClusterEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterEdge_cursor(ctx, field) +func (ec *executionContext) _CloudProviderSecretEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.CloudProviderSecretEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecretEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -15100,9 +13344,9 @@ func (ec *executionContext) _ClusterEdge_cursor(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecretEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterEdge", + Object: "CloudProviderSecretEdge", Field: field, IsMethod: false, IsResolver: false, @@ -15113,8 +13357,8 @@ func (ec *executionContext) fieldContext_ClusterEdge_cursor(ctx context.Context, return fc, nil } -func (ec *executionContext) _ClusterEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.ClusterEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterEdge_node(ctx, field) +func (ec *executionContext) _CloudProviderSecretEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.CloudProviderSecretEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecretEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -15139,66 +13383,54 @@ func (ec *executionContext) _ClusterEdge_node(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(*entities.Cluster) + res := resTmp.(*entities.CloudProviderSecret) fc.Result = res - return ec.marshalNCluster2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCluster(ctx, field.Selections, res) + return ec.marshalNCloudProviderSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCloudProviderSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecretEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterEdge", + Object: "CloudProviderSecretEdge", 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_Cluster_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_Cluster_apiVersion(ctx, field) + return ec.fieldContext_CloudProviderSecret_accountName(ctx, field) + case "aws": + return ec.fieldContext_CloudProviderSecret_aws(ctx, field) + case "cloudProviderName": + return ec.fieldContext_CloudProviderSecret_cloudProviderName(ctx, field) case "createdBy": - return ec.fieldContext_Cluster_createdBy(ctx, field) + return ec.fieldContext_CloudProviderSecret_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_Cluster_creationTime(ctx, field) + return ec.fieldContext_CloudProviderSecret_creationTime(ctx, field) case "displayName": - return ec.fieldContext_Cluster_displayName(ctx, field) - case "globalVPN": - return ec.fieldContext_Cluster_globalVPN(ctx, field) + return ec.fieldContext_CloudProviderSecret_displayName(ctx, field) + case "gcp": + return ec.fieldContext_CloudProviderSecret_gcp(ctx, field) case "id": - return ec.fieldContext_Cluster_id(ctx, field) - case "kind": - return ec.fieldContext_Cluster_kind(ctx, field) - case "lastOnlineAt": - return ec.fieldContext_Cluster_lastOnlineAt(ctx, field) + return ec.fieldContext_CloudProviderSecret_id(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_Cluster_lastUpdatedBy(ctx, field) + return ec.fieldContext_CloudProviderSecret_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_Cluster_markedForDeletion(ctx, field) + return ec.fieldContext_CloudProviderSecret_markedForDeletion(ctx, field) case "metadata": - return ec.fieldContext_Cluster_metadata(ctx, field) + return ec.fieldContext_CloudProviderSecret_metadata(ctx, field) case "recordVersion": - return ec.fieldContext_Cluster_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_Cluster_spec(ctx, field) - case "status": - return ec.fieldContext_Cluster_status(ctx, field) - case "syncStatus": - return ec.fieldContext_Cluster_syncStatus(ctx, field) + return ec.fieldContext_CloudProviderSecret_recordVersion(ctx, field) case "updateTime": - return ec.fieldContext_Cluster_updateTime(ctx, field) - case "adminKubeconfig": - return ec.fieldContext_Cluster_adminKubeconfig(ctx, field) - case "clusterDNSSuffix": - return ec.fieldContext_Cluster_clusterDNSSuffix(ctx, field) + return ec.fieldContext_CloudProviderSecret_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Cluster", field.Name) + return nil, fmt.Errorf("no field named %q was found under type CloudProviderSecret", field.Name) }, } return fc, nil } -func (ec *executionContext) _ClusterManagedService_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_accountName(ctx, field) +func (ec *executionContext) _CloudProviderSecretPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.CloudProviderSecretPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecretPaginatedRecords_edges(ctx, field) if err != nil { return graphql.Null } @@ -15211,7 +13443,7 @@ func (ec *executionContext) _ClusterManagedService_accountName(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AccountName, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -15223,26 +13455,32 @@ func (ec *executionContext) _ClusterManagedService_accountName(ctx context.Conte } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*model.CloudProviderSecretEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNCloudProviderSecretEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐCloudProviderSecretEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "CloudProviderSecretPaginatedRecords", 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") + switch field.Name { + case "cursor": + return ec.fieldContext_CloudProviderSecretEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_CloudProviderSecretEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CloudProviderSecretEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _ClusterManagedService_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) +func (ec *executionContext) _CloudProviderSecretPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.CloudProviderSecretPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecretPaginatedRecords_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -15255,35 +13493,48 @@ func (ec *executionContext) _ClusterManagedService_apiVersion(ctx context.Contex }() 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 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.(string) + res := resTmp.(*model.PageInfo) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "CloudProviderSecretPaginatedRecords", 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") + switch field.Name { + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(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) _ClusterManagedService_clusterName(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_clusterName(ctx, field) +func (ec *executionContext) _CloudProviderSecretPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.CloudProviderSecretPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CloudProviderSecretPaginatedRecords_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -15296,7 +13547,51 @@ func (ec *executionContext) _ClusterManagedService_clusterName(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ClusterName, nil + 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_CloudProviderSecretPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CloudProviderSecretPaginatedRecords", + 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) _Cluster_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_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) @@ -15313,9 +13608,50 @@ func (ec *executionContext) _ClusterManagedService_clusterName(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Cluster", + 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) _Cluster_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_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_Cluster_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: false, IsResolver: false, @@ -15326,8 +13662,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_clusterName(ctx c return fc, nil } -func (ec *executionContext) _ClusterManagedService_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_createdBy(ctx, field) +func (ec *executionContext) _Cluster_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_createdBy(ctx, field) if err != nil { return graphql.Null } @@ -15357,9 +13693,9 @@ func (ec *executionContext) _ClusterManagedService_createdBy(ctx context.Context return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: false, IsResolver: false, @@ -15378,8 +13714,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_createdBy(ctx con return fc, nil } -func (ec *executionContext) _ClusterManagedService_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_creationTime(ctx, field) +func (ec *executionContext) _Cluster_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_creationTime(ctx, field) if err != nil { return graphql.Null } @@ -15392,7 +13728,7 @@ func (ec *executionContext) _ClusterManagedService_creationTime(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ClusterManagedService().CreationTime(rctx, obj) + return ec.resolvers.Cluster().CreationTime(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -15409,9 +13745,9 @@ func (ec *executionContext) _ClusterManagedService_creationTime(ctx context.Cont return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: true, IsResolver: true, @@ -15422,8 +13758,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_creationTime(ctx return fc, nil } -func (ec *executionContext) _ClusterManagedService_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_displayName(ctx, field) +func (ec *executionContext) _Cluster_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_displayName(ctx, field) if err != nil { return graphql.Null } @@ -15453,9 +13789,9 @@ func (ec *executionContext) _ClusterManagedService_displayName(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: false, IsResolver: false, @@ -15466,8 +13802,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_displayName(ctx c return fc, nil } -func (ec *executionContext) _ClusterManagedService_id(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_id(ctx, field) +func (ec *executionContext) _Cluster_globalVPN(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_globalVPN(ctx, field) if err != nil { return graphql.Null } @@ -15480,7 +13816,48 @@ func (ec *executionContext) _ClusterManagedService_id(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ClusterManagedService().ID(rctx, obj) + return obj.GlobalVPN, 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.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Cluster_globalVPN(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Cluster", + 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) _Cluster_id(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_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 ec.resolvers.Cluster().ID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -15497,9 +13874,9 @@ func (ec *executionContext) _ClusterManagedService_id(ctx context.Context, field return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: true, IsResolver: true, @@ -15510,8 +13887,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_id(ctx context.Co return fc, nil } -func (ec *executionContext) _ClusterManagedService_isArchived(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_isArchived(ctx, field) +func (ec *executionContext) _Cluster_kind(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_kind(ctx, field) if err != nil { return graphql.Null } @@ -15524,7 +13901,7 @@ func (ec *executionContext) _ClusterManagedService_isArchived(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IsArchived, nil + return obj.Kind, nil }) if err != nil { ec.Error(ctx, err) @@ -15533,26 +13910,26 @@ func (ec *executionContext) _ClusterManagedService_isArchived(ctx context.Contex if resTmp == nil { return graphql.Null } - res := resTmp.(*bool) + res := resTmp.(string) fc.Result = res - return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_isArchived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", 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 nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ClusterManagedService_kind(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_kind(ctx, field) +func (ec *executionContext) _Cluster_lastOnlineAt(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_lastOnlineAt(ctx, field) if err != nil { return graphql.Null } @@ -15565,7 +13942,7 @@ func (ec *executionContext) _ClusterManagedService_kind(ctx context.Context, fie }() 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.Cluster().LastOnlineAt(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -15574,26 +13951,26 @@ func (ec *executionContext) _ClusterManagedService_kind(ctx context.Context, fie if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_lastOnlineAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", 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) _ClusterManagedService_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) +func (ec *executionContext) _Cluster_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_lastUpdatedBy(ctx, field) if err != nil { return graphql.Null } @@ -15623,9 +14000,9 @@ func (ec *executionContext) _ClusterManagedService_lastUpdatedBy(ctx context.Con return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: false, IsResolver: false, @@ -15644,8 +14021,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_lastUpdatedBy(ctx return fc, nil } -func (ec *executionContext) _ClusterManagedService_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) +func (ec *executionContext) _Cluster_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_markedForDeletion(ctx, field) if err != nil { return graphql.Null } @@ -15672,9 +14049,9 @@ func (ec *executionContext) _ClusterManagedService_markedForDeletion(ctx context return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: false, IsResolver: false, @@ -15685,8 +14062,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_markedForDeletion return fc, nil } -func (ec *executionContext) _ClusterManagedService_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_metadata(ctx, field) +func (ec *executionContext) _Cluster_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_metadata(ctx, field) if err != nil { return graphql.Null } @@ -15706,16 +14083,19 @@ func (ec *executionContext) _ClusterManagedService_metadata(ctx context.Context, return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(v1.ObjectMeta) fc.Result = res - return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) + return ec.marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: false, IsResolver: false, @@ -15742,8 +14122,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_metadata(ctx cont return fc, nil } -func (ec *executionContext) _ClusterManagedService_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) +func (ec *executionContext) _Cluster_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_recordVersion(ctx, field) if err != nil { return graphql.Null } @@ -15773,9 +14153,9 @@ func (ec *executionContext) _ClusterManagedService_recordVersion(ctx context.Con return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: false, IsResolver: false, @@ -15786,8 +14166,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_recordVersion(ctx return fc, nil } -func (ec *executionContext) _ClusterManagedService_spec(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_spec(ctx, field) +func (ec *executionContext) _Cluster_spec(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_spec(ctx, field) if err != nil { return graphql.Null } @@ -15800,41 +14180,72 @@ func (ec *executionContext) _ClusterManagedService_spec(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ClusterManagedService().Spec(rctx, obj) + return ec.resolvers.Cluster().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.(*model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec) + res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1ClusterSpec) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__ClusterSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1ClusterSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "msvcSpec": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(ctx, field) - case "targetNamespace": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(ctx, field) + case "accountId": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_accountId(ctx, field) + case "accountName": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_accountName(ctx, field) + case "availabilityMode": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_availabilityMode(ctx, field) + case "aws": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_aws(ctx, field) + case "backupToS3Enabled": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_backupToS3Enabled(ctx, field) + case "cloudflareEnabled": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_cloudflareEnabled(ctx, field) + case "cloudProvider": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_cloudProvider(ctx, field) + case "clusterInternalDnsHost": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterInternalDnsHost(ctx, field) + case "clusterServiceCIDR": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterServiceCIDR(ctx, field) + case "clusterTokenRef": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterTokenRef(ctx, field) + case "gcp": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_gcp(ctx, field) + case "kloudliteRelease": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_kloudliteRelease(ctx, field) + case "messageQueueTopicName": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_messageQueueTopicName(ctx, field) + case "output": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_output(ctx, field) + case "publicDNSHost": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_publicDNSHost(ctx, field) + case "taintMasterNodes": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_taintMasterNodes(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", field.Name) }, } return fc, nil } -func (ec *executionContext) _ClusterManagedService_status(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_status(ctx, field) +func (ec *executionContext) _Cluster_status(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_status(ctx, field) if err != nil { return graphql.Null } @@ -15861,9 +14272,9 @@ func (ec *executionContext) _ClusterManagedService_status(ctx context.Context, f return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: false, IsResolver: false, @@ -15890,8 +14301,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_status(ctx contex return fc, nil } -func (ec *executionContext) _ClusterManagedService_syncStatus(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) +func (ec *executionContext) _Cluster_syncStatus(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_syncStatus(ctx, field) if err != nil { return graphql.Null } @@ -15921,9 +14332,9 @@ func (ec *executionContext) _ClusterManagedService_syncStatus(ctx context.Contex return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: false, IsResolver: false, @@ -15948,8 +14359,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_syncStatus(ctx co return fc, nil } -func (ec *executionContext) _ClusterManagedService_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.ClusterManagedService) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedService_updateTime(ctx, field) +func (ec *executionContext) _Cluster_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -15962,7 +14373,7 @@ func (ec *executionContext) _ClusterManagedService_updateTime(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ClusterManagedService().UpdateTime(rctx, obj) + return ec.resolvers.Cluster().UpdateTime(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -15979,9 +14390,9 @@ func (ec *executionContext) _ClusterManagedService_updateTime(ctx context.Contex return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedService", + Object: "Cluster", Field: field, IsMethod: true, IsResolver: true, @@ -15992,52 +14403,8 @@ func (ec *executionContext) fieldContext_ClusterManagedService_updateTime(ctx co return fc, nil } -func (ec *executionContext) _ClusterManagedServiceEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.ClusterManagedServiceEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedServiceEdge_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_ClusterManagedServiceEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "ClusterManagedServiceEdge", - 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) _ClusterManagedServiceEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.ClusterManagedServiceEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedServiceEdge_node(ctx, field) +func (ec *executionContext) _Cluster_adminKubeconfig(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_adminKubeconfig(ctx, field) if err != nil { return graphql.Null } @@ -16050,74 +14417,41 @@ func (ec *executionContext) _ClusterManagedServiceEdge_node(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Cluster().AdminKubeconfig(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.(*entities.ClusterManagedService) + res := resTmp.(*model.EncodedValue) fc.Result = res - return ec.marshalNClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx, field.Selections, res) + return ec.marshalOEncodedValue2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐEncodedValue(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedServiceEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_adminKubeconfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedServiceEdge", + Object: "Cluster", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "accountName": - return ec.fieldContext_ClusterManagedService_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_ClusterManagedService_clusterName(ctx, field) - case "createdBy": - return ec.fieldContext_ClusterManagedService_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_ClusterManagedService_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_ClusterManagedService_displayName(ctx, field) - case "id": - return ec.fieldContext_ClusterManagedService_id(ctx, field) - case "isArchived": - return ec.fieldContext_ClusterManagedService_isArchived(ctx, field) - case "kind": - return ec.fieldContext_ClusterManagedService_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_ClusterManagedService_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_ClusterManagedService_spec(ctx, field) - case "status": - return ec.fieldContext_ClusterManagedService_status(ctx, field) - case "syncStatus": - return ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_ClusterManagedService_updateTime(ctx, field) + case "value": + return ec.fieldContext_EncodedValue_value(ctx, field) + case "encoding": + return ec.fieldContext_EncodedValue_encoding(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ClusterManagedService", field.Name) + return nil, fmt.Errorf("no field named %q was found under type EncodedValue", field.Name) }, } return fc, nil } -func (ec *executionContext) _ClusterManagedServicePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.ClusterManagedServicePaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedServicePaginatedRecords_edges(ctx, field) +func (ec *executionContext) _Cluster_clusterDNSSuffix(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_clusterDNSSuffix(ctx, field) if err != nil { return graphql.Null } @@ -16130,7 +14464,7 @@ func (ec *executionContext) _ClusterManagedServicePaginatedRecords_edges(ctx con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.Cluster().ClusterDNSSuffix(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -16142,32 +14476,26 @@ func (ec *executionContext) _ClusterManagedServicePaginatedRecords_edges(ctx con } return graphql.Null } - res := resTmp.([]*model.ClusterManagedServiceEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalNClusterManagedServiceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_clusterDNSSuffix(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedServicePaginatedRecords", + Object: "Cluster", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "cursor": - return ec.fieldContext_ClusterManagedServiceEdge_cursor(ctx, field) - case "node": - return ec.fieldContext_ClusterManagedServiceEdge_node(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ClusterManagedServiceEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ClusterManagedServicePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.ClusterManagedServicePaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedServicePaginatedRecords_pageInfo(ctx, field) +func (ec *executionContext) _ClusterEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.ClusterEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -16180,7 +14508,7 @@ func (ec *executionContext) _ClusterManagedServicePaginatedRecords_pageInfo(ctx }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -16192,36 +14520,26 @@ func (ec *executionContext) _ClusterManagedServicePaginatedRecords_pageInfo(ctx } return graphql.Null } - res := resTmp.(*model.PageInfo) + res := resTmp.(string) fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedServicePaginatedRecords", + Object: "ClusterEdge", 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 "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(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 nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ClusterManagedServicePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.ClusterManagedServicePaginatedRecords) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ClusterManagedServicePaginatedRecords_totalCount(ctx, field) +func (ec *executionContext) _ClusterEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.ClusterEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ClusterEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -16234,7 +14552,7 @@ func (ec *executionContext) _ClusterManagedServicePaginatedRecords_totalCount(ct }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -16246,19 +14564,59 @@ func (ec *executionContext) _ClusterManagedServicePaginatedRecords_totalCount(ct } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*entities.Cluster) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNCluster2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCluster(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ClusterManagedServicePaginatedRecords", + Object: "ClusterEdge", 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") + switch field.Name { + case "accountName": + return ec.fieldContext_Cluster_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_Cluster_apiVersion(ctx, field) + case "createdBy": + return ec.fieldContext_Cluster_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_Cluster_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_Cluster_displayName(ctx, field) + case "globalVPN": + return ec.fieldContext_Cluster_globalVPN(ctx, field) + case "id": + return ec.fieldContext_Cluster_id(ctx, field) + case "kind": + return ec.fieldContext_Cluster_kind(ctx, field) + case "lastOnlineAt": + return ec.fieldContext_Cluster_lastOnlineAt(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_Cluster_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_Cluster_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_Cluster_metadata(ctx, field) + case "recordVersion": + return ec.fieldContext_Cluster_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_Cluster_spec(ctx, field) + case "status": + return ec.fieldContext_Cluster_status(ctx, field) + case "syncStatus": + return ec.fieldContext_Cluster_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_Cluster_updateTime(ctx, field) + case "adminKubeconfig": + return ec.fieldContext_Cluster_adminKubeconfig(ctx, field) + case "clusterDNSSuffix": + return ec.fieldContext_Cluster_clusterDNSSuffix(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Cluster", field.Name) }, } return fc, nil @@ -24595,94 +22953,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___common____types__SecretKeyRef", - 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) _Github__com___kloudlite___operator___apis___common____types__SecretRef_name(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCommonTypesSecretRef) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_name(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.Name, 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_Github__com___kloudlite___operator___apis___common____types__SecretRef_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___common____types__SecretRef", - 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) _Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCommonTypesSecretRef) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(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.Namespace, 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.marshalOString2ᚖstring(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___common____types__SecretRef", + Object: "Github__com___kloudlite___operator___apis___common____types__SecretKeyRef", Field: field, IsMethod: false, IsResolver: false, @@ -24693,8 +22966,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___common____types__SecretRef_name(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCommonTypesSecretRef) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_name(ctx, field) if err != nil { return graphql.Null } @@ -24707,7 +22980,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MsvcSpec, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -24719,34 +22992,26 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ } return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) + res := resTmp.(string) fc.Result = res - return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec", + Object: "Github__com___kloudlite___operator___apis___common____types__SecretRef", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "nodeSelector": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(ctx, field) - case "serviceTemplate": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(ctx, field) - case "tolerations": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCommonTypesSecretRef) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(ctx, field) if err != nil { return graphql.Null } @@ -24759,26 +23024,23 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TargetNamespace, nil + return obj.Namespace, 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.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec", + Object: "Github__com___kloudlite___operator___apis___common____types__SecretRef", Field: field, IsMethod: false, IsResolver: false, @@ -25809,281 +24071,6 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(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.NodeSelector, nil - }) - 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_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec", - Field: field, - IsMethod: false, - IsResolver: false, - 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) _Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(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.ServiceTemplate, 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.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) - fc.Result = res - return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ServiceTemplate(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "apiVersion": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_apiVersion(ctx, field) - case "kind": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_kind(ctx, field) - case "spec": - return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(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.Tolerations, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]*model.K8sIoAPICoreV1Toleration) - fc.Result = res - return ec.marshalOK8s__io___api___core___v1__Toleration2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Tolerationᚄ(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "effect": - return ec.fieldContext_K8s__io___api___core___v1__Toleration_effect(ctx, field) - case "key": - return ec.fieldContext_K8s__io___api___core___v1__Toleration_key(ctx, field) - case "operator": - return ec.fieldContext_K8s__io___api___core___v1__Toleration_operator(ctx, field) - case "tolerationSeconds": - return ec.fieldContext_K8s__io___api___core___v1__Toleration_tolerationSeconds(ctx, field) - case "value": - return ec.fieldContext_K8s__io___api___core___v1__Toleration_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type K8s__io___api___core___v1__Toleration", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_apiVersion(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_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 { - 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_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate", - 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) _Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_kind(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_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 { - 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_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate", - 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) _Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(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.Spec, nil - }) - 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_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate", - Field: field, - IsMethod: false, - IsResolver: false, - 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) _Github__com___kloudlite___operator___pkg___operator__Check_debug(ctx context.Context, field graphql.CollectedField, obj *operator.Check) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_debug(ctx, field) if err != nil { @@ -43433,482 +41420,10 @@ func (ec *executionContext) _Mutation_infra_updateProviderSecret(ctx context.Con if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.CloudProviderSecret); ok { - return data, nil - } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/entities.CloudProviderSecret`, tmp) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*entities.CloudProviderSecret) - fc.Result = res - return ec.marshalOCloudProviderSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCloudProviderSecret(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Mutation_infra_updateProviderSecret(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) { - switch field.Name { - case "accountName": - return ec.fieldContext_CloudProviderSecret_accountName(ctx, field) - case "aws": - return ec.fieldContext_CloudProviderSecret_aws(ctx, field) - case "cloudProviderName": - return ec.fieldContext_CloudProviderSecret_cloudProviderName(ctx, field) - case "createdBy": - return ec.fieldContext_CloudProviderSecret_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_CloudProviderSecret_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_CloudProviderSecret_displayName(ctx, field) - case "gcp": - return ec.fieldContext_CloudProviderSecret_gcp(ctx, field) - case "id": - return ec.fieldContext_CloudProviderSecret_id(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_CloudProviderSecret_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_CloudProviderSecret_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_CloudProviderSecret_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_CloudProviderSecret_recordVersion(ctx, field) - case "updateTime": - return ec.fieldContext_CloudProviderSecret_updateTime(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type CloudProviderSecret", 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_Mutation_infra_updateProviderSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _Mutation_infra_deleteProviderSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_infra_deleteProviderSecret(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().InfraDeleteProviderSecret(rctx, fc.Args["secretName"].(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_infra_deleteProviderSecret(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_infra_deleteProviderSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _Mutation_infra_createDomainEntry(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_infra_createDomainEntry(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().InfraCreateDomainEntry(rctx, fc.Args["domainEntry"].(entities.DomainEntry)) - } - 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.DomainEntry); ok { - return data, nil - } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/entities.DomainEntry`, tmp) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*entities.DomainEntry) - fc.Result = res - return ec.marshalODomainEntry2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Mutation_infra_createDomainEntry(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) { - switch field.Name { - case "accountName": - return ec.fieldContext_DomainEntry_accountName(ctx, field) - case "clusterName": - return ec.fieldContext_DomainEntry_clusterName(ctx, field) - case "createdBy": - return ec.fieldContext_DomainEntry_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_DomainEntry_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_DomainEntry_displayName(ctx, field) - case "domainName": - return ec.fieldContext_DomainEntry_domainName(ctx, field) - case "id": - return ec.fieldContext_DomainEntry_id(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_DomainEntry_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_DomainEntry_markedForDeletion(ctx, field) - case "recordVersion": - return ec.fieldContext_DomainEntry_recordVersion(ctx, field) - case "updateTime": - return ec.fieldContext_DomainEntry_updateTime(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DomainEntry", 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_Mutation_infra_createDomainEntry_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _Mutation_infra_updateDomainEntry(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_infra_updateDomainEntry(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().InfraUpdateDomainEntry(rctx, fc.Args["domainEntry"].(entities.DomainEntry)) - } - 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.DomainEntry); ok { - return data, nil - } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/entities.DomainEntry`, tmp) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*entities.DomainEntry) - fc.Result = res - return ec.marshalODomainEntry2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Mutation_infra_updateDomainEntry(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) { - switch field.Name { - case "accountName": - return ec.fieldContext_DomainEntry_accountName(ctx, field) - case "clusterName": - return ec.fieldContext_DomainEntry_clusterName(ctx, field) - case "createdBy": - return ec.fieldContext_DomainEntry_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_DomainEntry_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_DomainEntry_displayName(ctx, field) - case "domainName": - return ec.fieldContext_DomainEntry_domainName(ctx, field) - case "id": - return ec.fieldContext_DomainEntry_id(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_DomainEntry_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_DomainEntry_markedForDeletion(ctx, field) - case "recordVersion": - return ec.fieldContext_DomainEntry_recordVersion(ctx, field) - case "updateTime": - return ec.fieldContext_DomainEntry_updateTime(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DomainEntry", 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_Mutation_infra_updateDomainEntry_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _Mutation_infra_deleteDomainEntry(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_infra_deleteDomainEntry(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().InfraDeleteDomainEntry(rctx, fc.Args["domainName"].(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_infra_deleteDomainEntry(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_infra_deleteDomainEntry_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _Mutation_infra_createNodePool(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_infra_createNodePool(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().InfraCreateNodePool(rctx, fc.Args["clusterName"].(string), fc.Args["pool"].(entities.NodePool)) - } - 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.NodePool); ok { + if data, ok := tmp.(*entities.CloudProviderSecret); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/entities.NodePool`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/entities.CloudProviderSecret`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -43917,12 +41432,12 @@ func (ec *executionContext) _Mutation_infra_createNodePool(ctx context.Context, if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.NodePool) + res := resTmp.(*entities.CloudProviderSecret) fc.Result = res - return ec.marshalONodePool2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐNodePool(ctx, field.Selections, res) + return ec.marshalOCloudProviderSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCloudProviderSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_infra_createNodePool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_infra_updateProviderSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -43931,39 +41446,33 @@ func (ec *executionContext) fieldContext_Mutation_infra_createNodePool(ctx conte Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_NodePool_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_NodePool_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_NodePool_clusterName(ctx, field) + return ec.fieldContext_CloudProviderSecret_accountName(ctx, field) + case "aws": + return ec.fieldContext_CloudProviderSecret_aws(ctx, field) + case "cloudProviderName": + return ec.fieldContext_CloudProviderSecret_cloudProviderName(ctx, field) case "createdBy": - return ec.fieldContext_NodePool_createdBy(ctx, field) + return ec.fieldContext_CloudProviderSecret_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_NodePool_creationTime(ctx, field) + return ec.fieldContext_CloudProviderSecret_creationTime(ctx, field) case "displayName": - return ec.fieldContext_NodePool_displayName(ctx, field) + return ec.fieldContext_CloudProviderSecret_displayName(ctx, field) + case "gcp": + return ec.fieldContext_CloudProviderSecret_gcp(ctx, field) case "id": - return ec.fieldContext_NodePool_id(ctx, field) - case "kind": - return ec.fieldContext_NodePool_kind(ctx, field) + return ec.fieldContext_CloudProviderSecret_id(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_NodePool_lastUpdatedBy(ctx, field) + return ec.fieldContext_CloudProviderSecret_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_NodePool_markedForDeletion(ctx, field) + return ec.fieldContext_CloudProviderSecret_markedForDeletion(ctx, field) case "metadata": - return ec.fieldContext_NodePool_metadata(ctx, field) + return ec.fieldContext_CloudProviderSecret_metadata(ctx, field) case "recordVersion": - return ec.fieldContext_NodePool_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_NodePool_spec(ctx, field) - case "status": - return ec.fieldContext_NodePool_status(ctx, field) - case "syncStatus": - return ec.fieldContext_NodePool_syncStatus(ctx, field) + return ec.fieldContext_CloudProviderSecret_recordVersion(ctx, field) case "updateTime": - return ec.fieldContext_NodePool_updateTime(ctx, field) + return ec.fieldContext_CloudProviderSecret_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type NodePool", field.Name) + return nil, fmt.Errorf("no field named %q was found under type CloudProviderSecret", field.Name) }, } defer func() { @@ -43973,15 +41482,15 @@ func (ec *executionContext) fieldContext_Mutation_infra_createNodePool(ctx conte } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_infra_createNodePool_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_infra_updateProviderSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_infra_updateNodePool(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_infra_updateNodePool(ctx, field) +func (ec *executionContext) _Mutation_infra_deleteProviderSecret(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_infra_deleteProviderSecret(ctx, field) if err != nil { return graphql.Null } @@ -43995,7 +41504,7 @@ func (ec *executionContext) _Mutation_infra_updateNodePool(ctx context.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.Mutation().InfraUpdateNodePool(rctx, fc.Args["clusterName"].(string), fc.Args["pool"].(entities.NodePool)) + return ec.resolvers.Mutation().InfraDeleteProviderSecret(rctx, fc.Args["secretName"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -44017,65 +41526,34 @@ func (ec *executionContext) _Mutation_infra_updateNodePool(ctx context.Context, if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.NodePool); 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/infra/internal/entities.NodePool`, 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.(*entities.NodePool) + res := resTmp.(bool) fc.Result = res - return ec.marshalONodePool2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐNodePool(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_infra_updateNodePool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_infra_deleteProviderSecret(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) { - switch field.Name { - case "accountName": - return ec.fieldContext_NodePool_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_NodePool_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_NodePool_clusterName(ctx, field) - case "createdBy": - return ec.fieldContext_NodePool_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_NodePool_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_NodePool_displayName(ctx, field) - case "id": - return ec.fieldContext_NodePool_id(ctx, field) - case "kind": - return ec.fieldContext_NodePool_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_NodePool_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_NodePool_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_NodePool_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_NodePool_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_NodePool_spec(ctx, field) - case "status": - return ec.fieldContext_NodePool_status(ctx, field) - case "syncStatus": - return ec.fieldContext_NodePool_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_NodePool_updateTime(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NodePool", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } defer func() { @@ -44085,15 +41563,15 @@ func (ec *executionContext) fieldContext_Mutation_infra_updateNodePool(ctx conte } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_infra_updateNodePool_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_infra_deleteProviderSecret_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_infra_deleteNodePool(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_infra_deleteNodePool(ctx, field) +func (ec *executionContext) _Mutation_infra_createDomainEntry(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_infra_createDomainEntry(ctx, field) if err != nil { return graphql.Null } @@ -44107,7 +41585,7 @@ func (ec *executionContext) _Mutation_infra_deleteNodePool(ctx context.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.Mutation().InfraDeleteNodePool(rctx, fc.Args["clusterName"].(string), fc.Args["poolName"].(string)) + return ec.resolvers.Mutation().InfraCreateDomainEntry(rctx, fc.Args["domainEntry"].(entities.DomainEntry)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -44129,34 +41607,55 @@ func (ec *executionContext) _Mutation_infra_deleteNodePool(ctx context.Context, if tmp == nil { return nil, nil } - if data, ok := tmp.(bool); ok { + if data, ok := tmp.(*entities.DomainEntry); 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/infra/internal/entities.DomainEntry`, 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.DomainEntry) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalODomainEntry2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_infra_deleteNodePool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_infra_createDomainEntry(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") + switch field.Name { + case "accountName": + return ec.fieldContext_DomainEntry_accountName(ctx, field) + case "clusterName": + return ec.fieldContext_DomainEntry_clusterName(ctx, field) + case "createdBy": + return ec.fieldContext_DomainEntry_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_DomainEntry_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_DomainEntry_displayName(ctx, field) + case "domainName": + return ec.fieldContext_DomainEntry_domainName(ctx, field) + case "id": + return ec.fieldContext_DomainEntry_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_DomainEntry_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_DomainEntry_markedForDeletion(ctx, field) + case "recordVersion": + return ec.fieldContext_DomainEntry_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_DomainEntry_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DomainEntry", field.Name) }, } defer func() { @@ -44166,15 +41665,15 @@ func (ec *executionContext) fieldContext_Mutation_infra_deleteNodePool(ctx conte } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_infra_deleteNodePool_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_infra_createDomainEntry_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_infra_createClusterManagedService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_infra_createClusterManagedService(ctx, field) +func (ec *executionContext) _Mutation_infra_updateDomainEntry(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_infra_updateDomainEntry(ctx, field) if err != nil { return graphql.Null } @@ -44188,7 +41687,7 @@ func (ec *executionContext) _Mutation_infra_createClusterManagedService(ctx cont 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().InfraCreateClusterManagedService(rctx, fc.Args["service"].(entities.ClusterManagedService)) + return ec.resolvers.Mutation().InfraUpdateDomainEntry(rctx, fc.Args["domainEntry"].(entities.DomainEntry)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -44210,10 +41709,10 @@ func (ec *executionContext) _Mutation_infra_createClusterManagedService(ctx cont if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.ClusterManagedService); ok { + if data, ok := tmp.(*entities.DomainEntry); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/entities.ClusterManagedService`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/entities.DomainEntry`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -44222,12 +41721,12 @@ func (ec *executionContext) _Mutation_infra_createClusterManagedService(ctx cont if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.ClusterManagedService) + res := resTmp.(*entities.DomainEntry) fc.Result = res - return ec.marshalOClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx, field.Selections, res) + return ec.marshalODomainEntry2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_infra_createClusterManagedService(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_infra_updateDomainEntry(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -44236,41 +41735,29 @@ func (ec *executionContext) fieldContext_Mutation_infra_createClusterManagedServ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_ClusterManagedService_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) + return ec.fieldContext_DomainEntry_accountName(ctx, field) case "clusterName": - return ec.fieldContext_ClusterManagedService_clusterName(ctx, field) + return ec.fieldContext_DomainEntry_clusterName(ctx, field) case "createdBy": - return ec.fieldContext_ClusterManagedService_createdBy(ctx, field) + return ec.fieldContext_DomainEntry_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_ClusterManagedService_creationTime(ctx, field) + return ec.fieldContext_DomainEntry_creationTime(ctx, field) case "displayName": - return ec.fieldContext_ClusterManagedService_displayName(ctx, field) + return ec.fieldContext_DomainEntry_displayName(ctx, field) + case "domainName": + return ec.fieldContext_DomainEntry_domainName(ctx, field) case "id": - return ec.fieldContext_ClusterManagedService_id(ctx, field) - case "isArchived": - return ec.fieldContext_ClusterManagedService_isArchived(ctx, field) - case "kind": - return ec.fieldContext_ClusterManagedService_kind(ctx, field) + return ec.fieldContext_DomainEntry_id(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) + return ec.fieldContext_DomainEntry_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_ClusterManagedService_metadata(ctx, field) + return ec.fieldContext_DomainEntry_markedForDeletion(ctx, field) case "recordVersion": - return ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_ClusterManagedService_spec(ctx, field) - case "status": - return ec.fieldContext_ClusterManagedService_status(ctx, field) - case "syncStatus": - return ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) + return ec.fieldContext_DomainEntry_recordVersion(ctx, field) case "updateTime": - return ec.fieldContext_ClusterManagedService_updateTime(ctx, field) + return ec.fieldContext_DomainEntry_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ClusterManagedService", field.Name) + return nil, fmt.Errorf("no field named %q was found under type DomainEntry", field.Name) }, } defer func() { @@ -44280,15 +41767,15 @@ func (ec *executionContext) fieldContext_Mutation_infra_createClusterManagedServ } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_infra_createClusterManagedService_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_infra_updateDomainEntry_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_infra_updateClusterManagedService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_infra_updateClusterManagedService(ctx, field) +func (ec *executionContext) _Mutation_infra_deleteDomainEntry(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_infra_deleteDomainEntry(ctx, field) if err != nil { return graphql.Null } @@ -44302,7 +41789,7 @@ func (ec *executionContext) _Mutation_infra_updateClusterManagedService(ctx cont 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().InfraUpdateClusterManagedService(rctx, fc.Args["service"].(entities.ClusterManagedService)) + return ec.resolvers.Mutation().InfraDeleteDomainEntry(rctx, fc.Args["domainName"].(string)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -44324,67 +41811,34 @@ func (ec *executionContext) _Mutation_infra_updateClusterManagedService(ctx cont if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.ClusterManagedService); 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/infra/internal/entities.ClusterManagedService`, 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.(*entities.ClusterManagedService) + res := resTmp.(bool) fc.Result = res - return ec.marshalOClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_infra_updateClusterManagedService(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_infra_deleteDomainEntry(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) { - switch field.Name { - case "accountName": - return ec.fieldContext_ClusterManagedService_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_ClusterManagedService_clusterName(ctx, field) - case "createdBy": - return ec.fieldContext_ClusterManagedService_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_ClusterManagedService_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_ClusterManagedService_displayName(ctx, field) - case "id": - return ec.fieldContext_ClusterManagedService_id(ctx, field) - case "isArchived": - return ec.fieldContext_ClusterManagedService_isArchived(ctx, field) - case "kind": - return ec.fieldContext_ClusterManagedService_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_ClusterManagedService_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_ClusterManagedService_spec(ctx, field) - case "status": - return ec.fieldContext_ClusterManagedService_status(ctx, field) - case "syncStatus": - return ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_ClusterManagedService_updateTime(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ClusterManagedService", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } defer func() { @@ -44394,15 +41848,15 @@ func (ec *executionContext) fieldContext_Mutation_infra_updateClusterManagedServ } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_infra_updateClusterManagedService_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_infra_deleteDomainEntry_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_infra_deleteClusterManagedService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_infra_deleteClusterManagedService(ctx, field) +func (ec *executionContext) _Mutation_infra_createNodePool(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_infra_createNodePool(ctx, field) if err != nil { return graphql.Null } @@ -44416,7 +41870,7 @@ func (ec *executionContext) _Mutation_infra_deleteClusterManagedService(ctx cont 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().InfraDeleteClusterManagedService(rctx, fc.Args["name"].(string)) + return ec.resolvers.Mutation().InfraCreateNodePool(rctx, fc.Args["clusterName"].(string), fc.Args["pool"].(entities.NodePool)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -44438,34 +41892,65 @@ func (ec *executionContext) _Mutation_infra_deleteClusterManagedService(ctx cont if tmp == nil { return nil, nil } - if data, ok := tmp.(bool); ok { + if data, ok := tmp.(*entities.NodePool); 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/infra/internal/entities.NodePool`, 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.NodePool) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalONodePool2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐNodePool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_infra_deleteClusterManagedService(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_infra_createNodePool(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") + switch field.Name { + case "accountName": + return ec.fieldContext_NodePool_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_NodePool_apiVersion(ctx, field) + case "clusterName": + return ec.fieldContext_NodePool_clusterName(ctx, field) + case "createdBy": + return ec.fieldContext_NodePool_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_NodePool_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_NodePool_displayName(ctx, field) + case "id": + return ec.fieldContext_NodePool_id(ctx, field) + case "kind": + return ec.fieldContext_NodePool_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_NodePool_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_NodePool_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_NodePool_metadata(ctx, field) + case "recordVersion": + return ec.fieldContext_NodePool_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_NodePool_spec(ctx, field) + case "status": + return ec.fieldContext_NodePool_status(ctx, field) + case "syncStatus": + return ec.fieldContext_NodePool_syncStatus(ctx, field) + case "updateTime": + return ec.fieldContext_NodePool_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NodePool", field.Name) }, } defer func() { @@ -44475,15 +41960,15 @@ func (ec *executionContext) fieldContext_Mutation_infra_deleteClusterManagedServ } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_infra_deleteClusterManagedService_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_infra_createNodePool_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_infra_cloneClusterManagedService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_infra_cloneClusterManagedService(ctx, field) +func (ec *executionContext) _Mutation_infra_updateNodePool(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_infra_updateNodePool(ctx, field) if err != nil { return graphql.Null } @@ -44497,7 +41982,7 @@ func (ec *executionContext) _Mutation_infra_cloneClusterManagedService(ctx conte 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().InfraCloneClusterManagedService(rctx, fc.Args["clusterName"].(string), fc.Args["sourceMsvcName"].(string), fc.Args["destinationMsvcName"].(string), fc.Args["displayName"].(string)) + return ec.resolvers.Mutation().InfraUpdateNodePool(rctx, fc.Args["clusterName"].(string), fc.Args["pool"].(entities.NodePool)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -44519,10 +42004,10 @@ func (ec *executionContext) _Mutation_infra_cloneClusterManagedService(ctx conte if tmp == nil { return nil, nil } - if data, ok := tmp.(*entities.ClusterManagedService); ok { + if data, ok := tmp.(*entities.NodePool); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/entities.ClusterManagedService`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/entities.NodePool`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -44531,12 +42016,12 @@ func (ec *executionContext) _Mutation_infra_cloneClusterManagedService(ctx conte if resTmp == nil { return graphql.Null } - res := resTmp.(*entities.ClusterManagedService) + res := resTmp.(*entities.NodePool) fc.Result = res - return ec.marshalOClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx, field.Selections, res) + return ec.marshalONodePool2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐNodePool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_infra_cloneClusterManagedService(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_infra_updateNodePool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -44545,41 +42030,120 @@ func (ec *executionContext) fieldContext_Mutation_infra_cloneClusterManagedServi Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "accountName": - return ec.fieldContext_ClusterManagedService_accountName(ctx, field) + return ec.fieldContext_NodePool_accountName(ctx, field) case "apiVersion": - return ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) + return ec.fieldContext_NodePool_apiVersion(ctx, field) case "clusterName": - return ec.fieldContext_ClusterManagedService_clusterName(ctx, field) + return ec.fieldContext_NodePool_clusterName(ctx, field) case "createdBy": - return ec.fieldContext_ClusterManagedService_createdBy(ctx, field) + return ec.fieldContext_NodePool_createdBy(ctx, field) case "creationTime": - return ec.fieldContext_ClusterManagedService_creationTime(ctx, field) + return ec.fieldContext_NodePool_creationTime(ctx, field) case "displayName": - return ec.fieldContext_ClusterManagedService_displayName(ctx, field) + return ec.fieldContext_NodePool_displayName(ctx, field) case "id": - return ec.fieldContext_ClusterManagedService_id(ctx, field) - case "isArchived": - return ec.fieldContext_ClusterManagedService_isArchived(ctx, field) + return ec.fieldContext_NodePool_id(ctx, field) case "kind": - return ec.fieldContext_ClusterManagedService_kind(ctx, field) + return ec.fieldContext_NodePool_kind(ctx, field) case "lastUpdatedBy": - return ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) + return ec.fieldContext_NodePool_lastUpdatedBy(ctx, field) case "markedForDeletion": - return ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) + return ec.fieldContext_NodePool_markedForDeletion(ctx, field) case "metadata": - return ec.fieldContext_ClusterManagedService_metadata(ctx, field) + return ec.fieldContext_NodePool_metadata(ctx, field) case "recordVersion": - return ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) + return ec.fieldContext_NodePool_recordVersion(ctx, field) case "spec": - return ec.fieldContext_ClusterManagedService_spec(ctx, field) + return ec.fieldContext_NodePool_spec(ctx, field) case "status": - return ec.fieldContext_ClusterManagedService_status(ctx, field) + return ec.fieldContext_NodePool_status(ctx, field) case "syncStatus": - return ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) + return ec.fieldContext_NodePool_syncStatus(ctx, field) case "updateTime": - return ec.fieldContext_ClusterManagedService_updateTime(ctx, field) + return ec.fieldContext_NodePool_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NodePool", 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_Mutation_infra_updateNodePool_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_infra_deleteNodePool(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_infra_deleteNodePool(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().InfraDeleteNodePool(rctx, fc.Args["clusterName"].(string), fc.Args["poolName"].(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 nil, fmt.Errorf("no field named %q was found under type ClusterManagedService", field.Name) + 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_infra_deleteNodePool(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() { @@ -44589,7 +42153,7 @@ func (ec *executionContext) fieldContext_Mutation_infra_cloneClusterManagedServi } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_infra_cloneClusterManagedService_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_infra_deleteNodePool_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } @@ -51820,206 +49384,6 @@ func (ec *executionContext) fieldContext_Query_infra_checkAwsAccess(ctx context. 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 { - 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.(*model.ClusterManagedServicePaginatedRecords); ok { - return data, nil - } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/app/graph/model.ClusterManagedServicePaginatedRecords`, tmp) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*model.ClusterManagedServicePaginatedRecords) - fc.Result = res - return ec.marshalOClusterManagedServicePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServicePaginatedRecords(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Query_infra_listClusterManagedServices(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_ClusterManagedServicePaginatedRecords_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ClusterManagedServicePaginatedRecords_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_ClusterManagedServicePaginatedRecords_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ClusterManagedServicePaginatedRecords", 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_infra_listClusterManagedServices_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _Query_infra_getClusterManagedService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_infra_getClusterManagedService(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().InfraGetClusterManagedService(rctx, 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.ClusterManagedService); ok { - return data, nil - } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/entities.ClusterManagedService`, tmp) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*entities.ClusterManagedService) - fc.Result = res - return ec.marshalOClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Query_infra_getClusterManagedService(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_ClusterManagedService_accountName(ctx, field) - case "apiVersion": - return ec.fieldContext_ClusterManagedService_apiVersion(ctx, field) - case "clusterName": - return ec.fieldContext_ClusterManagedService_clusterName(ctx, field) - case "createdBy": - return ec.fieldContext_ClusterManagedService_createdBy(ctx, field) - case "creationTime": - return ec.fieldContext_ClusterManagedService_creationTime(ctx, field) - case "displayName": - return ec.fieldContext_ClusterManagedService_displayName(ctx, field) - case "id": - return ec.fieldContext_ClusterManagedService_id(ctx, field) - case "isArchived": - return ec.fieldContext_ClusterManagedService_isArchived(ctx, field) - case "kind": - return ec.fieldContext_ClusterManagedService_kind(ctx, field) - case "lastUpdatedBy": - return ec.fieldContext_ClusterManagedService_lastUpdatedBy(ctx, field) - case "markedForDeletion": - return ec.fieldContext_ClusterManagedService_markedForDeletion(ctx, field) - case "metadata": - return ec.fieldContext_ClusterManagedService_metadata(ctx, field) - case "recordVersion": - return ec.fieldContext_ClusterManagedService_recordVersion(ctx, field) - case "spec": - return ec.fieldContext_ClusterManagedService_spec(ctx, field) - case "status": - return ec.fieldContext_ClusterManagedService_status(ctx, field) - case "syncStatus": - return ec.fieldContext_ClusterManagedService_syncStatus(ctx, field) - case "updateTime": - return ec.fieldContext_ClusterManagedService_updateTime(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ClusterManagedService", 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_infra_getClusterManagedService_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - func (ec *executionContext) _Query_infra_listHelmReleases(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Query_infra_listHelmReleases(ctx, field) if err != nil { @@ -56355,72 +53719,6 @@ func (ec *executionContext) unmarshalInputClusterIn(ctx context.Context, obj int return it, nil } -func (ec *executionContext) unmarshalInputClusterManagedServiceIn(ctx context.Context, obj interface{}) (entities.ClusterManagedService, error) { - var it entities.ClusterManagedService - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"apiVersion", "clusterName", "displayName", "kind", "metadata", "spec"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "apiVersion": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiVersion")) - data, err := ec.unmarshalOString2string(ctx, v) - if err != nil { - return it, err - } - it.APIVersion = data - case "clusterName": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.ClusterName = data - case "displayName": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.DisplayName = data - case "kind": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) - data, err := ec.unmarshalOString2string(ctx, v) - if err != nil { - return it, err - } - it.Kind = data - case "metadata": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("metadata")) - data, err := ec.unmarshalOMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, v) - if err != nil { - return it, err - } - if err = ec.resolvers.ClusterManagedServiceIn().Metadata(ctx, &it, data); err != nil { - return it, err - } - case "spec": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spec")) - data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn(ctx, v) - if err != nil { - return it, err - } - if err = ec.resolvers.ClusterManagedServiceIn().Spec(ctx, &it, data); err != nil { - return it, err - } - } - } - - return it, nil -} - func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context, obj interface{}) (repos.CursorPagination, error) { var it repos.CursorPagination asMap := map[string]interface{}{} @@ -57308,33 +54606,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, nil } -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn, error) { - var it model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"msvcSpec"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "msvcSpec": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcSpec")) - data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn(ctx, v) - if err != nil { - return it, err - } - it.MsvcSpec = data - } - } - - return it, nil -} - func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HelmChartSpecIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1HelmChartSpecIn, error) { var it model.GithubComKloudliteOperatorApisCrdsV1HelmChartSpecIn asMap := map[string]interface{}{} @@ -57466,88 +54737,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, nil } -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn, error) { - var it model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"nodeSelector", "serviceTemplate", "tolerations"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "nodeSelector": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nodeSelector")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.NodeSelector = data - case "serviceTemplate": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceTemplate")) - data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn(ctx, v) - if err != nil { - return it, err - } - it.ServiceTemplate = data - case "tolerations": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tolerations")) - data, err := ec.unmarshalOK8s__io___api___core___v1__TolerationIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationInᚄ(ctx, v) - if err != nil { - return it, err - } - it.Tolerations = data - } - } - - return it, nil -} - -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn, error) { - var it model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"apiVersion", "kind", "spec"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "apiVersion": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiVersion")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.APIVersion = data - case "kind": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Kind = data - case "spec": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spec")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.Spec = data - } - } - - return it, nil -} - func (ec *executionContext) unmarshalInputGlobalVPNDeviceIn(ctx context.Context, obj interface{}) (entities.GlobalVPNDevice, error) { var it entities.GlobalVPNDevice asMap := map[string]interface{}{} @@ -60940,40 +58129,6 @@ func (ec *executionContext) unmarshalInputSearchCluster(ctx context.Context, obj return it, nil } -func (ec *executionContext) unmarshalInputSearchClusterManagedService(ctx context.Context, obj interface{}) (model.SearchClusterManagedService, error) { - var it model.SearchClusterManagedService - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"isReady", "text"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "isReady": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) - data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) - if err != nil { - return it, err - } - it.IsReady = data - 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) unmarshalInputSearchDomainEntry(ctx context.Context, obj interface{}) (model.SearchDomainEntry, error) { var it model.SearchDomainEntry asMap := map[string]interface{}{} @@ -62295,145 +59450,14 @@ func (ec *executionContext) _Cluster(ctx context.Context, sel ast.SelectionSet, } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "displayName": - out.Values[i] = ec._Cluster_displayName(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "globalVPN": - out.Values[i] = ec._Cluster_globalVPN(ctx, field, obj) - case "id": - 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._Cluster_id(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 "kind": - out.Values[i] = ec._Cluster_kind(ctx, field, obj) - case "lastOnlineAt": - 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._Cluster_lastOnlineAt(ctx, field, obj) - 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 "lastUpdatedBy": - out.Values[i] = ec._Cluster_lastUpdatedBy(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "markedForDeletion": - out.Values[i] = ec._Cluster_markedForDeletion(ctx, field, obj) - case "metadata": - out.Values[i] = ec._Cluster_metadata(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "recordVersion": - out.Values[i] = ec._Cluster_recordVersion(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "spec": - 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._Cluster_spec(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 "status": - out.Values[i] = ec._Cluster_status(ctx, field, obj) - case "syncStatus": - out.Values[i] = ec._Cluster_syncStatus(ctx, field, obj) + case "displayName": + out.Values[i] = ec._Cluster_displayName(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "updateTime": + case "globalVPN": + out.Values[i] = ec._Cluster_globalVPN(ctx, field, obj) + case "id": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -62442,7 +59466,7 @@ func (ec *executionContext) _Cluster(ctx context.Context, sel ast.SelectionSet, ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Cluster_updateTime(ctx, field, obj) + res = ec._Cluster_id(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -62469,40 +59493,9 @@ func (ec *executionContext) _Cluster(ctx context.Context, sel ast.SelectionSet, } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "adminKubeconfig": - 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._Cluster_adminKubeconfig(ctx, field, obj) - 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 "clusterDNSSuffix": + case "kind": + out.Values[i] = ec._Cluster_kind(ctx, field, obj) + case "lastOnlineAt": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -62511,10 +59504,7 @@ func (ec *executionContext) _Cluster(ctx context.Context, sel ast.SelectionSet, ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Cluster_clusterDNSSuffix(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } + res = ec._Cluster_lastOnlineAt(ctx, field, obj) return res } @@ -62538,102 +59528,24 @@ func (ec *executionContext) _Cluster(ctx context.Context, sel ast.SelectionSet, } 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 clusterEdgeImplementors = []string{"ClusterEdge"} - -func (ec *executionContext) _ClusterEdge(ctx context.Context, sel ast.SelectionSet, obj *model.ClusterEdge) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, clusterEdgeImplementors) - - 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("ClusterEdge") - case "cursor": - out.Values[i] = ec._ClusterEdge_cursor(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "node": - out.Values[i] = ec._ClusterEdge_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 clusterManagedServiceImplementors = []string{"ClusterManagedService"} - -func (ec *executionContext) _ClusterManagedService(ctx context.Context, sel ast.SelectionSet, obj *entities.ClusterManagedService) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, clusterManagedServiceImplementors) - - 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("ClusterManagedService") - case "accountName": - out.Values[i] = ec._ClusterManagedService_accountName(ctx, field, obj) + case "lastUpdatedBy": + out.Values[i] = ec._Cluster_lastUpdatedBy(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "apiVersion": - out.Values[i] = ec._ClusterManagedService_apiVersion(ctx, field, obj) - case "clusterName": - out.Values[i] = ec._ClusterManagedService_clusterName(ctx, field, obj) + case "markedForDeletion": + out.Values[i] = ec._Cluster_markedForDeletion(ctx, field, obj) + case "metadata": + out.Values[i] = ec._Cluster_metadata(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "createdBy": - out.Values[i] = ec._ClusterManagedService_createdBy(ctx, field, obj) + case "recordVersion": + out.Values[i] = ec._Cluster_recordVersion(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "creationTime": + case "spec": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -62642,7 +59554,7 @@ func (ec *executionContext) _ClusterManagedService(ctx context.Context, sel ast. ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ClusterManagedService_creationTime(ctx, field, obj) + res = ec._Cluster_spec(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -62669,12 +59581,14 @@ func (ec *executionContext) _ClusterManagedService(ctx context.Context, sel ast. } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "displayName": - out.Values[i] = ec._ClusterManagedService_displayName(ctx, field, obj) + case "status": + out.Values[i] = ec._Cluster_status(ctx, field, obj) + case "syncStatus": + out.Values[i] = ec._Cluster_syncStatus(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "id": + case "updateTime": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -62683,7 +59597,7 @@ func (ec *executionContext) _ClusterManagedService(ctx context.Context, sel ast. ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ClusterManagedService_id(ctx, field, obj) + res = ec._Cluster_updateTime(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -62710,25 +59624,7 @@ func (ec *executionContext) _ClusterManagedService(ctx context.Context, sel ast. } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "isArchived": - out.Values[i] = ec._ClusterManagedService_isArchived(ctx, field, obj) - case "kind": - out.Values[i] = ec._ClusterManagedService_kind(ctx, field, obj) - case "lastUpdatedBy": - out.Values[i] = ec._ClusterManagedService_lastUpdatedBy(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "markedForDeletion": - out.Values[i] = ec._ClusterManagedService_markedForDeletion(ctx, field, obj) - case "metadata": - out.Values[i] = ec._ClusterManagedService_metadata(ctx, field, obj) - case "recordVersion": - out.Values[i] = ec._ClusterManagedService_recordVersion(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "spec": + case "adminKubeconfig": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -62737,7 +59633,7 @@ func (ec *executionContext) _ClusterManagedService(ctx context.Context, sel ast. ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ClusterManagedService_spec(ctx, field, obj) + res = ec._Cluster_adminKubeconfig(ctx, field, obj) return res } @@ -62761,14 +59657,7 @@ func (ec *executionContext) _ClusterManagedService(ctx context.Context, sel ast. } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "status": - out.Values[i] = ec._ClusterManagedService_status(ctx, field, obj) - case "syncStatus": - out.Values[i] = ec._ClusterManagedService_syncStatus(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "updateTime": + case "clusterDNSSuffix": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -62777,7 +59666,7 @@ func (ec *executionContext) _ClusterManagedService(ctx context.Context, sel ast. ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ClusterManagedService_updateTime(ctx, field, obj) + res = ec._Cluster_clusterDNSSuffix(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -62827,73 +59716,24 @@ func (ec *executionContext) _ClusterManagedService(ctx context.Context, sel ast. return out } -var clusterManagedServiceEdgeImplementors = []string{"ClusterManagedServiceEdge"} +var clusterEdgeImplementors = []string{"ClusterEdge"} -func (ec *executionContext) _ClusterManagedServiceEdge(ctx context.Context, sel ast.SelectionSet, obj *model.ClusterManagedServiceEdge) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, clusterManagedServiceEdgeImplementors) +func (ec *executionContext) _ClusterEdge(ctx context.Context, sel ast.SelectionSet, obj *model.ClusterEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, clusterEdgeImplementors) 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("ClusterManagedServiceEdge") + out.Values[i] = graphql.MarshalString("ClusterEdge") case "cursor": - out.Values[i] = ec._ClusterManagedServiceEdge_cursor(ctx, field, obj) + out.Values[i] = ec._ClusterEdge_cursor(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "node": - out.Values[i] = ec._ClusterManagedServiceEdge_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 clusterManagedServicePaginatedRecordsImplementors = []string{"ClusterManagedServicePaginatedRecords"} - -func (ec *executionContext) _ClusterManagedServicePaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.ClusterManagedServicePaginatedRecords) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, clusterManagedServicePaginatedRecordsImplementors) - - 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("ClusterManagedServicePaginatedRecords") - case "edges": - out.Values[i] = ec._ClusterManagedServicePaginatedRecords_edges(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "pageInfo": - out.Values[i] = ec._ClusterManagedServicePaginatedRecords_pageInfo(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "totalCount": - out.Values[i] = ec._ClusterManagedServicePaginatedRecords_totalCount(ctx, field, obj) + out.Values[i] = ec._ClusterEdge_node(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -65246,70 +62086,29 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return out } -var github__com___kloudlite___operator___apis___common____types__SecretKeyRefImplementors = []string{"Github__com___kloudlite___operator___apis___common____types__SecretKeyRef"} - -func (ec *executionContext) _Github__com___kloudlite___operator___apis___common____types__SecretKeyRef(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCommonTypesSecretKeyRef) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___common____types__SecretKeyRefImplementors) - - 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("Github__com___kloudlite___operator___apis___common____types__SecretKeyRef") - case "key": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_key(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "name": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "namespace": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_namespace(ctx, field, obj) - 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 github__com___kloudlite___operator___apis___common____types__SecretRefImplementors = []string{"Github__com___kloudlite___operator___apis___common____types__SecretRef"} +var github__com___kloudlite___operator___apis___common____types__SecretKeyRefImplementors = []string{"Github__com___kloudlite___operator___apis___common____types__SecretKeyRef"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___common____types__SecretRef(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCommonTypesSecretRef) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___common____types__SecretRefImplementors) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___common____types__SecretKeyRef(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCommonTypesSecretKeyRef) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___common____types__SecretKeyRefImplementors) 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("Github__com___kloudlite___operator___apis___common____types__SecretRef") + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___common____types__SecretKeyRef") + case "key": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_key(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } case "name": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__SecretRef_name(ctx, field, obj) + out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "namespace": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(ctx, field, obj) + out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_namespace(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -65333,27 +62132,24 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return out } -var github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec"} +var github__com___kloudlite___operator___apis___common____types__SecretRefImplementors = []string{"Github__com___kloudlite___operator___apis___common____types__SecretRef"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecImplementors) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___common____types__SecretRef(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCommonTypesSecretRef) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___common____types__SecretRefImplementors) 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("Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec") - case "msvcSpec": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "targetNamespace": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(ctx, field, obj) + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___common____types__SecretRef") + case "name": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__SecretRef_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } + case "namespace": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -65546,95 +62342,6 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return out } -var github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec"} - -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecImplementors) - - 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("Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec") - case "nodeSelector": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(ctx, field, obj) - case "serviceTemplate": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "tolerations": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(ctx, field, obj) - 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 github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate"} - -func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ServiceTemplate) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateImplementors) - - 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("Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate") - case "apiVersion": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_apiVersion(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "kind": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_kind(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "spec": - out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(ctx, field, obj) - 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 github__com___kloudlite___operator___pkg___operator__CheckImplementors = []string{"Github__com___kloudlite___operator___pkg___operator__Check"} func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Check(ctx context.Context, sel ast.SelectionSet, obj *operator.Check) graphql.Marshaler { @@ -70156,25 +66863,6 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) if out.Values[i] == graphql.Null { out.Invalids++ } - case "infra_createClusterManagedService": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_infra_createClusterManagedService(ctx, field) - }) - case "infra_updateClusterManagedService": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_infra_updateClusterManagedService(ctx, field) - }) - case "infra_deleteClusterManagedService": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_infra_deleteClusterManagedService(ctx, field) - }) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "infra_cloneClusterManagedService": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_infra_cloneClusterManagedService(ctx, field) - }) case "infra_createHelmRelease": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Mutation_infra_createHelmRelease(ctx, field) @@ -72258,44 +68946,6 @@ 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 "infra_listClusterManagedServices": - 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_infra_listClusterManagedServices(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 "infra_getClusterManagedService": - 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_infra_getClusterManagedService(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 "infra_listHelmReleases": field := field @@ -73568,75 +70218,6 @@ func (ec *executionContext) unmarshalNClusterIn2githubᚗcomᚋkloudliteᚋapi return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx context.Context, sel ast.SelectionSet, v *entities.ClusterManagedService) 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._ClusterManagedService(ctx, sel, v) -} - -func (ec *executionContext) marshalNClusterManagedServiceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ClusterManagedServiceEdge) 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.marshalNClusterManagedServiceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdge(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) marshalNClusterManagedServiceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdge(ctx context.Context, sel ast.SelectionSet, v *model.ClusterManagedServiceEdge) 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._ClusterManagedServiceEdge(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx context.Context, v interface{}) (entities.ClusterManagedService, error) { - res, err := ec.unmarshalInputClusterManagedServiceIn(ctx, v) - return res, graphql.ErrorOnPath(ctx, err) -} - func (ec *executionContext) unmarshalNDate2string(ctx context.Context, v interface{}) (string, error) { res, err := graphql.UnmarshalString(v) return res, graphql.ErrorOnPath(ctx, err) @@ -74262,36 +70843,6 @@ func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis_ return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋ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ᚋinfraᚋ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__ServiceTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋ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ᚋinfraᚋ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ᚋinfraᚋ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)) { @@ -75854,7 +72405,7 @@ func (ec *executionContext) marshalNfederation__Scope2ᚕᚕstringᚄ(ctx contex return ret } -func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v interface{}) (interface{}, error) { +func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v interface{}) (any, error) { if v == nil { return nil, nil } @@ -75862,7 +72413,7 @@ func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v inter return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOAny2interface(ctx context.Context, sel ast.SelectionSet, v interface{}) graphql.Marshaler { +func (ec *executionContext) marshalOAny2interface(ctx context.Context, sel ast.SelectionSet, v any) graphql.Marshaler { if v == nil { return graphql.Null } @@ -76016,20 +72567,6 @@ func (ec *executionContext) marshalOCluster2ᚖgithubᚗcomᚋkloudliteᚋapiᚋ return ec._Cluster(ctx, sel, v) } -func (ec *executionContext) marshalOClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx context.Context, sel ast.SelectionSet, v *entities.ClusterManagedService) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._ClusterManagedService(ctx, sel, v) -} - -func (ec *executionContext) marshalOClusterManagedServicePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServicePaginatedRecords(ctx context.Context, sel ast.SelectionSet, v *model.ClusterManagedServicePaginatedRecords) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._ClusterManagedServicePaginatedRecords(ctx, sel, v) -} - func (ec *executionContext) marshalOClusterPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterPaginatedRecords(ctx context.Context, sel ast.SelectionSet, v *model.ClusterPaginatedRecords) graphql.Marshaler { if v == nil { return graphql.Null @@ -76361,21 +72898,6 @@ func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___ return ec._Github__com___kloudlite___operator___apis___common____types__SecretKeyRef(ctx, sel, v) } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__HelmChartSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HelmChartSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1HelmChartSpec) graphql.Marshaler { if v == nil { return graphql.Null @@ -78192,14 +74714,6 @@ func (ec *executionContext) unmarshalOSearchCluster2ᚖgithubᚗcomᚋkloudlite return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalOSearchClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchClusterManagedService(ctx context.Context, v interface{}) (*model.SearchClusterManagedService, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputSearchClusterManagedService(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - func (ec *executionContext) unmarshalOSearchDomainEntry2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchDomainEntry(ctx context.Context, v interface{}) (*model.SearchDomainEntry, error) { if v == nil { return nil, nil diff --git a/apps/infra/internal/app/graph/model/models_gen.go b/apps/infra/internal/app/graph/model/models_gen.go index d69bd2c4c..98341d518 100644 --- a/apps/infra/internal/app/graph/model/models_gen.go +++ b/apps/infra/internal/app/graph/model/models_gen.go @@ -55,17 +55,6 @@ type ClusterEdge struct { Node *entities.Cluster `json:"node"` } -type ClusterManagedServiceEdge struct { - Cursor string `json:"cursor"` - Node *entities.ClusterManagedService `json:"node"` -} - -type ClusterManagedServicePaginatedRecords struct { - Edges []*ClusterManagedServiceEdge `json:"edges"` - PageInfo *PageInfo `json:"pageInfo"` - TotalCount int `json:"totalCount"` -} - type ClusterPaginatedRecords struct { Edges []*ClusterEdge `json:"edges"` PageInfo *PageInfo `json:"pageInfo"` @@ -439,15 +428,6 @@ type GithubComKloudliteOperatorApisCommonTypesSecretRefIn struct { Namespace *string `json:"namespace,omitempty"` } -type GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec struct { - MsvcSpec *GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec `json:"msvcSpec"` - TargetNamespace string `json:"targetNamespace"` -} - -type GithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpecIn struct { - MsvcSpec *GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn `json:"msvcSpec"` -} - type GithubComKloudliteOperatorApisCrdsV1HelmChartSpec struct { ChartName string `json:"chartName"` ChartRepoURL string `json:"chartRepoURL"` @@ -499,30 +479,6 @@ type GithubComKloudliteOperatorApisCrdsV1JobVarsIn struct { Tolerations []*K8sIoAPICoreV1TolerationIn `json:"tolerations,omitempty"` } -type GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec struct { - NodeSelector map[string]interface{} `json:"nodeSelector,omitempty"` - ServiceTemplate *GithubComKloudliteOperatorApisCrdsV1ServiceTemplate `json:"serviceTemplate"` - Tolerations []*K8sIoAPICoreV1Toleration `json:"tolerations,omitempty"` -} - -type GithubComKloudliteOperatorApisCrdsV1ManagedServiceSpecIn struct { - NodeSelector map[string]interface{} `json:"nodeSelector,omitempty"` - ServiceTemplate *GithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn `json:"serviceTemplate"` - Tolerations []*K8sIoAPICoreV1TolerationIn `json:"tolerations,omitempty"` -} - -type GithubComKloudliteOperatorApisCrdsV1ServiceTemplate struct { - APIVersion string `json:"apiVersion"` - Kind string `json:"kind"` - Spec map[string]interface{} `json:"spec,omitempty"` -} - -type GithubComKloudliteOperatorApisCrdsV1ServiceTemplateIn struct { - APIVersion string `json:"apiVersion"` - Kind string `json:"kind"` - Spec map[string]interface{} `json:"spec,omitempty"` -} - type GithubComKloudliteOperatorPkgOperatorCheckMeta struct { Debug *bool `json:"debug,omitempty"` Description *string `json:"description,omitempty"` @@ -1480,11 +1436,6 @@ type SearchCluster struct { Text *repos.MatchFilter `json:"text,omitempty"` } -type SearchClusterManagedService struct { - IsReady *repos.MatchFilter `json:"isReady,omitempty"` - Text *repos.MatchFilter `json:"text,omitempty"` -} - type SearchDomainEntry struct { ClusterName *repos.MatchFilter `json:"clusterName,omitempty"` Text *repos.MatchFilter `json:"text,omitempty"` diff --git a/apps/infra/internal/app/graph/schema.graphqls b/apps/infra/internal/app/graph/schema.graphqls index e686cb0c9..49ba7eff6 100644 --- a/apps/infra/internal/app/graph/schema.graphqls +++ b/apps/infra/internal/app/graph/schema.graphqls @@ -35,11 +35,6 @@ input SearchGlobalVPNDevices { creationMethod: MatchFilterIn } -input SearchClusterManagedService { - isReady: MatchFilterIn - text: MatchFilterIn -} - input SearchNodepool { text: MatchFilterIn } @@ -115,9 +110,6 @@ type Query { infra_checkAwsAccess(cloudproviderName: String!): CheckAwsAccessOutput! @isLoggedInAndVerified @hasAccount - infra_listClusterManagedServices(search: SearchClusterManagedService, pagination: CursorPaginationIn): ClusterManagedServicePaginatedRecords @isLoggedInAndVerified @hasAccount - infra_getClusterManagedService(name: String!): ClusterManagedService @isLoggedInAndVerified @hasAccount - infra_listHelmReleases(clusterName: String!, search: SearchHelmRelease, pagination: CursorPaginationIn): HelmReleasePaginatedRecords @isLoggedInAndVerified @hasAccount infra_getHelmRelease(clusterName: String!, name: String!): HelmRelease @isLoggedInAndVerified @hasAccount @@ -171,11 +163,6 @@ type Mutation { infra_updateNodePool(clusterName: String!, pool: NodePoolIn!): NodePool @isLoggedInAndVerified @hasAccount infra_deleteNodePool(clusterName: String!, poolName: String!): Boolean! @isLoggedInAndVerified @hasAccount - infra_createClusterManagedService(service: ClusterManagedServiceIn!): ClusterManagedService @isLoggedInAndVerified @hasAccount - infra_updateClusterManagedService(service: ClusterManagedServiceIn!): ClusterManagedService @isLoggedInAndVerified @hasAccount - infra_deleteClusterManagedService(name: String!): Boolean! @isLoggedInAndVerified @hasAccount - infra_cloneClusterManagedService(clusterName: String!, sourceMsvcName: String!, destinationMsvcName: String!, displayName: String!): ClusterManagedService @isLoggedInAndVerified @hasAccount - infra_createHelmRelease(clusterName: String!, release: HelmReleaseIn!): HelmRelease @isLoggedInAndVerified @hasAccount infra_updateHelmRelease(clusterName: String!, release: HelmReleaseIn!): HelmRelease @isLoggedInAndVerified @hasAccount infra_deleteHelmRelease(clusterName: String!, releaseName: String!): Boolean! @isLoggedInAndVerified @hasAccount diff --git a/apps/infra/internal/app/graph/schema.resolvers.go b/apps/infra/internal/app/graph/schema.resolvers.go index fe6481b67..ec6253cc4 100644 --- a/apps/infra/internal/app/graph/schema.resolvers.go +++ b/apps/infra/internal/app/graph/schema.resolvers.go @@ -300,52 +300,6 @@ func (r *mutationResolver) InfraDeleteNodePool(ctx context.Context, clusterName return true, nil } -// InfraCreateClusterManagedService is the resolver for the infra_createClusterManagedService field. -func (r *mutationResolver) InfraCreateClusterManagedService(ctx context.Context, service entities.ClusterManagedService) (*entities.ClusterManagedService, error) { - ictx, err := toInfraContext(ctx) - if err != nil { - return nil, errors.NewE(err) - } - return r.Domain.CreateClusterManagedService(ictx, service) -} - -// InfraUpdateClusterManagedService is the resolver for the infra_updateClusterManagedService field. -func (r *mutationResolver) InfraUpdateClusterManagedService(ctx context.Context, service entities.ClusterManagedService) (*entities.ClusterManagedService, error) { - ictx, err := toInfraContext(ctx) - if err != nil { - return nil, errors.NewE(err) - } - - return r.Domain.UpdateClusterManagedService(ictx, service) -} - -// InfraDeleteClusterManagedService is the resolver for the infra_deleteClusterManagedService field. -func (r *mutationResolver) InfraDeleteClusterManagedService(ctx context.Context, name string) (bool, error) { - ictx, err := toInfraContext(ctx) - if err != nil { - return false, errors.NewE(err) - } - if err := r.Domain.DeleteClusterManagedService(ictx, name); err != nil { - return false, errors.NewE(err) - } - return true, nil -} - -// InfraCloneClusterManagedService is the resolver for the infra_cloneClusterManagedService field. -func (r *mutationResolver) InfraCloneClusterManagedService(ctx context.Context, clusterName string, sourceMsvcName string, destinationMsvcName string, displayName string) (*entities.ClusterManagedService, error) { - ictx, err := toInfraContext(ctx) - if err != nil { - return nil, errors.NewE(err) - } - - return r.Domain.CloneClusterManagedService(ictx, domain.CloneManagedServiceArgs{ - ClusterName: clusterName, - SourceMsvcName: sourceMsvcName, - DestinationMsvcName: destinationMsvcName, - DisplayName: displayName, - }) -} - // InfraCreateHelmRelease is the resolver for the infra_createHelmRelease field. func (r *mutationResolver) InfraCreateHelmRelease(ctx context.Context, clusterName string, release entities.HelmRelease) (*entities.HelmRelease, error) { ictx, err := toInfraContext(ctx) @@ -511,7 +465,7 @@ func (r *queryResolver) InfratGetBYOKClusterSetupInstructions(ctx context.Contex return nil, errors.NewE(err) } - bcsi, err := r.Domain.GetBYOKClusterSetupInstructions(ictx, name, fn.DefaultIfNil(onlyHelmValues,false)) + bcsi, err := r.Domain.GetBYOKClusterSetupInstructions(ictx, name, fn.DefaultIfNil(onlyHelmValues, false)) if err != nil { return nil, err } @@ -794,66 +748,6 @@ func (r *queryResolver) InfraCheckAwsAccess(ctx context.Context, cloudproviderNa }, nil } -// InfraListClusterManagedServices is the resolver for the infra_listClusterManagedServices field. -func (r *queryResolver) InfraListClusterManagedServices(ctx context.Context, search *model.SearchClusterManagedService, pagination *repos.CursorPagination) (*model.ClusterManagedServicePaginatedRecords, error) { - ictx, err := toInfraContext(ctx) - if err != nil { - return nil, errors.NewE(err) - } - - if pagination == nil { - pagination = &repos.DefaultCursorPagination - } - - filter := map[string]repos.MatchFilter{} - - if search != nil { - if search.IsReady != nil { - filter["status.isReady"] = *search.IsReady - } - - if search.Text != nil { - filter["metadata.name"] = *search.Text - } - } - - pClusters, err := r.Domain.ListClusterManagedServices(ictx, filter, *pagination) - if err != nil { - return nil, errors.NewE(err) - } - - ce := make([]*model.ClusterManagedServiceEdge, len(pClusters.Edges)) - for i := range pClusters.Edges { - ce[i] = &model.ClusterManagedServiceEdge{ - Node: pClusters.Edges[i].Node, - Cursor: pClusters.Edges[i].Cursor, - } - } - - m := model.ClusterManagedServicePaginatedRecords{ - Edges: ce, - PageInfo: &model.PageInfo{ - EndCursor: &pClusters.PageInfo.EndCursor, - HasNextPage: pClusters.PageInfo.HasNextPage, - HasPreviousPage: pClusters.PageInfo.HasPrevPage, - StartCursor: &pClusters.PageInfo.StartCursor, - }, - TotalCount: int(pClusters.TotalCount), - } - - return &m, nil -} - -// InfraGetClusterManagedService is the resolver for the infra_getClusterManagedService field. -func (r *queryResolver) InfraGetClusterManagedService(ctx context.Context, name string) (*entities.ClusterManagedService, error) { - ictx, err := toInfraContext(ctx) - if err != nil { - return nil, errors.NewE(err) - } - - return r.Domain.GetClusterManagedService(ictx, name) -} - // InfraListHelmReleases is the resolver for the infra_listHelmReleases field. func (r *queryResolver) InfraListHelmReleases(ctx context.Context, clusterName string, search *model.SearchHelmRelease, pagination *repos.CursorPagination) (*model.HelmReleasePaginatedRecords, error) { ictx, err := toInfraContext(ctx) diff --git a/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls index 5d323df63..dbca49c8d 100644 --- a/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -263,11 +263,6 @@ type Github__com___kloudlite___operator___apis___common____types__SecretRef @sha namespace: String } -type Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec @shareable { - msvcSpec: Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec! - targetNamespace: String! -} - type Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec @shareable { chartName: String! chartRepoURL: String! @@ -300,18 +295,6 @@ type Github__com___kloudlite___operator___apis___crds___v1__JobVars @shareable { tolerations: [K8s__io___api___core___v1__Toleration!] } -type Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec @shareable { - nodeSelector: Map - serviceTemplate: Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate! - tolerations: [K8s__io___api___core___v1__Toleration!] -} - -type Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate @shareable { - apiVersion: String! - kind: String! - spec: Map -} - type Github__com___kloudlite___operator___pkg___operator__Check @shareable { debug: String error: String @@ -893,10 +876,6 @@ input Github__com___kloudlite___operator___apis___common____types__SecretRefIn { namespace: String } -input Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpecIn { - msvcSpec: Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn! -} - input Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpecIn { chartName: String! chartRepoURL: String! @@ -916,18 +895,6 @@ input Github__com___kloudlite___operator___apis___crds___v1__JobVarsIn { tolerations: [K8s__io___api___core___v1__TolerationIn!] } -input Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpecIn { - nodeSelector: Map - serviceTemplate: Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn! - tolerations: [K8s__io___api___core___v1__TolerationIn!] -} - -input Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn { - apiVersion: String! - kind: String! - spec: Map -} - input K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSourceIn { fsType: String partition: Int diff --git a/apps/infra/internal/app/grpc-server.go b/apps/infra/internal/app/grpc-server.go index 8ba2d5e68..ef9dca763 100644 --- a/apps/infra/internal/app/grpc-server.go +++ b/apps/infra/internal/app/grpc-server.go @@ -128,29 +128,6 @@ func (g *grpcServer) ClusterExists(ctx context.Context, in *infra.ClusterExistsI return &infra.ClusterExistsOut{Exists: true}, nil } -func (g *grpcServer) GetClusterManagedService(ctx context.Context, in *infra.GetClusterManagedServiceIn) (*infra.GetClusterManagedServiceOut, error) { - infraCtx := domain.InfraContext{ - Context: ctx, - UserId: repos.ID(in.UserId), - UserEmail: in.UserEmail, - UserName: in.UserName, - AccountName: in.AccountName, - } - msvc, err := g.d.GetClusterManagedService(infraCtx, in.MsvcName) - if err != nil { - return nil, errors.NewE(err) - } - - if msvc == nil { - return nil, errors.Newf("cluster managed service %s not found", in.MsvcName) - } - - return &infra.GetClusterManagedServiceOut{ - TargetNamespace: msvc.Spec.TargetNamespace, - ClusterName: msvc.ClusterName, - }, nil -} - // MarkClusterAsOnline implements infra.InfraServer. func (g *grpcServer) MarkClusterOnlineAt(ctx context.Context, in *infra.MarkClusterOnlineAtIn) (*infra.MarkClusterOnlineAtOut, error) { ictx := domain.InfraContext{Context: ctx, AccountName: in.AccountName} diff --git a/apps/infra/internal/app/process-error-on-apply.go b/apps/infra/internal/app/process-error-on-apply.go index 8290d324a..9e889cb26 100644 --- a/apps/infra/internal/app/process-error-on-apply.go +++ b/apps/infra/internal/app/process-error-on-apply.go @@ -82,19 +82,6 @@ func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, logger logging.Logger, d } return d.OnNodePoolDeleteMessage(dctx, em.ClusterName, nodepool) } - case clusterMsvcGVK.String(): - { - cmsvc, err := fn.JsonConvert[entities.ClusterManagedService](obj.Object) - if err != nil { - return err - } - - if errObj.Action == t.ActionApply { - return d.OnClusterManagedServiceApplyError(dctx, em.ClusterName, obj.GetName(), errObj.Error, opts) - } - return d.OnClusterManagedServiceDeleteMessage(dctx, em.ClusterName, cmsvc) - - } case helmreleaseGVK.String(): { helmRelease, err := fn.JsonConvert[entities.HelmRelease](obj.Object) diff --git a/apps/infra/internal/app/process-resource-updates.go b/apps/infra/internal/app/process-resource-updates.go index 8e30c10dd..2363ac206 100644 --- a/apps/infra/internal/app/process-resource-updates.go +++ b/apps/infra/internal/app/process-resource-updates.go @@ -43,7 +43,6 @@ var ( pvGVK = fn.GVK("v1", "PersistentVolume") volumeAttachmentGVK = fn.GVK("storage.k8s.io/v1", "VolumeAttachment") namespaceGVK = fn.GVK("v1", "Namespace") - clusterMsvcGVK = fn.GVK("crds.kloudlite.io/v1", "ClusterManagedService") ingressGVK = fn.GVK("networking.k8s.io/v1", "Ingress") secretGVK = fn.GVK("v1", "Secret") ) @@ -239,28 +238,6 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do return d.OnNamespaceUpdateMessage(dctx, ru.ClusterName, ns, resStatus, domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp}) } - case clusterMsvcGVK.String(): - { - var cmsvc entities.ClusterManagedService - if err := fn.JsonConversion(su.Object, &cmsvc); err != nil { - return errors.NewE(err) - } - - if v, ok := su.Object[types.KeyClusterManagedSvcSecret]; ok { - v2, err := fn.JsonConvertP[corev1.Secret](v) - if err != nil { - mLogger.Infof("managed resource, invalid output secret received") - return errors.NewE(err) - } - v2.SetManagedFields(nil) - cmsvc.SyncedOutputSecretRef = v2 - } - - if resStatus == types.ResourceStatusDeleted { - return d.OnClusterManagedServiceDeleteMessage(dctx, ru.ClusterName, cmsvc) - } - return d.OnClusterManagedServiceUpdateMessage(dctx, ru.ClusterName, cmsvc, resStatus, domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp}) - } case ingressGVK.String(): { diff --git a/apps/infra/internal/domain/api.go b/apps/infra/internal/domain/api.go index ee3883307..9279f1828 100644 --- a/apps/infra/internal/domain/api.go +++ b/apps/infra/internal/domain/api.go @@ -38,7 +38,6 @@ type UpdateAndDeleteOpts struct { type ResourceType string const ( - ResourceTypeClusterManagedService ResourceType = "cluster_managed_service" ResourceTypeCluster ResourceType = "cluster" ResourceTypeClusterGroup ResourceType = "cluster_group" ResourceTypeBYOKCluster ResourceType = "byok_cluster" @@ -46,6 +45,7 @@ const ( ResourceTypeHelmRelease ResourceType = "helm_release" ResourceTypeNodePool ResourceType = "nodepool" ResourceTypeClusterConnection ResourceType = "cluster_connection" + ResourceTypeClusterManagedService ResourceType = "cluster_managed_service" ResourceTypePVC ResourceType = "persistance_volume_claim" ResourceTypePV ResourceType = "persistance_volume" ResourceTypeVolumeAttachment ResourceType = "volume_attachment" @@ -133,19 +133,6 @@ type Domain interface { OnNodeUpdateMessage(ctx InfraContext, clusterName string, node entities.Node) error OnNodeDeleteMessage(ctx InfraContext, clusterName string, node entities.Node) error - ListClusterManagedServices(ctx InfraContext, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.ClusterManagedService], error) - GetClusterManagedService(ctx InfraContext, serviceName string) (*entities.ClusterManagedService, error) - - CreateClusterManagedService(ctx InfraContext, cmsvc entities.ClusterManagedService) (*entities.ClusterManagedService, error) - CloneClusterManagedService(ctx InfraContext, args CloneManagedServiceArgs) (*entities.ClusterManagedService, error) - UpdateClusterManagedService(ctx InfraContext, cmsvc entities.ClusterManagedService) (*entities.ClusterManagedService, error) - DeleteClusterManagedService(ctx InfraContext, name string) error - ArchiveClusterManagedService(ctx InfraContext, clusterName string) error - - OnClusterManagedServiceApplyError(ctx InfraContext, clusterName, name, errMsg string, opts UpdateAndDeleteOpts) error - OnClusterManagedServiceDeleteMessage(ctx InfraContext, clusterName string, service entities.ClusterManagedService) error - OnClusterManagedServiceUpdateMessage(ctx InfraContext, clusterName string, service entities.ClusterManagedService, status types.ResourceStatus, opts UpdateAndDeleteOpts) error - ListHelmReleases(ctx InfraContext, clusterName string, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.HelmRelease], error) GetHelmRelease(ctx InfraContext, clusterName string, serviceName string) (*entities.HelmRelease, error) CreateHelmRelease(ctx InfraContext, clusterName string, service entities.HelmRelease) (*entities.HelmRelease, error) diff --git a/apps/infra/internal/domain/byok-clusters.go b/apps/infra/internal/domain/byok-clusters.go index cbcf58bf3..e0f65ba72 100644 --- a/apps/infra/internal/domain/byok-clusters.go +++ b/apps/infra/internal/domain/byok-clusters.go @@ -239,10 +239,6 @@ func (d *domain) DeleteBYOKCluster(ctx InfraContext, name string) error { return errors.NewE(err) } - if err := d.ArchiveClusterManagedService(ctx, name); err != nil { - return errors.NewE(err) - } - if err := d.byokClusterRepo.DeleteOne(ctx, entities.UniqueBYOKClusterFilter(ctx.AccountName, name)); err != nil { return errors.NewE(err) } diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index d50612309..837c11a60 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -963,10 +963,6 @@ func (d *domain) DeleteCluster(ctx InfraContext, name string) error { return errors.NewE(err) } - if err := d.ArchiveClusterManagedService(ctx, name); err != nil { - return errors.NewE(err) - } - d.resourceEventPublisher.PublishInfraEvent(ctx, ResourceTypeCluster, ucluster.Name, PublishUpdate) if err := d.deleteK8sResource(ctx, &ucluster.Cluster); err != nil { if !apiErrors.IsNotFound(err) { diff --git a/apps/infra/internal/domain/domain.go b/apps/infra/internal/domain/domain.go index fb79b227f..7129e3a82 100644 --- a/apps/infra/internal/domain/domain.go +++ b/apps/infra/internal/domain/domain.go @@ -33,12 +33,11 @@ type domain struct { logger logging.Logger env *env.Env - clusterRepo repos.DbRepo[*entities.Cluster] - byokClusterRepo repos.DbRepo[*entities.BYOKCluster] - clusterManagedServiceRepo repos.DbRepo[*entities.ClusterManagedService] - helmReleaseRepo repos.DbRepo[*entities.HelmRelease] - nodeRepo repos.DbRepo[*entities.Node] - nodePoolRepo repos.DbRepo[*entities.NodePool] + clusterRepo repos.DbRepo[*entities.Cluster] + byokClusterRepo repos.DbRepo[*entities.BYOKCluster] + helmReleaseRepo repos.DbRepo[*entities.HelmRelease] + nodeRepo repos.DbRepo[*entities.Node] + nodePoolRepo repos.DbRepo[*entities.NodePool] gvpnConnRepo repos.DbRepo[*entities.GlobalVPNConnection] freeClusterSvcCIDRRepo repos.DbRepo[*entities.FreeClusterSvcCIDR] @@ -172,7 +171,6 @@ var Module = fx.Module("domain", env *env.Env, clusterRepo repos.DbRepo[*entities.Cluster], byokClusterRepo repos.DbRepo[*entities.BYOKCluster], - clustermanagedserviceRepo repos.DbRepo[*entities.ClusterManagedService], nodeRepo repos.DbRepo[*entities.Node], nodePoolRepo repos.DbRepo[*entities.NodePool], secretRepo repos.DbRepo[*entities.CloudProviderSecret], @@ -203,7 +201,6 @@ var Module = fx.Module("domain", msgOfficeInternalClient message_office_internal.MessageOfficeInternalClient, logger logging.Logger, resourceEventPublisher ResourceEventPublisher, - ) (Domain, error) { open, err := os.Open(env.MsvcTemplateFilePath) if err != nil { @@ -250,7 +247,6 @@ var Module = fx.Module("domain", gvpnDevicesRepo: gvpnDevicesRepo, byokClusterRepo: byokClusterRepo, - clusterManagedServiceRepo: clustermanagedserviceRepo, nodeRepo: nodeRepo, nodePoolRepo: nodePoolRepo, secretRepo: secretRepo, diff --git a/apps/infra/internal/domain/names.go b/apps/infra/internal/domain/names.go index 8c635ac96..0dcf4a037 100644 --- a/apps/infra/internal/domain/names.go +++ b/apps/infra/internal/domain/names.go @@ -52,6 +52,11 @@ func (d *domain) CheckNameAvailability(ctx InfraContext, typeArg ResType, cluste } switch typeArg { + // FIXME: remove me after web fixes it + case ResTypeClusterManagedService: + { + return &CheckNameAvailabilityOutput{Result: true}, nil + } case ResTypeCluster: { return checkResourceName(ctx, repos.Filter{ @@ -102,17 +107,6 @@ func (d *domain) CheckNameAvailability(ctx InfraContext, typeArg ResType, cluste fields.MetadataName: name, }, d.helmReleaseRepo) } - case ResTypeClusterManagedService: - { - if clusterName == nil || *clusterName == "" { - return nil, errors.Newf("clusterName is required for checking name availability for %s", ResTypeClusterManagedService) - } - return checkResourceName(ctx, repos.Filter{ - fields.AccountName: ctx.AccountName, - fields.ClusterName: clusterName, - fields.MetadataName: name, - }, d.clusterManagedServiceRepo) - } default: { return &CheckNameAvailabilityOutput{Result: false}, errors.Newf("unknown resource type provided: %q", typeArg) diff --git a/apps/infra/internal/entities/field-constants/generated_constants.go b/apps/infra/internal/entities/field-constants/generated_constants.go index 449f13f16..aff67347e 100644 --- a/apps/infra/internal/entities/field-constants/generated_constants.go +++ b/apps/infra/internal/entities/field-constants/generated_constants.go @@ -151,48 +151,6 @@ const ( ClusterSpecTaintMasterNodes = "spec.taintMasterNodes" ) -// constant vars generated for struct ClusterManagedService -const ( - ClusterManagedServiceIsArchived = "isArchived" - ClusterManagedServiceOutput = "output" - ClusterManagedServiceOutputCredentialsRef = "output.credentialsRef" - ClusterManagedServiceOutputCredentialsRefName = "output.credentialsRef.name" - ClusterManagedServiceSpec = "spec" - ClusterManagedServiceSpecMsvcSpec = "spec.msvcSpec" - ClusterManagedServiceSpecMsvcSpecNodeSelector = "spec.msvcSpec.nodeSelector" - ClusterManagedServiceSpecMsvcSpecServiceTemplate = "spec.msvcSpec.serviceTemplate" - ClusterManagedServiceSpecMsvcSpecServiceTemplateApiVersion = "spec.msvcSpec.serviceTemplate.apiVersion" - ClusterManagedServiceSpecMsvcSpecServiceTemplateKind = "spec.msvcSpec.serviceTemplate.kind" - ClusterManagedServiceSpecMsvcSpecServiceTemplateSpec = "spec.msvcSpec.serviceTemplate.spec" - ClusterManagedServiceSpecMsvcSpecSharedSecret = "spec.msvcSpec.sharedSecret" - ClusterManagedServiceSpecMsvcSpecTolerations = "spec.msvcSpec.tolerations" - ClusterManagedServiceSpecSharedSecret = "spec.sharedSecret" - ClusterManagedServiceSpecTargetNamespace = "spec.targetNamespace" - ClusterManagedServiceSyncedOutputSecretRef = "syncedOutputSecretRef" - ClusterManagedServiceSyncedOutputSecretRefApiVersion = "syncedOutputSecretRef.apiVersion" - ClusterManagedServiceSyncedOutputSecretRefData = "syncedOutputSecretRef.data" - ClusterManagedServiceSyncedOutputSecretRefImmutable = "syncedOutputSecretRef.immutable" - ClusterManagedServiceSyncedOutputSecretRefKind = "syncedOutputSecretRef.kind" - ClusterManagedServiceSyncedOutputSecretRefMetadata = "syncedOutputSecretRef.metadata" - ClusterManagedServiceSyncedOutputSecretRefMetadataAnnotations = "syncedOutputSecretRef.metadata.annotations" - ClusterManagedServiceSyncedOutputSecretRefMetadataCreationTimestamp = "syncedOutputSecretRef.metadata.creationTimestamp" - ClusterManagedServiceSyncedOutputSecretRefMetadataDeletionGracePeriodSeconds = "syncedOutputSecretRef.metadata.deletionGracePeriodSeconds" - ClusterManagedServiceSyncedOutputSecretRefMetadataDeletionTimestamp = "syncedOutputSecretRef.metadata.deletionTimestamp" - ClusterManagedServiceSyncedOutputSecretRefMetadataFinalizers = "syncedOutputSecretRef.metadata.finalizers" - ClusterManagedServiceSyncedOutputSecretRefMetadataGenerateName = "syncedOutputSecretRef.metadata.generateName" - ClusterManagedServiceSyncedOutputSecretRefMetadataGeneration = "syncedOutputSecretRef.metadata.generation" - ClusterManagedServiceSyncedOutputSecretRefMetadataLabels = "syncedOutputSecretRef.metadata.labels" - ClusterManagedServiceSyncedOutputSecretRefMetadataManagedFields = "syncedOutputSecretRef.metadata.managedFields" - ClusterManagedServiceSyncedOutputSecretRefMetadataName = "syncedOutputSecretRef.metadata.name" - ClusterManagedServiceSyncedOutputSecretRefMetadataNamespace = "syncedOutputSecretRef.metadata.namespace" - ClusterManagedServiceSyncedOutputSecretRefMetadataOwnerReferences = "syncedOutputSecretRef.metadata.ownerReferences" - ClusterManagedServiceSyncedOutputSecretRefMetadataResourceVersion = "syncedOutputSecretRef.metadata.resourceVersion" - ClusterManagedServiceSyncedOutputSecretRefMetadataSelfLink = "syncedOutputSecretRef.metadata.selfLink" - ClusterManagedServiceSyncedOutputSecretRefMetadataUid = "syncedOutputSecretRef.metadata.uid" - ClusterManagedServiceSyncedOutputSecretRefStringData = "syncedOutputSecretRef.stringData" - ClusterManagedServiceSyncedOutputSecretRefType = "syncedOutputSecretRef.type" -) - // constant vars generated for struct ClusterVisbility const ( ClusterVisbilityMode = "mode" diff --git a/common/patch-util.go b/common/patch-util.go index 7b1c0d69a..dde014d06 100644 --- a/common/patch-util.go +++ b/common/patch-util.go @@ -35,12 +35,23 @@ type ResourceUpdateContext interface { GetUserName() string } +type ResourceForSyncFromAgent interface { + GetName() string + GetNamespace() string + GetCreationTimestamp() metav1.Time + GetLabels() map[string]string + GetAnnotations() map[string]string + GetGeneration() int64 + GetStatus() rApi.Status +} + func PatchForSyncFromAgent( - res ResourceForSync, + res ResourceForSyncFromAgent, recordVersion int, status types.ResourceStatus, opts PatchOpts, ) repos.Document { + res.GetCreationTimestamp() generatedPatch := repos.Document{ fields.MetadataCreationTimestamp: res.GetCreationTimestamp(), fields.MetadataLabels: res.GetLabels(), @@ -57,11 +68,12 @@ func PatchForSyncFromAgent( fields.SyncStatusLastSyncedAt: opts.MessageTimestamp, fields.SyncStatusError: nil, } - var patch repos.Document = nil - patch = opts.XPatch - if patch == nil { + + if opts.XPatch == nil { return generatedPatch } + + patch := opts.XPatch maps.Copy(patch, generatedPatch) return patch } diff --git a/grpc-interfaces/console.proto b/grpc-interfaces/console.proto index abe46d7b9..6538c09bd 100644 --- a/grpc-interfaces/console.proto +++ b/grpc-interfaces/console.proto @@ -4,7 +4,6 @@ option go_package = "kloudlite.io/rpc/console"; service Console { rpc ArchiveEnvironmentsForCluster(ArchiveEnvironmentsForClusterIn) returns (ArchiveEnvironmentsForClusterOut); - rpc CreateManagedResource(CreateManagedResourceIn) returns (CreateManagedResourceOut); } message ArchiveEnvironmentsForClusterIn { @@ -19,27 +18,3 @@ message ArchiveEnvironmentsForClusterIn { message ArchiveEnvironmentsForClusterOut { bool archived = 1; } - -message CreateManagedResourceIn { - string userId = 1; - string userName = 2; - string userEmail = 3; - - string accountName = 4; - string clusterName = 5; - - string msvcName = 6; - string accountNamespace = 7; - string msvcTargetNamespace = 8; - - string mresName = 9; - - string mresType = 10; - bytes outputSecret = 11; - - string msvcApiVersion = 12; -} - -message CreateManagedResourceOut { - bool ok = 1; -} diff --git a/grpc-interfaces/infra.proto b/grpc-interfaces/infra.proto index 0f9568ee1..2c4fbfd6f 100644 --- a/grpc-interfaces/infra.proto +++ b/grpc-interfaces/infra.proto @@ -9,7 +9,6 @@ service Infra { rpc GetNodepool(GetNodepoolIn) returns (GetNodepoolOut); rpc ClusterExists(ClusterExistsIn) returns (ClusterExistsOut); rpc GetClusterKubeconfig(GetClusterIn) returns (GetClusterKubeconfigOut); - rpc GetClusterManagedService(GetClusterManagedServiceIn) returns (GetClusterManagedServiceOut); rpc MarkClusterOnlineAt(MarkClusterOnlineAtIn) returns (MarkClusterOnlineAtOut); } @@ -62,20 +61,6 @@ message GetClusterKubeconfigOut { bytes kubeconfig = 1; } -message GetClusterManagedServiceIn { - string userId = 1; - string userName = 2; - string userEmail = 3; - - string accountName = 4; - string msvcName = 5; -} - -message GetClusterManagedServiceOut { - string targetNamespace = 1; - string clusterName = 2; -} - message MarkClusterOnlineAtIn { string accountName = 1; string clusterName = 2; diff --git a/grpc-interfaces/infra/infra.pb.go b/grpc-interfaces/infra/infra.pb.go index 2141aa4c3..f33718582 100644 --- a/grpc-interfaces/infra/infra.pb.go +++ b/grpc-interfaces/infra/infra.pb.go @@ -486,140 +486,6 @@ func (x *GetClusterKubeconfigOut) GetKubeconfig() []byte { return nil } -type GetClusterManagedServiceIn struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` - UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` - UserEmail string `protobuf:"bytes,3,opt,name=userEmail,proto3" json:"userEmail,omitempty"` - AccountName string `protobuf:"bytes,4,opt,name=accountName,proto3" json:"accountName,omitempty"` - MsvcName string `protobuf:"bytes,5,opt,name=msvcName,proto3" json:"msvcName,omitempty"` -} - -func (x *GetClusterManagedServiceIn) Reset() { - *x = GetClusterManagedServiceIn{} - if protoimpl.UnsafeEnabled { - mi := &file_infra_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetClusterManagedServiceIn) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetClusterManagedServiceIn) ProtoMessage() {} - -func (x *GetClusterManagedServiceIn) ProtoReflect() protoreflect.Message { - mi := &file_infra_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetClusterManagedServiceIn.ProtoReflect.Descriptor instead. -func (*GetClusterManagedServiceIn) Descriptor() ([]byte, []int) { - return file_infra_proto_rawDescGZIP(), []int{7} -} - -func (x *GetClusterManagedServiceIn) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -func (x *GetClusterManagedServiceIn) GetUserName() string { - if x != nil { - return x.UserName - } - return "" -} - -func (x *GetClusterManagedServiceIn) GetUserEmail() string { - if x != nil { - return x.UserEmail - } - return "" -} - -func (x *GetClusterManagedServiceIn) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *GetClusterManagedServiceIn) GetMsvcName() string { - if x != nil { - return x.MsvcName - } - return "" -} - -type GetClusterManagedServiceOut struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TargetNamespace string `protobuf:"bytes,1,opt,name=targetNamespace,proto3" json:"targetNamespace,omitempty"` - ClusterName string `protobuf:"bytes,2,opt,name=clusterName,proto3" json:"clusterName,omitempty"` -} - -func (x *GetClusterManagedServiceOut) Reset() { - *x = GetClusterManagedServiceOut{} - if protoimpl.UnsafeEnabled { - mi := &file_infra_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetClusterManagedServiceOut) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetClusterManagedServiceOut) ProtoMessage() {} - -func (x *GetClusterManagedServiceOut) ProtoReflect() protoreflect.Message { - mi := &file_infra_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetClusterManagedServiceOut.ProtoReflect.Descriptor instead. -func (*GetClusterManagedServiceOut) Descriptor() ([]byte, []int) { - return file_infra_proto_rawDescGZIP(), []int{8} -} - -func (x *GetClusterManagedServiceOut) GetTargetNamespace() string { - if x != nil { - return x.TargetNamespace - } - return "" -} - -func (x *GetClusterManagedServiceOut) GetClusterName() string { - if x != nil { - return x.ClusterName - } - return "" -} - type MarkClusterOnlineAtIn struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -633,7 +499,7 @@ type MarkClusterOnlineAtIn struct { func (x *MarkClusterOnlineAtIn) Reset() { *x = MarkClusterOnlineAtIn{} if protoimpl.UnsafeEnabled { - mi := &file_infra_proto_msgTypes[9] + mi := &file_infra_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -646,7 +512,7 @@ func (x *MarkClusterOnlineAtIn) String() string { func (*MarkClusterOnlineAtIn) ProtoMessage() {} func (x *MarkClusterOnlineAtIn) ProtoReflect() protoreflect.Message { - mi := &file_infra_proto_msgTypes[9] + mi := &file_infra_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -659,7 +525,7 @@ func (x *MarkClusterOnlineAtIn) ProtoReflect() protoreflect.Message { // Deprecated: Use MarkClusterOnlineAtIn.ProtoReflect.Descriptor instead. func (*MarkClusterOnlineAtIn) Descriptor() ([]byte, []int) { - return file_infra_proto_rawDescGZIP(), []int{9} + return file_infra_proto_rawDescGZIP(), []int{7} } func (x *MarkClusterOnlineAtIn) GetAccountName() string { @@ -692,7 +558,7 @@ type MarkClusterOnlineAtOut struct { func (x *MarkClusterOnlineAtOut) Reset() { *x = MarkClusterOnlineAtOut{} if protoimpl.UnsafeEnabled { - mi := &file_infra_proto_msgTypes[10] + mi := &file_infra_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -705,7 +571,7 @@ func (x *MarkClusterOnlineAtOut) String() string { func (*MarkClusterOnlineAtOut) ProtoMessage() {} func (x *MarkClusterOnlineAtOut) ProtoReflect() protoreflect.Message { - mi := &file_infra_proto_msgTypes[10] + mi := &file_infra_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -718,7 +584,7 @@ func (x *MarkClusterOnlineAtOut) ProtoReflect() protoreflect.Message { // Deprecated: Use MarkClusterOnlineAtOut.ProtoReflect.Descriptor instead. func (*MarkClusterOnlineAtOut) Descriptor() ([]byte, []int) { - return file_infra_proto_rawDescGZIP(), []int{10} + return file_infra_proto_rawDescGZIP(), []int{8} } var File_infra_proto protoreflect.FileDescriptor @@ -783,60 +649,37 @@ var file_infra_proto_rawDesc = []byte{ 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x75, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x22, 0xac, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, - 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, - 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, - 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x76, 0x63, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x73, 0x76, 0x63, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x69, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x75, 0x74, - 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x95, 0x01, 0x0a, - 0x15, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x41, 0x74, 0x49, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x4f, 0x75, 0x74, 0x32, 0xfa, - 0x02, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x12, 0x2b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x2e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, - 0x6f, 0x6c, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, - 0x6f, 0x6c, 0x4f, 0x75, 0x74, 0x12, 0x34, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x10, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x49, 0x6e, 0x1a, 0x11, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4f, 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x14, 0x47, - 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x6e, 0x1a, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, - 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x75, 0x74, 0x12, 0x55, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x49, 0x6e, 0x1a, 0x1c, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4f, 0x75, 0x74, 0x12, 0x46, 0x0a, 0x13, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x12, 0x16, 0x2e, 0x4d, 0x61, 0x72, - 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, - 0x49, 0x6e, 0x1a, 0x17, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x4f, 0x75, 0x74, 0x42, 0x09, 0x5a, 0x07, 0x2e, - 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x67, 0x22, 0x95, 0x01, 0x0a, 0x15, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x49, 0x6e, 0x12, 0x20, 0x0a, 0x0b, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x61, + 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, + 0x74, 0x4f, 0x75, 0x74, 0x32, 0xa3, 0x02, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x12, 0x2b, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0d, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x0e, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x2e, 0x0a, 0x0b, 0x47, + 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x0e, 0x2e, 0x47, 0x65, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x47, 0x65, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x4f, 0x75, 0x74, 0x12, 0x34, 0x0a, 0x0d, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x10, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x49, 0x6e, 0x1a, 0x11, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4f, 0x75, + 0x74, 0x12, 0x3f, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, + 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, + 0x75, 0x74, 0x12, 0x46, 0x0a, 0x13, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x12, 0x16, 0x2e, 0x4d, 0x61, 0x72, 0x6b, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x49, + 0x6e, 0x1a, 0x17, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x4f, 0x75, 0x74, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, + 0x69, 0x6e, 0x66, 0x72, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -851,40 +694,36 @@ func file_infra_proto_rawDescGZIP() []byte { return file_infra_proto_rawDescData } -var file_infra_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_infra_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_infra_proto_goTypes = []interface{}{ - (*GetClusterIn)(nil), // 0: GetClusterIn - (*GetClusterOut)(nil), // 1: GetClusterOut - (*GetNodepoolIn)(nil), // 2: GetNodepoolIn - (*GetNodepoolOut)(nil), // 3: GetNodepoolOut - (*ClusterExistsIn)(nil), // 4: ClusterExistsIn - (*ClusterExistsOut)(nil), // 5: ClusterExistsOut - (*GetClusterKubeconfigOut)(nil), // 6: GetClusterKubeconfigOut - (*GetClusterManagedServiceIn)(nil), // 7: GetClusterManagedServiceIn - (*GetClusterManagedServiceOut)(nil), // 8: GetClusterManagedServiceOut - (*MarkClusterOnlineAtIn)(nil), // 9: MarkClusterOnlineAtIn - (*MarkClusterOnlineAtOut)(nil), // 10: MarkClusterOnlineAtOut - (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (*GetClusterIn)(nil), // 0: GetClusterIn + (*GetClusterOut)(nil), // 1: GetClusterOut + (*GetNodepoolIn)(nil), // 2: GetNodepoolIn + (*GetNodepoolOut)(nil), // 3: GetNodepoolOut + (*ClusterExistsIn)(nil), // 4: ClusterExistsIn + (*ClusterExistsOut)(nil), // 5: ClusterExistsOut + (*GetClusterKubeconfigOut)(nil), // 6: GetClusterKubeconfigOut + (*MarkClusterOnlineAtIn)(nil), // 7: MarkClusterOnlineAtIn + (*MarkClusterOnlineAtOut)(nil), // 8: MarkClusterOnlineAtOut + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp } var file_infra_proto_depIdxs = []int32{ - 11, // 0: MarkClusterOnlineAtIn.timestamp:type_name -> google.protobuf.Timestamp - 0, // 1: Infra.GetCluster:input_type -> GetClusterIn - 2, // 2: Infra.GetNodepool:input_type -> GetNodepoolIn - 4, // 3: Infra.ClusterExists:input_type -> ClusterExistsIn - 0, // 4: Infra.GetClusterKubeconfig:input_type -> GetClusterIn - 7, // 5: Infra.GetClusterManagedService:input_type -> GetClusterManagedServiceIn - 9, // 6: Infra.MarkClusterOnlineAt:input_type -> MarkClusterOnlineAtIn - 1, // 7: Infra.GetCluster:output_type -> GetClusterOut - 3, // 8: Infra.GetNodepool:output_type -> GetNodepoolOut - 5, // 9: Infra.ClusterExists:output_type -> ClusterExistsOut - 6, // 10: Infra.GetClusterKubeconfig:output_type -> GetClusterKubeconfigOut - 8, // 11: Infra.GetClusterManagedService:output_type -> GetClusterManagedServiceOut - 10, // 12: Infra.MarkClusterOnlineAt:output_type -> MarkClusterOnlineAtOut - 7, // [7:13] is the sub-list for method output_type - 1, // [1:7] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 9, // 0: MarkClusterOnlineAtIn.timestamp:type_name -> google.protobuf.Timestamp + 0, // 1: Infra.GetCluster:input_type -> GetClusterIn + 2, // 2: Infra.GetNodepool:input_type -> GetNodepoolIn + 4, // 3: Infra.ClusterExists:input_type -> ClusterExistsIn + 0, // 4: Infra.GetClusterKubeconfig:input_type -> GetClusterIn + 7, // 5: Infra.MarkClusterOnlineAt:input_type -> MarkClusterOnlineAtIn + 1, // 6: Infra.GetCluster:output_type -> GetClusterOut + 3, // 7: Infra.GetNodepool:output_type -> GetNodepoolOut + 5, // 8: Infra.ClusterExists:output_type -> ClusterExistsOut + 6, // 9: Infra.GetClusterKubeconfig:output_type -> GetClusterKubeconfigOut + 8, // 10: Infra.MarkClusterOnlineAt:output_type -> MarkClusterOnlineAtOut + 6, // [6:11] is the sub-list for method output_type + 1, // [1:6] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_infra_proto_init() } @@ -978,30 +817,6 @@ func file_infra_proto_init() { } } file_infra_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetClusterManagedServiceIn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_infra_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetClusterManagedServiceOut); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_infra_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MarkClusterOnlineAtIn); i { case 0: return &v.state @@ -1013,7 +828,7 @@ func file_infra_proto_init() { return nil } } - file_infra_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_infra_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MarkClusterOnlineAtOut); i { case 0: return &v.state @@ -1032,7 +847,7 @@ func file_infra_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_infra_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 9, NumExtensions: 0, NumServices: 1, }, diff --git a/grpc-interfaces/infra/infra_grpc.pb.go b/grpc-interfaces/infra/infra_grpc.pb.go index d3d058a55..a772207ad 100644 --- a/grpc-interfaces/infra/infra_grpc.pb.go +++ b/grpc-interfaces/infra/infra_grpc.pb.go @@ -19,12 +19,11 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Infra_GetCluster_FullMethodName = "/Infra/GetCluster" - Infra_GetNodepool_FullMethodName = "/Infra/GetNodepool" - Infra_ClusterExists_FullMethodName = "/Infra/ClusterExists" - Infra_GetClusterKubeconfig_FullMethodName = "/Infra/GetClusterKubeconfig" - Infra_GetClusterManagedService_FullMethodName = "/Infra/GetClusterManagedService" - Infra_MarkClusterOnlineAt_FullMethodName = "/Infra/MarkClusterOnlineAt" + Infra_GetCluster_FullMethodName = "/Infra/GetCluster" + Infra_GetNodepool_FullMethodName = "/Infra/GetNodepool" + Infra_ClusterExists_FullMethodName = "/Infra/ClusterExists" + Infra_GetClusterKubeconfig_FullMethodName = "/Infra/GetClusterKubeconfig" + Infra_MarkClusterOnlineAt_FullMethodName = "/Infra/MarkClusterOnlineAt" ) // InfraClient is the client API for Infra service. @@ -35,7 +34,6 @@ type InfraClient interface { GetNodepool(ctx context.Context, in *GetNodepoolIn, opts ...grpc.CallOption) (*GetNodepoolOut, error) ClusterExists(ctx context.Context, in *ClusterExistsIn, opts ...grpc.CallOption) (*ClusterExistsOut, error) GetClusterKubeconfig(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterKubeconfigOut, error) - GetClusterManagedService(ctx context.Context, in *GetClusterManagedServiceIn, opts ...grpc.CallOption) (*GetClusterManagedServiceOut, error) MarkClusterOnlineAt(ctx context.Context, in *MarkClusterOnlineAtIn, opts ...grpc.CallOption) (*MarkClusterOnlineAtOut, error) } @@ -83,15 +81,6 @@ func (c *infraClient) GetClusterKubeconfig(ctx context.Context, in *GetClusterIn return out, nil } -func (c *infraClient) GetClusterManagedService(ctx context.Context, in *GetClusterManagedServiceIn, opts ...grpc.CallOption) (*GetClusterManagedServiceOut, error) { - out := new(GetClusterManagedServiceOut) - err := c.cc.Invoke(ctx, Infra_GetClusterManagedService_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *infraClient) MarkClusterOnlineAt(ctx context.Context, in *MarkClusterOnlineAtIn, opts ...grpc.CallOption) (*MarkClusterOnlineAtOut, error) { out := new(MarkClusterOnlineAtOut) err := c.cc.Invoke(ctx, Infra_MarkClusterOnlineAt_FullMethodName, in, out, opts...) @@ -109,7 +98,6 @@ type InfraServer interface { GetNodepool(context.Context, *GetNodepoolIn) (*GetNodepoolOut, error) ClusterExists(context.Context, *ClusterExistsIn) (*ClusterExistsOut, error) GetClusterKubeconfig(context.Context, *GetClusterIn) (*GetClusterKubeconfigOut, error) - GetClusterManagedService(context.Context, *GetClusterManagedServiceIn) (*GetClusterManagedServiceOut, error) MarkClusterOnlineAt(context.Context, *MarkClusterOnlineAtIn) (*MarkClusterOnlineAtOut, error) mustEmbedUnimplementedInfraServer() } @@ -130,9 +118,6 @@ func (UnimplementedInfraServer) ClusterExists(context.Context, *ClusterExistsIn) func (UnimplementedInfraServer) GetClusterKubeconfig(context.Context, *GetClusterIn) (*GetClusterKubeconfigOut, error) { return nil, status.Errorf(codes.Unimplemented, "method GetClusterKubeconfig not implemented") } -func (UnimplementedInfraServer) GetClusterManagedService(context.Context, *GetClusterManagedServiceIn) (*GetClusterManagedServiceOut, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetClusterManagedService not implemented") -} func (UnimplementedInfraServer) MarkClusterOnlineAt(context.Context, *MarkClusterOnlineAtIn) (*MarkClusterOnlineAtOut, error) { return nil, status.Errorf(codes.Unimplemented, "method MarkClusterOnlineAt not implemented") } @@ -221,24 +206,6 @@ func _Infra_GetClusterKubeconfig_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -func _Infra_GetClusterManagedService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetClusterManagedServiceIn) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(InfraServer).GetClusterManagedService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Infra_GetClusterManagedService_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfraServer).GetClusterManagedService(ctx, req.(*GetClusterManagedServiceIn)) - } - return interceptor(ctx, in, info, handler) -} - func _Infra_MarkClusterOnlineAt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MarkClusterOnlineAtIn) if err := dec(in); err != nil { @@ -280,10 +247,6 @@ var Infra_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetClusterKubeconfig", Handler: _Infra_GetClusterKubeconfig_Handler, }, - { - MethodName: "GetClusterManagedService", - Handler: _Infra_GetClusterManagedService_Handler, - }, { MethodName: "MarkClusterOnlineAt", Handler: _Infra_MarkClusterOnlineAt_Handler, diff --git a/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go b/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go index 443b49539..fab611dc4 100644 --- a/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go @@ -146,188 +146,6 @@ func (x *ArchiveEnvironmentsForClusterOut) GetArchived() bool { return false } -type CreateManagedResourceIn struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` - UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` - UserEmail string `protobuf:"bytes,3,opt,name=userEmail,proto3" json:"userEmail,omitempty"` - AccountName string `protobuf:"bytes,4,opt,name=accountName,proto3" json:"accountName,omitempty"` - ClusterName string `protobuf:"bytes,5,opt,name=clusterName,proto3" json:"clusterName,omitempty"` - MsvcName string `protobuf:"bytes,6,opt,name=msvcName,proto3" json:"msvcName,omitempty"` - AccountNamespace string `protobuf:"bytes,7,opt,name=accountNamespace,proto3" json:"accountNamespace,omitempty"` - MsvcTargetNamespace string `protobuf:"bytes,8,opt,name=msvcTargetNamespace,proto3" json:"msvcTargetNamespace,omitempty"` - MresName string `protobuf:"bytes,9,opt,name=mresName,proto3" json:"mresName,omitempty"` - MresType string `protobuf:"bytes,10,opt,name=mresType,proto3" json:"mresType,omitempty"` - OutputSecret []byte `protobuf:"bytes,11,opt,name=outputSecret,proto3" json:"outputSecret,omitempty"` - MsvcApiVersion string `protobuf:"bytes,12,opt,name=msvcApiVersion,proto3" json:"msvcApiVersion,omitempty"` -} - -func (x *CreateManagedResourceIn) Reset() { - *x = CreateManagedResourceIn{} - if protoimpl.UnsafeEnabled { - mi := &file_console_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateManagedResourceIn) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateManagedResourceIn) ProtoMessage() {} - -func (x *CreateManagedResourceIn) ProtoReflect() protoreflect.Message { - mi := &file_console_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateManagedResourceIn.ProtoReflect.Descriptor instead. -func (*CreateManagedResourceIn) Descriptor() ([]byte, []int) { - return file_console_proto_rawDescGZIP(), []int{2} -} - -func (x *CreateManagedResourceIn) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -func (x *CreateManagedResourceIn) GetUserName() string { - if x != nil { - return x.UserName - } - return "" -} - -func (x *CreateManagedResourceIn) GetUserEmail() string { - if x != nil { - return x.UserEmail - } - return "" -} - -func (x *CreateManagedResourceIn) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *CreateManagedResourceIn) GetClusterName() string { - if x != nil { - return x.ClusterName - } - return "" -} - -func (x *CreateManagedResourceIn) GetMsvcName() string { - if x != nil { - return x.MsvcName - } - return "" -} - -func (x *CreateManagedResourceIn) GetAccountNamespace() string { - if x != nil { - return x.AccountNamespace - } - return "" -} - -func (x *CreateManagedResourceIn) GetMsvcTargetNamespace() string { - if x != nil { - return x.MsvcTargetNamespace - } - return "" -} - -func (x *CreateManagedResourceIn) GetMresName() string { - if x != nil { - return x.MresName - } - return "" -} - -func (x *CreateManagedResourceIn) GetMresType() string { - if x != nil { - return x.MresType - } - return "" -} - -func (x *CreateManagedResourceIn) GetOutputSecret() []byte { - if x != nil { - return x.OutputSecret - } - return nil -} - -func (x *CreateManagedResourceIn) GetMsvcApiVersion() string { - if x != nil { - return x.MsvcApiVersion - } - return "" -} - -type CreateManagedResourceOut struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` -} - -func (x *CreateManagedResourceOut) Reset() { - *x = CreateManagedResourceOut{} - if protoimpl.UnsafeEnabled { - mi := &file_console_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateManagedResourceOut) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateManagedResourceOut) ProtoMessage() {} - -func (x *CreateManagedResourceOut) ProtoReflect() protoreflect.Message { - mi := &file_console_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateManagedResourceOut.ProtoReflect.Descriptor instead. -func (*CreateManagedResourceOut) Descriptor() ([]byte, []int) { - return file_console_proto_rawDescGZIP(), []int{3} -} - -func (x *CreateManagedResourceOut) GetOk() bool { - if x != nil { - return x.Ok - } - return false -} - var File_console_proto protoreflect.FileDescriptor var file_console_proto_rawDesc = []byte{ @@ -347,51 +165,16 @@ var file_console_proto_rawDesc = []byte{ 0x68, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x22, 0xad, 0x03, 0x0a, 0x17, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, - 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, - 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, - 0x73, 0x76, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, - 0x73, 0x76, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x6d, 0x73, 0x76, 0x63, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x13, 0x6d, 0x73, 0x76, 0x63, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x72, 0x65, 0x73, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x72, 0x65, 0x73, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x72, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x72, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, - 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x73, 0x76, 0x63, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x73, 0x76, 0x63, 0x41, - 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x18, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4f, 0x75, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x32, 0xbd, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, - 0x65, 0x12, 0x64, 0x0a, 0x1d, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x69, - 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x20, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x69, - 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x21, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x6e, - 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x4c, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x18, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x1a, 0x19, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4f, 0x75, 0x74, 0x42, 0x1a, 0x5a, 0x18, 0x6b, 0x6c, 0x6f, 0x75, 0x64, 0x6c, 0x69, - 0x74, 0x65, 0x2e, 0x69, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, - 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x32, 0x6f, 0x0a, 0x07, 0x43, 0x6f, 0x6e, + 0x73, 0x6f, 0x6c, 0x65, 0x12, 0x64, 0x0a, 0x1d, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x21, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, + 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x42, 0x1a, 0x5a, 0x18, 0x6b, 0x6c, + 0x6f, 0x75, 0x64, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x69, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, + 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -406,20 +189,16 @@ func file_console_proto_rawDescGZIP() []byte { return file_console_proto_rawDescData } -var file_console_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_console_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_console_proto_goTypes = []interface{}{ (*ArchiveEnvironmentsForClusterIn)(nil), // 0: ArchiveEnvironmentsForClusterIn (*ArchiveEnvironmentsForClusterOut)(nil), // 1: ArchiveEnvironmentsForClusterOut - (*CreateManagedResourceIn)(nil), // 2: CreateManagedResourceIn - (*CreateManagedResourceOut)(nil), // 3: CreateManagedResourceOut } var file_console_proto_depIdxs = []int32{ 0, // 0: Console.ArchiveEnvironmentsForCluster:input_type -> ArchiveEnvironmentsForClusterIn - 2, // 1: Console.CreateManagedResource:input_type -> CreateManagedResourceIn - 1, // 2: Console.ArchiveEnvironmentsForCluster:output_type -> ArchiveEnvironmentsForClusterOut - 3, // 3: Console.CreateManagedResource:output_type -> CreateManagedResourceOut - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type + 1, // 1: Console.ArchiveEnvironmentsForCluster:output_type -> ArchiveEnvironmentsForClusterOut + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -455,30 +234,6 @@ func file_console_proto_init() { return nil } } - file_console_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateManagedResourceIn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_console_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateManagedResourceOut); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -486,7 +241,7 @@ func file_console_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_console_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, 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 1d6762757..6cbe7e45d 100644 --- a/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go @@ -20,7 +20,6 @@ const _ = grpc.SupportPackageIsVersion7 const ( Console_ArchiveEnvironmentsForCluster_FullMethodName = "/Console/ArchiveEnvironmentsForCluster" - Console_CreateManagedResource_FullMethodName = "/Console/CreateManagedResource" ) // ConsoleClient is the client API for Console service. @@ -28,7 +27,6 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ConsoleClient interface { ArchiveEnvironmentsForCluster(ctx context.Context, in *ArchiveEnvironmentsForClusterIn, opts ...grpc.CallOption) (*ArchiveEnvironmentsForClusterOut, error) - CreateManagedResource(ctx context.Context, in *CreateManagedResourceIn, opts ...grpc.CallOption) (*CreateManagedResourceOut, error) } type consoleClient struct { @@ -48,21 +46,11 @@ func (c *consoleClient) ArchiveEnvironmentsForCluster(ctx context.Context, in *A return out, nil } -func (c *consoleClient) CreateManagedResource(ctx context.Context, in *CreateManagedResourceIn, opts ...grpc.CallOption) (*CreateManagedResourceOut, error) { - out := new(CreateManagedResourceOut) - err := c.cc.Invoke(ctx, Console_CreateManagedResource_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // ConsoleServer is the server API for Console service. // All implementations must embed UnimplementedConsoleServer // for forward compatibility type ConsoleServer interface { ArchiveEnvironmentsForCluster(context.Context, *ArchiveEnvironmentsForClusterIn) (*ArchiveEnvironmentsForClusterOut, error) - CreateManagedResource(context.Context, *CreateManagedResourceIn) (*CreateManagedResourceOut, error) mustEmbedUnimplementedConsoleServer() } @@ -73,9 +61,6 @@ type UnimplementedConsoleServer struct { func (UnimplementedConsoleServer) ArchiveEnvironmentsForCluster(context.Context, *ArchiveEnvironmentsForClusterIn) (*ArchiveEnvironmentsForClusterOut, error) { return nil, status.Errorf(codes.Unimplemented, "method ArchiveEnvironmentsForCluster not implemented") } -func (UnimplementedConsoleServer) CreateManagedResource(context.Context, *CreateManagedResourceIn) (*CreateManagedResourceOut, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateManagedResource not implemented") -} func (UnimplementedConsoleServer) mustEmbedUnimplementedConsoleServer() {} // UnsafeConsoleServer may be embedded to opt out of forward compatibility for this service. @@ -107,24 +92,6 @@ func _Console_ArchiveEnvironmentsForCluster_Handler(srv interface{}, ctx context return interceptor(ctx, in, info, handler) } -func _Console_CreateManagedResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateManagedResourceIn) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConsoleServer).CreateManagedResource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Console_CreateManagedResource_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConsoleServer).CreateManagedResource(ctx, req.(*CreateManagedResourceIn)) - } - return interceptor(ctx, in, info, handler) -} - // Console_ServiceDesc is the grpc.ServiceDesc for Console service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -136,10 +103,6 @@ var Console_ServiceDesc = grpc.ServiceDesc{ MethodName: "ArchiveEnvironmentsForCluster", Handler: _Console_ArchiveEnvironmentsForCluster_Handler, }, - { - MethodName: "CreateManagedResource", - Handler: _Console_CreateManagedResource_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "console.proto", From 9da9d474bc3d0a35cd61da4c9a90e4e013eac2b2 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Mon, 15 Jul 2024 22:54:05 +0530 Subject: [PATCH 06/89] fix: pagination hasPrevPage fix - adds kloudliteDNSSuffix to BYOK Cluster Helm Vars --- .tools/nvim/__http__/console/mres.graphql.yml | 18 +- .../internal/app/graph/generated/generated.go | 28 +- .../internal/app/graph/model/models_gen.go | 8 +- .../struct-to-graphql/common-types.graphqls | 2 +- .../internal/app/graph/generated/generated.go | 32 +- .../internal/app/graph/model/models_gen.go | 8 +- .../internal/app/graph/schema.resolvers.go | 4 +- .../struct-to-graphql/common-types.graphqls | 2 +- .../generated_constants_notification.go | 1 + .../internal/app/graph/generated/generated.go | 72 +-- .../internal/app/graph/model/models_gen.go | 8 +- .../struct-to-graphql/common-types.graphqls | 2 +- .../internal/app/graph/build.resolvers.go | 2 +- .../internal/app/graph/buildrun.resolvers.go | 2 +- .../app/graph/common-types.resolvers.go | 2 +- .../app/graph/credential.resolvers.go | 2 +- .../internal/app/graph/digest.resolvers.go | 2 +- .../internal/app/graph/entity.resolvers.go | 2 +- .../internal/app/graph/generated/generated.go | 304 ++++------- .../app/graph/githubinstallation.resolvers.go | 2 +- .../graph/githublistrepository.resolvers.go | 2 +- .../graph/githubsearchrepository.resolvers.go | 2 +- .../app/graph/gitlabproject.resolvers.go | 2 +- .../app/graph/matchfilter.resolvers.go | 2 +- .../internal/app/graph/model/models_gen.go | 14 +- .../app/graph/repository.resolvers.go | 2 +- .../internal/app/graph/schema.resolvers.go | 96 +--- .../struct-to-graphql/common-types.graphqls | 2 +- .../internal/app/graph/generated/generated.go | 140 ++++-- .../internal/app/graph/model/models_gen.go | 9 +- .../internal/app/graph/schema.resolvers.go | 196 +------- .../struct-to-graphql/common-types.graphqls | 3 +- apps/infra/internal/domain/byok-clusters.go | 3 +- .../field-constants/generated_constants.go | 1 + apps/infra/internal/env/env.go | 2 + .../app/graph/common-types.resolvers.go | 2 +- .../internal/app/graph/generated/generated.go | 472 +++++------------- .../internal/app/graph/iotapp.resolvers.go | 2 +- .../app/graph/iotdeployment.resolvers.go | 2 +- .../internal/app/graph/iotdevice.resolvers.go | 2 +- .../app/graph/iotdeviceblueprint.resolvers.go | 2 +- .../app/graph/iotproject.resolvers.go | 2 +- .../app/graph/matchfilter.resolvers.go | 2 +- .../internal/app/graph/model/models_gen.go | 14 +- .../internal/app/graph/schema.resolvers.go | 2 +- .../struct-to-graphql/common-types.graphqls | 2 +- cmd/struct-to-graphql/pkg/parser/parser.go | 2 +- .../pkg/parser/parser_test.go | 5 +- pkg/http-server/http-server.go | 8 + 49 files changed, 512 insertions(+), 986 deletions(-) diff --git a/.tools/nvim/__http__/console/mres.graphql.yml b/.tools/nvim/__http__/console/mres.graphql.yml index e63469727..5bf2073f7 100644 --- a/.tools/nvim/__http__/console/mres.graphql.yml +++ b/.tools/nvim/__http__/console/mres.graphql.yml @@ -7,9 +7,15 @@ global: label: List Managed Resources query: |+ #graphql - query Core_listManagedResources($msvcName: String!) { - core_listManagedResources(msvcName: $msvcName) { + query Core_listManagedResources($search: SearchManagedResources, $pq: CursorPaginationIn) { + core_listManagedResources(search: $search, pq: $pq) { + totalCount + pageInfo { + hasNextPage + hasPreviousPage + } edges { + cursor node { accountName displayName @@ -20,7 +26,13 @@ query: |+ #graphql } } variables: - msvcName: "msvc-one" + pq: + first: 10 + after: NjY5NTUxMTE3YTU0Njk4MTBkZWNlNDRl + search: + managedServiceName: + matchType: exact + exact: new-k-db-service --- label: Create Managed Resource diff --git a/apps/accounts/internal/app/graph/generated/generated.go b/apps/accounts/internal/app/graph/generated/generated.go index 15abcb92e..56f3a3ef7 100644 --- a/apps/accounts/internal/app/graph/generated/generated.go +++ b/apps/accounts/internal/app/graph/generated/generated.go @@ -150,10 +150,10 @@ type ComplexityRoot struct { } PageInfo struct { - EndCursor func(childComplexity int) int - HasNextPage func(childComplexity int) int - HasPreviousPage func(childComplexity int) int - StartCursor func(childComplexity int) int + EndCursor func(childComplexity int) int + HasNextPage func(childComplexity int) int + HasPrevPage func(childComplexity int) int + StartCursor func(childComplexity int) int } Query struct { @@ -756,12 +756,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PageInfo.HasNextPage(childComplexity), true - case "PageInfo.hasPreviousPage": - if e.complexity.PageInfo.HasPreviousPage == nil { + case "PageInfo.hasPrevPage": + if e.complexity.PageInfo.HasPrevPage == nil { break } - return e.complexity.PageInfo.HasPreviousPage(childComplexity), true + return e.complexity.PageInfo.HasPrevPage(childComplexity), true case "PageInfo.startCursor": if e.complexity.PageInfo.StartCursor == nil { @@ -1191,7 +1191,7 @@ type Metadata @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } @@ -4929,8 +4929,8 @@ func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Contex return fc, nil } -func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) +func (ec *executionContext) _PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasPrevPage(ctx, field) if err != nil { return graphql.Null } @@ -4943,7 +4943,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HasPreviousPage, nil + return obj.HasPrevPage, nil }) if err != nil { ec.Error(ctx, err) @@ -4957,7 +4957,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -9472,8 +9472,8 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj) case "hasNextPage": out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) - case "hasPreviousPage": - out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj) + case "hasPrevPage": + out.Values[i] = ec._PageInfo_hasPrevPage(ctx, field, obj) case "startCursor": out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj) default: diff --git a/apps/accounts/internal/app/graph/model/models_gen.go b/apps/accounts/internal/app/graph/model/models_gen.go index 94cee05b9..711fbd4ff 100644 --- a/apps/accounts/internal/app/graph/model/models_gen.go +++ b/apps/accounts/internal/app/graph/model/models_gen.go @@ -23,10 +23,10 @@ type Mutation struct { } type PageInfo struct { - EndCursor *string `json:"endCursor,omitempty"` - HasNextPage *bool `json:"hasNextPage,omitempty"` - HasPreviousPage *bool `json:"hasPreviousPage,omitempty"` - StartCursor *string `json:"startCursor,omitempty"` + EndCursor *string `json:"endCursor,omitempty"` + HasNextPage *bool `json:"hasNextPage,omitempty"` + HasPrevPage *bool `json:"hasPrevPage,omitempty"` + StartCursor *string `json:"startCursor,omitempty"` } type Query struct { diff --git a/apps/accounts/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/accounts/internal/app/graph/struct-to-graphql/common-types.graphqls index ae044ee10..7ca34a325 100644 --- a/apps/accounts/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/accounts/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -17,7 +17,7 @@ type Metadata @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } diff --git a/apps/comms/internal/app/graph/generated/generated.go b/apps/comms/internal/app/graph/generated/generated.go index a2dacc18f..88bb51644 100644 --- a/apps/comms/internal/app/graph/generated/generated.go +++ b/apps/comms/internal/app/graph/generated/generated.go @@ -161,10 +161,10 @@ type ComplexityRoot struct { } PageInfo struct { - EndCursor func(childComplexity int) int - HasNextPage func(childComplexity int) int - HasPreviousPage func(childComplexity int) int - StartCursor func(childComplexity int) int + EndCursor func(childComplexity int) int + HasNextPage func(childComplexity int) int + HasPrevPage func(childComplexity int) int + StartCursor func(childComplexity int) int } Pagination struct { @@ -715,12 +715,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PageInfo.HasNextPage(childComplexity), true - case "PageInfo.hasPreviousPage": - if e.complexity.PageInfo.HasPreviousPage == nil { + case "PageInfo.hasPrevPage": + if e.complexity.PageInfo.HasPrevPage == nil { break } - return e.complexity.PageInfo.HasPreviousPage(childComplexity), true + return e.complexity.PageInfo.HasPrevPage(childComplexity), true case "PageInfo.startCursor": if e.complexity.PageInfo.StartCursor == nil { @@ -1044,7 +1044,7 @@ type Github__com___kloudlite___api___common__CreatedOrUpdatedBy @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } @@ -4163,8 +4163,8 @@ func (ec *executionContext) fieldContext_NotificationPaginatedRecords_pageInfo(c return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -4300,8 +4300,8 @@ func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Contex return fc, nil } -func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) +func (ec *executionContext) _PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasPrevPage(ctx, field) if err != nil { return graphql.Null } @@ -4314,7 +4314,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HasPreviousPage, nil + return obj.HasPrevPage, nil }) if err != nil { ec.Error(ctx, err) @@ -4328,7 +4328,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -8774,8 +8774,8 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj) case "hasNextPage": out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) - case "hasPreviousPage": - out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj) + case "hasPrevPage": + out.Values[i] = ec._PageInfo_hasPrevPage(ctx, field, obj) case "startCursor": out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj) default: diff --git a/apps/comms/internal/app/graph/model/models_gen.go b/apps/comms/internal/app/graph/model/models_gen.go index eafa39616..46a4da28b 100644 --- a/apps/comms/internal/app/graph/model/models_gen.go +++ b/apps/comms/internal/app/graph/model/models_gen.go @@ -75,10 +75,10 @@ type NotificationPaginatedRecords struct { } type PageInfo struct { - EndCursor *string `json:"endCursor,omitempty"` - HasNextPage *bool `json:"hasNextPage,omitempty"` - HasPreviousPage *bool `json:"hasPreviousPage,omitempty"` - StartCursor *string `json:"startCursor,omitempty"` + EndCursor *string `json:"endCursor,omitempty"` + HasNextPage *bool `json:"hasNextPage,omitempty"` + HasPrevPage *bool `json:"hasPrevPage,omitempty"` + StartCursor *string `json:"startCursor,omitempty"` } type Query struct { diff --git a/apps/comms/internal/app/graph/schema.resolvers.go b/apps/comms/internal/app/graph/schema.resolvers.go index bc631eef4..de1c29383 100644 --- a/apps/comms/internal/app/graph/schema.resolvers.go +++ b/apps/comms/internal/app/graph/schema.resolvers.go @@ -6,13 +6,11 @@ package graph import ( "context" - - "github.com/kloudlite/api/pkg/errors" - "github.com/kloudlite/api/apps/comms/internal/app/graph/generated" "github.com/kloudlite/api/apps/comms/internal/app/graph/model" "github.com/kloudlite/api/apps/comms/internal/domain/entities" "github.com/kloudlite/api/apps/comms/types" + "github.com/kloudlite/api/pkg/errors" fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/repos" ) diff --git a/apps/comms/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/comms/internal/app/graph/struct-to-graphql/common-types.graphqls index 94ce581b3..75712de36 100644 --- a/apps/comms/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/comms/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -36,7 +36,7 @@ type Github__com___kloudlite___api___common__CreatedOrUpdatedBy @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } diff --git a/apps/comms/internal/domain/entities/field-constants/generated_constants_notification.go b/apps/comms/internal/domain/entities/field-constants/generated_constants_notification.go index a0aebf9a6..5496ca533 100644 --- a/apps/comms/internal/domain/entities/field-constants/generated_constants_notification.go +++ b/apps/comms/internal/domain/entities/field-constants/generated_constants_notification.go @@ -15,6 +15,7 @@ const ( NotificationId = "id" NotificationMarkedForDeletion = "markedForDeletion" NotificationNotificationType = "notificationType" + NotificationPriority = "priority" NotificationRead = "read" NotificationRecordVersion = "recordVersion" NotificationUpdateTime = "updateTime" diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 548afdd6a..7ccd4d3d0 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -772,10 +772,10 @@ type ComplexityRoot struct { } PageInfo struct { - EndCursor func(childComplexity int) int - HasNextPage func(childComplexity int) int - HasPreviousPage func(childComplexity int) int - StartCursor func(childComplexity int) int + EndCursor func(childComplexity int) int + HasNextPage func(childComplexity int) int + HasPrevPage func(childComplexity int) int + StartCursor func(childComplexity int) int } Port struct { @@ -4433,12 +4433,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PageInfo.HasNextPage(childComplexity), true - case "PageInfo.hasPreviousPage": - if e.complexity.PageInfo.HasPreviousPage == nil { + case "PageInfo.hasPrevPage": + if e.complexity.PageInfo.HasPrevPage == nil { break } - return e.complexity.PageInfo.HasPreviousPage(childComplexity), true + return e.complexity.PageInfo.HasPrevPage(childComplexity), true case "PageInfo.startCursor": if e.complexity.PageInfo.StartCursor == nil { @@ -6064,7 +6064,7 @@ type Metadata @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } @@ -9938,8 +9938,8 @@ func (ec *executionContext) fieldContext_AppPaginatedRecords_pageInfo(ctx contex return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -11075,8 +11075,8 @@ func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_p return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -12340,8 +12340,8 @@ func (ec *executionContext) fieldContext_ConfigPaginatedRecords_pageInfo(ctx con return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -13797,8 +13797,8 @@ func (ec *executionContext) fieldContext_EnvironmentPaginatedRecords_pageInfo(ct return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -14823,8 +14823,8 @@ func (ec *executionContext) fieldContext_ExternalAppPaginatedRecords_pageInfo(ct return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -23368,8 +23368,8 @@ func (ec *executionContext) fieldContext_ImagePullSecretPaginatedRecords_pageInf return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -24380,8 +24380,8 @@ func (ec *executionContext) fieldContext_ImportedManagedResourcePaginatedRecords return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -26983,8 +26983,8 @@ func (ec *executionContext) fieldContext_ManagedResourcePaginatedRecords_pageInf return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -31103,8 +31103,8 @@ func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Contex return fc, nil } -func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) +func (ec *executionContext) _PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasPrevPage(ctx, field) if err != nil { return graphql.Null } @@ -31117,7 +31117,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HasPreviousPage, nil + return obj.HasPrevPage, nil }) if err != nil { ec.Error(ctx, err) @@ -31131,7 +31131,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -35590,8 +35590,8 @@ func (ec *executionContext) fieldContext_RouterPaginatedRecords_pageInfo(ctx con return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -36997,8 +36997,8 @@ func (ec *executionContext) fieldContext_SecretPaginatedRecords_pageInfo(ctx con return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -48480,8 +48480,8 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj) case "hasNextPage": out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) - case "hasPreviousPage": - out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj) + case "hasPrevPage": + out.Values[i] = ec._PageInfo_hasPrevPage(ctx, field, obj) case "startCursor": out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj) default: @@ -52521,7 +52521,7 @@ func (ec *executionContext) marshalNfederation__Scope2ᚕᚕstringᚄ(ctx contex return ret } -func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v interface{}) (any, error) { +func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v interface{}) (interface{}, error) { if v == nil { return nil, nil } @@ -52529,7 +52529,7 @@ func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v inter return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOAny2interface(ctx context.Context, sel ast.SelectionSet, v any) graphql.Marshaler { +func (ec *executionContext) marshalOAny2interface(ctx context.Context, sel ast.SelectionSet, v interface{}) 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 a686801dd..bfe50fee4 100644 --- a/apps/console/internal/app/graph/model/models_gen.go +++ b/apps/console/internal/app/graph/model/models_gen.go @@ -737,10 +737,10 @@ type Mutation struct { } type PageInfo struct { - EndCursor *string `json:"endCursor,omitempty"` - HasNextPage *bool `json:"hasNextPage,omitempty"` - HasPreviousPage *bool `json:"hasPreviousPage,omitempty"` - StartCursor *string `json:"startCursor,omitempty"` + EndCursor *string `json:"endCursor,omitempty"` + HasNextPage *bool `json:"hasNextPage,omitempty"` + HasPrevPage *bool `json:"hasPrevPage,omitempty"` + StartCursor *string `json:"startCursor,omitempty"` } type Port struct { diff --git a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls index 3eb06e2cf..c89eeac85 100644 --- a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -343,7 +343,7 @@ type Metadata @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } diff --git a/apps/container-registry/internal/app/graph/build.resolvers.go b/apps/container-registry/internal/app/graph/build.resolvers.go index df004de98..48794d4dc 100644 --- a/apps/container-registry/internal/app/graph/build.resolvers.go +++ b/apps/container-registry/internal/app/graph/build.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/buildrun.resolvers.go b/apps/container-registry/internal/app/graph/buildrun.resolvers.go index 2db56810f..a59862e39 100644 --- a/apps/container-registry/internal/app/graph/buildrun.resolvers.go +++ b/apps/container-registry/internal/app/graph/buildrun.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/common-types.resolvers.go b/apps/container-registry/internal/app/graph/common-types.resolvers.go index d7046bab8..82d047ae8 100644 --- a/apps/container-registry/internal/app/graph/common-types.resolvers.go +++ b/apps/container-registry/internal/app/graph/common-types.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/credential.resolvers.go b/apps/container-registry/internal/app/graph/credential.resolvers.go index 9f6c15c9b..211aebb64 100644 --- a/apps/container-registry/internal/app/graph/credential.resolvers.go +++ b/apps/container-registry/internal/app/graph/credential.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/digest.resolvers.go b/apps/container-registry/internal/app/graph/digest.resolvers.go index 1520470e8..e0172a633 100644 --- a/apps/container-registry/internal/app/graph/digest.resolvers.go +++ b/apps/container-registry/internal/app/graph/digest.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/entity.resolvers.go b/apps/container-registry/internal/app/graph/entity.resolvers.go index 8b34d3882..74606df8f 100644 --- a/apps/container-registry/internal/app/graph/entity.resolvers.go +++ b/apps/container-registry/internal/app/graph/entity.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/generated/generated.go b/apps/container-registry/internal/app/graph/generated/generated.go index 100685307..affd67158 100644 --- a/apps/container-registry/internal/app/graph/generated/generated.go +++ b/apps/container-registry/internal/app/graph/generated/generated.go @@ -444,10 +444,10 @@ type ComplexityRoot struct { } PageInfo struct { - EndCursor func(childComplexity int) int - HasNextPage func(childComplexity int) int - HasPreviousPage func(childComplexity int) int - StartCursor func(childComplexity int) int + EndCursor func(childComplexity int) int + HasNextPage func(childComplexity int) int + HasPrevPage func(childComplexity int) int + StartCursor func(childComplexity int) int } Pagination struct { @@ -2394,12 +2394,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PageInfo.HasNextPage(childComplexity), true - case "PageInfo.hasPreviousPage": - if e.complexity.PageInfo.HasPreviousPage == nil { + case "PageInfo.hasPrevPage": + if e.complexity.PageInfo.HasPrevPage == nil { break } - return e.complexity.PageInfo.HasPreviousPage(childComplexity), true + return e.complexity.PageInfo.HasPrevPage(childComplexity), true case "PageInfo.startCursor": if e.complexity.PageInfo.StartCursor == nil { @@ -3161,7 +3161,7 @@ type Metadata @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } @@ -3577,7 +3577,13 @@ scalar Date | UNION directive @interfaceObject on OBJECT directive @link(import: [String!], url: String!) repeatable on SCHEMA - directive @override(from: String!) on FIELD_DEFINITION + directive @override(from: String!, label: String) on FIELD_DEFINITION + directive @policy(policies: [[federation__Policy!]!]!) on + | FIELD_DEFINITION + | OBJECT + | INTERFACE + | SCALAR + | ENUM directive @provides(fields: FieldSet!) on FIELD_DEFINITION directive @requires(fields: FieldSet!) on FIELD_DEFINITION directive @requiresScopes(scopes: [[federation__Scope!]!]!) on @@ -3600,6 +3606,7 @@ scalar Date | UNION scalar _Any scalar FieldSet + scalar federation__Policy scalar federation__Scope `, BuiltIn: true}, {Name: "../../federation/entity.graphql", Input: ` @@ -5232,8 +5239,8 @@ func (ec *executionContext) fieldContext_BuildPaginatedRecords_pageInfo(ctx cont return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -6308,8 +6315,8 @@ func (ec *executionContext) fieldContext_BuildRunPaginatedRecords_pageInfo(ctx c return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -7202,8 +7209,8 @@ func (ec *executionContext) fieldContext_CredentialPaginatedRecords_pageInfo(ctx return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -8373,8 +8380,8 @@ func (ec *executionContext) fieldContext_DigestPaginatedRecords_pageInfo(ctx con return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -15732,8 +15739,8 @@ func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Contex return fc, nil } -func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) +func (ec *executionContext) _PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasPrevPage(ctx, field) if err != nil { return graphql.Null } @@ -15746,7 +15753,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HasPreviousPage, nil + return obj.HasPrevPage, nil }) if err != nil { ec.Error(ctx, err) @@ -15760,7 +15767,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -18154,8 +18161,8 @@ func (ec *executionContext) fieldContext_RepositoryPaginatedRecords_pageInfo(ctx return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -20038,8 +20045,6 @@ func (ec *executionContext) unmarshalInputBuildIn(ctx context.Context, obj inter } switch k { case "buildClusterName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildClusterName")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20047,8 +20052,6 @@ func (ec *executionContext) unmarshalInputBuildIn(ctx context.Context, obj inter } it.BuildClusterName = data case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20056,8 +20059,6 @@ func (ec *executionContext) unmarshalInputBuildIn(ctx context.Context, obj inter } it.Name = data case "source": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("source")) data, err := ec.unmarshalNGithub__com___kloudlite___api___apps___container____registry___internal___domain___entities__GitSourceIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsContainerRegistryInternalDomainEntitiesGitSourceIn(ctx, v) if err != nil { @@ -20067,8 +20068,6 @@ func (ec *executionContext) unmarshalInputBuildIn(ctx context.Context, obj inter return it, err } case "spec": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spec")) data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___distribution___v1__BuildRunSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisDistributionV1BuildRunSpecIn(ctx, v) if err != nil { @@ -20098,8 +20097,6 @@ func (ec *executionContext) unmarshalInputBuildRunIn(ctx context.Context, obj in } switch k { case "displayName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20127,8 +20124,6 @@ func (ec *executionContext) unmarshalInputCredentialIn(ctx context.Context, obj } switch k { case "access": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("access")) data, err := ec.unmarshalNGithub__com___kloudlite___api___apps___container____registry___internal___domain___entities__RepoAccess2githubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsContainerRegistryInternalDomainEntitiesRepoAccess(ctx, v) if err != nil { @@ -20138,8 +20133,6 @@ func (ec *executionContext) unmarshalInputCredentialIn(ctx context.Context, obj return it, err } case "expiration": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("expiration")) data, err := ec.unmarshalNGithub__com___kloudlite___api___apps___container____registry___internal___domain___entities__ExpirationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsContainerRegistryInternalDomainEntitiesExpirationIn(ctx, v) if err != nil { @@ -20149,8 +20142,6 @@ func (ec *executionContext) unmarshalInputCredentialIn(ctx context.Context, obj return it, err } case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20158,8 +20149,6 @@ func (ec *executionContext) unmarshalInputCredentialIn(ctx context.Context, obj } it.Name = data case "username": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20194,8 +20183,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } switch k { case "after": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20203,8 +20190,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } it.After = data case "before": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20212,8 +20197,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } it.Before = data case "first": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) data, err := ec.unmarshalOInt2ᚖint64(ctx, v) if err != nil { @@ -20221,8 +20204,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } it.First = data case "last": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) data, err := ec.unmarshalOInt2ᚖint64(ctx, v) if err != nil { @@ -20230,8 +20211,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } it.Last = data case "orderBy": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("orderBy")) data, err := ec.unmarshalOString2string(ctx, v) if err != nil { @@ -20239,8 +20218,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } it.OrderBy = data case "sortDirection": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortDirection")) data, err := ec.unmarshalOCursorPaginationSortDirection2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐSortDirection(ctx, v) if err != nil { @@ -20268,8 +20245,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } switch k { case "unit": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("unit")) data, err := ec.unmarshalNGithub__com___kloudlite___api___apps___container____registry___internal___domain___entities__ExpirationUnit2githubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsContainerRegistryInternalDomainEntitiesExpirationUnit(ctx, v) if err != nil { @@ -20277,8 +20252,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } it.Unit = data case "value": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) data, err := ec.unmarshalNInt2int(ctx, v) if err != nil { @@ -20306,8 +20279,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } switch k { case "branch": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("branch")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20315,8 +20286,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } it.Branch = data case "provider": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("provider")) data, err := ec.unmarshalNGithub__com___kloudlite___api___apps___container____registry___internal___domain___entities__GitProvider2githubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsContainerRegistryInternalDomainEntitiesGitProvider(ctx, v) if err != nil { @@ -20324,8 +20293,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } it.Provider = data case "repository": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repository")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20353,8 +20320,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } switch k { case "avatarUrl": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("avatarUrl")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20362,8 +20327,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } it.AvatarURL = data case "id": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -20371,8 +20334,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } it.ID = data case "login": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("login")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20380,8 +20341,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } it.Login = data case "nodeId": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nodeId")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20389,8 +20348,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } it.NodeID = data case "type": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20418,8 +20375,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "buildArgs": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildArgs")) data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { @@ -20427,8 +20382,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.BuildArgs = data case "buildContexts": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildContexts")) data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { @@ -20436,8 +20389,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.BuildContexts = data case "contextDir": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contextDir")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20445,8 +20396,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.ContextDir = data case "dockerfileContent": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dockerfileContent")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20454,8 +20403,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.DockerfileContent = data case "dockerfilePath": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dockerfilePath")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20463,8 +20410,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.DockerfilePath = data case "targetPlatforms": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("targetPlatforms")) data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { @@ -20492,8 +20437,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "buildOptions": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildOptions")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___distribution___v1__BuildOptionsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisDistributionV1BuildOptionsIn(ctx, v) if err != nil { @@ -20501,8 +20444,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.BuildOptions = data case "caches": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("caches")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___distribution___v1__CacheIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisDistributionV1CacheInᚄ(ctx, v) if err != nil { @@ -20510,8 +20451,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Caches = data case "registry": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("registry")) data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___distribution___v1__RegistryIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisDistributionV1RegistryIn(ctx, v) if err != nil { @@ -20519,8 +20458,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Registry = data case "resource": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resource")) data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___distribution___v1__ResourceIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisDistributionV1ResourceIn(ctx, v) if err != nil { @@ -20548,8 +20485,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20557,8 +20492,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Name = data case "path": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("path")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20586,8 +20519,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "repo": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repo")) data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___distribution___v1__RepoIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisDistributionV1RepoIn(ctx, v) if err != nil { @@ -20615,8 +20546,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20624,8 +20553,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Name = data case "tags": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tags")) data, err := ec.unmarshalNString2ᚕstringᚄ(ctx, v) if err != nil { @@ -20653,8 +20580,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "cpu": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cpu")) data, err := ec.unmarshalNInt2int(ctx, v) if err != nil { @@ -20662,8 +20587,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.CPU = data case "memoryInMb": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("memoryInMb")) data, err := ec.unmarshalNInt2int(ctx, v) if err != nil { @@ -20691,8 +20614,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } switch k { case "debug": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("debug")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20700,8 +20621,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Debug = data case "error": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("error")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20709,8 +20628,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Error = data case "generation": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("generation")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -20718,8 +20635,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Generation = data case "info": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("info")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20727,8 +20642,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Info = data case "message": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20736,8 +20649,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Message = data case "startedAt": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("startedAt")) data, err := ec.unmarshalODate2ᚖstring(ctx, v) if err != nil { @@ -20745,8 +20656,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.StartedAt = data case "state": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("state")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___pkg___operator__State2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorState(ctx, v) if err != nil { @@ -20754,8 +20663,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.State = data case "status": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status")) data, err := ec.unmarshalNBoolean2bool(ctx, v) if err != nil { @@ -20783,8 +20690,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } switch k { case "debug": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("debug")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { @@ -20792,8 +20697,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Debug = data case "description": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -20801,8 +20704,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Description = data case "hide": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hide")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { @@ -20810,8 +20711,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Hide = data case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20819,8 +20718,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Name = data case "title": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("title")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20848,8 +20745,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } switch k { case "apiVersion": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiVersion")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20857,8 +20752,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.APIVersion = data case "kind": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20866,8 +20759,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Kind = data case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20875,8 +20766,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Name = data case "namespace": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -20904,8 +20793,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } switch k { case "checkList": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("checkList")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___pkg___operator__CheckMetaIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMetaInᚄ(ctx, v) if err != nil { @@ -20913,8 +20800,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.CheckList = data case "checks": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("checks")) data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { @@ -20922,8 +20807,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Checks = data case "isReady": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) data, err := ec.unmarshalNBoolean2bool(ctx, v) if err != nil { @@ -20931,8 +20814,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.IsReady = data case "lastReadyGeneration": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lastReadyGeneration")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -20940,8 +20821,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.LastReadyGeneration = data case "lastReconcileTime": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lastReconcileTime")) data, err := ec.unmarshalODate2ᚖstring(ctx, v) if err != nil { @@ -20949,8 +20828,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.LastReconcileTime = data case "message": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___pkg___raw____json__RawJsonIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgRawJSONRawJSONIn(ctx, v) if err != nil { @@ -20958,8 +20835,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } it.Message = data case "resources": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resources")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___pkg___operator__ResourceRefIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorResourceRefInᚄ(ctx, v) if err != nil { @@ -20987,8 +20862,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___p } switch k { case "RawMessage": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("RawMessage")) data, err := ec.unmarshalOAny2interface(ctx, v) if err != nil { @@ -21016,8 +20889,6 @@ func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj } switch k { case "array": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("array")) data, err := ec.unmarshalOAny2ᚕinterfaceᚄ(ctx, v) if err != nil { @@ -21025,8 +20896,6 @@ func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj } it.Array = data case "exact": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("exact")) data, err := ec.unmarshalOAny2interface(ctx, v) if err != nil { @@ -21034,8 +20903,6 @@ func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj } it.Exact = data case "matchType": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("matchType")) data, err := ec.unmarshalNGithub__com___kloudlite___api___pkg___repos__MatchType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋcontainerᚑregistryᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIPkgReposMatchType(ctx, v) if err != nil { @@ -21045,8 +20912,6 @@ func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj return it, err } case "notInArray": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notInArray")) data, err := ec.unmarshalOAny2ᚕinterfaceᚄ(ctx, v) if err != nil { @@ -21054,8 +20919,6 @@ func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj } it.NotInArray = data case "regex": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("regex")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -21083,8 +20946,6 @@ func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj in } switch k { case "annotations": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { @@ -21094,8 +20955,6 @@ func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj in return it, err } case "labels": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { @@ -21105,8 +20964,6 @@ func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj in return it, err } case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -21114,8 +20971,6 @@ func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj in } it.Name = data case "namespace": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) data, err := ec.unmarshalOString2string(ctx, v) if err != nil { @@ -21143,8 +20998,6 @@ func (ec *executionContext) unmarshalInputPaginationIn(ctx context.Context, obj } switch k { case "page": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) data, err := ec.unmarshalOInt2int(ctx, v) if err != nil { @@ -21152,8 +21005,6 @@ func (ec *executionContext) unmarshalInputPaginationIn(ctx context.Context, obj } it.Page = data case "per_page": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("per_page")) data, err := ec.unmarshalOInt2int(ctx, v) if err != nil { @@ -21181,8 +21032,6 @@ func (ec *executionContext) unmarshalInputRepositoryIn(ctx context.Context, obj } switch k { case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -21210,8 +21059,6 @@ func (ec *executionContext) unmarshalInputSearchBuildRuns(ctx context.Context, o } switch k { case "buildId": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildId")) data, err := ec.unmarshalOID2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, v) if err != nil { @@ -21219,8 +21066,6 @@ func (ec *executionContext) unmarshalInputSearchBuildRuns(ctx context.Context, o } it.BuildID = data case "repoName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoName")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -21248,8 +21093,6 @@ func (ec *executionContext) unmarshalInputSearchBuilds(ctx context.Context, obj } switch k { case "text": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -21277,8 +21120,6 @@ func (ec *executionContext) unmarshalInputSearchCreds(ctx context.Context, obj i } switch k { case "text": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -21306,8 +21147,6 @@ func (ec *executionContext) unmarshalInputSearchRepos(ctx context.Context, obj i } switch k { case "text": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -24670,8 +24509,8 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj) case "hasNextPage": out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) - case "hasPreviousPage": - out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj) + case "hasPrevPage": + out.Values[i] = ec._PageInfo_hasPrevPage(ctx, field, obj) case "startCursor": out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj) default: @@ -26951,6 +26790,85 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a return res } +func (ec *executionContext) unmarshalNfederation__Policy2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNfederation__Policy2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(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) unmarshalNfederation__Policy2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNfederation__Policy2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalNfederation__Policy2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNfederation__Policy2string(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalNfederation__Policy2ᚕᚕstringᚄ(ctx context.Context, v interface{}) ([][]string, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([][]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNfederation__Policy2ᚕstringᚄ(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalNfederation__Policy2ᚕᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v [][]string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNfederation__Policy2ᚕstringᚄ(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + func (ec *executionContext) unmarshalNfederation__Scope2string(ctx context.Context, v interface{}) (string, error) { res, err := graphql.UnmarshalString(v) return res, graphql.ErrorOnPath(ctx, err) diff --git a/apps/container-registry/internal/app/graph/githubinstallation.resolvers.go b/apps/container-registry/internal/app/graph/githubinstallation.resolvers.go index a73376e0e..83a3bff9a 100644 --- a/apps/container-registry/internal/app/graph/githubinstallation.resolvers.go +++ b/apps/container-registry/internal/app/graph/githubinstallation.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/githublistrepository.resolvers.go b/apps/container-registry/internal/app/graph/githublistrepository.resolvers.go index 1b74452c3..a6a02b444 100644 --- a/apps/container-registry/internal/app/graph/githublistrepository.resolvers.go +++ b/apps/container-registry/internal/app/graph/githublistrepository.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/githubsearchrepository.resolvers.go b/apps/container-registry/internal/app/graph/githubsearchrepository.resolvers.go index 4027d4e44..2f84056bc 100644 --- a/apps/container-registry/internal/app/graph/githubsearchrepository.resolvers.go +++ b/apps/container-registry/internal/app/graph/githubsearchrepository.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/gitlabproject.resolvers.go b/apps/container-registry/internal/app/graph/gitlabproject.resolvers.go index 9a372d39e..cd8f680cf 100644 --- a/apps/container-registry/internal/app/graph/gitlabproject.resolvers.go +++ b/apps/container-registry/internal/app/graph/gitlabproject.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/matchfilter.resolvers.go b/apps/container-registry/internal/app/graph/matchfilter.resolvers.go index d90b4533b..04f7fba80 100644 --- a/apps/container-registry/internal/app/graph/matchfilter.resolvers.go +++ b/apps/container-registry/internal/app/graph/matchfilter.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/model/models_gen.go b/apps/container-registry/internal/app/graph/model/models_gen.go index 24b4a173f..73103f11b 100644 --- a/apps/container-registry/internal/app/graph/model/models_gen.go +++ b/apps/container-registry/internal/app/graph/model/models_gen.go @@ -297,11 +297,17 @@ type GitlabBranch struct { WebURL string `json:"webUrl"` } +type Mutation struct { +} + type PageInfo struct { - EndCursor *string `json:"endCursor,omitempty"` - HasNextPage *bool `json:"hasNextPage,omitempty"` - HasPreviousPage *bool `json:"hasPreviousPage,omitempty"` - StartCursor *string `json:"startCursor,omitempty"` + EndCursor *string `json:"endCursor,omitempty"` + HasNextPage *bool `json:"hasNextPage,omitempty"` + HasPrevPage *bool `json:"hasPrevPage,omitempty"` + StartCursor *string `json:"startCursor,omitempty"` +} + +type Query struct { } type RepositoryEdge struct { diff --git a/apps/container-registry/internal/app/graph/repository.resolvers.go b/apps/container-registry/internal/app/graph/repository.resolvers.go index 8c6f3ea43..678f31788 100644 --- a/apps/container-registry/internal/app/graph/repository.resolvers.go +++ b/apps/container-registry/internal/app/graph/repository.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/container-registry/internal/app/graph/schema.resolvers.go b/apps/container-registry/internal/app/graph/schema.resolvers.go index 9b4786591..69c2c4ca0 100644 --- a/apps/container-registry/internal/app/graph/schema.resolvers.go +++ b/apps/container-registry/internal/app/graph/schema.resolvers.go @@ -2,10 +2,11 @@ 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.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" + generated1 "github.com/kloudlite/api/apps/container-registry/internal/app/graph/generated" "github.com/kloudlite/api/apps/container-registry/internal/app/graph/model" "github.com/kloudlite/api/apps/container-registry/internal/domain" @@ -148,27 +149,7 @@ func (r *queryResolver) CrListRepos(ctx context.Context, search *model.SearchRep return nil, errors.NewE(err) } - records := make([]*model.RepositoryEdge, len(rr.Edges)) - - for i := range rr.Edges { - records[i] = &model.RepositoryEdge{ - Node: rr.Edges[i].Node, - Cursor: rr.Edges[i].Cursor, - } - } - - m := &model.RepositoryPaginatedRecords{ - Edges: records, - PageInfo: &model.PageInfo{ - HasNextPage: rr.PageInfo.HasNextPage, - HasPreviousPage: rr.PageInfo.HasPrevPage, - StartCursor: &rr.PageInfo.StartCursor, - EndCursor: &rr.PageInfo.EndCursor, - }, - TotalCount: int(rr.TotalCount), - } - - return m, nil + return fn.JsonConvertP[model.RepositoryPaginatedRecords](rr) } // CrListCreds is the resolver for the cr_listCreds field. @@ -190,27 +171,7 @@ func (r *queryResolver) CrListCreds(ctx context.Context, search *model.SearchCre return nil, errors.NewE(err) } - records := make([]*model.CredentialEdge, len(rr.Edges)) - - for i := range rr.Edges { - records[i] = &model.CredentialEdge{ - Node: rr.Edges[i].Node, - Cursor: rr.Edges[i].Cursor, - } - } - - m := &model.CredentialPaginatedRecords{ - Edges: records, - PageInfo: &model.PageInfo{ - HasNextPage: rr.PageInfo.HasNextPage, - HasPreviousPage: rr.PageInfo.HasPrevPage, - StartCursor: &rr.PageInfo.StartCursor, - EndCursor: &rr.PageInfo.EndCursor, - }, - TotalCount: int(rr.TotalCount), - } - - return m, nil + return fn.JsonConvertP[model.CredentialPaginatedRecords](rr) } // CrListDigests is the resolver for the cr_listDigests field. @@ -232,26 +193,7 @@ func (r *queryResolver) CrListDigests(ctx context.Context, repoName string, sear return nil, errors.NewE(err) } - records := make([]*model.DigestEdge, len(rr.Edges)) - - for i := range rr.Edges { - records[i] = &model.DigestEdge{ - Node: rr.Edges[i].Node, - Cursor: rr.Edges[i].Cursor, - } - } - m := &model.DigestPaginatedRecords{ - Edges: records, - PageInfo: &model.PageInfo{ - HasNextPage: rr.PageInfo.HasNextPage, - HasPreviousPage: rr.PageInfo.HasPrevPage, - StartCursor: &rr.PageInfo.StartCursor, - EndCursor: &rr.PageInfo.EndCursor, - }, - TotalCount: int(rr.TotalCount), - } - - return m, nil + return fn.JsonConvertP[model.DigestPaginatedRecords](rr) } // CrGetCredToken is the resolver for the cr_getCredToken field. @@ -308,27 +250,7 @@ func (r *queryResolver) CrListBuilds(ctx context.Context, repoName string, searc return nil, errors.NewE(err) } - records := make([]*model.BuildEdge, len(rr.Edges)) - - for i := range rr.Edges { - records[i] = &model.BuildEdge{ - Node: rr.Edges[i].Node, - Cursor: rr.Edges[i].Cursor, - } - } - - m := &model.BuildPaginatedRecords{ - Edges: records, - PageInfo: &model.PageInfo{ - HasNextPage: rr.PageInfo.HasNextPage, - HasPreviousPage: rr.PageInfo.HasPrevPage, - StartCursor: &rr.PageInfo.StartCursor, - EndCursor: &rr.PageInfo.EndCursor, - }, - TotalCount: int(rr.TotalCount), - } - - return m, nil + return fn.JsonConvertP[model.BuildPaginatedRecords](rr) } // CrListGithubInstallations is the resolver for the cr_listGithubInstallations field. @@ -445,5 +367,7 @@ func (r *Resolver) Mutation() generated1.MutationResolver { return &mutationReso // Query returns generated1.QueryResolver implementation. func (r *Resolver) Query() generated1.QueryResolver { return &queryResolver{r} } -type mutationResolver struct{ *Resolver } -type queryResolver struct{ *Resolver } +type ( + mutationResolver struct{ *Resolver } + queryResolver struct{ *Resolver } +) diff --git a/apps/container-registry/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/container-registry/internal/app/graph/struct-to-graphql/common-types.graphqls index f736d876b..b12a58225 100644 --- a/apps/container-registry/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/container-registry/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -149,7 +149,7 @@ type Metadata @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } diff --git a/apps/infra/internal/app/graph/generated/generated.go b/apps/infra/internal/app/graph/generated/generated.go index 54eaab288..d79f22e6c 100644 --- a/apps/infra/internal/app/graph/generated/generated.go +++ b/apps/infra/internal/app/graph/generated/generated.go @@ -345,6 +345,7 @@ type ComplexityRoot struct { IamInstanceProfileRole func(childComplexity int) int NvidiaGpuEnabled func(childComplexity int) int PoolType func(childComplexity int) int + Region func(childComplexity int) int RootVolumeSize func(childComplexity int) int RootVolumeType func(childComplexity int) int SpotPool func(childComplexity int) int @@ -1225,10 +1226,10 @@ type ComplexityRoot struct { } PageInfo struct { - EndCursor func(childComplexity int) int - HasNextPage func(childComplexity int) int - HasPreviousPage func(childComplexity int) int - StartCursor func(childComplexity int) int + EndCursor func(childComplexity int) int + HasNextPage func(childComplexity int) int + HasPrevPage func(childComplexity int) int + StartCursor func(childComplexity int) int } PersistentVolume struct { @@ -2813,6 +2814,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.PoolType(childComplexity), true + case "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.region": + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.Region == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.Region(childComplexity), true + case "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.rootVolumeSize": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.RootVolumeSize == nil { break @@ -6807,12 +6815,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PageInfo.HasNextPage(childComplexity), true - case "PageInfo.hasPreviousPage": - if e.complexity.PageInfo.HasPreviousPage == nil { + case "PageInfo.hasPrevPage": + if e.complexity.PageInfo.HasPrevPage == nil { break } - return e.complexity.PageInfo.HasPreviousPage(childComplexity), true + return e.complexity.PageInfo.HasPrevPage(childComplexity), true case "PageInfo.startCursor": if e.complexity.PageInfo.StartCursor == nil { @@ -8258,6 +8266,7 @@ type Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfi iamInstanceProfileRole: String nvidiaGpuEnabled: Boolean! poolType: Github__com___kloudlite___operator___apis___clusters___v1__AWSPoolType! + region: String! rootVolumeSize: Int! rootVolumeType: String! spotPool: Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig @@ -8906,7 +8915,7 @@ type Metadata @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } @@ -12384,8 +12393,8 @@ func (ec *executionContext) fieldContext_BYOKClusterPaginatedRecords_pageInfo(ct return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -13522,8 +13531,8 @@ func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_pag return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -14715,8 +14724,8 @@ func (ec *executionContext) fieldContext_ClusterPaginatedRecords_pageInfo(ctx co return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -15718,8 +15727,8 @@ func (ec *executionContext) fieldContext_DomainEntryPaginatedRecords_pageInfo(ct return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -19071,6 +19080,50 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_region(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_region(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.Region, 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_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_region(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", + 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) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(ctx, field) if err != nil { @@ -22358,6 +22411,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_nvidiaGpuEnabled(ctx, field) case "poolType": return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_poolType(ctx, field) + case "region": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_region(ctx, field) case "rootVolumeSize": return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(ctx, field) case "rootVolumeType": @@ -27014,8 +27069,8 @@ func (ec *executionContext) fieldContext_GlobalVPNDevicePaginatedRecords_pageInf return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -27466,8 +27521,8 @@ func (ec *executionContext) fieldContext_GlobalVPNPaginatedRecords_pageInfo(ctx return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -28510,8 +28565,8 @@ func (ec *executionContext) fieldContext_HelmReleasePaginatedRecords_pageInfo(ct return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -43503,8 +43558,8 @@ func (ec *executionContext) fieldContext_NamespacePaginatedRecords_pageInfo(ctx return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -44374,8 +44429,8 @@ func (ec *executionContext) fieldContext_NodePaginatedRecords_pageInfo(ctx conte return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -45411,8 +45466,8 @@ func (ec *executionContext) fieldContext_NodePoolPaginatedRecords_pageInfo(ctx c return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -45548,8 +45603,8 @@ func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Contex return fc, nil } -func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) +func (ec *executionContext) _PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasPrevPage(ctx, field) if err != nil { return graphql.Null } @@ -45562,7 +45617,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HasPreviousPage, nil + return obj.HasPrevPage, nil }) if err != nil { ec.Error(ctx, err) @@ -45576,7 +45631,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -47413,8 +47468,8 @@ func (ec *executionContext) fieldContext_PersistentVolumeClaimPaginatedRecords_p return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -47683,8 +47738,8 @@ func (ec *executionContext) fieldContext_PersistentVolumePaginatedRecords_pageIn return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -51642,8 +51697,8 @@ func (ec *executionContext) fieldContext_VolumeAttachmentPaginatedRecords_pageIn return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -61086,6 +61141,11 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster if out.Values[i] == graphql.Null { out.Invalids++ } + case "region": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_region(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } case "rootVolumeSize": out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -67884,8 +67944,8 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj) case "hasNextPage": out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) - case "hasPreviousPage": - out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj) + case "hasPrevPage": + out.Values[i] = ec._PageInfo_hasPrevPage(ctx, field, obj) case "startCursor": out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj) default: diff --git a/apps/infra/internal/app/graph/model/models_gen.go b/apps/infra/internal/app/graph/model/models_gen.go index 98341d518..6a049210d 100644 --- a/apps/infra/internal/app/graph/model/models_gen.go +++ b/apps/infra/internal/app/graph/model/models_gen.go @@ -195,6 +195,7 @@ type GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig struct { IamInstanceProfileRole *string `json:"iamInstanceProfileRole,omitempty"` NvidiaGpuEnabled bool `json:"nvidiaGpuEnabled"` PoolType GithubComKloudliteOperatorApisClustersV1AWSPoolType `json:"poolType"` + Region string `json:"region"` RootVolumeSize int `json:"rootVolumeSize"` RootVolumeType string `json:"rootVolumeType"` SpotPool *GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig `json:"spotPool,omitempty"` @@ -1398,10 +1399,10 @@ type NodePoolPaginatedRecords struct { } type PageInfo struct { - EndCursor *string `json:"endCursor,omitempty"` - HasNextPage *bool `json:"hasNextPage,omitempty"` - HasPreviousPage *bool `json:"hasPreviousPage,omitempty"` - StartCursor *string `json:"startCursor,omitempty"` + EndCursor *string `json:"endCursor,omitempty"` + HasNextPage *bool `json:"hasNextPage,omitempty"` + HasPrevPage *bool `json:"hasPrevPage,omitempty"` + StartCursor *string `json:"startCursor,omitempty"` } type PersistentVolumeClaimEdge struct { diff --git a/apps/infra/internal/app/graph/schema.resolvers.go b/apps/infra/internal/app/graph/schema.resolvers.go index ec6253cc4..642bd1893 100644 --- a/apps/infra/internal/app/graph/schema.resolvers.go +++ b/apps/infra/internal/app/graph/schema.resolvers.go @@ -8,6 +8,7 @@ import ( "context" "encoding/base64" "fmt" + "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/apps/infra/internal/app/graph/generated" @@ -389,26 +390,7 @@ func (r *queryResolver) InfraListClusters(ctx context.Context, search *model.Sea return nil, errors.NewE(err) } - ce := make([]*model.ClusterEdge, len(pClusters.Edges)) - for i := range pClusters.Edges { - ce[i] = &model.ClusterEdge{ - Node: pClusters.Edges[i].Node, - Cursor: pClusters.Edges[i].Cursor, - } - } - - m := model.ClusterPaginatedRecords{ - Edges: ce, - PageInfo: &model.PageInfo{ - EndCursor: &pClusters.PageInfo.EndCursor, - HasNextPage: pClusters.PageInfo.HasNextPage, - HasPreviousPage: pClusters.PageInfo.HasPrevPage, - StartCursor: &pClusters.PageInfo.StartCursor, - }, - TotalCount: int(pClusters.TotalCount), - } - - return &m, nil + return fn.JsonConvertP[model.ClusterPaginatedRecords](pClusters) } // InfraGetCluster is the resolver for the infra_getCluster field. @@ -582,26 +564,7 @@ func (r *queryResolver) InfraListNodePools(ctx context.Context, clusterName stri return nil, errors.NewE(err) } - pe := make([]*model.NodePoolEdge, len(pNodePools.Edges)) - for i := range pNodePools.Edges { - pe[i] = &model.NodePoolEdge{ - Node: pNodePools.Edges[i].Node, - Cursor: pNodePools.Edges[i].Cursor, - } - } - - m := model.NodePoolPaginatedRecords{ - Edges: pe, - PageInfo: &model.PageInfo{ - EndCursor: &pNodePools.PageInfo.EndCursor, - HasNextPage: pNodePools.PageInfo.HasNextPage, - HasPreviousPage: pNodePools.PageInfo.HasPrevPage, - StartCursor: &pNodePools.PageInfo.StartCursor, - }, - TotalCount: int(pNodePools.TotalCount), - } - - return &m, nil + return fn.JsonConvertP[model.NodePoolPaginatedRecords](pNodePools) } // InfraGetNodePool is the resolver for the infra_getNodePool field. @@ -642,26 +605,7 @@ func (r *queryResolver) InfraListProviderSecrets(ctx context.Context, search *mo return nil, errors.NewE(err) } - pe := make([]*model.CloudProviderSecretEdge, len(pSecrets.Edges)) - for i := range pSecrets.Edges { - pe[i] = &model.CloudProviderSecretEdge{ - Node: pSecrets.Edges[i].Node, - Cursor: pSecrets.Edges[i].Cursor, - } - } - - m := model.CloudProviderSecretPaginatedRecords{ - Edges: pe, - PageInfo: &model.PageInfo{ - EndCursor: &pSecrets.PageInfo.EndCursor, - HasNextPage: pSecrets.PageInfo.HasNextPage, - HasPreviousPage: pSecrets.PageInfo.HasPrevPage, - StartCursor: &pSecrets.PageInfo.StartCursor, - }, - TotalCount: int(pSecrets.TotalCount), - } - - return &m, nil + return fn.JsonConvertP[model.CloudProviderSecretPaginatedRecords](pSecrets) } // InfraGetProviderSecret is the resolver for the infra_getProviderSecret field. @@ -698,26 +642,7 @@ func (r *queryResolver) InfraListDomainEntries(ctx context.Context, search *mode return nil, errors.NewE(err) } - edges := make([]*model.DomainEntryEdge, len(dEntries.Edges)) - for i := range dEntries.Edges { - edges[i] = &model.DomainEntryEdge{ - Node: dEntries.Edges[i].Node, - Cursor: dEntries.Edges[i].Cursor, - } - } - - m := model.DomainEntryPaginatedRecords{ - Edges: edges, - PageInfo: &model.PageInfo{ - EndCursor: &dEntries.PageInfo.EndCursor, - HasNextPage: dEntries.PageInfo.HasNextPage, - HasPreviousPage: dEntries.PageInfo.HasPrevPage, - StartCursor: &dEntries.PageInfo.StartCursor, - }, - TotalCount: int(dEntries.TotalCount), - } - - return &m, nil + return fn.JsonConvertP[model.DomainEntryPaginatedRecords](dEntries) } // InfraGetDomainEntry is the resolver for the infra_getDomainEntry field. @@ -776,26 +701,7 @@ func (r *queryResolver) InfraListHelmReleases(ctx context.Context, clusterName s return nil, errors.NewE(err) } - ce := make([]*model.HelmReleaseEdge, len(pRelease.Edges)) - for i := range pRelease.Edges { - ce[i] = &model.HelmReleaseEdge{ - Node: pRelease.Edges[i].Node, - Cursor: pRelease.Edges[i].Cursor, - } - } - - m := model.HelmReleasePaginatedRecords{ - Edges: ce, - PageInfo: &model.PageInfo{ - EndCursor: &pRelease.PageInfo.EndCursor, - HasNextPage: pRelease.PageInfo.HasNextPage, - HasPreviousPage: pRelease.PageInfo.HasPrevPage, - StartCursor: &pRelease.PageInfo.StartCursor, - }, - TotalCount: int(pRelease.TotalCount), - } - - return &m, nil + return fn.JsonConvertP[model.HelmReleasePaginatedRecords](pRelease) } // InfraGetHelmRelease is the resolver for the infra_getHelmRelease field. @@ -837,26 +743,7 @@ func (r *queryResolver) InfraListPVCs(ctx context.Context, clusterName string, s return nil, errors.NewE(err) } - ve := make([]*model.PersistentVolumeClaimEdge, len(pvcs.Edges)) - for i := range pvcs.Edges { - ve[i] = &model.PersistentVolumeClaimEdge{ - Node: pvcs.Edges[i].Node, - Cursor: pvcs.Edges[i].Cursor, - } - } - - m := model.PersistentVolumeClaimPaginatedRecords{ - Edges: ve, - PageInfo: &model.PageInfo{ - EndCursor: &pvcs.PageInfo.EndCursor, - HasNextPage: pvcs.PageInfo.HasNextPage, - HasPreviousPage: pvcs.PageInfo.HasPrevPage, - StartCursor: &pvcs.PageInfo.StartCursor, - }, - TotalCount: int(pvcs.TotalCount), - } - - return &m, nil + return fn.JsonConvertP[model.PersistentVolumeClaimPaginatedRecords](pvcs) } // InfraGetPvc is the resolver for the infra_getPVC field. @@ -888,26 +775,7 @@ func (r *queryResolver) InfraListNamespaces(ctx context.Context, clusterName str return nil, errors.NewE(err) } - ve := make([]*model.NamespaceEdge, len(namespaces.Edges)) - for i := range namespaces.Edges { - ve[i] = &model.NamespaceEdge{ - Node: namespaces.Edges[i].Node, - Cursor: namespaces.Edges[i].Cursor, - } - } - - m := model.NamespacePaginatedRecords{ - Edges: ve, - PageInfo: &model.PageInfo{ - EndCursor: &namespaces.PageInfo.EndCursor, - HasNextPage: namespaces.PageInfo.HasNextPage, - HasPreviousPage: namespaces.PageInfo.HasPrevPage, - StartCursor: &namespaces.PageInfo.StartCursor, - }, - TotalCount: int(namespaces.TotalCount), - } - - return &m, nil + return fn.JsonConvertP[model.NamespacePaginatedRecords](namespaces) } // InfraGetNamespace is the resolver for the infra_getNamespace field. @@ -938,26 +806,7 @@ func (r *queryResolver) InfraListPVs(ctx context.Context, clusterName string, se return nil, errors.NewE(err) } - ve := make([]*model.PersistentVolumeEdge, len(pvs.Edges)) - for i := range pvs.Edges { - ve[i] = &model.PersistentVolumeEdge{ - Node: pvs.Edges[i].Node, - Cursor: pvs.Edges[i].Cursor, - } - } - - m := model.PersistentVolumePaginatedRecords{ - Edges: ve, - PageInfo: &model.PageInfo{ - EndCursor: &pvs.PageInfo.EndCursor, - HasNextPage: pvs.PageInfo.HasNextPage, - HasPreviousPage: pvs.PageInfo.HasPrevPage, - StartCursor: &pvs.PageInfo.StartCursor, - }, - TotalCount: int(pvs.TotalCount), - } - - return &m, nil + return fn.JsonConvertP[model.PersistentVolumePaginatedRecords](pvs) } // InfraGetPv is the resolver for the infra_getPV field. @@ -988,26 +837,7 @@ func (r *queryResolver) InfraListVolumeAttachments(ctx context.Context, clusterN return nil, errors.NewE(err) } - ve := make([]*model.VolumeAttachmentEdge, len(volatt.Edges)) - for i := range volatt.Edges { - ve[i] = &model.VolumeAttachmentEdge{ - Node: volatt.Edges[i].Node, - Cursor: volatt.Edges[i].Cursor, - } - } - - m := model.VolumeAttachmentPaginatedRecords{ - Edges: ve, - PageInfo: &model.PageInfo{ - EndCursor: &volatt.PageInfo.EndCursor, - HasNextPage: volatt.PageInfo.HasNextPage, - HasPreviousPage: volatt.PageInfo.HasPrevPage, - StartCursor: &volatt.PageInfo.StartCursor, - }, - TotalCount: int(volatt.TotalCount), - } - - return &m, nil + return fn.JsonConvertP[model.VolumeAttachmentPaginatedRecords](volatt) } // InfraGetVolumeAttachment is the resolver for the infra_getVolumeAttachment field. @@ -1025,5 +855,7 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type mutationResolver struct{ *Resolver } -type queryResolver struct{ *Resolver } +type ( + mutationResolver struct{ *Resolver } + queryResolver struct{ *Resolver } +) diff --git a/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls index dbca49c8d..75bc292fb 100644 --- a/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -110,6 +110,7 @@ type Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfi iamInstanceProfileRole: String nvidiaGpuEnabled: Boolean! poolType: Github__com___kloudlite___operator___apis___clusters___v1__AWSPoolType! + region: String! rootVolumeSize: Int! rootVolumeType: String! spotPool: Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig @@ -758,7 +759,7 @@ type Metadata @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } diff --git a/apps/infra/internal/domain/byok-clusters.go b/apps/infra/internal/domain/byok-clusters.go index e0f65ba72..81ba6f1e0 100644 --- a/apps/infra/internal/domain/byok-clusters.go +++ b/apps/infra/internal/domain/byok-clusters.go @@ -191,6 +191,7 @@ func (d *domain) GetBYOKClusterSetupInstructions(ctx InfraContext, name string, "clusterName": name, "clusterToken": cluster.ClusterToken, "messageOfficeGRPCAddr": d.env.MessageOfficeExternalGrpcAddr, + "kloudliteDNSSuffix": d.env.KloudliteDNSSuffix, }, }) if err != nil { @@ -209,7 +210,7 @@ func (d *domain) GetBYOKClusterSetupInstructions(ctx InfraContext, name string, {Title: "Add Helm Repo", Command: "helm repo add kloudlite https://kloudlite.github.io/helm-charts"}, {Title: "Update Kloudlite Repo", Command: "helm repo update kloudlite"}, {Title: "Install kloudlite CRDs", Command: fmt.Sprintf("kubectl apply -f https://github.com/kloudlite/helm-charts/releases/download/%s/crds-all.yml --server-side", d.env.KloudliteRelease)}, - {Title: "Install Kloudlite Agent", Command: fmt.Sprintf(`helm upgrade --install kloudlite --namespace kloudlite --create-namespace kloudlite/kloudlite-agent --version %s --set accountName="%s" --set clusterName="%s" --set clusterToken="%s" --set messageOfficeGRPCAddr="%s"`, d.env.KloudliteRelease, ctx.AccountName, name, cluster.ClusterToken, d.env.MessageOfficeExternalGrpcAddr)}, + {Title: "Install Kloudlite Agent", Command: fmt.Sprintf(`helm upgrade --install kloudlite --namespace kloudlite --create-namespace kloudlite/kloudlite-agent --version %s --set accountName="%s" --set clusterName="%s" --set clusterToken="%s" --set messageOfficeGRPCAddr="%s" --set kloudliteDNSSuffix="%s"`, d.env.KloudliteRelease, ctx.AccountName, name, cluster.ClusterToken, d.env.MessageOfficeExternalGrpcAddr, d.env.KloudliteDNSSuffix)}, }, nil } diff --git a/apps/infra/internal/entities/field-constants/generated_constants.go b/apps/infra/internal/entities/field-constants/generated_constants.go index aff67347e..ef1ba1463 100644 --- a/apps/infra/internal/entities/field-constants/generated_constants.go +++ b/apps/infra/internal/entities/field-constants/generated_constants.go @@ -334,6 +334,7 @@ const ( NodePoolSpecAwsIamInstanceProfileRole = "spec.aws.iamInstanceProfileRole" NodePoolSpecAwsNvidiaGpuEnabled = "spec.aws.nvidiaGpuEnabled" NodePoolSpecAwsPoolType = "spec.aws.poolType" + NodePoolSpecAwsRegion = "spec.aws.region" NodePoolSpecAwsRootVolumeSize = "spec.aws.rootVolumeSize" NodePoolSpecAwsRootVolumeType = "spec.aws.rootVolumeType" NodePoolSpecAwsSpotPool = "spec.aws.spotPool" diff --git a/apps/infra/internal/env/env.go b/apps/infra/internal/env/env.go index c4cd01060..28d8464c2 100644 --- a/apps/infra/internal/env/env.go +++ b/apps/infra/internal/env/env.go @@ -17,6 +17,8 @@ type Env struct { GrpcPort uint16 `env:"GRPC_PORT" required:"true"` CookieDomain string `env:"COOKIE_DOMAIN" required:"true"` + KloudliteDNSSuffix string `env:"KLOUDLITE_DNS_SUFFIX" required:"true"` + NatsURL string `env:"NATS_URL" required:"true"` NatsStream string `env:"NATS_STREAM" required:"true"` diff --git a/apps/iot-console/internal/app/graph/common-types.resolvers.go b/apps/iot-console/internal/app/graph/common-types.resolvers.go index 7e82f122e..0c37281b2 100644 --- a/apps/iot-console/internal/app/graph/common-types.resolvers.go +++ b/apps/iot-console/internal/app/graph/common-types.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/iot-console/internal/app/graph/generated/generated.go b/apps/iot-console/internal/app/graph/generated/generated.go index de252b056..483ea7574 100644 --- a/apps/iot-console/internal/app/graph/generated/generated.go +++ b/apps/iot-console/internal/app/graph/generated/generated.go @@ -513,10 +513,10 @@ type ComplexityRoot struct { } PageInfo struct { - EndCursor func(childComplexity int) int - HasNextPage func(childComplexity int) int - HasPreviousPage func(childComplexity int) int - StartCursor func(childComplexity int) int + EndCursor func(childComplexity int) int + HasNextPage func(childComplexity int) int + HasPrevPage func(childComplexity int) int + StartCursor func(childComplexity int) int } Query struct { @@ -2719,12 +2719,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PageInfo.HasNextPage(childComplexity), true - case "PageInfo.hasPreviousPage": - if e.complexity.PageInfo.HasPreviousPage == nil { + case "PageInfo.hasPrevPage": + if e.complexity.PageInfo.HasPrevPage == nil { break } - return e.complexity.PageInfo.HasPreviousPage(childComplexity), true + return e.complexity.PageInfo.HasPrevPage(childComplexity), true case "PageInfo.startCursor": if e.complexity.PageInfo.StartCursor == nil { @@ -3333,7 +3333,7 @@ type Metadata @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } @@ -3868,7 +3868,13 @@ scalar Date | UNION directive @interfaceObject on OBJECT directive @link(import: [String!], url: String!) repeatable on SCHEMA - directive @override(from: String!) on FIELD_DEFINITION + directive @override(from: String!, label: String) on FIELD_DEFINITION + directive @policy(policies: [[federation__Policy!]!]!) on + | FIELD_DEFINITION + | OBJECT + | INTERFACE + | SCALAR + | ENUM directive @provides(fields: FieldSet!) on FIELD_DEFINITION directive @requires(fields: FieldSet!) on FIELD_DEFINITION directive @requiresScopes(scopes: [[federation__Scope!]!]!) on @@ -3891,6 +3897,7 @@ scalar Date | UNION scalar _Any scalar FieldSet + scalar federation__Policy scalar federation__Scope `, BuiltIn: true}, {Name: "../../federation/entity.graphql", Input: ` @@ -11273,8 +11280,8 @@ func (ec *executionContext) fieldContext_IOTAppPaginatedRecords_pageInfo(ctx con return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -12128,8 +12135,8 @@ func (ec *executionContext) fieldContext_IOTDeploymentPaginatedRecords_pageInfo( return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -13738,8 +13745,8 @@ func (ec *executionContext) fieldContext_IOTDeviceBlueprintPaginatedRecords_page return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -14010,8 +14017,8 @@ func (ec *executionContext) fieldContext_IOTDevicePaginatedRecords_pageInfo(ctx return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -14767,8 +14774,8 @@ func (ec *executionContext) fieldContext_IOTEnvironmentPaginatedRecords_pageInfo return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -15478,8 +15485,8 @@ func (ec *executionContext) fieldContext_IOTProjectPaginatedRecords_pageInfo(ctx return ec.fieldContext_PageInfo_endCursor(ctx, field) case "hasNextPage": return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "hasPrevPage": + return ec.fieldContext_PageInfo_hasPrevPage(ctx, field) case "startCursor": return ec.fieldContext_PageInfo_startCursor(ctx, field) } @@ -18371,8 +18378,8 @@ func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Contex return fc, nil } -func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) +func (ec *executionContext) _PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasPrevPage(ctx, field) if err != nil { return graphql.Null } @@ -18385,7 +18392,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HasPreviousPage, nil + return obj.HasPrevPage, nil }) if err != nil { ec.Error(ctx, err) @@ -18399,7 +18406,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -21436,8 +21443,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } switch k { case "after": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -21445,8 +21450,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } it.After = data case "before": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -21454,8 +21457,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } it.Before = data case "first": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) data, err := ec.unmarshalOInt2ᚖint64(ctx, v) if err != nil { @@ -21463,8 +21464,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } it.First = data case "last": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) data, err := ec.unmarshalOInt2ᚖint64(ctx, v) if err != nil { @@ -21472,8 +21471,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } it.Last = data case "orderBy": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("orderBy")) data, err := ec.unmarshalOString2string(ctx, v) if err != nil { @@ -21481,8 +21478,6 @@ func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context } it.OrderBy = data case "sortDirection": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortDirection")) data, err := ec.unmarshalOCursorPaginationSortDirection2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐSortDirection(ctx, v) if err != nil { @@ -21510,8 +21505,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } switch k { case "ip": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ip")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -21519,8 +21512,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ } it.IP = data case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -21548,8 +21539,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "args": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("args")) data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { @@ -21557,8 +21546,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Args = data case "command": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("command")) data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { @@ -21566,8 +21553,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Command = data case "env": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("env")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnvInᚄ(ctx, v) if err != nil { @@ -21575,8 +21560,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Env = data case "envFrom": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envFrom")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromInᚄ(ctx, v) if err != nil { @@ -21584,8 +21567,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.EnvFrom = data case "image": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("image")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -21593,8 +21574,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Image = data case "imagePullPolicy": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("imagePullPolicy")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -21602,8 +21581,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.ImagePullPolicy = data case "livenessProbe": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("livenessProbe")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ProbeIn(ctx, v) if err != nil { @@ -21611,8 +21588,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.LivenessProbe = data case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -21620,8 +21595,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Name = data case "readinessProbe": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("readinessProbe")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ProbeIn(ctx, v) if err != nil { @@ -21629,8 +21602,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.ReadinessProbe = data case "resourceCpu": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resourceCpu")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerResourceIn(ctx, v) if err != nil { @@ -21638,8 +21609,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.ResourceCPU = data case "resourceMemory": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resourceMemory")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerResourceIn(ctx, v) if err != nil { @@ -21647,8 +21616,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.ResourceMemory = data case "volumes": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("volumes")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeInᚄ(ctx, v) if err != nil { @@ -21676,8 +21643,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "appPort": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("appPort")) data, err := ec.unmarshalNInt2int(ctx, v) if err != nil { @@ -21685,8 +21650,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.AppPort = data case "devicePort": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("devicePort")) data, err := ec.unmarshalNInt2int(ctx, v) if err != nil { @@ -21714,8 +21677,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "backendProtocol": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("backendProtocol")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -21723,8 +21684,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.BackendProtocol = data case "basicAuth": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("basicAuth")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__BasicAuthIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1BasicAuthIn(ctx, v) if err != nil { @@ -21732,8 +21691,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.BasicAuth = data case "cors": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cors")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__CorsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1CorsIn(ctx, v) if err != nil { @@ -21741,8 +21698,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Cors = data case "domains": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("domains")) data, err := ec.unmarshalNString2ᚕstringᚄ(ctx, v) if err != nil { @@ -21750,8 +21705,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Domains = data case "https": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("https")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPSIn(ctx, v) if err != nil { @@ -21759,8 +21712,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.HTTPS = data case "ingressClass": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ingressClass")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -21768,8 +21719,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.IngressClass = data case "maxBodySizeInMB": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("maxBodySizeInMB")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -21777,8 +21726,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.MaxBodySizeInMb = data case "rateLimit": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rateLimit")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__RateLimitIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RateLimitIn(ctx, v) if err != nil { @@ -21786,8 +21733,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.RateLimit = data case "routes": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("routes")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__RouteIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RouteInᚄ(ctx, v) if err != nil { @@ -21815,8 +21760,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "containers": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("containers")) data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerInᚄ(ctx, v) if err != nil { @@ -21824,8 +21767,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Containers = data case "displayName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -21833,8 +21774,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.DisplayName = data case "freeze": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("freeze")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { @@ -21842,8 +21781,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Freeze = data case "hpa": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hpa")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HPAIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HPAIn(ctx, v) if err != nil { @@ -21851,8 +21788,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Hpa = data case "intercept": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("intercept")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__InterceptIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1InterceptIn(ctx, v) if err != nil { @@ -21860,8 +21795,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Intercept = data case "nodeSelector": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nodeSelector")) data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { @@ -21869,8 +21802,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.NodeSelector = data case "region": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("region")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -21878,8 +21809,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Region = data case "replicas": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("replicas")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -21887,8 +21816,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Replicas = data case "router": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("router")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppRouterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppRouterIn(ctx, v) if err != nil { @@ -21896,8 +21823,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Router = data case "serviceAccount": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceAccount")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -21905,8 +21830,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.ServiceAccount = data case "services": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("services")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvcInᚄ(ctx, v) if err != nil { @@ -21914,8 +21837,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Services = data case "tolerations": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tolerations")) data, err := ec.unmarshalOK8s__io___api___core___v1__TolerationIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationInᚄ(ctx, v) if err != nil { @@ -21923,8 +21844,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Tolerations = data case "topologySpreadConstraints": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("topologySpreadConstraints")) data, err := ec.unmarshalOK8s__io___api___core___v1__TopologySpreadConstraintIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraintInᚄ(ctx, v) if err != nil { @@ -21952,8 +21871,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "port": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("port")) data, err := ec.unmarshalNInt2int(ctx, v) if err != nil { @@ -21961,8 +21878,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Port = data case "protocol": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("protocol")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -21990,8 +21905,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "enabled": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) data, err := ec.unmarshalNBoolean2bool(ctx, v) if err != nil { @@ -21999,8 +21912,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Enabled = data case "secretName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("secretName")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -22008,8 +21919,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.SecretName = data case "username": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -22037,8 +21946,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "key": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22046,8 +21953,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Key = data case "optional": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("optional")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { @@ -22055,8 +21960,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Optional = data case "refKey": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("refKey")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -22064,8 +21967,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.RefKey = data case "refName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("refName")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -22073,8 +21974,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.RefName = data case "type": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, v) if err != nil { @@ -22082,8 +21981,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Type = data case "value": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -22111,8 +22008,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "max": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("max")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -22120,8 +22015,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Max = data case "min": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("min")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -22149,8 +22042,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "items": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("items")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemInᚄ(ctx, v) if err != nil { @@ -22158,8 +22049,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Items = data case "mountPath": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("mountPath")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22167,8 +22056,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.MountPath = data case "refName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("refName")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22176,8 +22063,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.RefName = data case "type": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, v) if err != nil { @@ -22205,8 +22090,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "fileName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileName")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -22214,8 +22097,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.FileName = data case "key": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22243,8 +22124,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "allowCredentials": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("allowCredentials")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { @@ -22252,8 +22131,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.AllowCredentials = data case "enabled": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { @@ -22261,8 +22138,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Enabled = data case "origins": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("origins")) data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { @@ -22290,8 +22165,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "refName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("refName")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22299,8 +22172,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.RefName = data case "type": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, v) if err != nil { @@ -22328,8 +22199,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "enabled": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) data, err := ec.unmarshalNBoolean2bool(ctx, v) if err != nil { @@ -22337,8 +22206,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Enabled = data case "maxReplicas": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("maxReplicas")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -22346,8 +22213,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.MaxReplicas = data case "minReplicas": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("minReplicas")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -22355,8 +22220,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.MinReplicas = data case "thresholdCpu": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("thresholdCpu")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -22364,8 +22227,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.ThresholdCPU = data case "thresholdMemory": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("thresholdMemory")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -22393,8 +22254,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "httpHeaders": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("httpHeaders")) data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { @@ -22402,8 +22261,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.HTTPHeaders = data case "path": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("path")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22411,8 +22268,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Path = data case "port": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("port")) data, err := ec.unmarshalNInt2int(ctx, v) if err != nil { @@ -22440,8 +22295,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "clusterIssuer": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterIssuer")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -22449,8 +22302,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.ClusterIssuer = data case "enabled": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) data, err := ec.unmarshalNBoolean2bool(ctx, v) if err != nil { @@ -22458,8 +22309,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Enabled = data case "forceRedirect": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("forceRedirect")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { @@ -22487,8 +22336,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "enabled": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) data, err := ec.unmarshalNBoolean2bool(ctx, v) if err != nil { @@ -22496,8 +22343,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Enabled = data case "portMappings": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("portMappings")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppInterceptPortMappingsInᚄ(ctx, v) if err != nil { @@ -22505,8 +22350,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.PortMappings = data case "toDevice": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("toDevice")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22534,8 +22377,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "failureThreshold": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("failureThreshold")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -22543,8 +22384,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.FailureThreshold = data case "httpGet": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("httpGet")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn(ctx, v) if err != nil { @@ -22552,8 +22391,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.HTTPGet = data case "initialDelay": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("initialDelay")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -22561,8 +22398,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.InitialDelay = data case "interval": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("interval")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -22570,8 +22405,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Interval = data case "shell": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("shell")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ShellProbeIn(ctx, v) if err != nil { @@ -22579,8 +22412,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Shell = data case "tcp": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tcp")) data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1TCPProbeIn(ctx, v) if err != nil { @@ -22588,8 +22419,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.TCP = data case "type": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22617,8 +22446,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "connections": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("connections")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -22626,8 +22453,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Connections = data case "enabled": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { @@ -22635,8 +22460,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Enabled = data case "rpm": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rpm")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -22644,8 +22467,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Rpm = data case "rps": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rps")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -22673,8 +22494,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "app": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("app")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22682,8 +22501,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.App = data case "path": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("path")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22691,8 +22508,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Path = data case "port": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("port")) data, err := ec.unmarshalNInt2int(ctx, v) if err != nil { @@ -22700,8 +22515,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } it.Port = data case "rewrite": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rewrite")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { @@ -22729,8 +22542,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "command": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("command")) data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { @@ -22758,8 +22569,6 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a } switch k { case "port": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("port")) data, err := ec.unmarshalNInt2int(ctx, v) if err != nil { @@ -22787,8 +22596,6 @@ func (ec *executionContext) unmarshalInputIOTAppIn(ctx context.Context, obj inte } switch k { case "apiVersion": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiVersion")) data, err := ec.unmarshalOString2string(ctx, v) if err != nil { @@ -22796,8 +22603,6 @@ func (ec *executionContext) unmarshalInputIOTAppIn(ctx context.Context, obj inte } it.APIVersion = data case "displayName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22805,8 +22610,6 @@ func (ec *executionContext) unmarshalInputIOTAppIn(ctx context.Context, obj inte } it.DisplayName = data case "enabled": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { @@ -22814,8 +22617,6 @@ func (ec *executionContext) unmarshalInputIOTAppIn(ctx context.Context, obj inte } it.Enabled = data case "kind": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) data, err := ec.unmarshalOString2string(ctx, v) if err != nil { @@ -22823,8 +22624,6 @@ func (ec *executionContext) unmarshalInputIOTAppIn(ctx context.Context, obj inte } it.Kind = data case "metadata": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("metadata")) data, err := ec.unmarshalOMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, v) if err != nil { @@ -22834,8 +22633,6 @@ func (ec *executionContext) unmarshalInputIOTAppIn(ctx context.Context, obj inte return it, err } case "spec": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spec")) data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpecIn(ctx, v) if err != nil { @@ -22865,8 +22662,6 @@ func (ec *executionContext) unmarshalInputIOTDeploymentIn(ctx context.Context, o } switch k { case "CIDR": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("CIDR")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22874,8 +22669,6 @@ func (ec *executionContext) unmarshalInputIOTDeploymentIn(ctx context.Context, o } it.CIDR = data case "displayName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22883,8 +22676,6 @@ func (ec *executionContext) unmarshalInputIOTDeploymentIn(ctx context.Context, o } it.DisplayName = data case "exposedServices": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("exposedServices")) data, err := ec.unmarshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceInᚄ(ctx, v) if err != nil { @@ -22894,8 +22685,6 @@ func (ec *executionContext) unmarshalInputIOTDeploymentIn(ctx context.Context, o return it, err } case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22923,8 +22712,6 @@ func (ec *executionContext) unmarshalInputIOTDeviceBlueprintIn(ctx context.Conte } switch k { case "bluePrintType": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bluePrintType")) data, err := ec.unmarshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType(ctx, v) if err != nil { @@ -22934,8 +22721,6 @@ func (ec *executionContext) unmarshalInputIOTDeviceBlueprintIn(ctx context.Conte return it, err } case "displayName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22943,8 +22728,6 @@ func (ec *executionContext) unmarshalInputIOTDeviceBlueprintIn(ctx context.Conte } it.DisplayName = data case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22952,8 +22735,6 @@ func (ec *executionContext) unmarshalInputIOTDeviceBlueprintIn(ctx context.Conte } it.Name = data case "version": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("version")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22981,8 +22762,6 @@ func (ec *executionContext) unmarshalInputIOTDeviceIn(ctx context.Context, obj i } switch k { case "displayName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22990,8 +22769,6 @@ func (ec *executionContext) unmarshalInputIOTDeviceIn(ctx context.Context, obj i } it.DisplayName = data case "ip": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ip")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -22999,8 +22776,6 @@ func (ec *executionContext) unmarshalInputIOTDeviceIn(ctx context.Context, obj i } it.IP = data case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23008,8 +22783,6 @@ func (ec *executionContext) unmarshalInputIOTDeviceIn(ctx context.Context, obj i } it.Name = data case "podCIDR": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("podCIDR")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23017,8 +22790,6 @@ func (ec *executionContext) unmarshalInputIOTDeviceIn(ctx context.Context, obj i } it.PodCIDR = data case "publicKey": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("publicKey")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23026,8 +22797,6 @@ func (ec *executionContext) unmarshalInputIOTDeviceIn(ctx context.Context, obj i } it.PublicKey = data case "serviceCIDR": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceCIDR")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23035,8 +22804,6 @@ func (ec *executionContext) unmarshalInputIOTDeviceIn(ctx context.Context, obj i } it.ServiceCIDR = data case "version": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("version")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23064,8 +22831,6 @@ func (ec *executionContext) unmarshalInputIOTEnvironmentIn(ctx context.Context, } switch k { case "displayName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23073,8 +22838,6 @@ func (ec *executionContext) unmarshalInputIOTEnvironmentIn(ctx context.Context, } it.DisplayName = data case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23102,8 +22865,6 @@ func (ec *executionContext) unmarshalInputIOTProjectIn(ctx context.Context, obj } switch k { case "displayName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23111,8 +22872,6 @@ func (ec *executionContext) unmarshalInputIOTProjectIn(ctx context.Context, obj } it.DisplayName = data case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23140,8 +22899,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TolerationI } switch k { case "effect": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("effect")) data, err := ec.unmarshalOK8s__io___api___core___v1__TaintEffect2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TaintEffect(ctx, v) if err != nil { @@ -23149,8 +22906,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TolerationI } it.Effect = data case "key": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -23158,8 +22913,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TolerationI } it.Key = data case "operator": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("operator")) data, err := ec.unmarshalOK8s__io___api___core___v1__TolerationOperator2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationOperator(ctx, v) if err != nil { @@ -23167,8 +22920,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TolerationI } it.Operator = data case "tolerationSeconds": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tolerationSeconds")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -23176,8 +22927,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TolerationI } it.TolerationSeconds = data case "value": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -23205,8 +22954,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TopologySpr } switch k { case "labelSelector": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) data, err := ec.unmarshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorIn(ctx, v) if err != nil { @@ -23214,8 +22961,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TopologySpr } it.LabelSelector = data case "matchLabelKeys": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("matchLabelKeys")) data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { @@ -23223,8 +22968,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TopologySpr } it.MatchLabelKeys = data case "maxSkew": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("maxSkew")) data, err := ec.unmarshalNInt2int(ctx, v) if err != nil { @@ -23232,8 +22975,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TopologySpr } it.MaxSkew = data case "minDomains": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("minDomains")) data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { @@ -23241,8 +22982,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TopologySpr } it.MinDomains = data case "nodeAffinityPolicy": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nodeAffinityPolicy")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -23250,8 +22989,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TopologySpr } it.NodeAffinityPolicy = data case "nodeTaintsPolicy": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nodeTaintsPolicy")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -23259,8 +22996,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TopologySpr } it.NodeTaintsPolicy = data case "topologyKey": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("topologyKey")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23268,8 +23003,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TopologySpr } it.TopologyKey = data case "whenUnsatisfiable": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("whenUnsatisfiable")) data, err := ec.unmarshalNK8s__io___api___core___v1__UnsatisfiableConstraintAction2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1UnsatisfiableConstraintAction(ctx, v) if err != nil { @@ -23297,8 +23030,6 @@ func (ec *executionContext) unmarshalInputK8s__io___apimachinery___pkg___apis___ } switch k { case "matchExpressions": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("matchExpressions")) data, err := ec.unmarshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementInᚄ(ctx, v) if err != nil { @@ -23306,8 +23037,6 @@ func (ec *executionContext) unmarshalInputK8s__io___apimachinery___pkg___apis___ } it.MatchExpressions = data case "matchLabels": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("matchLabels")) data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { @@ -23335,8 +23064,6 @@ func (ec *executionContext) unmarshalInputK8s__io___apimachinery___pkg___apis___ } switch k { case "key": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23344,8 +23071,6 @@ func (ec *executionContext) unmarshalInputK8s__io___apimachinery___pkg___apis___ } it.Key = data case "operator": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("operator")) data, err := ec.unmarshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(ctx, v) if err != nil { @@ -23353,8 +23078,6 @@ func (ec *executionContext) unmarshalInputK8s__io___apimachinery___pkg___apis___ } it.Operator = data case "values": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("values")) data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { @@ -23382,8 +23105,6 @@ func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj } switch k { case "array": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("array")) data, err := ec.unmarshalOAny2ᚕinterfaceᚄ(ctx, v) if err != nil { @@ -23391,8 +23112,6 @@ func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj } it.Array = data case "exact": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("exact")) data, err := ec.unmarshalOAny2interface(ctx, v) if err != nil { @@ -23400,8 +23119,6 @@ func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj } it.Exact = data case "matchType": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("matchType")) data, err := ec.unmarshalNGithub__com___kloudlite___api___pkg___repos__MatchType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIPkgReposMatchType(ctx, v) if err != nil { @@ -23411,8 +23128,6 @@ func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj return it, err } case "notInArray": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notInArray")) data, err := ec.unmarshalOAny2ᚕinterfaceᚄ(ctx, v) if err != nil { @@ -23420,8 +23135,6 @@ func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj } it.NotInArray = data case "regex": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("regex")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -23449,8 +23162,6 @@ func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj in } switch k { case "annotations": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { @@ -23460,8 +23171,6 @@ func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj in return it, err } case "labels": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { @@ -23471,8 +23180,6 @@ func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj in return it, err } case "name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -23480,8 +23187,6 @@ func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj in } it.Name = data case "namespace": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) data, err := ec.unmarshalOString2string(ctx, v) if err != nil { @@ -23509,8 +23214,6 @@ func (ec *executionContext) unmarshalInputSearchIOTApps(ctx context.Context, obj } switch k { case "text": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23518,8 +23221,6 @@ func (ec *executionContext) unmarshalInputSearchIOTApps(ctx context.Context, obj } it.Text = data case "isReady": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23527,8 +23228,6 @@ func (ec *executionContext) unmarshalInputSearchIOTApps(ctx context.Context, obj } it.IsReady = data case "markedForDeletion": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("markedForDeletion")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23556,8 +23255,6 @@ func (ec *executionContext) unmarshalInputSearchIOTDeployments(ctx context.Conte } switch k { case "text": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23565,8 +23262,6 @@ func (ec *executionContext) unmarshalInputSearchIOTDeployments(ctx context.Conte } it.Text = data case "isReady": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23574,8 +23269,6 @@ func (ec *executionContext) unmarshalInputSearchIOTDeployments(ctx context.Conte } it.IsReady = data case "markedForDeletion": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("markedForDeletion")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23603,8 +23296,6 @@ func (ec *executionContext) unmarshalInputSearchIOTDeviceBlueprints(ctx context. } switch k { case "text": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23612,8 +23303,6 @@ func (ec *executionContext) unmarshalInputSearchIOTDeviceBlueprints(ctx context. } it.Text = data case "isReady": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23621,8 +23310,6 @@ func (ec *executionContext) unmarshalInputSearchIOTDeviceBlueprints(ctx context. } it.IsReady = data case "markedForDeletion": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("markedForDeletion")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23650,8 +23337,6 @@ func (ec *executionContext) unmarshalInputSearchIOTDevices(ctx context.Context, } switch k { case "text": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23659,8 +23344,6 @@ func (ec *executionContext) unmarshalInputSearchIOTDevices(ctx context.Context, } it.Text = data case "isReady": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23668,8 +23351,6 @@ func (ec *executionContext) unmarshalInputSearchIOTDevices(ctx context.Context, } it.IsReady = data case "markedForDeletion": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("markedForDeletion")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23697,8 +23378,6 @@ func (ec *executionContext) unmarshalInputSearchIOTProjects(ctx context.Context, } switch k { case "text": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23706,8 +23385,6 @@ func (ec *executionContext) unmarshalInputSearchIOTProjects(ctx context.Context, } it.Text = data case "isReady": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -23715,8 +23392,6 @@ func (ec *executionContext) unmarshalInputSearchIOTProjects(ctx context.Context, } it.IsReady = data case "markedForDeletion": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("markedForDeletion")) data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) if err != nil { @@ -27271,8 +26946,8 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj) case "hasNextPage": out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) - case "hasPreviousPage": - out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj) + case "hasPrevPage": + out.Values[i] = ec._PageInfo_hasPrevPage(ctx, field, obj) case "startCursor": out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj) default: @@ -29167,6 +28842,85 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a return res } +func (ec *executionContext) unmarshalNfederation__Policy2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNfederation__Policy2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(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) unmarshalNfederation__Policy2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNfederation__Policy2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalNfederation__Policy2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNfederation__Policy2string(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalNfederation__Policy2ᚕᚕstringᚄ(ctx context.Context, v interface{}) ([][]string, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([][]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNfederation__Policy2ᚕstringᚄ(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalNfederation__Policy2ᚕᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v [][]string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNfederation__Policy2ᚕstringᚄ(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + func (ec *executionContext) unmarshalNfederation__Scope2string(ctx context.Context, v interface{}) (string, error) { res, err := graphql.UnmarshalString(v) return res, graphql.ErrorOnPath(ctx, err) diff --git a/apps/iot-console/internal/app/graph/iotapp.resolvers.go b/apps/iot-console/internal/app/graph/iotapp.resolvers.go index 122604e4a..74b29f57d 100644 --- a/apps/iot-console/internal/app/graph/iotapp.resolvers.go +++ b/apps/iot-console/internal/app/graph/iotapp.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/iot-console/internal/app/graph/iotdeployment.resolvers.go b/apps/iot-console/internal/app/graph/iotdeployment.resolvers.go index 08f94e81b..96f3da560 100644 --- a/apps/iot-console/internal/app/graph/iotdeployment.resolvers.go +++ b/apps/iot-console/internal/app/graph/iotdeployment.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/iot-console/internal/app/graph/iotdevice.resolvers.go b/apps/iot-console/internal/app/graph/iotdevice.resolvers.go index 378af7bda..c7777c525 100644 --- a/apps/iot-console/internal/app/graph/iotdevice.resolvers.go +++ b/apps/iot-console/internal/app/graph/iotdevice.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/iot-console/internal/app/graph/iotdeviceblueprint.resolvers.go b/apps/iot-console/internal/app/graph/iotdeviceblueprint.resolvers.go index fe8524553..c1f032ca3 100644 --- a/apps/iot-console/internal/app/graph/iotdeviceblueprint.resolvers.go +++ b/apps/iot-console/internal/app/graph/iotdeviceblueprint.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/iot-console/internal/app/graph/iotproject.resolvers.go b/apps/iot-console/internal/app/graph/iotproject.resolvers.go index 9f630f506..4d7bd0daf 100644 --- a/apps/iot-console/internal/app/graph/iotproject.resolvers.go +++ b/apps/iot-console/internal/app/graph/iotproject.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/iot-console/internal/app/graph/matchfilter.resolvers.go b/apps/iot-console/internal/app/graph/matchfilter.resolvers.go index 8b4fea54a..49d19d9e3 100644 --- a/apps/iot-console/internal/app/graph/matchfilter.resolvers.go +++ b/apps/iot-console/internal/app/graph/matchfilter.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/iot-console/internal/app/graph/model/models_gen.go b/apps/iot-console/internal/app/graph/model/models_gen.go index 8ec823638..87d1fb43f 100644 --- a/apps/iot-console/internal/app/graph/model/models_gen.go +++ b/apps/iot-console/internal/app/graph/model/models_gen.go @@ -515,11 +515,17 @@ type K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn struct { Values []string `json:"values,omitempty"` } +type Mutation struct { +} + type PageInfo struct { - EndCursor *string `json:"endCursor,omitempty"` - HasNextPage *bool `json:"hasNextPage,omitempty"` - HasPreviousPage *bool `json:"hasPreviousPage,omitempty"` - StartCursor *string `json:"startCursor,omitempty"` + EndCursor *string `json:"endCursor,omitempty"` + HasNextPage *bool `json:"hasNextPage,omitempty"` + HasPrevPage *bool `json:"hasPrevPage,omitempty"` + StartCursor *string `json:"startCursor,omitempty"` +} + +type Query struct { } type SearchIOTApps struct { diff --git a/apps/iot-console/internal/app/graph/schema.resolvers.go b/apps/iot-console/internal/app/graph/schema.resolvers.go index ab5b83b10..ffbd8bbe9 100644 --- a/apps/iot-console/internal/app/graph/schema.resolvers.go +++ b/apps/iot-console/internal/app/graph/schema.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/common-types.graphqls index 35466e3b6..08724a18b 100644 --- a/apps/iot-console/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -246,7 +246,7 @@ type Metadata @shareable { type PageInfo @shareable { endCursor: String hasNextPage: Boolean - hasPreviousPage: Boolean + hasPrevPage: Boolean startCursor: String } diff --git a/cmd/struct-to-graphql/pkg/parser/parser.go b/cmd/struct-to-graphql/pkg/parser/parser.go index c187c7927..2695d4209 100644 --- a/cmd/struct-to-graphql/pkg/parser/parser.go +++ b/cmd/struct-to-graphql/pkg/parser/parser.go @@ -464,7 +464,7 @@ func (p *parser) WithPagination(types []string) { p.structs[commonLabel].Types["PageInfo"] = []string{ "hasNextPage: Boolean", - "hasPreviousPage: Boolean", + "hasPrevPage: Boolean", "startCursor: String", "endCursor: String", } diff --git a/cmd/struct-to-graphql/pkg/parser/parser_test.go b/cmd/struct-to-graphql/pkg/parser/parser_test.go index 6cd2b69ab..bee94808f 100644 --- a/cmd/struct-to-graphql/pkg/parser/parser_test.go +++ b/cmd/struct-to-graphql/pkg/parser/parser_test.go @@ -871,7 +871,8 @@ func Test_GeneratedGraphqlSchema(t *testing.T) { "status: Boolean!", }, "Github__com___kloudlite___operator___pkg___operator__CheckMeta": { - "debug: Boolean!", + "debug: Boolean", + "hide: Boolean", "description: String", "name: String!", "title: String!", @@ -981,7 +982,7 @@ func Test_GeneratedGraphqlSchema(t *testing.T) { Types: map[string][]string{ "PageInfo": { "hasNextPage: Boolean", - "hasPreviousPage: Boolean", + "hasPrevPage: Boolean", "startCursor: String", "endCursor: String", }, diff --git a/pkg/http-server/http-server.go b/pkg/http-server/http-server.go index a6b0399ad..c602f0e04 100644 --- a/pkg/http-server/http-server.go +++ b/pkg/http-server/http-server.go @@ -49,6 +49,10 @@ func (s *server) Listen(addr string) error { ctx, cancel := context.WithTimeout(context.TODO(), time.Second*1) defer cancel() + s.App.Get("/_healthy", func(c *fiber.Ctx) error { + return c.SendStatus(http.StatusOK) + }) + go func() { errChannel <- s.App.Listen(addr) }() @@ -127,4 +131,8 @@ func (s *server) SetupGraphqlServer(es graphql.ExecutableSchema, middlewares ... }) s.All("/query", adaptor.HTTPHandlerFunc(gqlServer.ServeHTTP)) + + s.All("/", func(c *fiber.Ctx) error { + return c.SendStatus(http.StatusNotFound) + }) } From fda120c987f04c692747041b2b81ef042be0b140 Mon Sep 17 00:00:00 2001 From: Karthik Date: Tue, 16 Jul 2024 02:01:15 +0530 Subject: [PATCH 07/89] Archive Cluster MangedService when cluster is deleted --- apps/console/internal/app/grpc-server.go | 11 +- apps/console/internal/domain/api.go | 1 + .../domain/cluster-managed-service.go | 8 +- grpc-interfaces/console.proto | 6 +- .../kloudlite.io/rpc/console/console.pb.go | 105 +++++++++--------- .../rpc/console/console_grpc.pb.go | 30 ++--- 6 files changed, 83 insertions(+), 78 deletions(-) diff --git a/apps/console/internal/app/grpc-server.go b/apps/console/internal/app/grpc-server.go index 3cd2fd63e..4e956cd76 100644 --- a/apps/console/internal/app/grpc-server.go +++ b/apps/console/internal/app/grpc-server.go @@ -15,7 +15,7 @@ type grpcServer struct { kcli k8s.Client } -func (g *grpcServer) ArchiveEnvironmentsForCluster(ctx context.Context, in *console.ArchiveEnvironmentsForClusterIn) (*console.ArchiveEnvironmentsForClusterOut, error) { +func (g *grpcServer) ArchiveResourcesForCluster(ctx context.Context, in *console.ArchiveResourcesForClusterIn) (*console.ArchiveResourcesForClusterOut, error) { consoleCtx := domain.ConsoleContext{ Context: ctx, UserId: repos.ID(in.UserId), @@ -26,10 +26,15 @@ func (g *grpcServer) ArchiveEnvironmentsForCluster(ctx context.Context, in *cons archiveStatus, err := g.d.ArchiveEnvironmentsForCluster(consoleCtx, in.ClusterName) if err != nil { - return &console.ArchiveEnvironmentsForClusterOut{Archived: false}, err + return &console.ArchiveResourcesForClusterOut{Archived: false}, err } - return &console.ArchiveEnvironmentsForClusterOut{Archived: archiveStatus}, nil + archiveStatus, err = g.d.ArchiveClusterManagedServicesForCluster(consoleCtx, in.ClusterName) + if err != nil { + return &console.ArchiveResourcesForClusterOut{Archived: false}, err + } + + return &console.ArchiveResourcesForClusterOut{Archived: archiveStatus}, nil } func newConsoleGrpcServer(d domain.Domain, kcli k8s.Client) console.ConsoleServer { diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index a941ec988..0aae80c52 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -161,6 +161,7 @@ type Domain interface { UpdateEnvironment(ctx ConsoleContext, env entities.Environment) (*entities.Environment, error) DeleteEnvironment(ctx ConsoleContext, name string) error ArchiveEnvironmentsForCluster(ctx ConsoleContext, clusterName string) (bool, error) + ArchiveClusterManagedServicesForCluster(ctx ConsoleContext, clusterName string) (bool, error) OnEnvironmentApplyError(ctx ConsoleContext, errMsg, namespace, name string, opts UpdateAndDeleteOpts) error OnEnvironmentDeleteMessage(ctx ConsoleContext, env entities.Environment) error diff --git a/apps/console/internal/domain/cluster-managed-service.go b/apps/console/internal/domain/cluster-managed-service.go index 613f1f5bf..40b3fed88 100644 --- a/apps/console/internal/domain/cluster-managed-service.go +++ b/apps/console/internal/domain/cluster-managed-service.go @@ -190,7 +190,7 @@ func (d *domain) CloneClusterManagedService(ctx ConsoleContext, args CloneManage return destMsvc, nil } -func (d *domain) ArchiveClusterManagedService(ctx ConsoleContext, clusterName string) error { +func (d *domain) ArchiveClusterManagedServicesForCluster(ctx ConsoleContext, clusterName string) (bool, error) { filter := repos.Filter{ fields.AccountName: ctx.AccountName, fields.ClusterName: clusterName, @@ -201,7 +201,7 @@ func (d *domain) ArchiveClusterManagedService(ctx ConsoleContext, clusterName st Sort: nil, }) if err != nil { - return errors.NewE(err) + return false, errors.NewE(err) } for i := range msvc { @@ -216,10 +216,10 @@ func (d *domain) ArchiveClusterManagedService(ctx ConsoleContext, clusterName st _, err := d.clusterManagedServiceRepo.Patch(ctx, patchFilter, patchForUpdate) if err != nil { - return errors.NewE(err) + return false, errors.NewE(err) } } - return nil + return true, nil } func (d *domain) UpdateClusterManagedService(ctx ConsoleContext, cmsvc entities.ClusterManagedService) (*entities.ClusterManagedService, error) { diff --git a/grpc-interfaces/console.proto b/grpc-interfaces/console.proto index 6538c09bd..5d5819b01 100644 --- a/grpc-interfaces/console.proto +++ b/grpc-interfaces/console.proto @@ -3,10 +3,10 @@ syntax = "proto3"; option go_package = "kloudlite.io/rpc/console"; service Console { - rpc ArchiveEnvironmentsForCluster(ArchiveEnvironmentsForClusterIn) returns (ArchiveEnvironmentsForClusterOut); + rpc ArchiveResourcesForCluster(ArchiveResourcesForClusterIn) returns (ArchiveResourcesForClusterOut); } -message ArchiveEnvironmentsForClusterIn { +message ArchiveResourcesForClusterIn { string userId = 1; string userName = 2; string userEmail = 3; @@ -15,6 +15,6 @@ message ArchiveEnvironmentsForClusterIn { string clusterName = 5; } -message ArchiveEnvironmentsForClusterOut { +message ArchiveResourcesForClusterOut { bool archived = 1; } diff --git a/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go b/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go index fab611dc4..06231994c 100644 --- a/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go @@ -20,7 +20,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type ArchiveEnvironmentsForClusterIn struct { +type ArchiveResourcesForClusterIn struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -32,8 +32,8 @@ type ArchiveEnvironmentsForClusterIn struct { ClusterName string `protobuf:"bytes,5,opt,name=clusterName,proto3" json:"clusterName,omitempty"` } -func (x *ArchiveEnvironmentsForClusterIn) Reset() { - *x = ArchiveEnvironmentsForClusterIn{} +func (x *ArchiveResourcesForClusterIn) Reset() { + *x = ArchiveResourcesForClusterIn{} if protoimpl.UnsafeEnabled { mi := &file_console_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -41,13 +41,13 @@ func (x *ArchiveEnvironmentsForClusterIn) Reset() { } } -func (x *ArchiveEnvironmentsForClusterIn) String() string { +func (x *ArchiveResourcesForClusterIn) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ArchiveEnvironmentsForClusterIn) ProtoMessage() {} +func (*ArchiveResourcesForClusterIn) ProtoMessage() {} -func (x *ArchiveEnvironmentsForClusterIn) ProtoReflect() protoreflect.Message { +func (x *ArchiveResourcesForClusterIn) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59,47 +59,47 @@ func (x *ArchiveEnvironmentsForClusterIn) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ArchiveEnvironmentsForClusterIn.ProtoReflect.Descriptor instead. -func (*ArchiveEnvironmentsForClusterIn) Descriptor() ([]byte, []int) { +// Deprecated: Use ArchiveResourcesForClusterIn.ProtoReflect.Descriptor instead. +func (*ArchiveResourcesForClusterIn) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{0} } -func (x *ArchiveEnvironmentsForClusterIn) GetUserId() string { +func (x *ArchiveResourcesForClusterIn) GetUserId() string { if x != nil { return x.UserId } return "" } -func (x *ArchiveEnvironmentsForClusterIn) GetUserName() string { +func (x *ArchiveResourcesForClusterIn) GetUserName() string { if x != nil { return x.UserName } return "" } -func (x *ArchiveEnvironmentsForClusterIn) GetUserEmail() string { +func (x *ArchiveResourcesForClusterIn) GetUserEmail() string { if x != nil { return x.UserEmail } return "" } -func (x *ArchiveEnvironmentsForClusterIn) GetAccountName() string { +func (x *ArchiveResourcesForClusterIn) GetAccountName() string { if x != nil { return x.AccountName } return "" } -func (x *ArchiveEnvironmentsForClusterIn) GetClusterName() string { +func (x *ArchiveResourcesForClusterIn) GetClusterName() string { if x != nil { return x.ClusterName } return "" } -type ArchiveEnvironmentsForClusterOut struct { +type ArchiveResourcesForClusterOut struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -107,8 +107,8 @@ type ArchiveEnvironmentsForClusterOut struct { Archived bool `protobuf:"varint,1,opt,name=archived,proto3" json:"archived,omitempty"` } -func (x *ArchiveEnvironmentsForClusterOut) Reset() { - *x = ArchiveEnvironmentsForClusterOut{} +func (x *ArchiveResourcesForClusterOut) Reset() { + *x = ArchiveResourcesForClusterOut{} if protoimpl.UnsafeEnabled { mi := &file_console_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -116,13 +116,13 @@ func (x *ArchiveEnvironmentsForClusterOut) Reset() { } } -func (x *ArchiveEnvironmentsForClusterOut) String() string { +func (x *ArchiveResourcesForClusterOut) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ArchiveEnvironmentsForClusterOut) ProtoMessage() {} +func (*ArchiveResourcesForClusterOut) ProtoMessage() {} -func (x *ArchiveEnvironmentsForClusterOut) ProtoReflect() protoreflect.Message { +func (x *ArchiveResourcesForClusterOut) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -134,12 +134,12 @@ func (x *ArchiveEnvironmentsForClusterOut) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ArchiveEnvironmentsForClusterOut.ProtoReflect.Descriptor instead. -func (*ArchiveEnvironmentsForClusterOut) Descriptor() ([]byte, []int) { +// Deprecated: Use ArchiveResourcesForClusterOut.ProtoReflect.Descriptor instead. +func (*ArchiveResourcesForClusterOut) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{1} } -func (x *ArchiveEnvironmentsForClusterOut) GetArchived() bool { +func (x *ArchiveResourcesForClusterOut) GetArchived() bool { if x != nil { return x.Archived } @@ -150,31 +150,30 @@ var File_console_proto protoreflect.FileDescriptor var file_console_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xb7, 0x01, 0x0a, 0x1f, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, - 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, - 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, - 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, - 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, - 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x20, 0x41, 0x72, 0x63, - 0x68, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x0a, - 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x32, 0x6f, 0x0a, 0x07, 0x43, 0x6f, 0x6e, - 0x73, 0x6f, 0x6c, 0x65, 0x12, 0x64, 0x0a, 0x1d, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, - 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, - 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x21, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, - 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x42, 0x1a, 0x5a, 0x18, 0x6b, 0x6c, - 0x6f, 0x75, 0x64, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x69, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, - 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0xb4, 0x01, 0x0a, 0x1c, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x1d, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, + 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, + 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, + 0x76, 0x65, 0x64, 0x32, 0x66, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x12, 0x5b, + 0x0a, 0x1a, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x41, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x46, + 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x1e, 0x2e, 0x41, 0x72, + 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x46, 0x6f, + 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x42, 0x1a, 0x5a, 0x18, 0x6b, + 0x6c, 0x6f, 0x75, 0x64, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x69, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, + 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -191,12 +190,12 @@ func file_console_proto_rawDescGZIP() []byte { var file_console_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_console_proto_goTypes = []interface{}{ - (*ArchiveEnvironmentsForClusterIn)(nil), // 0: ArchiveEnvironmentsForClusterIn - (*ArchiveEnvironmentsForClusterOut)(nil), // 1: ArchiveEnvironmentsForClusterOut + (*ArchiveResourcesForClusterIn)(nil), // 0: ArchiveResourcesForClusterIn + (*ArchiveResourcesForClusterOut)(nil), // 1: ArchiveResourcesForClusterOut } var file_console_proto_depIdxs = []int32{ - 0, // 0: Console.ArchiveEnvironmentsForCluster:input_type -> ArchiveEnvironmentsForClusterIn - 1, // 1: Console.ArchiveEnvironmentsForCluster:output_type -> ArchiveEnvironmentsForClusterOut + 0, // 0: Console.ArchiveResourcesForCluster:input_type -> ArchiveResourcesForClusterIn + 1, // 1: Console.ArchiveResourcesForCluster:output_type -> ArchiveResourcesForClusterOut 1, // [1:2] is the sub-list for method output_type 0, // [0:1] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -211,7 +210,7 @@ func file_console_proto_init() { } if !protoimpl.UnsafeEnabled { file_console_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArchiveEnvironmentsForClusterIn); i { + switch v := v.(*ArchiveResourcesForClusterIn); i { case 0: return &v.state case 1: @@ -223,7 +222,7 @@ func file_console_proto_init() { } } file_console_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArchiveEnvironmentsForClusterOut); i { + switch v := v.(*ArchiveResourcesForClusterOut); i { case 0: return &v.state case 1: 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 6cbe7e45d..ffec4547c 100644 --- a/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go @@ -19,14 +19,14 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Console_ArchiveEnvironmentsForCluster_FullMethodName = "/Console/ArchiveEnvironmentsForCluster" + Console_ArchiveResourcesForCluster_FullMethodName = "/Console/ArchiveResourcesForCluster" ) // ConsoleClient is the client API for Console service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ConsoleClient interface { - ArchiveEnvironmentsForCluster(ctx context.Context, in *ArchiveEnvironmentsForClusterIn, opts ...grpc.CallOption) (*ArchiveEnvironmentsForClusterOut, error) + ArchiveResourcesForCluster(ctx context.Context, in *ArchiveResourcesForClusterIn, opts ...grpc.CallOption) (*ArchiveResourcesForClusterOut, error) } type consoleClient struct { @@ -37,9 +37,9 @@ func NewConsoleClient(cc grpc.ClientConnInterface) ConsoleClient { return &consoleClient{cc} } -func (c *consoleClient) ArchiveEnvironmentsForCluster(ctx context.Context, in *ArchiveEnvironmentsForClusterIn, opts ...grpc.CallOption) (*ArchiveEnvironmentsForClusterOut, error) { - out := new(ArchiveEnvironmentsForClusterOut) - err := c.cc.Invoke(ctx, Console_ArchiveEnvironmentsForCluster_FullMethodName, in, out, opts...) +func (c *consoleClient) ArchiveResourcesForCluster(ctx context.Context, in *ArchiveResourcesForClusterIn, opts ...grpc.CallOption) (*ArchiveResourcesForClusterOut, error) { + out := new(ArchiveResourcesForClusterOut) + err := c.cc.Invoke(ctx, Console_ArchiveResourcesForCluster_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func (c *consoleClient) ArchiveEnvironmentsForCluster(ctx context.Context, in *A // All implementations must embed UnimplementedConsoleServer // for forward compatibility type ConsoleServer interface { - ArchiveEnvironmentsForCluster(context.Context, *ArchiveEnvironmentsForClusterIn) (*ArchiveEnvironmentsForClusterOut, error) + ArchiveResourcesForCluster(context.Context, *ArchiveResourcesForClusterIn) (*ArchiveResourcesForClusterOut, error) mustEmbedUnimplementedConsoleServer() } @@ -58,8 +58,8 @@ type ConsoleServer interface { type UnimplementedConsoleServer struct { } -func (UnimplementedConsoleServer) ArchiveEnvironmentsForCluster(context.Context, *ArchiveEnvironmentsForClusterIn) (*ArchiveEnvironmentsForClusterOut, error) { - return nil, status.Errorf(codes.Unimplemented, "method ArchiveEnvironmentsForCluster not implemented") +func (UnimplementedConsoleServer) ArchiveResourcesForCluster(context.Context, *ArchiveResourcesForClusterIn) (*ArchiveResourcesForClusterOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveResourcesForCluster not implemented") } func (UnimplementedConsoleServer) mustEmbedUnimplementedConsoleServer() {} @@ -74,20 +74,20 @@ func RegisterConsoleServer(s grpc.ServiceRegistrar, srv ConsoleServer) { s.RegisterService(&Console_ServiceDesc, srv) } -func _Console_ArchiveEnvironmentsForCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveEnvironmentsForClusterIn) +func _Console_ArchiveResourcesForCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveResourcesForClusterIn) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ConsoleServer).ArchiveEnvironmentsForCluster(ctx, in) + return srv.(ConsoleServer).ArchiveResourcesForCluster(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Console_ArchiveEnvironmentsForCluster_FullMethodName, + FullMethod: Console_ArchiveResourcesForCluster_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConsoleServer).ArchiveEnvironmentsForCluster(ctx, req.(*ArchiveEnvironmentsForClusterIn)) + return srv.(ConsoleServer).ArchiveResourcesForCluster(ctx, req.(*ArchiveResourcesForClusterIn)) } return interceptor(ctx, in, info, handler) } @@ -100,8 +100,8 @@ var Console_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*ConsoleServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "ArchiveEnvironmentsForCluster", - Handler: _Console_ArchiveEnvironmentsForCluster_Handler, + MethodName: "ArchiveResourcesForCluster", + Handler: _Console_ArchiveResourcesForCluster_Handler, }, }, Streams: []grpc.StreamDesc{}, From c57dc19b46a8bcc2a73d595d0e6ee1e570a25fa1 Mon Sep 17 00:00:00 2001 From: Karthik Date: Tue, 16 Jul 2024 02:03:18 +0530 Subject: [PATCH 08/89] Archive Cluster MangedService when cluster is deleted --- apps/infra/internal/domain/byok-clusters.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/infra/internal/domain/byok-clusters.go b/apps/infra/internal/domain/byok-clusters.go index 81ba6f1e0..9a49933d6 100644 --- a/apps/infra/internal/domain/byok-clusters.go +++ b/apps/infra/internal/domain/byok-clusters.go @@ -230,7 +230,7 @@ func (d *domain) DeleteBYOKCluster(ctx InfraContext, name string) error { } } - if _, err := d.consoleClient.ArchiveEnvironmentsForCluster(ctx, &console.ArchiveEnvironmentsForClusterIn{ + if _, err := d.consoleClient.ArchiveResourcesForCluster(ctx, &console.ArchiveResourcesForClusterIn{ UserId: string(ctx.UserId), UserName: ctx.UserName, UserEmail: ctx.UserEmail, From 01e6d144405d1257f0d237b4da864c4bdd3b14dd Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 18 Jul 2024 12:31:43 +0530 Subject: [PATCH 09/89] feat: kloudlite DNS integration in helm charts, and app services --- .tools/nvim/__http__/console/apps.graphql.yml | 1 + .tools/nvim/__http__/console/mres.graphql.yml | 10 +- apps/console/internal/app/app.go | 2 +- apps/console/internal/app/gqlgen.yml | 2 + .../internal/app/graph/generated/generated.go | 96 ++++++++++++++++++- apps/console/internal/app/graph/resolver.go | 4 +- .../internal/app/graph/schema.graphqls | 1 + .../internal/app/graph/schema.resolvers.go | 15 ++- apps/console/internal/domain/api.go | 3 +- apps/infra/internal/domain/byok-clusters.go | 4 +- apps/infra/internal/domain/clusters.go | 2 +- go.mod | 2 +- go.sum | 2 + pkg/wgutils/peer-config.go | 6 +- 14 files changed, 132 insertions(+), 18 deletions(-) diff --git a/.tools/nvim/__http__/console/apps.graphql.yml b/.tools/nvim/__http__/console/apps.graphql.yml index ba6348511..6a9110f50 100644 --- a/.tools/nvim/__http__/console/apps.graphql.yml +++ b/.tools/nvim/__http__/console/apps.graphql.yml @@ -31,6 +31,7 @@ query: |+ #graphql kind displayName accountName + serviceHost } } } diff --git a/.tools/nvim/__http__/console/mres.graphql.yml b/.tools/nvim/__http__/console/mres.graphql.yml index 5bf2073f7..686ead6af 100644 --- a/.tools/nvim/__http__/console/mres.graphql.yml +++ b/.tools/nvim/__http__/console/mres.graphql.yml @@ -12,7 +12,8 @@ query: |+ #graphql totalCount pageInfo { hasNextPage - hasPreviousPage + hasPrevPage + # endCursor } edges { cursor @@ -27,8 +28,11 @@ query: |+ #graphql } variables: pq: - first: 10 - after: NjY5NTUxMTE3YTU0Njk4MTBkZWNlNDRl + # first: 5 + # after: NjY5NTUxMTk3YTU0Njk4MTBkZWNlNDRm + + last: 5 + before: NjY5NTUxMTk3YTU0Njk4MTBkZWNlNDRm search: managedServiceName: matchType: exact diff --git a/apps/console/internal/app/app.go b/apps/console/internal/app/app.go index 5506eebbd..86f0cb900 100644 --- a/apps/console/internal/app/app.go +++ b/apps/console/internal/app/app.go @@ -81,7 +81,7 @@ var Module = fx.Module("app", fx.Invoke( func(server httpServer.Server, d domain.Domain, sessionRepo kv.Repo[*common.AuthSession], ev *env.Env) { - gqlConfig := generated.Config{Resolvers: &graph.Resolver{Domain: d}} + gqlConfig := generated.Config{Resolvers: &graph.Resolver{Domain: d, EnvVars: ev}} gqlConfig.Directives.IsLoggedIn = func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) { sess := httpServer.GetSession[*common.AuthSession](ctx) diff --git a/apps/console/internal/app/gqlgen.yml b/apps/console/internal/app/gqlgen.yml index a99f675bc..d74bd8bef 100644 --- a/apps/console/internal/app/gqlgen.yml +++ b/apps/console/internal/app/gqlgen.yml @@ -111,6 +111,8 @@ models: fields: build: resolver: true + serviceHost: + resolver: true model: github.com/kloudlite/api/apps/console/internal/entities.App AppIn: *app-model diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 7ccd4d3d0..32f179a92 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -104,6 +104,7 @@ type ComplexityRoot struct { MarkedForDeletion func(childComplexity int) int ObjectMeta func(childComplexity int) int RecordVersion func(childComplexity int) int + ServiceHost func(childComplexity int) int Spec func(childComplexity int) int Status func(childComplexity int) int SyncStatus func(childComplexity int) int @@ -909,6 +910,7 @@ type AppResolver interface { UpdateTime(ctx context.Context, obj *entities.App) (string, error) Build(ctx context.Context, obj *entities.App) (*model.Build, error) + ServiceHost(ctx context.Context, obj *entities.App) (*string, error) } type ClusterManagedServiceResolver interface { CreationTime(ctx context.Context, obj *entities.ClusterManagedService) (string, error) @@ -1269,6 +1271,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.App.RecordVersion(childComplexity), true + case "App.serviceHost": + if e.complexity.App.ServiceHost == nil { + break + } + + return e.complexity.App.ServiceHost(childComplexity), true + case "App.spec": if e.complexity.App.Spec == nil { break @@ -5629,6 +5638,7 @@ type Build @key(fields: "id") { extend type App { build: Build + serviceHost: String } extend type ImportedManagedResource { @@ -9717,6 +9727,47 @@ func (ec *executionContext) fieldContext_App_build(ctx context.Context, field gr return fc, nil } +func (ec *executionContext) _App_serviceHost(ctx context.Context, field graphql.CollectedField, obj *entities.App) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_App_serviceHost(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.App().ServiceHost(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_App_serviceHost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "App", + 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 fc, nil +} + func (ec *executionContext) _AppEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.AppEdge) (ret graphql.Marshaler) { fc, err := ec.fieldContext_AppEdge_cursor(ctx, field) if err != nil { @@ -9838,6 +9889,8 @@ func (ec *executionContext) fieldContext_AppEdge_node(ctx context.Context, 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 App", field.Name) }, @@ -28374,6 +28427,8 @@ func (ec *executionContext) fieldContext_Mutation_core_createApp(ctx context.Con 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 App", field.Name) }, @@ -28492,6 +28547,8 @@ func (ec *executionContext) fieldContext_Mutation_core_updateApp(ctx context.Con 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 App", field.Name) }, @@ -32102,6 +32159,8 @@ func (ec *executionContext) fieldContext_Query_core_getApp(ctx context.Context, 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 App", field.Name) }, @@ -42890,6 +42949,39 @@ func (ec *executionContext) _App(ctx context.Context, sel ast.SelectionSet, obj continue } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "serviceHost": + 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._App_serviceHost(ctx, field, obj) + 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)) @@ -52521,7 +52613,7 @@ func (ec *executionContext) marshalNfederation__Scope2ᚕᚕstringᚄ(ctx contex return ret } -func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v interface{}) (interface{}, error) { +func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v interface{}) (any, error) { if v == nil { return nil, nil } @@ -52529,7 +52621,7 @@ func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v inter return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOAny2interface(ctx context.Context, sel ast.SelectionSet, v interface{}) graphql.Marshaler { +func (ec *executionContext) marshalOAny2interface(ctx context.Context, sel ast.SelectionSet, v any) graphql.Marshaler { if v == nil { return graphql.Null } diff --git a/apps/console/internal/app/graph/resolver.go b/apps/console/internal/app/graph/resolver.go index fe4a878cd..416276b3d 100644 --- a/apps/console/internal/app/graph/resolver.go +++ b/apps/console/internal/app/graph/resolver.go @@ -2,6 +2,7 @@ package graph import ( "github.com/kloudlite/api/apps/console/internal/domain" + "github.com/kloudlite/api/apps/console/internal/env" ) // This file will not be regenerated automatically. @@ -9,5 +10,6 @@ import ( // It serves as dependency injection for your app, add any dependencies you require here. type Resolver struct { - Domain domain.Domain + Domain domain.Domain + EnvVars *env.Env } diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index 5d3a53cb5..743871f79 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -199,6 +199,7 @@ type Build @key(fields: "id") { extend type App { build: Build + serviceHost: String } extend type ImportedManagedResource { diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index 2ddf049d7..395f3b8e4 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -7,6 +7,7 @@ package graph import ( "context" "fmt" + "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/apps/console/internal/app/graph/generated" @@ -27,6 +28,14 @@ func (r *appResolver) Build(ctx context.Context, obj *entities.App) (*model.Buil return &model.Build{ID: *obj.CIBuildId}, nil } +// ServiceHost is the resolver for the serviceHost field. +func (r *appResolver) ServiceHost(ctx context.Context, obj *entities.App) (*string, error) { + if obj == nil { + return nil, errNilApp + } + return fn.New(fmt.Sprintf("%s.%s.%s.%s", obj.Name, obj.EnvironmentName, obj.AccountName, r.EnvVars.KloudliteDNSSuffix)), nil +} + // ManagedResource is the resolver for the ManagedResource field. func (r *importedManagedResourceResolver) ManagedResource(ctx context.Context, obj *entities.ImportedManagedResource) (*entities.ManagedResource, error) { cc, err := toConsoleContext(ctx) @@ -977,5 +986,7 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type mutationResolver struct{ *Resolver } -type queryResolver struct{ *Resolver } +type ( + mutationResolver struct{ *Resolver } + queryResolver struct{ *Resolver } +) diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index 0aae80c52..ca17846ca 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -161,7 +161,6 @@ type Domain interface { UpdateEnvironment(ctx ConsoleContext, env entities.Environment) (*entities.Environment, error) DeleteEnvironment(ctx ConsoleContext, name string) error ArchiveEnvironmentsForCluster(ctx ConsoleContext, clusterName string) (bool, error) - ArchiveClusterManagedServicesForCluster(ctx ConsoleContext, clusterName string) (bool, error) OnEnvironmentApplyError(ctx ConsoleContext, errMsg, namespace, name string, opts UpdateAndDeleteOpts) error OnEnvironmentDeleteMessage(ctx ConsoleContext, env entities.Environment) error @@ -310,7 +309,7 @@ type ClusterManagedService interface { // CloneClusterManagedService(ctx ConsoleContext, args CloneManagedServiceArgs) (*entities.ClusterManagedService, error) UpdateClusterManagedService(ctx ConsoleContext, cmsvc entities.ClusterManagedService) (*entities.ClusterManagedService, error) DeleteClusterManagedService(ctx ConsoleContext, name string) error - ArchiveClusterManagedService(ctx ConsoleContext, clusterName string) error + ArchiveClusterManagedServicesForCluster(ctx ConsoleContext, clusterName string) (bool, error) OnClusterManagedServiceApplyError(ctx ConsoleContext, clusterName, name, errMsg string, opts UpdateAndDeleteOpts) error OnClusterManagedServiceDeleteMessage(ctx ConsoleContext, clusterName string, service entities.ClusterManagedService) error diff --git a/apps/infra/internal/domain/byok-clusters.go b/apps/infra/internal/domain/byok-clusters.go index 9a49933d6..2005e60af 100644 --- a/apps/infra/internal/domain/byok-clusters.go +++ b/apps/infra/internal/domain/byok-clusters.go @@ -191,7 +191,7 @@ func (d *domain) GetBYOKClusterSetupInstructions(ctx InfraContext, name string, "clusterName": name, "clusterToken": cluster.ClusterToken, "messageOfficeGRPCAddr": d.env.MessageOfficeExternalGrpcAddr, - "kloudliteDNSSuffix": d.env.KloudliteDNSSuffix, + "kloudliteDNSSuffix": fmt.Sprintf("%s.%s", ctx.AccountName, d.env.KloudliteDNSSuffix), }, }) if err != nil { @@ -210,7 +210,7 @@ func (d *domain) GetBYOKClusterSetupInstructions(ctx InfraContext, name string, {Title: "Add Helm Repo", Command: "helm repo add kloudlite https://kloudlite.github.io/helm-charts"}, {Title: "Update Kloudlite Repo", Command: "helm repo update kloudlite"}, {Title: "Install kloudlite CRDs", Command: fmt.Sprintf("kubectl apply -f https://github.com/kloudlite/helm-charts/releases/download/%s/crds-all.yml --server-side", d.env.KloudliteRelease)}, - {Title: "Install Kloudlite Agent", Command: fmt.Sprintf(`helm upgrade --install kloudlite --namespace kloudlite --create-namespace kloudlite/kloudlite-agent --version %s --set accountName="%s" --set clusterName="%s" --set clusterToken="%s" --set messageOfficeGRPCAddr="%s" --set kloudliteDNSSuffix="%s"`, d.env.KloudliteRelease, ctx.AccountName, name, cluster.ClusterToken, d.env.MessageOfficeExternalGrpcAddr, d.env.KloudliteDNSSuffix)}, + {Title: "Install Kloudlite Agent", Command: fmt.Sprintf(`helm upgrade --install kloudlite --namespace kloudlite --create-namespace kloudlite/kloudlite-agent --version %s --set accountName="%s" --set clusterName="%s" --set clusterToken="%s" --set messageOfficeGRPCAddr="%s" --set kloudliteDNSSuffix="%s"`, d.env.KloudliteRelease, ctx.AccountName, name, cluster.ClusterToken, d.env.MessageOfficeExternalGrpcAddr, fmt.Sprintf("%s.%s", ctx.AccountName, d.env.KloudliteDNSSuffix))}, }, nil } diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 837c11a60..41b6ef710 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -953,7 +953,7 @@ func (d *domain) DeleteCluster(ctx InfraContext, name string) error { return errors.NewE(err) } - if _, err := d.consoleClient.ArchiveEnvironmentsForCluster(ctx, &console.ArchiveEnvironmentsForClusterIn{ + if _, err := d.consoleClient.ArchiveResourcesForCluster(ctx, &console.ArchiveResourcesForClusterIn{ UserId: string(ctx.UserId), UserName: ctx.UserName, UserEmail: ctx.UserEmail, diff --git a/go.mod b/go.mod index 0624371f2..9a1985795 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/google/go-github/v43 v43.0.0 github.com/google/go-github/v45 v45.2.0 github.com/gorilla/websocket v1.5.0 - github.com/kloudlite/operator v0.0.0-20240710071747-9a61e7de9e93 + github.com/kloudlite/operator v0.0.0-20240718072819-c625b77c43b2 github.com/matoous/go-nanoid/v2 v2.0.0 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.29.1 diff --git a/go.sum b/go.sum index f4d2c0818..e277383b8 100644 --- a/go.sum +++ b/go.sum @@ -177,6 +177,8 @@ github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30 github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55/go.mod h1:GZj3wZmIw/qCciclRhgQTgmGiqe8wxoVzMXQjbOfnbc= github.com/kloudlite/operator v0.0.0-20240710071747-9a61e7de9e93 h1:vbF6PPTjgmtE5pNHKdZmTMmjfC4njjGW1EO8m7Njx1w= github.com/kloudlite/operator v0.0.0-20240710071747-9a61e7de9e93/go.mod h1:c6FiZvYztvr92/UcIUvQurp3oWMrrEK7deAriHckTPw= +github.com/kloudlite/operator v0.0.0-20240718072819-c625b77c43b2 h1:K6tlpBcl4PWv6ZiojFTXADYuAvGjcOkrYQbsPvbXaOU= +github.com/kloudlite/operator v0.0.0-20240718072819-c625b77c43b2/go.mod h1:c6FiZvYztvr92/UcIUvQurp3oWMrrEK7deAriHckTPw= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= diff --git a/pkg/wgutils/peer-config.go b/pkg/wgutils/peer-config.go index c9263778d..35f69f234 100644 --- a/pkg/wgutils/peer-config.go +++ b/pkg/wgutils/peer-config.go @@ -47,9 +47,9 @@ PrivateKey = {{.PrivateKey}} ListenPort = {{.ListenPort}} {{- end }} -{{- if .DNS }} -DNS = {{.DNS}} -{{- end }} +{{- /* {{- if .DNS }} */}} +{{- /* DNS = {{.DNS}} */}} +{{- /* {{- end }} */}} {{- range .PostUp -}} PostUp = {{.}} From b2b93da30f2fce6fc9255de495c7b3b0d68e267b Mon Sep 17 00:00:00 2001 From: Abdhesh Nayak Date: Thu, 18 Jul 2024 17:48:49 +0530 Subject: [PATCH 10/89] Fix/pagination (#352) * :bug: Fixed cursor-pagination with sorting --------- Co-authored-by: Karthik --- go.mod | 2 + go.sum | 7 +++- pkg/repos/db-repo-mongo.go | 76 +++++++++++++++++++++++++++----------- 3 files changed, 61 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index 9a1985795..70abb8efb 100644 --- a/go.mod +++ b/go.mod @@ -42,6 +42,7 @@ require ( ) require ( + github.com/PaesslerAG/jsonpath v0.1.1 github.com/go-chi/chi/v5 v5.0.10 github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 github.com/miekg/dns v1.1.55 @@ -58,6 +59,7 @@ require ( ) require ( + github.com/PaesslerAG/gval v1.0.0 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/charmbracelet/lipgloss v0.10.0 // indirect github.com/charmbracelet/log v0.4.0 // indirect diff --git a/go.sum b/go.sum index e277383b8..4637c250f 100644 --- a/go.sum +++ b/go.sum @@ -10,6 +10,11 @@ github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7Y github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= +github.com/PaesslerAG/gval v1.0.0 h1:GEKnRwkWDdf9dOmKcNrar9EA1bz1z9DqPIO1+iLzhd8= +github.com/PaesslerAG/gval v1.0.0/go.mod h1:y/nm5yEyTeX6av0OfKJNp9rBNj2XrGhAf5+v24IBN1I= +github.com/PaesslerAG/jsonpath v0.1.0/go.mod h1:4BzmtoM/PI8fPO4aQGIusjGxGir2BzcV0grWtFzq1Y8= +github.com/PaesslerAG/jsonpath v0.1.1 h1:c1/AToHQMVsduPAa4Vh6xp2U0evy4t8SWp8imEsylIk= +github.com/PaesslerAG/jsonpath v0.1.1/go.mod h1:lVboNxFGal/VwW6d9JzIy56bUsYAP6tH/x80vjnCseY= github.com/PuerkitoBio/goquery v1.9.1 h1:mTL6XjbJTZdpfL+Gwl5U2h1l9yEkJjhmlTeV9VPW7UI= github.com/PuerkitoBio/goquery v1.9.1/go.mod h1:cW1n6TmIMDoORQU5IU/P1T3tGFunOeXEpGP2WHRwkbY= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= @@ -175,8 +180,6 @@ github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLA github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 h1:YnZh3TL6AG4EfoInx1/L5zcPHd2QxgLKseJB1KtHjdQ= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55/go.mod h1:GZj3wZmIw/qCciclRhgQTgmGiqe8wxoVzMXQjbOfnbc= -github.com/kloudlite/operator v0.0.0-20240710071747-9a61e7de9e93 h1:vbF6PPTjgmtE5pNHKdZmTMmjfC4njjGW1EO8m7Njx1w= -github.com/kloudlite/operator v0.0.0-20240710071747-9a61e7de9e93/go.mod h1:c6FiZvYztvr92/UcIUvQurp3oWMrrEK7deAriHckTPw= github.com/kloudlite/operator v0.0.0-20240718072819-c625b77c43b2 h1:K6tlpBcl4PWv6ZiojFTXADYuAvGjcOkrYQbsPvbXaOU= github.com/kloudlite/operator v0.0.0-20240718072819-c625b77c43b2/go.mod h1:c6FiZvYztvr92/UcIUvQurp3oWMrrEK7deAriHckTPw= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= diff --git a/pkg/repos/db-repo-mongo.go b/pkg/repos/db-repo-mongo.go index ef2a0b0fc..5f7e2b2c7 100644 --- a/pkg/repos/db-repo-mongo.go +++ b/pkg/repos/db-repo-mongo.go @@ -4,12 +4,13 @@ import ( "context" "encoding/json" "fmt" + "github.com/PaesslerAG/jsonpath" + "go.mongodb.org/mongo-driver/bson/primitive" "regexp" "strings" "time" "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/bson/primitive" "go.uber.org/fx" "github.com/kloudlite/api/pkg/errors" @@ -81,24 +82,24 @@ func bsonToStruct[T any](r *mongo.SingleResult) (T, error) { return result, nil } -func cursorToStruct[T any](ctx context.Context, curr *mongo.Cursor) ([]T, error) { +func cursorToStruct[T any](ctx context.Context, curr *mongo.Cursor) ([]T, []map[string]any, error) { var m []map[string]any var results []T if err := curr.All(ctx, &m); err != nil { - return results, errors.NewE(err) + return results, m, errors.NewE(err) } b, err := json.Marshal(m) if err != nil { - return results, errors.NewE(err) + return results, m, errors.NewE(err) } if err := json.Unmarshal(b, &results); err != nil { - return results, errors.NewE(err) + return results, m, errors.NewE(err) } - return results, nil + return results, m, nil } func (repo *dbRepo[T]) NewId() ID { @@ -122,8 +123,8 @@ func (repo *dbRepo[T]) Find(ctx context.Context, query Query) ([]T, error) { } return nil, errors.NewE(err) } - - return cursorToStruct[T](ctx, curr) + toStruct, _, err := cursorToStruct[T](ctx, curr) + return toStruct, err } func (repo *dbRepo[T]) Count(ctx context.Context, filter Filter) (int64, error) { @@ -171,6 +172,14 @@ func (repo *dbRepo[T]) FindPaginated(ctx context.Context, filter Filter, paginat return nil, errors.Newf("paramter `before` requires paramter `last` to be specified") } + var cursorKey string + + if pagination.OrderBy == "" { + cursorKey = "_id" + } else { + cursorKey = pagination.OrderBy + } + queryFilter := Filter{} for k, v := range filter { @@ -182,11 +191,13 @@ func (repo *dbRepo[T]) FindPaginated(ctx context.Context, filter Filter, paginat if err != nil { return nil, errors.NewE(err) } - objectID, err := primitive.ObjectIDFromHex(string(aft)) - if err != nil { - return nil, errors.NewE(err) + + if pagination.SortDirection == SortDirectionAsc { + queryFilter[cursorKey] = bson.M{"$gte": string(aft)} + } else { + queryFilter[cursorKey] = bson.M{"$lte": string(aft)} } - queryFilter["_id"] = bson.M{"$gt": objectID} + } if pagination.Before != nil { @@ -194,11 +205,12 @@ func (repo *dbRepo[T]) FindPaginated(ctx context.Context, filter Filter, paginat if err != nil { return nil, errors.NewE(err) } - objectID, err := primitive.ObjectIDFromHex(string(bef)) - if err != nil { - return nil, errors.NewE(err) + + if pagination.SortDirection == SortDirectionAsc { + queryFilter[cursorKey] = bson.M{"$lte": string(bef)} + } else { + queryFilter[cursorKey] = bson.M{"$gte": string(bef)} } - queryFilter["_id"] = bson.M{"$lt": objectID} } var limit int64 @@ -210,7 +222,6 @@ func (repo *dbRepo[T]) FindPaginated(ctx context.Context, filter Filter, paginat limit = *pagination.First + 1 } - // var results []T curr, err := repo.db.Collection(repo.collectionName).Find( ctx, queryFilter, &options.FindOptions{ Limit: &limit, @@ -226,7 +237,7 @@ func (repo *dbRepo[T]) FindPaginated(ctx context.Context, filter Filter, paginat return nil, errors.NewE(err) } - results, err := cursorToStruct[T](ctx, curr) + results, rawResults, err := cursorToStruct[T](ctx, curr) if err != nil { return nil, errors.NewE(err) } @@ -238,9 +249,18 @@ func (repo *dbRepo[T]) FindPaginated(ctx context.Context, filter Filter, paginat pageInfo := PageInfo{} + getCursorOfResult := func(r T, m map[string]any) (string, error) { + if cursorKey == "_id" { + return CursorToBase64(Cursor(r.GetId())), nil + } + val, err := jsonpath.Get(fmt.Sprintf("$.%s", cursorKey), m) + if err != nil { + return "", errors.NewE(err) + } + return CursorToBase64(Cursor(fmt.Sprintf("%v", val))), nil + } + if len(results) > 0 { - pageInfo.StartCursor = CursorToBase64(Cursor(string(results[0].GetPrimitiveID()))) - pageInfo.EndCursor = CursorToBase64(Cursor(string(results[len(results)-1].GetPrimitiveID()))) if pagination.First != nil { pageInfo.HasNextPage = fn.New(len(results) > int(*pagination.First)) @@ -253,18 +273,30 @@ func (repo *dbRepo[T]) FindPaginated(ctx context.Context, filter Filter, paginat if pagination.Last != nil { pageInfo.HasNextPage = fn.New(pagination.Before != nil) pageInfo.HasPrevPage = fn.New(len(results) > int(*pagination.Last)) - if pageInfo.HasPrevPage != nil && *pageInfo.HasPrevPage { results = results[:*pagination.Last] } } + + pageInfo.StartCursor, err = getCursorOfResult(results[0], rawResults[0]) + if err != nil { + return nil, errors.NewE(err) + } + pageInfo.EndCursor, err = getCursorOfResult(results[len(results)-1], rawResults[len(results)-1]) + if err != nil { + return nil, errors.NewE(err) + } } edges := make([]RecordEdge[T], len(results)) for i := range results { + c, err := getCursorOfResult(results[i], rawResults[i]) + if err != nil { + return nil, errors.NewE(err) + } edges[i] = RecordEdge[T]{ Node: results[i], - Cursor: CursorToBase64(Cursor(results[i].GetPrimitiveID())), + Cursor: c, } } From 41c4d369c75d692b3911d39997fdeef358975988 Mon Sep 17 00:00:00 2001 From: Abdhesh Nayak Date: Fri, 19 Jul 2024 13:19:10 +0530 Subject: [PATCH 11/89] 350 all resource cleanups should happen properly when environment is getting deleted it is not deleting all the resources under it (#353) * :art: Added env resources deletion when env is deleted * :art: Added imported-mres for deletion while deleting environment --- apps/accounts/internal/domain/accounts.go | 3 +- apps/console/internal/domain/environment.go | 48 +++++++++++++++++++-- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/apps/accounts/internal/domain/accounts.go b/apps/accounts/internal/domain/accounts.go index d2d7cc675..4f28d10c9 100644 --- a/apps/accounts/internal/domain/accounts.go +++ b/apps/accounts/internal/domain/accounts.go @@ -91,7 +91,8 @@ func (d *domain) ensureNamespaceForAccount(ctx context.Context, accountName stri } func (d *domain) deleteNamespaceForAccount(ctx context.Context, targetNamespace string) error { - panic("not implemented. Yet to decide if we want to delete namespace when account is deleted") + // panic("not implemented. Yet to decide if we want to delete namespace when account is deleted") + return fmt.Errorf("not supported yet") } func (d *domain) ensureKloudliteRegistryCredentials(ctx UserContext, account *entities.Account) error { diff --git a/apps/console/internal/domain/environment.go b/apps/console/internal/domain/environment.go index b7837af37..ce18b88ce 100644 --- a/apps/console/internal/domain/environment.go +++ b/apps/console/internal/domain/environment.go @@ -24,6 +24,39 @@ import ( t "github.com/kloudlite/api/pkg/types" ) +func (d *domain) cleanupEnvironment(ctx ConsoleContext, envName string) error { + filter := repos.Filter{ + fields.AccountName: ctx.AccountName, + fields.EnvironmentName: envName, + } + + if err := d.appRepo.DeleteMany(ctx, filter); err != nil { + return errors.NewE(err) + } + + if err := d.externalAppRepo.DeleteMany(ctx, filter); err != nil { + return errors.NewE(err) + } + + if err := d.secretRepo.DeleteMany(ctx, filter); err != nil { + return errors.NewE(err) + } + + if err := d.configRepo.DeleteMany(ctx, filter); err != nil { + return errors.NewE(err) + } + + if err := d.routerRepo.DeleteMany(ctx, filter); err != nil { + return errors.NewE(err) + } + + if err := d.importedMresRepo.DeleteMany(ctx, filter); err != nil { + return errors.NewE(err) + } + + return nil +} + func (d *domain) findEnvironment(ctx ConsoleContext, name string) (*entities.Environment, error) { env, err := d.environmentRepo.FindOne(ctx, repos.Filter{ fields.AccountName: ctx.AccountName, @@ -515,6 +548,10 @@ func (d *domain) DeleteEnvironment(ctx ConsoleContext, name string) error { d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeEnvironment, uenv.Name, PublishUpdate) if uenv.IsArchived != nil && *uenv.IsArchived { + if err := d.cleanupEnvironment(ctx, name); err != nil { + return errors.NewE(err) + } + return d.environmentRepo.DeleteById(ctx, uenv.Id) } @@ -553,18 +590,21 @@ func (d *domain) OnEnvironmentApplyError(ctx ConsoleContext, errMsg, namespace, } func (d *domain) OnEnvironmentDeleteMessage(ctx ConsoleContext, env entities.Environment) error { - err := d.environmentRepo.DeleteOne( + if err := d.cleanupEnvironment(ctx, env.Name); err != nil { + return errors.NewE(err) + } + + if err := d.environmentRepo.DeleteOne( ctx, repos.Filter{ fields.AccountName: ctx.AccountName, fields.MetadataName: env.Name, }, - ) - if err != nil { + ); err != nil { return errors.NewE(err) } - if _, err = d.iamClient.RemoveResource(ctx, &iam.RemoveResourceIn{ + if _, err := d.iamClient.RemoveResource(ctx, &iam.RemoveResourceIn{ ResourceRef: iamT.NewResourceRef(ctx.AccountName, iamT.ResourceEnvironment, env.Name), }); err != nil { return errors.NewE(err) From c9b7602fec5fdd12f2e397ec3b100dae2b5455ef Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Sun, 21 Jul 2024 17:59:51 +0530 Subject: [PATCH 12/89] feat: implements nats subject change, to solve nats storage and performance issues --- apps/console/internal/app/app.go | 4 +- .../internal/app/adapter-resource-apply.go | 4 +- apps/infra/internal/app/app.go | 5 +- .../internal/app/grpc-server.go | 302 ++++++++---------- common/kafka-topic-name.go | 61 +++- pkg/functions/main.go | 8 + pkg/logging/slog-logger.go | 33 ++ 7 files changed, 235 insertions(+), 182 deletions(-) create mode 100644 pkg/logging/slog-logger.go diff --git a/apps/console/internal/app/app.go b/apps/console/internal/app/app.go index 86f0cb900..7c01f75d2 100644 --- a/apps/console/internal/app/app.go +++ b/apps/console/internal/app/app.go @@ -164,7 +164,7 @@ var Module = fx.Module("app", }), fx.Provide(func(jc *nats.JetstreamClient, ev *env.Env, logger logging.Logger) (ErrorOnApplyConsumer, error) { - topic := common.GetPlatformClusterMessagingTopic("*", "*", common.ConsoleReceiver, common.EventErrorOnApply) + topic := common.ReceiveFromAgentSubjectName(common.ReceiveFromAgentArgs{AccountName: "*", ClusterName: "*"}, common.ConsoleReceiver, common.EventErrorOnApply) consumerName := "console:error-on-apply" return msg_nats.NewJetstreamConsumer(context.TODO(), jc, msg_nats.JetstreamConsumerArgs{ Stream: ev.NatsResourceSyncStream, @@ -190,7 +190,7 @@ var Module = fx.Module("app", }), fx.Provide(func(jc *nats.JetstreamClient, ev *env.Env, logger logging.Logger) (ResourceUpdateConsumer, error) { - topic := common.GetPlatformClusterMessagingTopic("*", "*", common.ConsoleReceiver, common.EventResourceUpdate) + topic := common.ReceiveFromAgentSubjectName(common.ReceiveFromAgentArgs{AccountName: "*", ClusterName: "*"}, common.ConsoleReceiver, common.EventResourceUpdate) consumerName := "console:resource-updates" return msg_nats.NewJetstreamConsumer(context.TODO(), jc, msg_nats.JetstreamConsumerArgs{ diff --git a/apps/infra/internal/app/adapter-resource-apply.go b/apps/infra/internal/app/adapter-resource-apply.go index d4e3bcd8d..228cb632a 100644 --- a/apps/infra/internal/app/adapter-resource-apply.go +++ b/apps/infra/internal/app/adapter-resource-apply.go @@ -51,7 +51,7 @@ func (a *resourceDispatcherImpl) ApplyToTargetCluster(ctx domain.InfraContext, c } err = a.producer.Produce(ctx, msgTypes.ProduceMsg{ - Subject: common.GetTenantClusterMessagingTopic(ctx.AccountName, clusterName), + Subject: common.SendToAgentSubjectName(ctx.AccountName, clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()), Payload: b, }) @@ -75,7 +75,7 @@ func (d *resourceDispatcherImpl) DeleteFromTargetCluster(ctx domain.InfraContext } err = d.producer.Produce(ctx, msgTypes.ProduceMsg{ - Subject: common.GetTenantClusterMessagingTopic(ctx.AccountName, clusterName), + Subject: common.SendToAgentSubjectName(ctx.AccountName, clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()), Payload: b, }) diff --git a/apps/infra/internal/app/app.go b/apps/infra/internal/app/app.go index 7f83ebedc..6aa372f7a 100644 --- a/apps/infra/internal/app/app.go +++ b/apps/infra/internal/app/app.go @@ -2,6 +2,7 @@ package app import ( "context" + "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/console" "github.com/kloudlite/api/apps/infra/internal/entities" @@ -121,7 +122,7 @@ var Module = fx.Module( }), fx.Provide(func(jsc *nats.JetstreamClient, ev *env.Env) (ReceiveResourceUpdatesConsumer, error) { - topic := common.GetPlatformClusterMessagingTopic("*", "*", common.InfraReceiver, common.EventResourceUpdate) + topic := common.ReceiveFromAgentSubjectName(common.ReceiveFromAgentArgs{AccountName: "*", ClusterName: "*"}, common.InfraReceiver, common.EventResourceUpdate) consumerName := "infra:resource-updates" return msg_nats.NewJetstreamConsumer(context.TODO(), jsc, msg_nats.JetstreamConsumerArgs{ @@ -148,7 +149,7 @@ var Module = fx.Module( }), fx.Provide(func(jsc *nats.JetstreamClient, ev *env.Env) (ErrorOnApplyConsumer, error) { - topic := common.GetPlatformClusterMessagingTopic("*", "*", common.ConsoleReceiver, common.EventErrorOnApply) + topic := common.ReceiveFromAgentSubjectName(common.ReceiveFromAgentArgs{AccountName: "*", ClusterName: "*"}, common.InfraReceiver, common.EventErrorOnApply) consumerName := "infra:error-on-apply" diff --git a/apps/message-office/internal/app/grpc-server.go b/apps/message-office/internal/app/grpc-server.go index 6ab512a08..967a712f9 100644 --- a/apps/message-office/internal/app/grpc-server.go +++ b/apps/message-office/internal/app/grpc-server.go @@ -5,6 +5,7 @@ import ( "crypto/sha256" "encoding/base64" "fmt" + "log/slog" "strings" "time" @@ -27,7 +28,6 @@ import ( "github.com/kloudlite/api/apps/message-office/internal/domain" "github.com/kloudlite/api/apps/message-office/internal/env" fn "github.com/kloudlite/api/pkg/functions" - "github.com/kloudlite/api/pkg/logging" ) type ( @@ -36,7 +36,7 @@ type ( grpcServer struct { messages.UnimplementedMessageDispatchServiceServer - logger logging.Logger + logger *slog.Logger infraClient infra.InfraClient @@ -47,28 +47,36 @@ type ( domain domain.Domain createConsumer func(ctx context.Context, accountName string, clusterName string) (messaging.Consumer, error) - - resourceUpdatesCounter int64 - infraUpdatesCounter int64 - crUpdatesCounter int64 - errorMessagesCounter int64 - clusterUpdatesCounter int64 } ) // ReceiveConsoleResourceUpdate implements messages.MessageDispatchServiceServer. -func (g *grpcServer) ReceiveConsoleResourceUpdate(ctx context.Context, msg *messages.ResourceUpdate) (*messages.Empty, error) { +func (g *grpcServer) ReceiveConsoleResourceUpdate(ctx context.Context, msg *messages.ResourceUpdate) (_ *messages.Empty, err error) { accountName, clusterName, err := g.validateAndDecodeFromGrpcContext(ctx, g.ev.TokenHashingSecret) if err != nil { return nil, err } - logger := g.logger.WithKV("accountName", accountName).WithKV("cluster", clusterName) - logger.Debugf("console resource update request received") + + start := time.Now() + logger := g.logger.With("accountName", accountName, "cluster", "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), clusterName, "for", common.ConsoleReceiver, "request-id", fn.UUID()) + logger.Debug("RECEIVED resource update") defer func() { - logger.Debugf("console resource update request processed") + if err != nil { + logger.Error("FAILED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) + return + } + + logger.Info("DISPATCHED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) }() - if err := g.processConsoleResourceUpdate(ctx, accountName, clusterName, msg); err != nil { + if err := dispatchResourceUpdate(ctx, common.ConsoleReceiver, ResourceUpdateArgs{ + logger: logger, + updatesProducer: g.updatesProducer, + + AccountName: accountName, + ClusterName: clusterName, + Message: msg, + }); err != nil { return nil, err } @@ -76,19 +84,31 @@ func (g *grpcServer) ReceiveConsoleResourceUpdate(ctx context.Context, msg *mess } // ReceiveContainerRegistryUpdate implements messages.MessageDispatchServiceServer. -func (g *grpcServer) ReceiveContainerRegistryUpdate(ctx context.Context, msg *messages.ResourceUpdate) (*messages.Empty, error) { +func (g *grpcServer) ReceiveContainerRegistryUpdate(ctx context.Context, msg *messages.ResourceUpdate) (_ *messages.Empty, err error) { accountName, clusterName, err := g.validateAndDecodeFromGrpcContext(ctx, g.ev.TokenHashingSecret) if err != nil { return nil, err } - logger := g.logger.WithKV("accountName", accountName).WithKV("cluster", clusterName) - logger.Debugf("container registry resource update request received") + start := time.Now() + logger := g.logger.With("accountName", accountName, "cluster", "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), clusterName, "for", common.ContainerRegistryReceiver, "request-id", fn.UUID()) + logger.Debug("RECEIVED resource update") defer func() { - logger.Debugf("container registry resource update request processed") + if err != nil { + logger.Error("FAILED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) + return + } + logger.Info("DISPATCHED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) }() - if err := g.processContainerRegistryResourceUpdate(ctx, accountName, clusterName, msg); err != nil { + if err := dispatchResourceUpdate(ctx, common.ContainerRegistryReceiver, ResourceUpdateArgs{ + logger: logger, + updatesProducer: g.updatesProducer, + + AccountName: accountName, + ClusterName: clusterName, + Message: msg, + }); err != nil { return nil, err } @@ -102,15 +122,25 @@ func (g *grpcServer) ReceiveError(ctx context.Context, msg *messages.ErrorData) return nil, err } - logger := g.logger.WithKV("accountName", accountName).WithKV("cluster", clusterName) - logger.Debugf("request received for access token validation") - isValid := true - + start := time.Now() + logger := g.logger.With("accountName", accountName, "cluster", "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), clusterName, "for", common.ContainerRegistryReceiver, "request-id", fn.UUID()) + logger.Debug("RECEIVED error-on-apply update") defer func() { - logger.Debugf("is access token valid? (%v)", isValid) + if err != nil { + logger.Error("FAILED error-on-apply update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) + return + } + logger.Info("DISPATCHED error-on-apply update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) }() - if err := g.processError(ctx, accountName, clusterName, msg.Message); err != nil { + if err := processError(ctx, ProcessErrorArgs{ + logger: logger, + updatesProducer: g.updatesProducer, + + AccountName: accountName, + ClusterName: clusterName, + Error: msg, + }); err != nil { return nil, err } @@ -118,29 +148,37 @@ func (g *grpcServer) ReceiveError(ctx context.Context, msg *messages.ErrorData) } // ReceiveInfraResourceUpdate implements messages.MessageDispatchServiceServer. -func (g *grpcServer) ReceiveInfraResourceUpdate(ctx context.Context, msg *messages.ResourceUpdate) (*messages.Empty, error) { +func (g *grpcServer) ReceiveInfraResourceUpdate(ctx context.Context, msg *messages.ResourceUpdate) (_ *messages.Empty, err error) { accountName, clusterName, err := g.validateAndDecodeFromGrpcContext(ctx, g.ev.TokenHashingSecret) if err != nil { return nil, err } - logger := g.logger.WithKV("accountName", accountName).WithKV("cluster", clusterName) - logger.Debugf("infra resource update request received") + start := time.Now() + logger := g.logger.With("accountName", accountName, "cluster", "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), clusterName, "for", common.ContainerRegistryReceiver, "request-id", fn.UUID()) + logger.Debug("RECEIVED resource update") defer func() { - logger.Debugf("infra resource update request processed") + if err != nil { + logger.Error("FAILED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) + return + } + logger.Info("DISPATCHED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) }() - if err := g.processInfraResourceUpdate(ctx, accountName, clusterName, msg); err != nil { + if err := dispatchResourceUpdate(ctx, common.InfraReceiver, ResourceUpdateArgs{ + logger: logger, + updatesProducer: g.updatesProducer, + + AccountName: accountName, + ClusterName: clusterName, + Message: msg, + }); err != nil { return nil, err } return &messages.Empty{}, nil } -// ReceiveError implements messages.MessageDispatchServiceServer. -// func (g *grpcServer) ReceiveError(ctx context.Context, msg *messages.ErrorData) (*messages.Empty, error) { -// } - // Ping implements messages.MessageDispatchServiceServer. func (*grpcServer) Ping(context.Context, *messages.Empty) (*messages.PingOutput, error) { return &messages.PingOutput{Ok: true}, nil @@ -246,58 +284,62 @@ func (g *grpcServer) ValidateAccessToken(ctx context.Context, msg *messages.Vali return nil, err } - g.logger.WithKV("account", accountName).WithKV("cluster", clusterName).Infof("validated access token") + g.logger.With("account", accountName).With("cluster", clusterName).Info("validated access token") return &messages.ValidateAccessTokenOut{Valid: true}, nil } -func (g *grpcServer) processError(ctx context.Context, accountName string, clusterName string, msg []byte) (err error) { - g.errorMessagesCounter++ - logger := g.logger.WithKV("accountName", accountName).WithKV("cluster", clusterName) +type ProcessErrorArgs struct { + logger *slog.Logger + updatesProducer UpdatesProducer - logger.Infof("[%v] received error-on-apply message", g.errorMessagesCounter) - defer func() { - if err != nil { - err = errors.Wrap(err, fmt.Sprintf("[%v] (with ERROR) processed error-on-apply message", g.clusterUpdatesCounter)) - logger.Errorf(err) - return - } - logger.Infof("[%v] processed error-on-apply message", g.infraUpdatesCounter) - }() + AccountName string + ClusterName string + Error *messages.ErrorData +} +func processError(ctx context.Context, args ProcessErrorArgs) (err error) { b, err := msgOfficeT.MarshalErrMessage(msgOfficeT.ErrMessage{ - AccountName: accountName, - ClusterName: clusterName, - Error: msg, + AccountName: args.AccountName, + ClusterName: args.ClusterName, + Error: args.Error.Message, }) if err != nil { - return errors.Wrap(err, "while marshaling resource update") + return errors.Wrap(err, "marshaling resource update") + } + + subjectParams := common.ReceiveFromAgentArgs{ + AccountName: args.AccountName, + ClusterName: args.ClusterName, + GVK: args.Error.Gvk, + Namespace: args.Error.Namespace, + Name: args.Error.Name, } - msgTopic := common.GetPlatformClusterMessagingTopic(accountName, clusterName, common.InfraReceiver, common.EventErrorOnApply) - if err := g.updatesProducer.Produce(ctx, types.ProduceMsg{Subject: msgTopic, Payload: b}); err != nil { + msgTopic := common.ReceiveFromAgentSubjectName(subjectParams, common.InfraReceiver, common.EventErrorOnApply) + if err := args.updatesProducer.Produce(ctx, types.ProduceMsg{Subject: msgTopic, Payload: b}); err != nil { return errors.Wrap(err, fmt.Sprintf("while producing to topic (%s)", msgTopic)) } - logger.Infof("[%v] dispatched error-on-apply message to %s receiver", g.errorMessagesCounter, common.InfraReceiver) + args.logger.Debug("dispatched error-on-apply message", "subject", msgTopic, "to", common.InfraReceiver) - msgTopic = common.GetPlatformClusterMessagingTopic(accountName, clusterName, common.ConsoleReceiver, common.EventErrorOnApply) - if err := g.updatesProducer.Produce(ctx, types.ProduceMsg{Subject: msgTopic, Payload: b}); err != nil { + msgTopic = common.ReceiveFromAgentSubjectName(subjectParams, common.ConsoleReceiver, common.EventErrorOnApply) + if err := args.updatesProducer.Produce(ctx, types.ProduceMsg{Subject: msgTopic, Payload: b}); err != nil { return errors.Wrap(err, fmt.Sprintf("while producing to topic (%s)", msgTopic)) } - logger.Infof("[%v] dispatched error-on-apply message to %s receiver", g.errorMessagesCounter, common.ConsoleReceiver) + args.logger.Debug("dispatched error-on-apply message", "subject", msgTopic, "to", common.ConsoleReceiver) - msgTopic = common.GetPlatformClusterMessagingTopic(accountName, clusterName, common.ContainerRegistryReceiver, common.EventErrorOnApply) - if err := g.updatesProducer.Produce(ctx, types.ProduceMsg{Subject: msgTopic, Payload: b}); err != nil { + msgTopic = common.ReceiveFromAgentSubjectName(subjectParams, common.ContainerRegistryReceiver, common.EventErrorOnApply) + if err := args.updatesProducer.Produce(ctx, types.ProduceMsg{Subject: msgTopic, Payload: b}); err != nil { return errors.Wrap(err, fmt.Sprintf("while producing to topic (%s)", msgTopic)) } - logger.Infof("[%v] dispatched error-on-apply message to %s receiver", g.errorMessagesCounter, common.ContainerRegistryReceiver) + args.logger.Debug("dispatched error-on-apply message", "subject", msgTopic, "to", common.ContainerRegistryReceiver) return nil } // GetAccessToken implements messages.MessageDispatchServiceServer func (g *grpcServer) GetAccessToken(ctx context.Context, msg *messages.GetAccessTokenIn) (*messages.GetAccessTokenOut, error) { - g.logger.Infof("request received for cluster-token (%q) exchange", msg.ClusterToken) + g.logger.Info("request received for cluster-token (%q) exchange", msg.ClusterToken) ct, err := g.domain.FindClusterToken(ctx, msg.ClusterToken) if err != nil { @@ -308,7 +350,7 @@ func (g *grpcServer) GetAccessToken(ctx context.Context, msg *messages.GetAccess } s := encodeAccessToken(ct.AccountName, ct.ClusterName, msg.ClusterToken, g.ev.TokenHashingSecret) - g.logger.Infof("SUCCESSFUL cluster-token exchange for account=%q, cluster=%q", ct.AccountName, ct.ClusterName) + g.logger.Info("SUCCESSFUL cluster-token exchange for account=%q, cluster=%q", ct.AccountName, ct.ClusterName) return &messages.GetAccessTokenOut{ ProtocolVersion: g.ev.GrpcMessageProtocolVersion, @@ -324,10 +366,10 @@ func (g *grpcServer) SendActions(request *messages.Empty, server messages.Messag return klErrors.NewE(err) } - logger := g.logger.WithKV("accountName", accountName, "clusterName", clusterName) - logger.Infof("request received for sending actions to cluster") + logger := g.logger.With("accountName", accountName, "clusterName", clusterName) + logger.Info("request received for sending actions to cluster") defer func() { - logger.Infof("stopped sending actions to cluster") + logger.Info("stopped sending actions to cluster") }() key := fmt.Sprintf("%s/%s", accountName, clusterName) @@ -338,151 +380,86 @@ func (g *grpcServer) SendActions(request *messages.Empty, server messages.Messag } // TODO: implement cluster online feature, so that we can mark the cluster as online/offline - logger.Infof("consumer is available now") + logger.Info("consumer is available now") if _, err := g.infraClient.MarkClusterOnlineAt(server.Context(), &infra.MarkClusterOnlineAtIn{ AccountName: accountName, ClusterName: clusterName, Timestamp: timestamppb.New(time.Now()), }); err != nil { - logger.Errorf(err, "marking cluster online") + logger.Error("marking cluster online", "err", err) return klErrors.NewE(err) } go func() { <-server.Context().Done() - logger.Debugf("server context has been closed") + logger.Debug("server context has been closed") delete(g.consumers, key) if err := consumer.Stop(context.TODO()); err != nil { - logger.Errorf(err, "while stopping consumer") + logger.Error("while stopping consumer", "err", err) } - logger.Infof("consumer is closed now") + logger.Info("consumer is closed now") }() if err := consumer.Consume(func(msg *types.ConsumeMsg) error { - logger.WithKV("subject", msg.Subject).Infof("read message from consumer") + logger.Info("read message from consumer", "subject", msg.Subject) defer func() { - logger.WithKV("subject", msg.Subject).Infof("dispatched message to agent") + logger.Info("dispatched message to agent", "subject", msg.Subject) }() return server.Send(&messages.Action{Message: msg.Payload}) }, types.ConsumeOpts{ OnError: func(error) error { - logger.Infof("error occurrred on agent side, while parsing/applying the message, ignoring as we don't want to block the queue") + logger.Info("error occurrred on agent side, while parsing/applying the message, ignoring as we don't want to block the queue") return nil }, }); err != nil { - logger.Errorf(err, "while consuming messages from consumer") + logger.Error("while consuming messages from consumer", "err", err) } return nil } -func (g *grpcServer) processConsoleResourceUpdate(ctx context.Context, accountName string, clusterName string, msg *messages.ResourceUpdate) (err error) { - g.resourceUpdatesCounter++ +type ResourceUpdateArgs struct { + logger *slog.Logger + updatesProducer UpdatesProducer - logger := g.logger.WithKV("accountName", accountName).WithKV("clusterName", clusterName).WithKV("component", "console-resource-update") - logger.Infof("[%v] received resource status update", g.resourceUpdatesCounter) - defer func() { - if err != nil { - err = errors.Wrap(err, fmt.Sprintf("[%v] (with ERROR) processed resource status update", g.clusterUpdatesCounter)) - logger.Errorf(err) - return - } - logger.Infof("[%v] processed resource status update", g.resourceUpdatesCounter) - }() + AccountName string + ClusterName string - b, err := msgOfficeT.MarshalResourceUpdate(msgOfficeT.ResourceUpdate{ - AccountName: accountName, - ClusterName: clusterName, - WatcherUpdate: msg.Message, - }) - if err != nil { - return errors.Wrap(err, "marshalling resource update") - } - - msgTopic := common.GetPlatformClusterMessagingTopic(accountName, clusterName, common.ConsoleReceiver, common.EventResourceUpdate) - if err := g.updatesProducer.Produce(ctx, types.ProduceMsg{ - Subject: msgTopic, - Payload: b, - }); err != nil { - return errors.Wrap(err, fmt.Sprintf("while producing resource update to topic %q", msgTopic)) - } - - logger.Infof("[%v] dispatched resource updates to topic %q", g.resourceUpdatesCounter, msgTopic) - return nil + Message *messages.ResourceUpdate } -func (g *grpcServer) processInfraResourceUpdate(ctx context.Context, accountName string, clusterName string, msg *messages.ResourceUpdate) (err error) { - g.infraUpdatesCounter++ - logger := g.logger.WithKV("accountName", accountName).WithKV("clusterName", clusterName).WithKV("component", "infra-resource-update") - - logger.Infof("[%v] received infra update", g.infraUpdatesCounter) - defer func() { - if err != nil { - err = errors.Wrap(err, fmt.Sprintf("[%v] (with ERROR) processed infra update", g.infraUpdatesCounter)) - logger.Errorf(err) - return - } - logger.Infof("[%v] processed infra update", g.infraUpdatesCounter) - }() - +func dispatchResourceUpdate(ctx context.Context, receiver common.MessageReceiver, args ResourceUpdateArgs) (err error) { b, err := msgOfficeT.MarshalResourceUpdate(msgOfficeT.ResourceUpdate{ - AccountName: accountName, - ClusterName: clusterName, - WatcherUpdate: msg.Message, + AccountName: args.AccountName, + ClusterName: args.ClusterName, + WatcherUpdate: args.Message.Message, }) if err != nil { - return errors.Wrap(err, "while marshaling resource update") - } - - msgTopic := common.GetPlatformClusterMessagingTopic(accountName, clusterName, common.InfraReceiver, common.EventResourceUpdate) - if err := g.updatesProducer.Produce(ctx, types.ProduceMsg{ - Subject: msgTopic, - Payload: b, - }); err != nil { - return errors.Wrap(err, fmt.Sprintf("while producing resource update to topic %q", msgTopic)) + return errors.Wrap(err, "marshalling resource update") } - logger.Infof("[%v] processed infra update", g.infraUpdatesCounter) - return nil -} - -func (g *grpcServer) processContainerRegistryResourceUpdate(ctx context.Context, accountName string, clusterName string, msg *messages.ResourceUpdate) (err error) { - g.crUpdatesCounter++ - logger := g.logger.WithKV("accountName", accountName).WithKV("clusterName", clusterName).WithKV("component", "container-registry-update") + subject := common.ReceiveFromAgentSubjectName(common.ReceiveFromAgentArgs{ + AccountName: args.AccountName, + ClusterName: args.ClusterName, + GVK: args.Message.Gvk, + Namespace: args.Message.Namespace, + Name: args.Message.Name, + }, receiver, common.EventResourceUpdate) - logger.Infof("[%v] received cr update", g.crUpdatesCounter) - defer func() { - if err != nil { - err = errors.Wrap(err, fmt.Sprintf("[%v] (with ERROR) processed cr update", g.crUpdatesCounter)) - logger.Errorf(err) - return - } - logger.Infof("[%v] processed cr update", g.crUpdatesCounter) - }() - - b, err := msgOfficeT.MarshalResourceUpdate(msgOfficeT.ResourceUpdate{ - AccountName: accountName, - ClusterName: clusterName, - WatcherUpdate: msg.Message, - }) - if err != nil { - return errors.Wrap(err, "while marshaling resource update") - } + args.logger.Debug("dispatching to", "subject", subject) - msgTopic := common.GetPlatformClusterMessagingTopic(accountName, clusterName, common.ContainerRegistryReceiver, common.EventResourceUpdate) - if err := g.updatesProducer.Produce(ctx, types.ProduceMsg{ - Subject: msgTopic, + if err := args.updatesProducer.Produce(ctx, types.ProduceMsg{ + Subject: subject, Payload: b, }); err != nil { - return errors.Wrap(err, fmt.Sprintf("while producing resource update to topic %q", msgTopic)) + return errors.Wrap(err, "producing resource update") } - logger.Infof("[%v] processed cr update", g.crUpdatesCounter) return nil } -func NewMessageOfficeServer(producer UpdatesProducer, jc *nats.JetstreamClient, ev *env.Env, d domain.Domain, logger logging.Logger, infraConn InfraGRPCClient) (messages.MessageDispatchServiceServer, error) { +func NewMessageOfficeServer(producer UpdatesProducer, jc *nats.JetstreamClient, ev *env.Env, d domain.Domain, logger *slog.Logger, infraConn InfraGRPCClient) (messages.MessageDispatchServiceServer, error) { return &grpcServer{ UnimplementedMessageDispatchServiceServer: messages.UnimplementedMessageDispatchServiceServer{}, infraClient: infra.NewInfraClient(infraConn), @@ -501,7 +478,8 @@ func NewMessageOfficeServer(producer UpdatesProducer, jc *nats.JetstreamClient, Durable: name, Description: "this consumer consumes messages from platform, and dispatches them to the tenant cluster via kloudlite agent", FilterSubjects: []string{ - common.GetTenantClusterMessagingTopic(accountName, clusterName), + fmt.Sprintf("%s.>", common.SendToAgentSubjectPrefix(accountName, clusterName)), + // common.GetTenantClusterMessagingTopic(accountName, clusterName), }, }, }) diff --git a/common/kafka-topic-name.go b/common/kafka-topic-name.go index ba46731a2..33616f279 100644 --- a/common/kafka-topic-name.go +++ b/common/kafka-topic-name.go @@ -1,6 +1,9 @@ package common -import "fmt" +import ( + "encoding/base64" + "fmt" +) type topicName string @@ -10,12 +13,32 @@ const ( NotificationTopicName topicName = "events.notification" ) -func GetKafkaTopicName(accountName string, clusterName string) string { - return fmt.Sprintf("kl-send-to-acc-%s-clus-%s", accountName, clusterName) +const ( + SendToAgentSubjectNamePrefix = "send-to-agent" + ReceiveFromAgentSubjectNamePrefix = "receive-from-agent" +) + +func SendToAgentSubjectPrefix(accountName string, clusterName string) string { + return fmt.Sprintf("%s.%s.%s", SendToAgentSubjectNamePrefix, accountName, clusterName) +} + +func ReceiveFromAgentSubjectPrefix(accountName string, clusterName string) string { + return fmt.Sprintf("%s.%s.%s", ReceiveFromAgentSubjectNamePrefix, accountName, clusterName) } -func GetTenantClusterMessagingTopic(accountName string, clusterName string) string { - return fmt.Sprintf("resource-sync.account-%s.cluster-%s.tenant", accountName, clusterName) +// func GetKafkaTopicName(accountName string, clusterName string) string { +// return fmt.Sprintf("kl-send-to-acc-%s-clus-%s", accountName, clusterName) +// } + +// func GetTenantClusterMessagingTopic(accountName string, clusterName string) string { +// // return fmt.Sprintf("resource-sync.account-%s.cluster-%s.tenant", accountName, clusterName) +// return fmt.Sprintf("%s.%s.%s", SendToAgentSubjectNamePrefix, accountName, clusterName) +// } + +func SendToAgentSubjectName(accountName string, clusterName string, gvk string, namespace string, name string) string { + slug := base64.RawStdEncoding.EncodeToString([]byte(fmt.Sprintf("%s.%s/%s", gvk, namespace, name))) + + return fmt.Sprintf("%s.%s.%s.%s", SendToAgentSubjectNamePrefix, accountName, clusterName, slug) } type platformEvent string @@ -25,17 +48,27 @@ const ( EventResourceUpdate platformEvent = "resource-update" ) -type messageReceiver string +type MessageReceiver string const ( - ConsoleReceiver messageReceiver = "kloudlite-console" - InfraReceiver messageReceiver = "kloudlite-infra" - ContainerRegistryReceiver messageReceiver = "kloudlite-cr" + ConsoleReceiver MessageReceiver = "kloudlite-console" + InfraReceiver MessageReceiver = "kloudlite-infra" + ContainerRegistryReceiver MessageReceiver = "kloudlite-cr" ) -func GetPlatformClusterMessagingTopic(accountName string, clusterName string, controller messageReceiver, ev platformEvent) string { - if accountName == "*" && clusterName == "*" { - return fmt.Sprintf("resource-sync.*.*.platform.%s.%s", controller, ev) - } - return fmt.Sprintf("resource-sync.account-%s.cluster-%s.platform.%s.%s", accountName, clusterName, controller, ev) +type ReceiveFromAgentArgs struct { + AccountName string + ClusterName string } + +func ReceiveFromAgentSubjectName(args ReceiveFromAgentArgs, receiver MessageReceiver, ev platformEvent) string { + slug := "*" + return fmt.Sprintf("%s.%s.%s.%s.%s.%s", ReceiveFromAgentSubjectNamePrefix, args.AccountName, args.ClusterName, slug, receiver, ev) +} + +// func GetPlatformClusterMessagingTopic(accountName string, clusterName string, controller messageReceiver, ev platformEvent) string { +// if accountName == "*" && clusterName == "*" { +// return fmt.Sprintf("resource-sync.*.*.platform.%s.%s", controller, ev) +// } +// return fmt.Sprintf("resource-sync.account-%s.cluster-%s.platform.%s.%s", accountName, clusterName, controller, ev) +// } diff --git a/pkg/functions/main.go b/pkg/functions/main.go index e1780bec6..ffe6b3c87 100644 --- a/pkg/functions/main.go +++ b/pkg/functions/main.go @@ -58,6 +58,14 @@ func CleanerNanoidOrDie(n int) string { return id } +// UUID returns a UUID string of the given size, if specified, otherwise a default size of 16 is used. +func UUID(size ...int) string { + if len(size) > 0 { + return nanoid.Must(size[0]) + } + return nanoid.Must(16) +} + func JsonConversion(from any, to any) error { if from == nil { return nil diff --git a/pkg/logging/slog-logger.go b/pkg/logging/slog-logger.go new file mode 100644 index 000000000..7fcc7c269 --- /dev/null +++ b/pkg/logging/slog-logger.go @@ -0,0 +1,33 @@ +package logging + +import ( + "io" + "log/slog" + "os" + + "github.com/charmbracelet/log" +) + +type SlogOptions struct { + Writer io.Writer + Prefix string + + ShowTimestamp bool + ShowCaller bool + ShowDebugLogs bool +} + +func NewSlogLogger(opts SlogOptions) *slog.Logger { + if opts.Writer == nil { + opts.Writer = os.Stderr + } + + level := log.InfoLevel + if opts.ShowDebugLogs { + level = log.DebugLevel + } + + logger := log.NewWithOptions(opts.Writer, log.Options{ReportCaller: opts.ShowCaller, ReportTimestamp: opts.ShowTimestamp, Prefix: opts.Prefix, Level: level}) + + return slog.New(logger) +} From e56337bf466e5184323f3368399672d3baec76d4 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Mon, 22 Jul 2024 01:25:55 +0530 Subject: [PATCH 13/89] fix: tenant-agent cleanup, and better reconnect handling - improves reconnection triggering and handling - improves logging, introduces `log/slog` --- apps/tenant-agent/Taskfile.yml | 2 +- apps/tenant-agent/main.go | 151 ++++++++++-------- apps/tenant-agent/vector-grpc-proxy-server.go | 24 ++- pkg/grpc/client.go | 81 ++++++++++ pkg/grpc/server.go | 22 ++- pkg/logging/slog-logger.go | 9 ++ 6 files changed, 208 insertions(+), 81 deletions(-) diff --git a/apps/tenant-agent/Taskfile.yml b/apps/tenant-agent/Taskfile.yml index 4790b029a..74044bccf 100644 --- a/apps/tenant-agent/Taskfile.yml +++ b/apps/tenant-agent/Taskfile.yml @@ -17,7 +17,7 @@ tasks: dotenv: - .secrets/env cmds: - - go run . --dev + - go run . --dev --debug build: cmds: diff --git a/apps/tenant-agent/main.go b/apps/tenant-agent/main.go index 7d61d7e91..5d899eb90 100644 --- a/apps/tenant-agent/main.go +++ b/apps/tenant-agent/main.go @@ -4,15 +4,16 @@ import ( "context" "encoding/json" "flag" - "log" + "fmt" + "log/slog" "os" "strings" + "sync" "time" "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/errors" - "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" @@ -25,29 +26,36 @@ import ( proto_rpc "github.com/kloudlite/api/apps/tenant-agent/internal/proto-rpc" t "github.com/kloudlite/api/apps/tenant-agent/types" "github.com/kloudlite/operator/grpc-interfaces/grpc/messages" - libGrpc "github.com/kloudlite/operator/pkg/grpc" + + // libGrpc "github.com/kloudlite/operator/pkg/grpc" + libGrpc "github.com/kloudlite/api/pkg/grpc" "github.com/kloudlite/operator/pkg/kubectl" - "github.com/kloudlite/operator/pkg/logging" + "github.com/kloudlite/api/pkg/logging" apiErrors "k8s.io/apimachinery/pkg/api/errors" ) type grpcHandler struct { + mu sync.Mutex inMemCounter int64 yamlClient kubectl.YAMLClient - logger logging.Logger + logger *slog.Logger ev *env.Env msgDispatchCli messages.MessageDispatchServiceClient isDev bool } +func (g *grpcHandler) incrementCounter() { + g.mu.Lock() + defer g.mu.Unlock() + g.inMemCounter++ +} + const ( MaxConnectionDuration = 45 * time.Second ) func (g *grpcHandler) handleErrorOnApply(ctx context.Context, err error, msg t.AgentMessage) error { - g.logger.Debugf("[ERROR]: %s", err.Error()) - b, err := json.Marshal(t.AgentErrMessage{ AccountName: msg.AccountName, ClusterName: msg.ClusterName, @@ -71,7 +79,9 @@ func NewAuthorizedGrpcContext(ctx context.Context, accessToken string) context.C } func (g *grpcHandler) handleMessage(gctx context.Context, msg t.AgentMessage) error { - g.inMemCounter++ + g.incrementCounter() + start := time.Now() + logger := g.logger.With("counter", g.inMemCounter, "account", msg.AccountName, "cluster", msg.ClusterName, "action", msg.Action) ctx, cf := func() (context.Context, context.CancelFunc) { if g.isDev { return context.WithCancel(gctx) @@ -81,14 +91,14 @@ func (g *grpcHandler) handleMessage(gctx context.Context, msg t.AgentMessage) er defer cf() if msg.Object == nil { - g.logger.Infof("msg.Object is nil, could not process anything out of this message, ignoring ...") + logger.Info("msg.Object is nil, could not process anything out of this message, ignoring ...") return nil } obj := unstructured.Unstructured{Object: msg.Object} - mLogger := g.logger.WithKV("gvk", obj.GetObjectKind().GroupVersionKind().String()).WithKV("clusterName", msg.ClusterName).WithKV("accountName", msg.AccountName).WithKV("action", msg.Action) + mLogger := logger.With("gvk", obj.GetObjectKind().GroupVersionKind().String()) - mLogger.Infof("[%d] received message", g.inMemCounter) + mLogger.Info("received message") if len(strings.TrimSpace(msg.AccountName)) == 0 { return g.handleErrorOnApply(ctx, errors.Newf("field 'accountName' must be defined in message"), msg) @@ -110,53 +120,54 @@ func (g *grpcHandler) handleMessage(gctx context.Context, msg t.AgentMessage) er } if _, err := g.yamlClient.ApplyYAML(ctx, b); err != nil { - mLogger.Errorf(err, "[%d] [error-on-apply]: yaml: \n%s\n", g.inMemCounter, b) - mLogger.Infof("[%d] failed to process message", g.inMemCounter) + // mLogger.Errorf(err, "[%d] [error-on-apply]: yaml: \n%s\n", g.inMemCounter, b) + mLogger.Info("failed to process message") + fmt.Printf("[error-on-apply] yaml: \n%s\n", b) return g.handleErrorOnApply(ctx, err, msg) } - mLogger.Infof("[%d] processed message", g.inMemCounter) + mLogger.Info("processed message") } case t.ActionDelete: { if err := g.yamlClient.DeleteResource(ctx, &obj); err != nil { - mLogger.Infof("[%d] [error-on-delete]: %v", g.inMemCounter, err) + mLogger.Warn("while deleting resource, got", "err", err) if apiErrors.IsNotFound(err) { - mLogger.Infof("[%d] processed message, resource does not exist, might already be deleted", g.inMemCounter) + mLogger.Info("processed message, resource does not exist, might already be deleted") return g.handleErrorOnApply(ctx, err, msg) } - mLogger.Infof("[%d] failed to process message", g.inMemCounter) + mLogger.Info("failed to process message") } - mLogger.Infof("[%d] processed message", g.inMemCounter) + mLogger.Info("processed message") } case t.ActionRestart: { if err := g.yamlClient.RolloutRestart(ctx, kubectl.Deployment, obj.GetNamespace(), obj.GetLabels()); err != nil { return err } - mLogger.Infof("[%d] rolled out deployments", g.inMemCounter) + mLogger.Info("rolled out deployments") if err := g.yamlClient.RolloutRestart(ctx, kubectl.StatefulSet, obj.GetNamespace(), obj.GetLabels()); err != nil { return err } - mLogger.Infof("[%d] rolled out statefulsets", g.inMemCounter) - mLogger.Infof("[%d] processed message", g.inMemCounter) + mLogger.Info("rolled out statefulsets") } default: { err := errors.Newf("invalid action (%s)", msg.Action) - mLogger.Infof("[%d] [error]: %s", err.Error()) - mLogger.Infof("[%d] failed to process message", g.inMemCounter) + mLogger.Info("failed to process message, got", "err", err) return g.handleErrorOnApply(ctx, err, msg) } } + mLogger.Info("processed message", "took", fmt.Sprintf("%.3fs", time.Since(start).Seconds())) + return nil } func (g *grpcHandler) ensureAccessToken() error { if g.ev.AccessToken == "" { - g.logger.Infof("waiting on clusterToken exchange for accessToken") + g.logger.Info("waiting on clusterToken exchange for accessToken") } ctx := NewAuthorizedGrpcContext(context.TODO(), g.ev.AccessToken) @@ -165,16 +176,16 @@ func (g *grpcHandler) ensureAccessToken() error { ProtocolVersion: g.ev.GrpcMessageProtocolVersion, }) if err != nil { - g.logger.Errorf(err, "validating access token") + g.logger.Error("validating access token, got", "err", err) validationOut = nil } if validationOut != nil && validationOut.Valid { - g.logger.Infof("accessToken is valid, proceeding with it ...") + g.logger.Info("accessToken is valid, proceeding with it ...") return nil } - g.logger.Infof("accessToken is invalid, requesting new accessToken ...") + g.logger.Debug("accessToken is invalid, requesting new accessToken ...") out, err := g.msgDispatchCli.GetAccessToken(ctx, &messages.GetAccessTokenIn{ ProtocolVersion: g.ev.GrpcMessageProtocolVersion, @@ -184,7 +195,7 @@ func (g *grpcHandler) ensureAccessToken() error { return errors.NewE(err) } - g.logger.Infof("valid access token has been obtained, persisting it in k8s secret (%s/%s)...", g.ev.AccessTokenSecretNamespace, g.ev.AccessTokenSecretName) + g.logger.Info("valid access token has been obtained, persisting it in k8s secret (%s/%s)...", g.ev.AccessTokenSecretNamespace, g.ev.AccessTokenSecretName) s, err := g.yamlClient.Client().CoreV1().Secrets(g.ev.AccessTokenSecretNamespace).Get(context.TODO(), g.ev.AccessTokenSecretName, metav1.GetOptions{}) if err != nil { @@ -216,19 +227,18 @@ func (g *grpcHandler) ensureAccessToken() error { } if err := g.yamlClient.Client().CoreV1().Pods(g.ev.ResourceWatcherNamespace).DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{LabelSelector: metav1.FormatLabelSelector(&podLabelSelector)}); err != nil { - g.logger.Errorf(err, "failed to delete pods for resource watcher") + g.logger.Error("failed to delete pods for resource watcher, got", "err", err) } - g.logger.Infof("deleted all pods for resource watcher, they will be recreated") + g.logger.Info("deleted all pods for resource watcher, they will be recreated") } return nil } -func (g *grpcHandler) run(rctx context.Context, cf context.CancelFunc) error { - defer cf() +func (g *grpcHandler) run(rctx context.Context) error { ctx := NewAuthorizedGrpcContext(rctx, g.ev.AccessToken) - g.logger.Infof("asking message office to start sending actions") + g.logger.Info("asking message office to start sending actions") msgActionsCli, err := g.msgDispatchCli.SendActions(ctx, &messages.Empty{}) if err != nil { return errors.NewE(err) @@ -243,23 +253,27 @@ func (g *grpcHandler) run(rctx context.Context, cf context.CancelFunc) error { a, err := msgActionsCli.Recv() if err != nil { if status.Code(err) == codes.Unavailable { - g.logger.Infof("server unavailable, (may be, Gateway Timed Out 504), reconnecting ...") + g.logger.Info("server unavailable, (may be, Gateway Timed Out 504), reconnecting ...") return nil } if status.Code(err) == codes.DeadlineExceeded { - g.logger.Infof("Connection Timed Out, reconnecting ...") + g.logger.Info("Connection Timed Out, reconnecting ...") + return nil + } + if status.Code(err) == codes.Canceled { + g.logger.Info("client is being closed, will reconnect") return nil } return err } if err := json.Unmarshal(a.Message, &msg); err != nil { - g.logger.Errorf(err, "[ERROR] while json unmarshal") + g.logger.Error("while unmarshalling agent message, got", "err", err) return errors.NewE(err) } if err := g.handleMessage(ctx, msg); err != nil { - g.logger.Errorf(err, "[ERROR] while handling message") + g.logger.Error("while handling agent message, got", "err", err) return errors.NewE(err) } } @@ -268,27 +282,32 @@ func (g *grpcHandler) run(rctx context.Context, cf context.CancelFunc) error { func main() { var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") + + var debug bool + flag.BoolVar(&debug, "debug", false, "--debug") + flag.Parse() ev := env.GetEnvOrDie() - logger := logging.NewOrDie(&logging.Options{Name: "kloudlite-agent", Dev: isDev}) + logger := logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug}) - logger.Infof("waiting for GRPC connection to happen") + logger.Debug("waiting for GRPC connection to happen") yamlClient := func() kubectl.YAMLClient { if isDev { - logger.Debugf("connecting to k8s over host addr (%s)", "localhost:8081") - return kubectl.NewYAMLClientOrDie(&rest.Config{Host: "localhost:8081"}, kubectl.YAMLClientOpts{Logger: logger}) + logger.Debug("connecting to k8s over", "local-addr", "localhost:8081") + return kubectl.NewYAMLClientOrDie(&rest.Config{Host: "localhost:8081"}, kubectl.YAMLClientOpts{}) } config, err := rest.InClusterConfig() if err != nil { panic(err) } - return kubectl.NewYAMLClientOrDie(config, kubectl.YAMLClientOpts{Logger: logger}) + return kubectl.NewYAMLClientOrDie(config, kubectl.YAMLClientOpts{}) }() g := grpcHandler{ + mu: sync.Mutex{}, inMemCounter: 0, yamlClient: yamlClient, logger: logger, @@ -303,13 +322,16 @@ func main() { errCh: nil, } - gs := libGrpc.NewGrpcServer(libGrpc.GrpcServerOpts{Logger: logger}) - proto_rpc.RegisterVectorServer(gs.GrpcServer, vps) + gs, err := libGrpc.NewGrpcServer(libGrpc.ServerOpts{Slogger: logger.With("component", "vector-grpc-proxy")}) + if err != nil { + logger.Error("failed to create grpc server, got", "err", err) + } + proto_rpc.RegisterVectorServer(gs, vps) go func() { err := gs.Listen(ev.VectorProxyGrpcServerAddr) if err != nil { - logger.Error(err) + logger.Error("failed to listen on vector grpc server, got", "err", err) os.Exit(1) } }() @@ -317,28 +339,16 @@ func main() { common.PrintReadyBanner() for { - logger.Debugf("trying to connect to message office grpc (%s)", ev.GrpcAddr) - cc, err := func() (*grpc.ClientConn, error) { - // if isDev { - // logger.Infof("attempting grpc connect over %s", ev.GrpcAddr) - // return libGrpc.Connect(ev.GrpcAddr, libGrpc.ConnectOpts{ - // SecureConnect: false, - // Timeout: 20 * time.Second, - // }) - // } - logger.Infof("attempting grpc connect over %s", ev.GrpcAddr) - return libGrpc.ConnectSecure(ev.GrpcAddr) - }() + cc, err := libGrpc.NewGrpcClientV2(ev.GrpcAddr, libGrpc.GrpcConnectOpts{TLSConnect: isDev, Logger: logger}) if err != nil { - log.Fatalf("Failed to connect after retries: %v", err) + logger.Error("failed to connect to message office, got", "err", err) + <-time.After(1 * time.Second) } - logger.Infof("GRPC connection to message-office (%s) successful", ev.GrpcAddr) - g.msgDispatchCli = messages.NewMessageDispatchServiceClient(cc) if err := g.ensureAccessToken(); err != nil { - logger.Errorf(err, "ensuring access token") + logger.Error("ensuring access token, got", "err", err) } ctx, cf := context.WithTimeout(context.TODO(), MaxConnectionDuration) @@ -347,26 +357,33 @@ func main() { vps.realVectorClient = proto_rpc.NewVectorClient(cc) vps.errCh = make(chan error, 1) + // go func() { + // <-time.After(10 * time.Second) + // vps.errCh <- errors.Newf("FAKE connection timeout") + // }() + go func() { - if err := g.run(ctx, cf); err != nil { - logger.Errorf(err, "running grpc sendActions") + defer cf() + if err := g.run(ctx); err != nil { + logger.Error("running grpc sendActions, got", "err", err) } }() select { case err := <-vps.errCh: { - logger.Errorf(err, "error from vector grpc proxy server") - cf() + logger.Error("from vector grpc proxy server, got", "err", err) } case <-ctx.Done(): { - logger.Debugf("run context done, reconnecting ...") + logger.Debug("MAX_CONNECTION_DURATION reached, will re-initialize connection") } } if err = cc.Close(); err != nil { - logger.Errorf(err, "Failed to close connection") + logger.Error("Failed to close connection, got", "err", err) } + + cf() } } diff --git a/apps/tenant-agent/vector-grpc-proxy-server.go b/apps/tenant-agent/vector-grpc-proxy-server.go index 7d4baede6..19e95a227 100644 --- a/apps/tenant-agent/vector-grpc-proxy-server.go +++ b/apps/tenant-agent/vector-grpc-proxy-server.go @@ -2,17 +2,20 @@ package main import ( "context" + "fmt" + "log/slog" + "time" proto_rpc "github.com/kloudlite/api/apps/tenant-agent/internal/proto-rpc" "github.com/kloudlite/api/pkg/errors" - "github.com/kloudlite/operator/pkg/logging" + fn "github.com/kloudlite/api/pkg/functions" "google.golang.org/grpc/metadata" ) type vectorGrpcProxyServer struct { proto_rpc.UnimplementedVectorServer realVectorClient proto_rpc.VectorClient - logger logging.Logger + logger *slog.Logger errCh chan error @@ -30,14 +33,16 @@ func (v *vectorGrpcProxyServer) PushEvents(ctx context.Context, msg *proto_rpc.P } outgoingCtx := metadata.NewOutgoingContext(ctx, metadata.Pairs("authorization", v.accessToken)) + logger := v.logger.With("request-id", fn.UUID()) v.pushEventsCounter++ - v.logger.Debugf("[%v] received push-events message", v.pushEventsCounter) - defer v.logger.Debugf("[%v] dispatched push-events message", v.pushEventsCounter) + logger.Debug("received push-events message") + start := time.Now() + defer logger.Info("dispatched push-events message", "took", fmt.Sprintf("%.3fs", time.Since(start).Seconds())) per, err := v.realVectorClient.PushEvents(outgoingCtx, msg) if err != nil { - v.logger.Error(err) + v.logger.Error("while pushing events got", "err", err) if v.errCh != nil { v.errCh <- err } @@ -53,12 +58,15 @@ func (v *vectorGrpcProxyServer) HealthCheck(ctx context.Context, msg *proto_rpc. outgoingCtx := metadata.NewOutgoingContext(ctx, metadata.Pairs("authorization", v.accessToken)) + logger := v.logger.With("request-id", fn.UUID()) + v.healthCheckCounter++ - v.logger.Debugf("[%v] received health-check message", v.healthCheckCounter) - defer v.logger.Debugf("[%v] dispatched health-check message", v.healthCheckCounter) + logger.Debug("received health-check message") + start := time.Now() + defer logger.Debug("dispatched health-check message", "took", fmt.Sprintf("%.3fs", time.Since(start).Seconds())) hcr, err := v.realVectorClient.HealthCheck(outgoingCtx, msg) if err != nil { - v.logger.Error(err) + v.logger.Error("while health-checking got", "err", err) if v.errCh != nil { v.errCh <- err } diff --git a/pkg/grpc/client.go b/pkg/grpc/client.go index f39594fe7..743a75240 100644 --- a/pkg/grpc/client.go +++ b/pkg/grpc/client.go @@ -1,8 +1,16 @@ package grpc import ( + "context" + "crypto/tls" + "fmt" + "log/slog" + "time" + "github.com/kloudlite/api/pkg/errors" "google.golang.org/grpc" + "google.golang.org/grpc/connectivity" + "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" ) @@ -26,3 +34,76 @@ func NewGrpcClient(serverAddr string) (Client, error) { } return &grpcClient{ClientConn: conn}, nil } + +type GrpcConnectOpts struct { + TLSConnect bool + Logger *slog.Logger + + ReconnectCheckInterval *time.Duration +} + +func NewGrpcClientV2(serverAddr string, opts GrpcConnectOpts) (Client, error) { + tc := insecure.NewCredentials() + if opts.TLSConnect { + tc = credentials.NewTLS(&tls.Config{InsecureSkipVerify: false}) + } + + if opts.Logger == nil { + opts.Logger = slog.Default() + } + if opts.ReconnectCheckInterval == nil { + rafter := 2 * time.Second + opts.ReconnectCheckInterval = &rafter + } + + opts.Logger.Debug("ATTEMPTING to connect") + conn, err := grpc.Dial(serverAddr, grpc.WithTransportCredentials(tc)) + if err != nil { + return nil, errors.NewE(err) + } + + gc := &grpcClient{ClientConn: conn} + + go func() { + attempt := 0 + prevState := connectivity.Idle + reconnecting := false + start := time.Now() + for { + cstate := conn.GetState() + + if cstate != connectivity.Ready { + opts.Logger.Warn("connection is not in ready state", "current", cstate) + + if cstate == connectivity.Shutdown { + opts.Logger.Info("connection is closing, shutting down...") + return + } + + if cstate != connectivity.Connecting && !reconnecting { + start = time.Now() + conn.Connect() // reconnecting + opts.Logger.Debug("ATTEMPTING re-connect") + reconnecting = true + attempt++ + continue + } + } + if cstate == connectivity.Ready && prevState != connectivity.Ready { + if attempt > 0 { + reconnecting = false + opts.Logger.Info("RE-CONNECTED", "attempt", attempt, "took", fmt.Sprintf("%.3fs", time.Since(start).Seconds())) + } + opts.Logger.Info("CONNECTED", "took", fmt.Sprintf("%.3fs", time.Since(start).Seconds())) + } + + prevState = cstate + // <-time.After(*opts.ReconnectCheckInterval) + ctx, cf := context.WithTimeout(context.TODO(), *opts.ReconnectCheckInterval) + conn.WaitForStateChange(ctx, cstate) + cf() + } + }() + + return gc, nil +} diff --git a/pkg/grpc/server.go b/pkg/grpc/server.go index e04952a98..b510c47e3 100644 --- a/pkg/grpc/server.go +++ b/pkg/grpc/server.go @@ -1,6 +1,7 @@ package grpc import ( + "log/slog" "net" "github.com/kloudlite/api/pkg/errors" @@ -16,12 +17,15 @@ type Server interface { } type ServerOpts struct { - Logger logging.Logger + Logger logging.Logger + Slogger *slog.Logger } type grpcServer struct { *grpc.Server - logger logging.Logger + // Deprecated: use slogger + logger logging.Logger + slogger *slog.Logger } func (g *grpcServer) Listen(addr string) error { @@ -29,7 +33,11 @@ func (g *grpcServer) Listen(addr string) error { if err != nil { return errors.NewEf(err, "could not listen to net/tcp server") } - g.logger.Infof("listening on %s", addr) + if g.slogger != nil { + g.slogger.Info("grpc server listening", "at", addr) + } else { + g.logger.Infof("listening on %s", addr) + } return g.Serve(listen) } @@ -50,13 +58,17 @@ func NewGrpcServer(opts ServerOpts) (Server, error) { grpc.StreamInterceptor(func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { p, ok := peer.FromContext(stream.Context()) if ok { - opts.Logger.Debugf("[Stream] New connection from %s", p.Addr.String()) + if opts.Slogger != nil { + opts.Slogger.Debug("new grpc connection", "from", p.Addr.String()) + } else { + opts.Logger.Debugf("[Stream] New connection from %s", p.Addr.String()) + } } return handler(srv, stream) }), ) - return &grpcServer{Server: server, logger: opts.Logger}, nil + return &grpcServer{Server: server, logger: opts.Logger, slogger: opts.Slogger}, nil } // Type guard to ensure grpcServer implements Server interface, at compile time diff --git a/pkg/logging/slog-logger.go b/pkg/logging/slog-logger.go index 7fcc7c269..472257e99 100644 --- a/pkg/logging/slog-logger.go +++ b/pkg/logging/slog-logger.go @@ -5,6 +5,7 @@ import ( "log/slog" "os" + "github.com/charmbracelet/lipgloss" "github.com/charmbracelet/log" ) @@ -29,5 +30,13 @@ func NewSlogLogger(opts SlogOptions) *slog.Logger { logger := log.NewWithOptions(opts.Writer, log.Options{ReportCaller: opts.ShowCaller, ReportTimestamp: opts.ShowTimestamp, Prefix: opts.Prefix, Level: level}) + styles := log.DefaultStyles() + styles.Levels[log.DebugLevel] = styles.Levels[log.DebugLevel].Foreground(lipgloss.Color("#5b717f")) + + // styles.Key = lipgloss.NewStyle().Background(lipgloss.Color("#083e54")).Foreground(lipgloss.Color("#9dbdc9")).Bold(true) + styles.Key = lipgloss.NewStyle().Foreground(lipgloss.Color("#36cbfa")).Bold(true) + + logger.SetStyles(styles) + return slog.New(logger) } From a00f7a93d68b5006327eea6500588d5ef15ddfa8 Mon Sep 17 00:00:00 2001 From: DepsHub Date: Tue, 23 Jul 2024 12:20:57 +0000 Subject: [PATCH 14/89] Update @apollo/gateway and graphql Updated: - @apollo/gateway from ^2.7.2 to 2.8.3 - graphql from ^16.8.1 to 16.9.0 For issues or feature requests: --- apps/gateway/package-lock.json | 3136 ++++++++++++++++++++++++++++++++ apps/gateway/package.json | 4 +- apps/gateway/src/index.js | 15 +- 3 files changed, 3148 insertions(+), 7 deletions(-) create mode 100644 apps/gateway/package-lock.json diff --git a/apps/gateway/package-lock.json b/apps/gateway/package-lock.json new file mode 100644 index 000000000..92fb0df2f --- /dev/null +++ b/apps/gateway/package-lock.json @@ -0,0 +1,3136 @@ +{ + "name": "gateway", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "gateway", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@apollo/gateway": "2.8.3", + "@apollo/server": "^4.10.2", + "cookie": "^0.6.0", + "express": "^4.19.2", + "graphql": "16.9.0", + "js-yaml": "^4.1.0" + } + }, + "node_modules/@apollo/cache-control-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@apollo/cache-control-types/-/cache-control-types-1.0.3.tgz", + "integrity": "sha512-F17/vCp7QVwom9eG7ToauIKdAxpSoadsJnqIfyryLFSkLSOEqu+eC5Z3N8OXcUVStuOMcNHlyraRsA6rRICu4g==", + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/composition": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@apollo/composition/-/composition-2.8.3.tgz", + "integrity": "sha512-CpMraUfP9+LB6egE4HAVvShw/toxzb1KTYn175M7WE+lPnq3gclNh6bLUotPEOHQeW9EPttpC8tndMscfpil5A==", + "dependencies": { + "@apollo/federation-internals": "2.8.3", + "@apollo/query-graphs": "2.8.3" + }, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "graphql": "^16.5.0" + } + }, + "node_modules/@apollo/federation-internals": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@apollo/federation-internals/-/federation-internals-2.8.3.tgz", + "integrity": "sha512-5GOeQ1I5C7uCU6ob/TbRGqWg2m+9qo8/8qlGhfaMUqN3ukSCmgkKUDdfg1M6sB3lDmIoL5tAoSkmJegKSaDR5A==", + "dependencies": { + "@types/uuid": "^9.0.0", + "chalk": "^4.1.0", + "js-levenshtein": "^1.1.6", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "graphql": "^16.5.0" + } + }, + "node_modules/@apollo/gateway": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@apollo/gateway/-/gateway-2.8.3.tgz", + "integrity": "sha512-pJ99vpF7flKqtwLyFgV0SJF09zlLqlW8YYm34I/1FrFh0Zqc5+Y3VV3Y5nAc9ddiodftGItnUbx4txuVM/KMjA==", + "dependencies": { + "@apollo/composition": "2.8.3", + "@apollo/federation-internals": "2.8.3", + "@apollo/query-planner": "2.8.3", + "@apollo/server-gateway-interface": "^1.1.0", + "@apollo/usage-reporting-protobuf": "^4.1.0", + "@apollo/utils.createhash": "^2.0.0", + "@apollo/utils.fetcher": "^2.0.0", + "@apollo/utils.isnodelike": "^2.0.0", + "@apollo/utils.keyvaluecache": "^2.1.0", + "@apollo/utils.logger": "^2.0.0", + "@josephg/resolvable": "^1.0.1", + "@opentelemetry/api": "^1.0.1", + "@types/node-fetch": "^2.6.2", + "async-retry": "^1.3.3", + "loglevel": "^1.6.1", + "make-fetch-happen": "^11.0.0", + "node-abort-controller": "^3.0.1", + "node-fetch": "^2.6.7" + }, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "graphql": "^16.5.0" + } + }, + "node_modules/@apollo/protobufjs": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@apollo/protobufjs/-/protobufjs-1.2.7.tgz", + "integrity": "sha512-Lahx5zntHPZia35myYDBRuF58tlwPskwHc5CWBZC/4bMKB6siTBWwtMrkqXcsNwQiFSzSx5hKdRPUmemrEp3Gg==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.0", + "long": "^4.0.0" + }, + "bin": { + "apollo-pbjs": "bin/pbjs", + "apollo-pbts": "bin/pbts" + } + }, + "node_modules/@apollo/query-graphs": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@apollo/query-graphs/-/query-graphs-2.8.3.tgz", + "integrity": "sha512-AB1Lr8LUr9iXGQIb70EhiSsu+G6AIW9EXkl+YGTCihn/zbsCcGx/UKr/HUsfAOyg2twenjToLcvqX5eRuM8Xag==", + "dependencies": { + "@apollo/federation-internals": "2.8.3", + "deep-equal": "^2.0.5", + "ts-graphviz": "^1.5.4", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "graphql": "^16.5.0" + } + }, + "node_modules/@apollo/query-planner": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@apollo/query-planner/-/query-planner-2.8.3.tgz", + "integrity": "sha512-dwkschpjwoGziUjYfKwTVHAMuPoRt1Xr2suLEfHK0oSZ0AoDz3RQIBY6Dy8T61hPFB7p/3YvJja7q8jDDDP/og==", + "dependencies": { + "@apollo/federation-internals": "2.8.3", + "@apollo/query-graphs": "2.8.3", + "@apollo/utils.keyvaluecache": "^2.1.0", + "chalk": "^4.1.0", + "deep-equal": "^2.0.5", + "pretty-format": "^29.0.0" + }, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "graphql": "^16.5.0" + } + }, + "node_modules/@apollo/server": { + "version": "4.10.5", + "resolved": "https://registry.npmjs.org/@apollo/server/-/server-4.10.5.tgz", + "integrity": "sha512-I+Oi1CnphXExSAAsZbclgRDN4k4CEMxyKRzYg3bir5N8OmydEhzXDlIGAOETP/TKblxR7HPXGvwn2cJKzbl46w==", + "dependencies": { + "@apollo/cache-control-types": "^1.0.3", + "@apollo/server-gateway-interface": "^1.1.1", + "@apollo/usage-reporting-protobuf": "^4.1.1", + "@apollo/utils.createhash": "^2.0.0", + "@apollo/utils.fetcher": "^2.0.0", + "@apollo/utils.isnodelike": "^2.0.0", + "@apollo/utils.keyvaluecache": "^2.1.0", + "@apollo/utils.logger": "^2.0.0", + "@apollo/utils.usagereporting": "^2.1.0", + "@apollo/utils.withrequired": "^2.0.0", + "@graphql-tools/schema": "^9.0.0", + "@types/express": "^4.17.13", + "@types/express-serve-static-core": "^4.17.30", + "@types/node-fetch": "^2.6.1", + "async-retry": "^1.2.1", + "cors": "^2.8.5", + "express": "^4.17.1", + "loglevel": "^1.6.8", + "lru-cache": "^7.10.1", + "negotiator": "^0.6.3", + "node-abort-controller": "^3.1.1", + "node-fetch": "^2.6.7", + "uuid": "^9.0.0", + "whatwg-mimetype": "^3.0.0" + }, + "engines": { + "node": ">=14.16.0" + }, + "peerDependencies": { + "graphql": "^16.6.0" + } + }, + "node_modules/@apollo/server-gateway-interface": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@apollo/server-gateway-interface/-/server-gateway-interface-1.1.1.tgz", + "integrity": "sha512-pGwCl/po6+rxRmDMFgozKQo2pbsSwE91TpsDBAOgf74CRDPXHHtM88wbwjab0wMMZh95QfR45GGyDIdhY24bkQ==", + "dependencies": { + "@apollo/usage-reporting-protobuf": "^4.1.1", + "@apollo/utils.fetcher": "^2.0.0", + "@apollo/utils.keyvaluecache": "^2.1.0", + "@apollo/utils.logger": "^2.0.0" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/usage-reporting-protobuf": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@apollo/usage-reporting-protobuf/-/usage-reporting-protobuf-4.1.1.tgz", + "integrity": "sha512-u40dIUePHaSKVshcedO7Wp+mPiZsaU6xjv9J+VyxpoU/zL6Jle+9zWeG98tr/+SZ0nZ4OXhrbb8SNr0rAPpIDA==", + "dependencies": { + "@apollo/protobufjs": "1.2.7" + } + }, + "node_modules/@apollo/utils.createhash": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.createhash/-/utils.createhash-2.0.1.tgz", + "integrity": "sha512-fQO4/ZOP8LcXWvMNhKiee+2KuKyqIcfHrICA+M4lj/h/Lh1H10ICcUtk6N/chnEo5HXu0yejg64wshdaiFitJg==", + "dependencies": { + "@apollo/utils.isnodelike": "^2.0.1", + "sha.js": "^2.4.11" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@apollo/utils.dropunuseddefinitions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.dropunuseddefinitions/-/utils.dropunuseddefinitions-2.0.1.tgz", + "integrity": "sha512-EsPIBqsSt2BwDsv8Wu76LK5R1KtsVkNoO4b0M5aK0hx+dGg9xJXuqlr7Fo34Dl+y83jmzn+UvEW+t1/GP2melA==", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.fetcher": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.fetcher/-/utils.fetcher-2.0.1.tgz", + "integrity": "sha512-jvvon885hEyWXd4H6zpWeN3tl88QcWnHp5gWF5OPF34uhvoR+DFqcNxs9vrRaBBSY3qda3Qe0bdud7tz2zGx1A==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@apollo/utils.isnodelike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.isnodelike/-/utils.isnodelike-2.0.1.tgz", + "integrity": "sha512-w41XyepR+jBEuVpoRM715N2ZD0xMD413UiJx8w5xnAZD2ZkSJnMJBoIzauK83kJpSgNuR6ywbV29jG9NmxjK0Q==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@apollo/utils.keyvaluecache": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.keyvaluecache/-/utils.keyvaluecache-2.1.1.tgz", + "integrity": "sha512-qVo5PvUUMD8oB9oYvq4ViCjYAMWnZ5zZwEjNF37L2m1u528x5mueMlU+Cr1UinupCgdB78g+egA1G98rbJ03Vw==", + "dependencies": { + "@apollo/utils.logger": "^2.0.1", + "lru-cache": "^7.14.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@apollo/utils.logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.logger/-/utils.logger-2.0.1.tgz", + "integrity": "sha512-YuplwLHaHf1oviidB7MxnCXAdHp3IqYV8n0momZ3JfLniae92eYqMIx+j5qJFX6WKJPs6q7bczmV4lXIsTu5Pg==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@apollo/utils.printwithreducedwhitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.printwithreducedwhitespace/-/utils.printwithreducedwhitespace-2.0.1.tgz", + "integrity": "sha512-9M4LUXV/fQBh8vZWlLvb/HyyhjJ77/I5ZKu+NBWV/BmYGyRmoEP9EVAy7LCVoY3t8BDcyCAGfxJaLFCSuQkPUg==", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.removealiases": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.removealiases/-/utils.removealiases-2.0.1.tgz", + "integrity": "sha512-0joRc2HBO4u594Op1nev+mUF6yRnxoUH64xw8x3bX7n8QBDYdeYgY4tF0vJReTy+zdn2xv6fMsquATSgC722FA==", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.sortast": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.sortast/-/utils.sortast-2.0.1.tgz", + "integrity": "sha512-eciIavsWpJ09za1pn37wpsCGrQNXUhM0TktnZmHwO+Zy9O4fu/WdB4+5BvVhFiZYOXvfjzJUcc+hsIV8RUOtMw==", + "dependencies": { + "lodash.sortby": "^4.7.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.stripsensitiveliterals": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.stripsensitiveliterals/-/utils.stripsensitiveliterals-2.0.1.tgz", + "integrity": "sha512-QJs7HtzXS/JIPMKWimFnUMK7VjkGQTzqD9bKD1h3iuPAqLsxd0mUNVbkYOPTsDhUKgcvUOfOqOJWYohAKMvcSA==", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.usagereporting": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.usagereporting/-/utils.usagereporting-2.1.0.tgz", + "integrity": "sha512-LPSlBrn+S17oBy5eWkrRSGb98sWmnEzo3DPTZgp8IQc8sJe0prDgDuppGq4NeQlpoqEHz0hQeYHAOA0Z3aQsxQ==", + "dependencies": { + "@apollo/usage-reporting-protobuf": "^4.1.0", + "@apollo/utils.dropunuseddefinitions": "^2.0.1", + "@apollo/utils.printwithreducedwhitespace": "^2.0.1", + "@apollo/utils.removealiases": "2.0.1", + "@apollo/utils.sortast": "^2.0.1", + "@apollo/utils.stripsensitiveliterals": "^2.0.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.withrequired": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.withrequired/-/utils.withrequired-2.0.1.tgz", + "integrity": "sha512-YBDiuAX9i1lLc6GeTy1m7DGLFn/gMnvXqlalOIMjM7DeOgIacEjjfwPqb0M1CQ2v11HhR15d1NmxJoRCfrNqcA==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@graphql-tools/merge": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.4.2.tgz", + "integrity": "sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==", + "dependencies": { + "@graphql-tools/utils": "^9.2.1", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/schema": { + "version": "9.0.19", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.19.tgz", + "integrity": "sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==", + "dependencies": { + "@graphql-tools/merge": "^8.4.1", + "@graphql-tools/utils": "^9.2.1", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/utils": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", + "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "dependencies": { + "@graphql-typed-document-node/core": "^3.1.1", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-typed-document-node/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@josephg/resolvable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@josephg/resolvable/-/resolvable-1.0.1.tgz", + "integrity": "sha512-CtzORUwWTTOTqfVtHaKRJ0I1kNQd1bpn3sUh8I3nJDVY+5/M/Oe1DnEWzPQvqq/xPIIkzzzIP7mfCoAjFRvDhg==" + }, + "node_modules/@npmcli/fs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@opentelemetry/api": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", + "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.5", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz", + "integrity": "sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" + }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" + }, + "node_modules/@types/node": { + "version": "20.14.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", + "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", + "dependencies": { + "@types/node": "*", + "form-data": "^4.0.0" + } + }, + "node_modules/@types/qs": { + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agent-base/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/agent-base/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/async-retry": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz", + "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==", + "dependencies": { + "retry": "0.13.1" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacache": { + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/cacache/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/deep-equal": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", + "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.5", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.2", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.6.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphql": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" + }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==" + }, + "node_modules/loglevel": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", + "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==", + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, + "node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/make-fetch-happen": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-fetch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-fetch/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/promise-retry/node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + }, + "node_modules/ssri": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/ssri/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-graphviz": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/ts-graphviz/-/ts-graphviz-1.8.2.tgz", + "integrity": "sha512-5YhbFoHmjxa7pgQLkB07MtGnGJ/yhvjmc9uhsnDBEICME6gkPf83SBwLDQqGDoCa3XzUMWLk1AU2Wn1u1naDtA==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ts-graphviz" + } + }, + "node_modules/tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/value-or-promise": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", + "integrity": "sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==", + "engines": { + "node": ">=12" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/apps/gateway/package.json b/apps/gateway/package.json index a63daff4d..2cac51e4f 100644 --- a/apps/gateway/package.json +++ b/apps/gateway/package.json @@ -12,11 +12,11 @@ "author": "", "license": "ISC", "dependencies": { - "@apollo/gateway": "^2.7.2", + "@apollo/gateway": "2.8.3", "@apollo/server": "^4.10.2", "cookie": "^0.6.0", "express": "^4.19.2", - "graphql": "^16.8.1", + "graphql": "16.9.0", "js-yaml": "^4.1.0" } } diff --git a/apps/gateway/src/index.js b/apps/gateway/src/index.js index 307d9837b..96ec46614 100644 --- a/apps/gateway/src/index.js +++ b/apps/gateway/src/index.js @@ -27,6 +27,10 @@ class CustomDataSource extends RemoteGraphQLDataSource { } // eslint-disable-next-line class-methods-use-this + shouldBatchRequest({ request }) { + return request.http?.headers?.get('x-hasura-admin-secret') !== undefined; + } +} didReceiveResponse({ response, context }) { const x = response.http.headers.get('set-cookie'); if (!x) return response; @@ -58,10 +62,10 @@ const server = new ApolloServer({ credentials: true, }, gateway, - // plugins: [graphqlExecutionLogger], - // context: async ({ req, res }) => { - // return { req, res }; - // }, +// plugins: [graphqlExecutionLogger], +// context: async ({ req, res }) => { +// return { req, res }; +// }, }); const app = express() @@ -87,6 +91,8 @@ app.listen(port, (err) => { console.log(String.raw` , + +`) ##### ######## ######## @@ -105,4 +111,3 @@ console.log(String.raw` , `) - From 6f01011a2ae18de63c167b26002a3132345656c7 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 25 Jul 2024 15:12:52 +0530 Subject: [PATCH 15/89] fix(tenant-agent): fixes inconsistent reconnect behavior - cleans up lot of junk code - improves logging with `log/slog` --- apps/tenant-agent/main.go | 25 +++------------ apps/tenant-agent/vector-grpc-proxy-server.go | 32 +++++++++++-------- pkg/repos/db-repo-mongo.go | 11 ++++--- 3 files changed, 29 insertions(+), 39 deletions(-) diff --git a/apps/tenant-agent/main.go b/apps/tenant-agent/main.go index 5d899eb90..724159f61 100644 --- a/apps/tenant-agent/main.go +++ b/apps/tenant-agent/main.go @@ -27,7 +27,6 @@ import ( t "github.com/kloudlite/api/apps/tenant-agent/types" "github.com/kloudlite/operator/grpc-interfaces/grpc/messages" - // libGrpc "github.com/kloudlite/operator/pkg/grpc" libGrpc "github.com/kloudlite/api/pkg/grpc" "github.com/kloudlite/operator/pkg/kubectl" @@ -319,7 +318,6 @@ func main() { realVectorClient: nil, logger: logger, accessToken: ev.AccessToken, - errCh: nil, } gs, err := libGrpc.NewGrpcServer(libGrpc.ServerOpts{Slogger: logger.With("component", "vector-grpc-proxy")}) @@ -339,7 +337,7 @@ func main() { common.PrintReadyBanner() for { - cc, err := libGrpc.NewGrpcClientV2(ev.GrpcAddr, libGrpc.GrpcConnectOpts{TLSConnect: isDev, Logger: logger}) + cc, err := libGrpc.NewGrpcClientV2(ev.GrpcAddr, libGrpc.GrpcConnectOpts{TLSConnect: !isDev, Logger: logger}) if err != nil { logger.Error("failed to connect to message office, got", "err", err) <-time.After(1 * time.Second) @@ -355,12 +353,7 @@ func main() { vps.accessToken = g.ev.AccessToken vps.realVectorClient = proto_rpc.NewVectorClient(cc) - vps.errCh = make(chan error, 1) - - // go func() { - // <-time.After(10 * time.Second) - // vps.errCh <- errors.Newf("FAKE connection timeout") - // }() + vps.connCancelFn = cf go func() { defer cf() @@ -369,21 +362,11 @@ func main() { } }() - select { - case err := <-vps.errCh: - { - logger.Error("from vector grpc proxy server, got", "err", err) - } - case <-ctx.Done(): - { - logger.Debug("MAX_CONNECTION_DURATION reached, will re-initialize connection") - } - } + <-ctx.Done() + logger.Debug("MAX_CONNECTION_DURATION reached, will re-initialize connection") if err = cc.Close(); err != nil { logger.Error("Failed to close connection, got", "err", err) } - - cf() } } diff --git a/apps/tenant-agent/vector-grpc-proxy-server.go b/apps/tenant-agent/vector-grpc-proxy-server.go index 19e95a227..a55442d2e 100644 --- a/apps/tenant-agent/vector-grpc-proxy-server.go +++ b/apps/tenant-agent/vector-grpc-proxy-server.go @@ -9,15 +9,18 @@ import ( proto_rpc "github.com/kloudlite/api/apps/tenant-agent/internal/proto-rpc" "github.com/kloudlite/api/pkg/errors" fn "github.com/kloudlite/api/pkg/functions" + "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" ) type vectorGrpcProxyServer struct { proto_rpc.UnimplementedVectorServer + realVectorClient proto_rpc.VectorClient - logger *slog.Logger + connCancelFn context.CancelFunc - errCh chan error + logger *slog.Logger accessToken string accountName string @@ -33,21 +36,21 @@ func (v *vectorGrpcProxyServer) PushEvents(ctx context.Context, msg *proto_rpc.P } outgoingCtx := metadata.NewOutgoingContext(ctx, metadata.Pairs("authorization", v.accessToken)) - logger := v.logger.With("request-id", fn.UUID()) + logger := v.logger.With("request-id", fmt.Sprintf("%s-%s", fn.UUID(4), fn.UUID(4))) v.pushEventsCounter++ logger.Debug("received push-events message") start := time.Now() - defer logger.Info("dispatched push-events message", "took", fmt.Sprintf("%.3fs", time.Since(start).Seconds())) - per, err := v.realVectorClient.PushEvents(outgoingCtx, msg) if err != nil { - v.logger.Error("while pushing events got", "err", err) - if v.errCh != nil { - v.errCh <- err + v.connCancelFn() + if status.Code(err) == codes.Canceled { + return nil, err } + v.logger.Error("FAILED to dispatch push-events message, got", "err", err) return nil, errors.NewE(err) } + logger.Debug("DISPATCHED push-events message", "took", fmt.Sprintf("%.3fs", time.Since(start).Seconds())) return per, nil } @@ -58,19 +61,20 @@ func (v *vectorGrpcProxyServer) HealthCheck(ctx context.Context, msg *proto_rpc. outgoingCtx := metadata.NewOutgoingContext(ctx, metadata.Pairs("authorization", v.accessToken)) - logger := v.logger.With("request-id", fn.UUID()) + logger := v.logger.With("request-id", fmt.Sprintf("%s-%s", fn.UUID(4), fn.UUID(4))) v.healthCheckCounter++ - logger.Debug("received health-check message") + logger.Debug("RECEIVED health-check message") start := time.Now() - defer logger.Debug("dispatched health-check message", "took", fmt.Sprintf("%.3fs", time.Since(start).Seconds())) hcr, err := v.realVectorClient.HealthCheck(outgoingCtx, msg) if err != nil { - v.logger.Error("while health-checking got", "err", err) - if v.errCh != nil { - v.errCh <- err + v.connCancelFn() + if status.Code(err) == codes.Canceled { + return nil, err } + v.logger.Error("FAILED to dispatch health-check message, got", "err", err) return nil, errors.NewE(err) } + logger.Debug("DISPATCHED health-check message", "took", fmt.Sprintf("%.3fs", time.Since(start).Seconds())) return hcr, nil } diff --git a/pkg/repos/db-repo-mongo.go b/pkg/repos/db-repo-mongo.go index 5f7e2b2c7..3e2502f65 100644 --- a/pkg/repos/db-repo-mongo.go +++ b/pkg/repos/db-repo-mongo.go @@ -4,12 +4,13 @@ import ( "context" "encoding/json" "fmt" - "github.com/PaesslerAG/jsonpath" - "go.mongodb.org/mongo-driver/bson/primitive" "regexp" "strings" "time" + "github.com/PaesslerAG/jsonpath" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/bson" "go.uber.org/fx" @@ -136,7 +137,7 @@ func (repo *dbRepo[T]) findOne(ctx context.Context, filter Filter) (T, error) { item, err := bsonToStruct[T](one) if err != nil { if errors.Is(err, mongo.ErrNoDocuments) { - return item, errors.Newf("no document found") + return item, ErrNoDocuments } return item, errors.NewE(err) } @@ -399,12 +400,14 @@ func (repo *dbRepo[T]) UpdateMany(ctx context.Context, filter Filter, updatedDat return nil } +var ErrNoDocuments error = fmt.Errorf("no documents found") + func (repo *dbRepo[T]) Patch(ctx context.Context, filter Filter, patch Document, opts ...UpdateOpts) (T, error) { var x T res, err := repo.findOne(ctx, filter) if err != nil { - return x, errors.NewE(err) + return x, err } return repo.patchRecordByID(ctx, res.GetId(), patch, res.IsMarkedForDeletion(), opts...) From ce66b825ab2ccf732a14742e2529241ce8d9821b Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 25 Jul 2024 15:20:00 +0530 Subject: [PATCH 16/89] feat(message-office): implements workqueue stream subject, and improves logging - cleans up duplicated dispatch logic --- apps/message-office/internal/app/app.go | 10 +- .../internal/app/grpc-server.go | 107 ++++++++---------- .../internal/app/vector-proxy-server.go | 32 +++--- apps/message-office/internal/env/env.go | 5 +- .../internal/framework/framework.go | 5 +- apps/message-office/main.go | 12 ++ 6 files changed, 87 insertions(+), 84 deletions(-) diff --git a/apps/message-office/internal/app/app.go b/apps/message-office/internal/app/app.go index b00676951..e81c88f18 100644 --- a/apps/message-office/internal/app/app.go +++ b/apps/message-office/internal/app/app.go @@ -2,6 +2,7 @@ package app import ( "context" + "log/slog" "github.com/kloudlite/api/apps/message-office/internal/app/graph" "github.com/kloudlite/api/apps/message-office/internal/app/graph/generated" @@ -53,22 +54,21 @@ var Module = fx.Module("app", }, ), - fx.Provide(func(logger logging.Logger, jc *nats.JetstreamClient, producer UpdatesProducer, ev *env.Env, d domain.Domain, infraConn InfraGRPCClient) (messages.MessageDispatchServiceServer, error) { - return NewMessageOfficeServer(producer, jc, ev, d, logger.WithName("message-office"), infraConn) + fx.Provide(func(logger *slog.Logger, jc *nats.JetstreamClient, producer UpdatesProducer, ev *env.Env, d domain.Domain, infraCli infra.InfraClient) (messages.MessageDispatchServiceServer, error) { + return NewMessageOfficeServer(producer, jc, ev, d, logger.With("component", "message-office"), infraCli) }), fx.Provide(func(conn RealVectorGrpcClient) proto_rpc.VectorClient { return proto_rpc.NewVectorClient(conn) }), - fx.Provide(func(vectorGrpcClient proto_rpc.VectorClient, logger logging.Logger, d domain.Domain, ev *env.Env) proto_rpc.VectorServer { + fx.Provide(func(vectorGrpcClient proto_rpc.VectorClient, logger *slog.Logger, d domain.Domain, ev *env.Env) proto_rpc.VectorServer { return &vectorProxyServer{ realVectorClient: vectorGrpcClient, - logger: logger.WithName("vector-proxy"), + logger: logger, domain: d, tokenHashingSecret: ev.TokenHashingSecret, pushEventsCounter: 0, - healthCheckCounter: 0, } }), diff --git a/apps/message-office/internal/app/grpc-server.go b/apps/message-office/internal/app/grpc-server.go index 967a712f9..b4925e6a3 100644 --- a/apps/message-office/internal/app/grpc-server.go +++ b/apps/message-office/internal/app/grpc-server.go @@ -46,7 +46,7 @@ type ( domain domain.Domain - createConsumer func(ctx context.Context, accountName string, clusterName string) (messaging.Consumer, error) + createConsumer func(ctx context.Context, accountName string, clusterName string) (messaging.Consumer, string, error) } ) @@ -58,16 +58,8 @@ func (g *grpcServer) ReceiveConsoleResourceUpdate(ctx context.Context, msg *mess } start := time.Now() - logger := g.logger.With("accountName", accountName, "cluster", "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), clusterName, "for", common.ConsoleReceiver, "request-id", fn.UUID()) + logger := g.logger.With("account", accountName, "cluster", clusterName, "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), "for", common.ContainerRegistryReceiver, "request-id", fn.UUID()) logger.Debug("RECEIVED resource update") - defer func() { - if err != nil { - logger.Error("FAILED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) - return - } - - logger.Info("DISPATCHED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) - }() if err := dispatchResourceUpdate(ctx, common.ConsoleReceiver, ResourceUpdateArgs{ logger: logger, @@ -77,9 +69,11 @@ func (g *grpcServer) ReceiveConsoleResourceUpdate(ctx context.Context, msg *mess ClusterName: clusterName, Message: msg, }); err != nil { + logger.Error("FAILED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) return nil, err } + logger.Info("DISPATCHED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) return &messages.Empty{}, nil } @@ -91,15 +85,8 @@ func (g *grpcServer) ReceiveContainerRegistryUpdate(ctx context.Context, msg *me } start := time.Now() - logger := g.logger.With("accountName", accountName, "cluster", "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), clusterName, "for", common.ContainerRegistryReceiver, "request-id", fn.UUID()) + logger := g.logger.With("account", accountName, "cluster", clusterName, "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), "for", common.ContainerRegistryReceiver, "request-id", fn.UUID()) logger.Debug("RECEIVED resource update") - defer func() { - if err != nil { - logger.Error("FAILED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) - return - } - logger.Info("DISPATCHED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) - }() if err := dispatchResourceUpdate(ctx, common.ContainerRegistryReceiver, ResourceUpdateArgs{ logger: logger, @@ -109,29 +96,25 @@ func (g *grpcServer) ReceiveContainerRegistryUpdate(ctx context.Context, msg *me ClusterName: clusterName, Message: msg, }); err != nil { + logger.Error("FAILED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) return nil, err } + logger.Info("DISPATCHED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) return &messages.Empty{}, nil } // ReceiveError implements messages.MessageDispatchServiceServer. -func (g *grpcServer) ReceiveError(ctx context.Context, msg *messages.ErrorData) (*messages.Empty, error) { +func (g *grpcServer) ReceiveError(ctx context.Context, msg *messages.ErrorData) (_ *messages.Empty, err error) { accountName, clusterName, err := g.validateAndDecodeFromGrpcContext(ctx, g.ev.TokenHashingSecret) if err != nil { return nil, err } start := time.Now() - logger := g.logger.With("accountName", accountName, "cluster", "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), clusterName, "for", common.ContainerRegistryReceiver, "request-id", fn.UUID()) + logger := g.logger.With("account", accountName, "cluster", clusterName, "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), "for", common.ContainerRegistryReceiver, "request-id", fn.UUID()) + logger.Debug("RECEIVED error-on-apply update") - defer func() { - if err != nil { - logger.Error("FAILED error-on-apply update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) - return - } - logger.Info("DISPATCHED error-on-apply update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) - }() if err := processError(ctx, ProcessErrorArgs{ logger: logger, @@ -141,9 +124,11 @@ func (g *grpcServer) ReceiveError(ctx context.Context, msg *messages.ErrorData) ClusterName: clusterName, Error: msg, }); err != nil { + logger.Error("FAILED error-on-apply update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) return nil, err } + logger.Info("DISPATCHED error-on-apply update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) return &messages.Empty{}, nil } @@ -155,15 +140,8 @@ func (g *grpcServer) ReceiveInfraResourceUpdate(ctx context.Context, msg *messag } start := time.Now() - logger := g.logger.With("accountName", accountName, "cluster", "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), clusterName, "for", common.ContainerRegistryReceiver, "request-id", fn.UUID()) + logger := g.logger.With("account", accountName, "cluster", clusterName, "GVK", msg.Gvk, "NN", fmt.Sprintf("%s/%s", msg.Namespace, msg.Name), "for", common.ContainerRegistryReceiver, "request-id", fn.UUID()) logger.Debug("RECEIVED resource update") - defer func() { - if err != nil { - logger.Error("FAILED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) - return - } - logger.Info("DISPATCHED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) - }() if err := dispatchResourceUpdate(ctx, common.InfraReceiver, ResourceUpdateArgs{ logger: logger, @@ -173,9 +151,11 @@ func (g *grpcServer) ReceiveInfraResourceUpdate(ctx context.Context, msg *messag ClusterName: clusterName, Message: msg, }); err != nil { + logger.Error("FAILED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds()), "err", err) return nil, err } + logger.Info("DISPATCHED resource update", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) return &messages.Empty{}, nil } @@ -339,7 +319,7 @@ func processError(ctx context.Context, args ProcessErrorArgs) (err error) { // GetAccessToken implements messages.MessageDispatchServiceServer func (g *grpcServer) GetAccessToken(ctx context.Context, msg *messages.GetAccessTokenIn) (*messages.GetAccessTokenOut, error) { - g.logger.Info("request received for cluster-token (%q) exchange", msg.ClusterToken) + g.logger.Debug("request received for cluster-token exchange") ct, err := g.domain.FindClusterToken(ctx, msg.ClusterToken) if err != nil { @@ -350,7 +330,7 @@ func (g *grpcServer) GetAccessToken(ctx context.Context, msg *messages.GetAccess } s := encodeAccessToken(ct.AccountName, ct.ClusterName, msg.ClusterToken, g.ev.TokenHashingSecret) - g.logger.Info("SUCCESSFUL cluster-token exchange for account=%q, cluster=%q", ct.AccountName, ct.ClusterName) + g.logger.With("account", ct.AccountName, "cluster", ct.ClusterName).Info("SUCCESSFUL cluster-token exchange") return &messages.GetAccessTokenOut{ ProtocolVersion: g.ev.GrpcMessageProtocolVersion, @@ -366,21 +346,22 @@ func (g *grpcServer) SendActions(request *messages.Empty, server messages.Messag return klErrors.NewE(err) } - logger := g.logger.With("accountName", accountName, "clusterName", clusterName) - logger.Info("request received for sending actions to cluster") + logger := g.logger.With("account", accountName, "cluster", clusterName) + logger.Debug("request received for sending actions to cluster") defer func() { - logger.Info("stopped sending actions to cluster") + logger.Info("STOPPED transmitting messages to agent") }() key := fmt.Sprintf("%s/%s", accountName, clusterName) - consumer, err := g.createConsumer(server.Context(), accountName, clusterName) + consumer, subject, err := g.createConsumer(server.Context(), accountName, clusterName) if err != nil { return klErrors.NewE(err) } - // TODO: implement cluster online feature, so that we can mark the cluster as online/offline - logger.Info("consumer is available now") + logger = logger.With("subject", subject) + + logger.Info("READY to transmit messages to agent") if _, err := g.infraClient.MarkClusterOnlineAt(server.Context(), &infra.MarkClusterOnlineAtIn{ AccountName: accountName, @@ -398,22 +379,23 @@ func (g *grpcServer) SendActions(request *messages.Empty, server messages.Messag if err := consumer.Stop(context.TODO()); err != nil { logger.Error("while stopping consumer", "err", err) } - logger.Info("consumer is closed now") + logger.Debug("consumer is closed now") }() if err := consumer.Consume(func(msg *types.ConsumeMsg) error { + start := time.Now() logger.Info("read message from consumer", "subject", msg.Subject) defer func() { - logger.Info("dispatched message to agent", "subject", msg.Subject) + logger.Info("dispatched message to agent", "subject", msg.Subject, "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) }() return server.Send(&messages.Action{Message: msg.Payload}) }, types.ConsumeOpts{ - OnError: func(error) error { - logger.Info("error occurrred on agent side, while parsing/applying the message, ignoring as we don't want to block the queue") + OnError: func(err error) error { + logger.Warn("error occurrred on agent side, while parsing/applying the message, ignoring as we don't want to block the queue, got", "err", err) return nil }, }); err != nil { - logger.Error("while consuming messages from consumer", "err", err) + logger.Error("while consuming messages from consumer, got", "err", err) } return nil @@ -453,36 +435,39 @@ func dispatchResourceUpdate(ctx context.Context, receiver common.MessageReceiver Subject: subject, Payload: b, }); err != nil { - return errors.Wrap(err, "producing resource update") + return errors.Wrap(err, fmt.Sprintf("producing resource update to topic (%s)", subject)) } return nil } -func NewMessageOfficeServer(producer UpdatesProducer, jc *nats.JetstreamClient, ev *env.Env, d domain.Domain, logger *slog.Logger, infraConn InfraGRPCClient) (messages.MessageDispatchServiceServer, error) { +func NewMessageOfficeServer(producer UpdatesProducer, jc *nats.JetstreamClient, ev *env.Env, d domain.Domain, logger *slog.Logger, infraCli infra.InfraClient) (messages.MessageDispatchServiceServer, error) { return &grpcServer{ UnimplementedMessageDispatchServiceServer: messages.UnimplementedMessageDispatchServiceServer{}, - infraClient: infra.NewInfraClient(infraConn), + infraClient: infraCli, logger: logger, updatesProducer: producer, consumers: make(map[string]messaging.Consumer), ev: ev, domain: d, - createConsumer: func(ctx context.Context, accountName string, clusterName string) (messaging.Consumer, error) { + createConsumer: func(ctx context.Context, accountName string, clusterName string) (messaging.Consumer, string, error) { name := fmt.Sprintf("tenant-consumer-for-account-%s-cluster-%s", accountName, clusterName) - return msg_nats.NewJetstreamConsumer(ctx, jc, msg_nats.JetstreamConsumerArgs{ - Stream: ev.NatsStream, + filterSubject := fmt.Sprintf("%s.>", common.SendToAgentSubjectPrefix(accountName, clusterName)) + + jc, err := msg_nats.NewJetstreamConsumer(ctx, jc, msg_nats.JetstreamConsumerArgs{ + Stream: ev.NatsSendToAgentStream, ConsumerConfig: msg_nats.ConsumerConfig{ - Name: name, - Durable: name, - Description: "this consumer consumes messages from platform, and dispatches them to the tenant cluster via kloudlite agent", - FilterSubjects: []string{ - fmt.Sprintf("%s.>", common.SendToAgentSubjectPrefix(accountName, clusterName)), - // common.GetTenantClusterMessagingTopic(accountName, clusterName), - }, + Name: name, + Durable: name, + Description: "this consumer consumes messages from platform, and dispatches them to the tenant cluster via kloudlite agent", + FilterSubjects: []string{filterSubject}, }, }) + if err != nil { + return nil, "", klErrors.NewEf(err, "creating consumer") + } + return jc, filterSubject, nil }, }, nil } diff --git a/apps/message-office/internal/app/vector-proxy-server.go b/apps/message-office/internal/app/vector-proxy-server.go index 1551781aa..a2f93a408 100644 --- a/apps/message-office/internal/app/vector-proxy-server.go +++ b/apps/message-office/internal/app/vector-proxy-server.go @@ -2,22 +2,24 @@ package app import ( "context" + "log/slog" + "sync" "github.com/kloudlite/api/pkg/errors" proto_rpc "github.com/kloudlite/api/apps/message-office/internal/app/proto-rpc" "github.com/kloudlite/api/apps/message-office/internal/domain" - "github.com/kloudlite/api/pkg/logging" ) type vectorProxyServer struct { proto_rpc.UnimplementedVectorServer realVectorClient proto_rpc.VectorClient - logger logging.Logger + logger *slog.Logger domain domain.Domain tokenHashingSecret string - pushEventsCounter int - healthCheckCounter int + + sync.Mutex + pushEventsCounter int } func (v *vectorProxyServer) PushEvents(ctx context.Context, msg *proto_rpc.PushEventsRequest) (*proto_rpc.PushEventsResponse, error) { @@ -26,16 +28,20 @@ func (v *vectorProxyServer) PushEvents(ctx context.Context, msg *proto_rpc.PushE return nil, errors.NewE(err) } - logger := v.logger.WithKV("accountName", accountName, "clusterName", clusterName) + v.Lock() v.pushEventsCounter++ - logger.Debugf("[%v] received push-events message", v.pushEventsCounter) - defer logger.Debugf("[%v] dispatched push-events message to vector aggregator", v.pushEventsCounter) + v.Unlock() + + logger := v.logger.With("account", accountName, "cluster", clusterName, "counter", v.pushEventsCounter) + + logger.Debug("RECEIVED push-events message") per, err := v.realVectorClient.PushEvents(ctx, msg) if err != nil { - logger.Errorf(err) + logger.Error("FAILED to dispatch push-events message, got", "err", err) return nil, errors.NewE(err) } + logger.Debug("DISPATCHED push-events message") return per, nil } @@ -45,15 +51,13 @@ func (v *vectorProxyServer) HealthCheck(ctx context.Context, msg *proto_rpc.Heal return nil, errors.NewE(err) } - logger := v.logger.WithKV("accountName", accountName, "clusterName", clusterName) - v.healthCheckCounter++ - logger.Debugf("[%v] received health-check message", v.healthCheckCounter) - defer logger.Debugf("[%v] dispatched health-check message to vector aggregator", v.healthCheckCounter) - + logger := v.logger.With("account", accountName, "cluster", clusterName) + logger.Debug("RECEIVED health-check message") hcr, err := v.realVectorClient.HealthCheck(ctx, msg) if err != nil { - logger.Errorf(err) + logger.Error("FAILED to dispatch health-check message, got", "err", err) return nil, errors.NewE(err) } + logger.Debug("DISPATCHED health-check message") return hcr, nil } diff --git a/apps/message-office/internal/env/env.go b/apps/message-office/internal/env/env.go index 788fd1f88..d7e353969 100644 --- a/apps/message-office/internal/env/env.go +++ b/apps/message-office/internal/env/env.go @@ -5,8 +5,9 @@ import ( ) type Env struct { - NatsUrl string `env:"NATS_URL" required:"true"` - NatsStream string `env:"NATS_STREAM" required:"true"` + NatsUrl string `env:"NATS_URL" required:"true"` + NatsSendToAgentStream string `env:"NATS_SEND_TO_AGENT_STREAM" required:"true"` + NatsReceiveFromAgentStream string `env:"NATS_RECEIVE_FROM_AGENT_STREAM" required:"true"` PlatformAccessToken string `env:"PLATFORM_ACCESS_TOKEN" required:"true"` diff --git a/apps/message-office/internal/framework/framework.go b/apps/message-office/internal/framework/framework.go index e0836c4eb..8ad128beb 100644 --- a/apps/message-office/internal/framework/framework.go +++ b/apps/message-office/internal/framework/framework.go @@ -3,6 +3,7 @@ package framework import ( "context" "fmt" + "github.com/kloudlite/api/pkg/errors" "go.uber.org/fx" @@ -85,11 +86,11 @@ var Module = fx.Module("framework", }) }), - fx.Invoke(func(lf fx.Lifecycle,logr logging.Logger, server app.ExternalGrpcServer, ev *env.Env) { + fx.Invoke(func(lf fx.Lifecycle, logr logging.Logger, server app.ExternalGrpcServer, ev *env.Env) { lf.Append(fx.Hook{ OnStart: func(context.Context) error { go func() { - if err:=server.Listen(fmt.Sprintf(":%d", ev.ExternalGrpcPort)); err!=nil{ + if err := server.Listen(fmt.Sprintf(":%d", ev.ExternalGrpcPort)); err != nil { logr.Errorf(err, "while starting external grpc server") } }() diff --git a/apps/message-office/main.go b/apps/message-office/main.go index a4966c5f2..8b5e8585f 100644 --- a/apps/message-office/main.go +++ b/apps/message-office/main.go @@ -3,6 +3,7 @@ package main import ( "context" "flag" + "log/slog" "os" "time" @@ -19,6 +20,10 @@ import ( func main() { var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") + + var debug bool + flag.BoolVar(&debug, "debug", false, "--debug") + flag.Parse() logger, err := logging.New(&logging.Options{Name: "message-office", ShowDebugLog: isDev, HideCallerTrace: false}) @@ -39,6 +44,13 @@ func main() { }, ), + fx.Provide(func() *slog.Logger { + return logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: debug, + }) + }), + fx.Provide(func() (*rest.Config, error) { if isDev { return &rest.Config{ From 32016cbf8e7ac71f694dd5d5ac8ea7512ef9a0e8 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 25 Jul 2024 15:40:38 +0530 Subject: [PATCH 17/89] chore: excluding /_healthy from fiber logs - adds option to set SlogLogger as a global slog logger - grpc client auto-reconnect updates --- pkg/grpc/client.go | 1 + pkg/http-server/http-server.go | 26 ++++++++++++++++++-------- pkg/logging/slog-logger.go | 19 ++++++++++++++++--- pkg/repos/db-repo-mongo.go | 9 +++++---- pkg/repos/mongo.go | 8 ++++---- 5 files changed, 44 insertions(+), 19 deletions(-) diff --git a/pkg/grpc/client.go b/pkg/grpc/client.go index 743a75240..075514ee5 100644 --- a/pkg/grpc/client.go +++ b/pkg/grpc/client.go @@ -91,6 +91,7 @@ func NewGrpcClientV2(serverAddr string, opts GrpcConnectOpts) (Client, error) { } if cstate == connectivity.Ready && prevState != connectivity.Ready { if attempt > 0 { + attempt = 0 reconnecting = false opts.Logger.Info("RE-CONNECTED", "attempt", attempt, "took", fmt.Sprintf("%.3fs", time.Since(start).Seconds())) } diff --git a/pkg/http-server/http-server.go b/pkg/http-server/http-server.go index c602f0e04..5db89e9ed 100644 --- a/pkg/http-server/http-server.go +++ b/pkg/http-server/http-server.go @@ -19,6 +19,7 @@ import ( "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/cors" l "github.com/gofiber/fiber/v2/middleware/logger" + "github.com/gofiber/fiber/v2/middleware/skip" "github.com/kloudlite/api/pkg/logging" ) @@ -75,21 +76,30 @@ type ServerArgs struct { func NewServer(args ServerArgs) Server { app := fiber.New(fiber.Config{ + // Prefork: true, + DisableStartupMessage: true, ErrorHandler: func(ctx *fiber.Ctx, err error) error { args.Logger.Errorf(err) return errors.NewE(err) }, }) - app.Use( - l.New( - l.Config{ - Format: "${time} ${status} - ${method} ${latency} \t ${path} \n", - TimeFormat: "02-Jan-2006 15:04:05", - TimeZone: "Asia/Kolkata", - }, - ), + + loggerMiddleware := l.New( + l.Config{ + CustomTags: map[string]l.LogFunc{}, + Format: "${time} ${status} - ${method} ${latency} \t ${path} \n", + TimeFormat: "02-Jan-2006 15:04:05", + TimeZone: "Asia/Kolkata", + TimeInterval: 0, + Output: nil, + DisableColors: false, + }, ) + app.Use(skip.New(loggerMiddleware, func(c *fiber.Ctx) bool { + return c.Path() == "/_healthy" + })) + if args.CorsAllowOrigins != nil { app.Use( cors.New( diff --git a/pkg/logging/slog-logger.go b/pkg/logging/slog-logger.go index 472257e99..1e0e02d29 100644 --- a/pkg/logging/slog-logger.go +++ b/pkg/logging/slog-logger.go @@ -16,6 +16,8 @@ type SlogOptions struct { ShowTimestamp bool ShowCaller bool ShowDebugLogs bool + + SetAsDefaultLogger bool } func NewSlogLogger(opts SlogOptions) *slog.Logger { @@ -28,15 +30,26 @@ func NewSlogLogger(opts SlogOptions) *slog.Logger { level = log.DebugLevel } - logger := log.NewWithOptions(opts.Writer, log.Options{ReportCaller: opts.ShowCaller, ReportTimestamp: opts.ShowTimestamp, Prefix: opts.Prefix, Level: level}) + logger := log.NewWithOptions(opts.Writer, log.Options{ + ReportCaller: opts.ShowCaller, + ReportTimestamp: opts.ShowTimestamp, + Prefix: opts.Prefix, + Level: level, + }) styles := log.DefaultStyles() styles.Levels[log.DebugLevel] = styles.Levels[log.DebugLevel].Foreground(lipgloss.Color("#5b717f")) + styles.Levels[log.InfoLevel] = styles.Levels[log.InfoLevel].Foreground(lipgloss.Color("#36cbfa")) - // styles.Key = lipgloss.NewStyle().Background(lipgloss.Color("#083e54")).Foreground(lipgloss.Color("#9dbdc9")).Bold(true) styles.Key = lipgloss.NewStyle().Foreground(lipgloss.Color("#36cbfa")).Bold(true) logger.SetStyles(styles) - return slog.New(logger) + l := slog.New(logger) + + if opts.SetAsDefaultLogger { + slog.SetDefault(l) + } + + return l } diff --git a/pkg/repos/db-repo-mongo.go b/pkg/repos/db-repo-mongo.go index 3e2502f65..e5b2082a1 100644 --- a/pkg/repos/db-repo-mongo.go +++ b/pkg/repos/db-repo-mongo.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "log/slog" "regexp" "strings" "time" @@ -16,7 +17,6 @@ import ( "github.com/kloudlite/api/pkg/errors" fn "github.com/kloudlite/api/pkg/functions" - "github.com/kloudlite/api/pkg/logging" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" ) @@ -725,16 +725,17 @@ func NewFxMongoRepo[T Entity](collectionName, shortName string, indexFields []In }, ), fx.Invoke( - func(lifecycle fx.Lifecycle, repo DbRepo[T], logger logging.Logger) { + // func(lifecycle fx.Lifecycle, repo DbRepo[T], logger logging.Logger) { + func(lifecycle fx.Lifecycle, repo DbRepo[T]) { lifecycle.Append( fx.Hook{ OnStart: func(ctx context.Context) error { go func() { err := repo.IndexFields(ctx, indexFields) if err != nil { - logger.Errorf(err, "failed to update indexes on DB for repo %T", repo) + slog.Error("failed to update indexes", "collection", collectionName, "err", err) } - logger.Infof("indexes updated on DB for repo %T", repo) + slog.Info("indexes updated on DB", "collection", collectionName) }() return nil }, diff --git a/pkg/repos/mongo.go b/pkg/repos/mongo.go index a988a87de..74ebbc9b4 100644 --- a/pkg/repos/mongo.go +++ b/pkg/repos/mongo.go @@ -2,10 +2,10 @@ package repos import ( "context" + "log/slog" "time" "github.com/kloudlite/api/pkg/errors" - "github.com/kloudlite/api/pkg/logging" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "go.uber.org/fx" @@ -33,14 +33,14 @@ func NewMongoClientFx[T MongoConfig]() fx.Option { return NewMongoDatabase(ctx, url, dbName) }), - fx.Invoke(func(db *mongo.Database, logger logging.Logger, lifecycle fx.Lifecycle) { + fx.Invoke(func(db *mongo.Database, lifecycle fx.Lifecycle) { lifecycle.Append(fx.Hook{ OnStart: func(ctx context.Context) error { if err := db.Client().Ping(ctx, nil); err != nil { - // if err := db.Client().Ping(ctx, readpref.Primary()); err != nil { + // if err := db.Client().Ping(ctx, readpref.Primary()); err != nil { return errors.NewEf(err, "could not ping Mongo") } - logger.Infof("connected to mongodb database: %s", db.Name()) + slog.Info("connected to mongodb database", "db", db.Name()) return nil }, From 1e547589298e33f34eab1f7af6cdea6fab2791ce Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 25 Jul 2024 15:44:31 +0530 Subject: [PATCH 18/89] chore: fixes/improves logging for nats client --- pkg/messaging/examples/nats-consumer/main.go | 4 +-- pkg/messaging/nats/jetstream-consumer.go | 18 +++++++----- pkg/nats/client.go | 31 ++++++++------------ pkg/nats/jetstream-client.go | 5 ++-- 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/pkg/messaging/examples/nats-consumer/main.go b/pkg/messaging/examples/nats-consumer/main.go index 10c49a5db..58adeaaec 100644 --- a/pkg/messaging/examples/nats-consumer/main.go +++ b/pkg/messaging/examples/nats-consumer/main.go @@ -2,7 +2,6 @@ package main import ( "context" - "fmt" "log" "os" @@ -30,8 +29,7 @@ func main() { log.Fatal(err) } - subjectBase := fmt.Sprintf("resource-sync.*.*.platform.kloudlite-console.resource-update") - _ = subjectBase + subjectBase := "resource-sync.*.*.platform.kloudlite-console.resource-update" consumer, err = msg_nats.NewJetstreamConsumer(context.TODO(), jc, msg_nats.JetstreamConsumerArgs{ Stream: natsStream, diff --git a/pkg/messaging/nats/jetstream-consumer.go b/pkg/messaging/nats/jetstream-consumer.go index eb193d2c5..dee3b0c66 100644 --- a/pkg/messaging/nats/jetstream-consumer.go +++ b/pkg/messaging/nats/jetstream-consumer.go @@ -23,18 +23,22 @@ type JetstreamConsumer struct { // Consume implements messaging.Consumer. func (jc *JetstreamConsumer) Consume(consumeFn func(msg *types.ConsumeMsg) error, opts types.ConsumeOpts) error { cctx, err := jc.consumer.Consume(func(msg jetstream.Msg) { + logger := jc.client.Logger.With("subject", msg.Subject()) + mm, err := msg.Metadata() if err != nil { if err := msg.Nak(); err != nil { - jc.client.Logger.Errorf(err, "while consuming message from subject: %s, sending NACK", msg.Subject()) + logger.Error("failed to send NAK", "err", err) return } return } + logger = logger.With("consumer", mm.Consumer, "stream", mm.Stream) + if err = msg.InProgress(); err != nil { if err := msg.Nak(); err != nil { - jc.client.Logger.Errorf(err, "while consuming message from subject: %s, sending NACK", msg.Subject()) + logger.Error("failed to send NAK", "err", err) return } return @@ -46,9 +50,8 @@ func (jc *JetstreamConsumer) Consume(consumeFn func(msg *types.ConsumeMsg) error Payload: msg.Data(), }); err != nil { if opts.OnError == nil { - jc.client.Logger.Errorf(err, "while consuming message from subject: %s, sending NACK", msg.Subject()) if err := msg.Nak(); err != nil { - jc.client.Logger.Errorf(err, "while consuming message from subject: %s, sending NACK", msg.Subject()) + logger.Error("failed to send NAK", "err", err) return } return @@ -56,9 +59,8 @@ func (jc *JetstreamConsumer) Consume(consumeFn func(msg *types.ConsumeMsg) error if opts.OnError != nil { if err := opts.OnError(err); err != nil { - jc.client.Logger.Errorf(err, "while consuming message from subject: %s, sending NACK", msg.Subject()) if err := msg.Nak(); err != nil { - jc.client.Logger.Errorf(err, "while consuming message from subject: %s, sending NACK", msg.Subject()) + logger.Error("failed to send NAK", "err", err) return } return @@ -67,10 +69,10 @@ func (jc *JetstreamConsumer) Consume(consumeFn func(msg *types.ConsumeMsg) error } if err := msg.Ack(); err != nil { - jc.client.Logger.Errorf(err, "while consuming message from subject: %s, sending ACK", msg.Subject()) + logger.Error("failed to send ACK, got", "err", err) return } - jc.client.Logger.Infof("acknowledged message, stream: %s, consumer: %s", mm.Stream, mm.Consumer) + logger.Debug("CONSUMED message", "stream", mm.Stream, "consumer", mm.Consumer) }) if err != nil { return errors.NewE(err) diff --git a/pkg/nats/client.go b/pkg/nats/client.go index a6344bcbf..01479b7dd 100644 --- a/pkg/nats/client.go +++ b/pkg/nats/client.go @@ -2,17 +2,17 @@ package nats import ( "context" - "fmt" - "github.com/kloudlite/api/pkg/errors" + "log/slog" "time" - "github.com/kloudlite/api/pkg/logging" + "github.com/kloudlite/api/pkg/errors" + "github.com/nats-io/nats.go" ) type Client struct { Conn *nats.Conn - logger logging.Logger + logger *slog.Logger } // Close implements Client. @@ -33,7 +33,7 @@ type ClientOpts struct { Name string // https://pkg.go.dev/github.com/nats-io/nats.go#Options Servers []string - Logger logging.Logger + Logger *slog.Logger DisconnectedCB func() ReconnectedCB func() @@ -47,14 +47,7 @@ func NewClient(url string, opts ClientOpts) (*Client, error) { } if opts.Logger == nil { - var err error - opts.Logger, err = logging.New(&logging.Options{ - Name: fmt.Sprintf("nats-client:%s", opts.Name), - Dev: true, - }) - if err != nil { - return nil, errors.NewE(err) - } + opts.Logger = slog.Default() } connectOpts := []nats.Option{ @@ -91,34 +84,34 @@ func NewClient(url string, opts ClientOpts) (*Client, error) { opts.ClosedCB() return } - opts.Logger.Infof("[%s] connection closed with nats server", opts.Name) + opts.Logger.Warn("connection closed with nats server", "name", opts.Name) }, DisconnectedCB: func(*nats.Conn) { if opts.DisconnectedCB != nil { opts.DisconnectedCB() return } - opts.Logger.Infof("[%s] disconnected with nats server", opts.Name) + opts.Logger.Warn("disconnected with nats server", "name", opts.Name) }, ConnectedCB: func(*nats.Conn) { if opts.ConnectedCB != nil { opts.ConnectedCB() return } - opts.Logger.Infof("[%s] connected to nats server", opts.Name) + opts.Logger.Info("connected to nats server", "name", opts.Name) }, ReconnectedCB: func(*nats.Conn) { if opts.ReconnectedCB != nil { opts.ReconnectedCB() return } - opts.Logger.Infof("[%s] reconnected to nats server", opts.Name) + opts.Logger.Info("re-connected to nats server", "name", opts.Name) }, DiscoveredServersCB: func(c *nats.Conn) { - opts.Logger.Infof("[%s] discovered additional nats servers: %+v\n", c.DiscoveredServers()) + opts.Logger.Info("discovered additional nats servers", "servers", c.DiscoveredServers()) }, AsyncErrorCB: func(_ *nats.Conn, sub *nats.Subscription, err error) { - opts.Logger.Warnf("[%s] async error received in subject(%s): %v", opts.Name, sub.Subject, err) + opts.Logger.Warn("got async error for", "name", opts.Name, "subject", sub.Subject, "err", err) }, RetryOnFailedConnect: true, Compression: true, diff --git a/pkg/nats/jetstream-client.go b/pkg/nats/jetstream-client.go index a4bc4ea3d..636681838 100644 --- a/pkg/nats/jetstream-client.go +++ b/pkg/nats/jetstream-client.go @@ -2,15 +2,16 @@ package nats import ( "context" + "log/slog" + "github.com/kloudlite/api/pkg/errors" - "github.com/kloudlite/api/pkg/logging" "github.com/nats-io/nats.go/jetstream" ) type JetstreamClient struct { Jetstream jetstream.JetStream - Logger logging.Logger + Logger *slog.Logger } type ConsumerManager interface { From b1c939d3d122f6a8c267fa58752106c61e9fe516 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 25 Jul 2024 16:00:21 +0530 Subject: [PATCH 19/89] fix: nats subject changes, and improves logging --- apps/console/internal/app/app.go | 17 ++--- apps/console/internal/app/dns-server.go | 17 +++-- .../internal/app/process-error-on-apply.go | 36 ++++++---- .../internal/app/process-resource-updates.go | 68 ++++++++++--------- apps/console/internal/domain/domain.go | 15 ++-- apps/console/internal/env/env.go | 6 +- apps/console/internal/framework/framework.go | 9 ++- apps/console/main.go | 8 +++ common/kafka-topic-name.go | 25 ++++--- 9 files changed, 119 insertions(+), 82 deletions(-) diff --git a/apps/console/internal/app/app.go b/apps/console/internal/app/app.go index 7c01f75d2..9bf9d2fe4 100644 --- a/apps/console/internal/app/app.go +++ b/apps/console/internal/app/app.go @@ -2,6 +2,7 @@ package app import ( "context" + "log/slog" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/console" "github.com/kloudlite/api/pkg/k8s" @@ -167,7 +168,7 @@ var Module = fx.Module("app", topic := common.ReceiveFromAgentSubjectName(common.ReceiveFromAgentArgs{AccountName: "*", ClusterName: "*"}, common.ConsoleReceiver, common.EventErrorOnApply) consumerName := "console:error-on-apply" return msg_nats.NewJetstreamConsumer(context.TODO(), jc, msg_nats.JetstreamConsumerArgs{ - Stream: ev.NatsResourceSyncStream, + Stream: ev.NatsReceiveFromAgentStream, ConsumerConfig: msg_nats.ConsumerConfig{ Name: consumerName, Durable: consumerName, @@ -177,7 +178,7 @@ var Module = fx.Module("app", }) }), - fx.Invoke(func(lf fx.Lifecycle, consumer ErrorOnApplyConsumer, d domain.Domain, logger logging.Logger) { + fx.Invoke(func(lf fx.Lifecycle, consumer ErrorOnApplyConsumer, d domain.Domain, logger *slog.Logger) { lf.Append(fx.Hook{ OnStart: func(context.Context) error { go ProcessErrorOnApply(consumer, d, logger) @@ -194,7 +195,7 @@ var Module = fx.Module("app", consumerName := "console:resource-updates" return msg_nats.NewJetstreamConsumer(context.TODO(), jc, msg_nats.JetstreamConsumerArgs{ - Stream: ev.NatsResourceSyncStream, + Stream: ev.NatsReceiveFromAgentStream, ConsumerConfig: msg_nats.ConsumerConfig{ Name: consumerName, Durable: consumerName, @@ -204,7 +205,7 @@ var Module = fx.Module("app", }) }), - fx.Invoke(func(lf fx.Lifecycle, consumer ResourceUpdateConsumer, d domain.Domain, logger logging.Logger) { + fx.Invoke(func(lf fx.Lifecycle, consumer ResourceUpdateConsumer, d domain.Domain, logger *slog.Logger) { lf.Append(fx.Hook{ OnStart: func(context.Context) error { go ProcessResourceUpdates(consumer, d, logger) @@ -220,7 +221,7 @@ var Module = fx.Module("app", return domain.NewSvcBindingDomain(svcBindingRepo) }), - fx.Provide(func(logger logging.Logger, sbd domain.ServiceBindingDomain, ev *env.Env) *dnsHandler { + fx.Provide(func(logger *slog.Logger, sbd domain.ServiceBindingDomain, ev *env.Env) *dnsHandler { return &dnsHandler{ logger: logger, serviceBindingDomain: sbd, @@ -228,15 +229,15 @@ var Module = fx.Module("app", } }), - fx.Invoke(func(server *DNSServer, handler *dnsHandler, lf fx.Lifecycle, logger logging.Logger) { + fx.Invoke(func(server *DNSServer, handler *dnsHandler, lf fx.Lifecycle, logger *slog.Logger) { lf.Append(fx.Hook{ OnStart: func(ctx context.Context) error { - logger.Infof("starting dns server at %s", server.Addr) server.Handler = handler go func() { + logger.Info("starting dns server", "at", server.Addr) err := server.ListenAndServe() if err != nil { - logger.Errorf(err, "failed to start dns server") + logger.Error("failed to start dns server, got", "err", err) panic(err) } }() diff --git a/apps/console/internal/app/dns-server.go b/apps/console/internal/app/dns-server.go index 8ad4e94d3..5ad42ef95 100644 --- a/apps/console/internal/app/dns-server.go +++ b/apps/console/internal/app/dns-server.go @@ -3,16 +3,17 @@ package app import ( "context" "fmt" + "log/slog" "strings" + "time" "github.com/kloudlite/api/apps/console/internal/domain" - "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/operator/pkg/errors" "github.com/miekg/dns" ) type dnsHandler struct { - logger logging.Logger + logger *slog.Logger serviceBindingDomain domain.ServiceBindingDomain kloudliteDNSSuffix string } @@ -22,8 +23,10 @@ const ( ) func (h *dnsHandler) ServeDNS(w dns.ResponseWriter, r *dns.Msg) { - logger := h.logger.WithKV("query", r.Question[0].Name) - logger.Debugf("incoming dns request") + logger := h.logger.With("query", r.Question[0].Name) + logger.Debug("INCOMING dns request") + start := time.Now() + msg := new(dns.Msg) msg.SetReply(r) msg.Authoritative = true @@ -34,7 +37,7 @@ func (h *dnsHandler) ServeDNS(w dns.ResponseWriter, r *dns.Msg) { for _, question := range r.Question { answers, err := h.resolver(ctx, question.Name, question.Qtype) if err != nil { - h.logger.Errorf(err) + logger.Error("FAILED to resolve dns record, got", "err", err, "question", question.Name) msg.Rcode = dns.RcodeNameError continue } @@ -42,7 +45,9 @@ func (h *dnsHandler) ServeDNS(w dns.ResponseWriter, r *dns.Msg) { } w.WriteMsg(msg) - logger.WithKV("answers", msg.Answer).Debugf("outgoing dns request") + if msg.Rcode != dns.RcodeNameError { + logger.Info("RESOLVED dns request", "answers", msg.Answer, "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) + } } func (h *dnsHandler) newRR(domain string, ttl int, ip string) ([]dns.RR, error) { diff --git a/apps/console/internal/app/process-error-on-apply.go b/apps/console/internal/app/process-error-on-apply.go index 22d2bd5de..a1f24eafb 100644 --- a/apps/console/internal/app/process-error-on-apply.go +++ b/apps/console/internal/app/process-error-on-apply.go @@ -4,6 +4,9 @@ import ( "context" "encoding/json" "fmt" + "log/slog" + "sync" + "time" t "github.com/kloudlite/api/apps/tenant-agent/types" "github.com/kloudlite/api/pkg/errors" @@ -13,7 +16,6 @@ import ( "github.com/kloudlite/api/apps/console/internal/entities" msgOfficeT "github.com/kloudlite/api/apps/message-office/types" fn "github.com/kloudlite/api/pkg/functions" - "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/api/pkg/messaging" msgTypes "github.com/kloudlite/api/pkg/messaging/types" crdsv1 "github.com/kloudlite/operator/apis/crds/v1" @@ -21,9 +23,7 @@ import ( type ErrorOnApplyConsumer messaging.Consumer -func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, d domain.Domain, logger logging.Logger) { - counter := 0 - +func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, d domain.Domain, logger *slog.Logger) { getEnvironmentResourceContext := func(ctx domain.ConsoleContext, resType entities.ResourceType, clusterName string, obj unstructured.Unstructured) (domain.ResourceContext, error) { mapping, err := d.GetEnvironmentResourceMapping(ctx, resType, clusterName, obj.GetNamespace(), obj.GetName()) if err != nil { @@ -35,9 +35,18 @@ func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, d domain.Domain, logger return newResourceContext(ctx, mapping.EnvironmentName), nil } + counter := 0 + mu := sync.Mutex{} + msgReader := func(msg *msgTypes.ConsumeMsg) error { + mu.Lock() counter += 1 - logger.Debugf("received message [%d]", counter) + mu.Unlock() + + start := time.Now() + + logger := logger.With("subject", msg.Subject, "counter", counter) + logger.Debug("INCOMING message", "counter", counter) em, err := msgOfficeT.UnmarshalErrMessage(msg.Payload) if err != nil { @@ -50,25 +59,24 @@ func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, d domain.Domain, logger } obj := unstructured.Unstructured{Object: errObj.Object} + gvkStr := obj.GroupVersionKind().String() - mLogger := logger.WithKV( - "gvk", obj.GroupVersionKind(), - "nn", fmt.Sprintf("%s/%s", obj.GetNamespace(), obj.GetName()), + mlogger := logger.With( + "GVK", gvkStr, + "NN", fmt.Sprintf("%s/%s", obj.GetNamespace(), obj.GetName()), "accountName", em.AccountName, "clusterName", em.ClusterName, ) - mLogger.Infof("received message") + mlogger.Info("validated message") defer func() { - mLogger.Infof("processed message") + mlogger.Info("PROCESSED message", "took", fmt.Sprintf("%.2fs", time.Since(start).Seconds())) }() dctx := domain.NewConsoleContext(context.TODO(), "sys-user:apply-on-error-worker", em.AccountName) opts := domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp} - gvkStr := obj.GroupVersionKind().String() - switch gvkStr { case environmentGVK.String(): { @@ -204,10 +212,10 @@ func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, d domain.Domain, logger if err := consumer.Consume(msgReader, msgTypes.ConsumeOpts{ OnError: func(err error) error { - logger.Errorf(err, "received while reading messages, ignoring it") + logger.Error("while reading messages, got", "err", err) return nil }, }); err != nil { - logger.Errorf(err, "error while consuming messages") + logger.Error("while consuming messages, got", "err", err) } } diff --git a/apps/console/internal/app/process-resource-updates.go b/apps/console/internal/app/process-resource-updates.go index 306fa32d1..945c9b2d4 100644 --- a/apps/console/internal/app/process-resource-updates.go +++ b/apps/console/internal/app/process-resource-updates.go @@ -4,14 +4,16 @@ import ( "context" "encoding/json" "fmt" + "log/slog" "strings" + "sync" + "time" "github.com/kloudlite/api/apps/console/internal/domain" "github.com/kloudlite/api/apps/console/internal/entities" msgOfficeT "github.com/kloudlite/api/apps/message-office/types" "github.com/kloudlite/api/pkg/errors" fn "github.com/kloudlite/api/pkg/functions" - "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/api/pkg/messaging" msgTypes "github.com/kloudlite/api/pkg/messaging/types" crdsv1 "github.com/kloudlite/operator/apis/crds/v1" @@ -44,10 +46,8 @@ var ( serviceBindingGVK = fn.GVK("networking.kloudlite.io/v1", "ServiceBinding") ) -func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, logger logging.Logger) { - counter := 0 - - getResourceContext := func(ctx domain.ConsoleContext, rt entities.ResourceType, clusterName string, obj unstructured.Unstructured) (domain.ResourceContext, error) { +func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, logger *slog.Logger) { + getResourceContext := func(ctx domain.ConsoleContext, rt entities.ResourceType, clusterName string, obj *unstructured.Unstructured) (domain.ResourceContext, error) { mapping, err := d.GetEnvironmentResourceMapping(ctx, rt, clusterName, obj.GetNamespace(), obj.GetName()) if err != nil { return domain.ResourceContext{}, err @@ -59,59 +59,66 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo return newResourceContext(ctx, mapping.EnvironmentName), nil } - msgReader := func(msg *msgTypes.ConsumeMsg) error { - logger := logger.WithKV("subject", msg.Subject) + counter := 0 + mu := sync.Mutex{} + msgReader := func(msg *msgTypes.ConsumeMsg) error { + mu.Lock() counter += 1 - logger.Debugf("[%d] received message", counter) + mu.Unlock() + + start := time.Now() + + logger := logger.With("subject", msg.Subject, "counter", counter) + + logger.Debug("INCOMING message") ru, err := msgOfficeT.UnmarshalResourceUpdate(msg.Payload) if err != nil { - logger.Errorf(err, "unmarshaling resource update") + logger.Error("unmarshaling resource update, got", "err", err) return nil } var rwu types.ResourceUpdate if err := json.Unmarshal(ru.WatcherUpdate, &rwu); err != nil { - logger.Errorf(err, "unmarshaling into resource watcher update") + logger.Error("unmarshaling into resource watcher update, got", "err", err) return nil } if rwu.Object == nil { - logger.Infof("msg.Object is nil, so could not extract any info from message, ignoring ...") + logger.Debug("msg.Object is nil, so could not extract any info from message, ignoring ...") return nil } - obj := unstructured.Unstructured{Object: rwu.Object} + obj := rwu.Object + gvkStr := obj.GetObjectKind().GroupVersionKind().String() - mLogger := logger.WithKV( - "gvk", obj.GetObjectKind().GroupVersionKind(), - "resource", fmt.Sprintf("%s/%s", obj.GetNamespace(), obj.GetName()), - "accountName", ru.AccountName, - "clusterName", ru.ClusterName, + mlogger := logger.With( + "GVK", gvkStr, + "NN", fmt.Sprintf("%s/%s", obj.GetNamespace(), obj.GetName()), + "account", ru.AccountName, + "cluster", ru.ClusterName, ) - mLogger.Infof("received message") + mlogger.Debug("validated message") defer func() { - mLogger.Infof("processed message") + mlogger.Info("PROCESSED message", "took", fmt.Sprintf("%dms", time.Since(start).Milliseconds())) }() if len(strings.TrimSpace(ru.AccountName)) == 0 { - logger.Infof("message does not contain 'accountName', so won't be able to find a resource uniquely, thus ignoring ...") + mlogger.Warn("message does not contain 'accountName', so won't be able to find a resource uniquely, thus ignoring ...") return nil } if len(strings.TrimSpace(ru.ClusterName)) == 0 { - logger.Infof("message does not contain 'clusterName', so won't be able to find a resource uniquely, thus ignoring ...") + mlogger.Warn("message does not contain 'clusterName', so won't be able to find a resource uniquely, thus ignoring ...") return nil } dctx := domain.NewConsoleContext(context.TODO(), "sys-user:console-resource-updater", ru.AccountName) - gvkStr := obj.GetObjectKind().GroupVersionKind().String() - resStatus, err := func() (types.ResourceStatus, error) { - v, ok := rwu.Object[types.ResourceStatusKey] + v, ok := obj.Object[types.ResourceStatusKey] if !ok { return "", errors.NewE(fmt.Errorf("field %s not found in object", types.ResourceStatusKey)) } @@ -244,14 +251,13 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo } var outputSecret *corev1.Secret - if v, ok := rwu.Object[types.KeyManagedResSecret]; ok { + if v, ok := obj.Object[types.KeyManagedResSecret]; ok { s, err := fn.JsonConvertP[corev1.Secret](v) if err != nil { - mLogger.Infof("managed resource, invalid output secret received") + mlogger.Error("managed resource, invalid output secret received, got", "err", err) return errors.NewE(err) } s.SetManagedFields(nil) - mLogger.Infof("seting managed resource output secret") outputSecret = s } @@ -281,10 +287,10 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo return errors.NewE(err) } - if v, ok := rwu.Object[types.KeyClusterManagedSvcSecret]; ok { + if v, ok := obj.Object[types.KeyClusterManagedSvcSecret]; ok { v2, err := fn.JsonConvertP[corev1.Secret](v) if err != nil { - mLogger.Infof("managed resource, invalid output secret received") + mlogger.Warn("managed resource, invalid output secret received, got", "err", err) return errors.NewE(err) } v2.SetManagedFields(nil) @@ -302,10 +308,10 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo if err := consumer.Consume(msgReader, msgTypes.ConsumeOpts{ OnError: func(err error) error { - logger.Errorf(err, "received while reading messages, ignoring it") + logger.Error("while reading messages, got", "err", err) return nil }, }); err != nil { - logger.Errorf(err, "error while consuming messages") + logger.Error("while consuming messages, got", "err", err) } } diff --git a/apps/console/internal/domain/domain.go b/apps/console/internal/domain/domain.go index 855af2d0c..7e3fe5be4 100644 --- a/apps/console/internal/domain/domain.go +++ b/apps/console/internal/domain/domain.go @@ -131,7 +131,7 @@ func (d *domain) applyK8sResourceOnCluster(ctx K8sContext, clusterName string, o return errors.NewE(err) } - subject := common.GetTenantClusterMessagingTopic(ctx.GetAccountName(), clusterName) + subject := common.SendToAgentSubjectName(ctx.GetAccountName(), clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) err = d.producer.Produce(ctx, msgTypes.ProduceMsg{ Subject: subject, @@ -178,7 +178,7 @@ func (d *domain) applyK8sResource(ctx K8sContext, envName string, obj client.Obj return errors.NewE(err) } - subject := common.GetTenantClusterMessagingTopic(ctx.GetAccountName(), *clusterName) + subject := common.SendToAgentSubjectName(ctx.GetAccountName(), *clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) err = d.producer.Produce(ctx, msgTypes.ProduceMsg{ Subject: subject, @@ -226,7 +226,7 @@ func applyK8sResource(ctx K8sContext, args ApplyK8sResourceArgs) error { return errors.NewE(err) } - subject := common.GetTenantClusterMessagingTopic(ctx.GetAccountName(), args.ClusterName) + subject := common.SendToAgentSubjectName(ctx.GetAccountName(), args.ClusterName, args.Object.GetObjectKind().GroupVersionKind().String(), args.Object.GetNamespace(), args.Object.GetName()) err = args.Dispatcher.Produce(ctx, msgTypes.ProduceMsg{Subject: subject, Payload: b}) return errors.NewE(err) @@ -261,7 +261,7 @@ func (d *domain) restartK8sResource(ctx K8sContext, projectName string, namespac return errors.NewE(err) } - subject := common.GetTenantClusterMessagingTopic(ctx.GetAccountName(), *clusterName) + subject := common.SendToAgentSubjectName(ctx.GetAccountName(), *clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) err = d.producer.Produce(ctx, msgTypes.ProduceMsg{ Subject: subject, @@ -289,8 +289,9 @@ func (d *domain) deleteK8sResourceOfCluster(ctx K8sContext, clusterName string, return errors.NewE(err) } + subject := common.SendToAgentSubjectName(ctx.GetAccountName(), clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) err = d.producer.Produce(ctx, msgTypes.ProduceMsg{ - Subject: common.GetTenantClusterMessagingTopic(ctx.GetAccountName(), clusterName), + Subject: subject, Payload: b, }) @@ -326,8 +327,10 @@ func (d *domain) deleteK8sResource(ctx K8sContext, environmentName string, obj c return errors.NewE(err) } + subject := common.SendToAgentSubjectName(ctx.GetAccountName(), *clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) + err = d.producer.Produce(ctx, msgTypes.ProduceMsg{ - Subject: common.GetTenantClusterMessagingTopic(ctx.GetAccountName(), *clusterName), + Subject: subject, Payload: b, }) diff --git a/apps/console/internal/env/env.go b/apps/console/internal/env/env.go index 6ad55b3e0..1a2bf74f1 100644 --- a/apps/console/internal/env/env.go +++ b/apps/console/internal/env/env.go @@ -18,10 +18,8 @@ type Env struct { AccountCookieName string `env:"ACCOUNT_COOKIE_NAME" required:"true"` ClusterCookieName string `env:"CLUSTER_COOKIE_NAME" required:"true"` - // NATS:start - NatsURL string `env:"NATS_URL" required:"true"` - NatsResourceSyncStream string `env:"NATS_RESOURCE_STREAM" required:"true"` - // NATS:end + NatsURL string `env:"NATS_URL" required:"true"` + NatsReceiveFromAgentStream string `env:"NATS_RECEIVE_FROM_AGENT_STREAM" required:"true"` IAMGrpcAddr string `env:"IAM_GRPC_ADDR" required:"true"` InfraGrpcAddr string `env:"INFRA_GRPC_ADDR" required:"true"` diff --git a/apps/console/internal/framework/framework.go b/apps/console/internal/framework/framework.go index 0f69b5b74..29c707a23 100644 --- a/apps/console/internal/framework/framework.go +++ b/apps/console/internal/framework/framework.go @@ -3,6 +3,7 @@ package framework import ( "context" "fmt" + "log/slog" "github.com/kloudlite/api/apps/console/internal/domain" "github.com/kloudlite/api/common" @@ -10,7 +11,6 @@ import ( app "github.com/kloudlite/api/apps/console/internal/app" "github.com/kloudlite/api/apps/console/internal/env" - rpc "github.com/kloudlite/api/pkg/grpc" httpServer "github.com/kloudlite/api/pkg/http-server" "github.com/kloudlite/api/pkg/k8s" "github.com/kloudlite/api/pkg/kv" @@ -40,7 +40,7 @@ var Module = fx.Module("framework", mongoDb.NewMongoClientFx[*fm](), - fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.Client, error) { + fx.Provide(func(ev *env.Env, logger *slog.Logger) (*nats.Client, error) { return nats.NewClient(ev.NatsURL, nats.ClientOpts{ Name: "console", Logger: logger, @@ -69,11 +69,11 @@ var Module = fx.Module("framework", }), fx.Provide(func(ev *env.Env) (app.IAMGrpcClient, error) { - return rpc.NewGrpcClient(ev.IAMGrpcAddr) + return grpc.NewGrpcClient(ev.IAMGrpcAddr) }), fx.Provide(func(ev *env.Env) (app.InfraClient, error) { - return rpc.NewGrpcClient(ev.InfraGrpcAddr) + return grpc.NewGrpcClient(ev.InfraGrpcAddr) }), fx.Invoke(func(lf fx.Lifecycle, c1 app.IAMGrpcClient, c2 app.InfraClient) { @@ -136,7 +136,6 @@ var Module = fx.Module("framework", Server: &dns.Server{ Addr: ev.DNSAddr, Net: "udp", - // Handler: handler, UDPSize: 0xffff, ReusePort: true, }, diff --git a/apps/console/main.go b/apps/console/main.go index 88c40b496..d70cf275f 100644 --- a/apps/console/main.go +++ b/apps/console/main.go @@ -3,6 +3,7 @@ package main import ( "context" "flag" + "log/slog" "os" "strings" "time" @@ -22,6 +23,9 @@ import ( func main() { var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") + + var debug bool + flag.BoolVar(&debug, "debug", false, "--debug") flag.Parse() logger, err := logging.New(&logging.Options{Name: "console", ShowDebugLog: isDev || strings.ToLower(os.Getenv("LOG_LEVEL")) == "debug"}) @@ -36,6 +40,10 @@ func main() { return logger }), + fx.Provide(func() *slog.Logger { + return logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug, SetDefaultLogger: true}) + }), + fx.Provide(func() (*env.Env, error) { if e, err := env.LoadEnv(); err != nil { return nil, errors.NewE(err) diff --git a/common/kafka-topic-name.go b/common/kafka-topic-name.go index 33616f279..53c3ab1b4 100644 --- a/common/kafka-topic-name.go +++ b/common/kafka-topic-name.go @@ -14,16 +14,16 @@ const ( ) const ( - SendToAgentSubjectNamePrefix = "send-to-agent" - ReceiveFromAgentSubjectNamePrefix = "receive-from-agent" + sendToAgentSubjectPrefix = "send-to-agent" + receiveFromAgentSubjectPrefix = "receive-from-agent" ) func SendToAgentSubjectPrefix(accountName string, clusterName string) string { - return fmt.Sprintf("%s.%s.%s", SendToAgentSubjectNamePrefix, accountName, clusterName) + return fmt.Sprintf("%s.%s.%s", sendToAgentSubjectPrefix, accountName, clusterName) } func ReceiveFromAgentSubjectPrefix(accountName string, clusterName string) string { - return fmt.Sprintf("%s.%s.%s", ReceiveFromAgentSubjectNamePrefix, accountName, clusterName) + return fmt.Sprintf("%s.%s.%s", receiveFromAgentSubjectPrefix, accountName, clusterName) } // func GetKafkaTopicName(accountName string, clusterName string) string { @@ -36,9 +36,9 @@ func ReceiveFromAgentSubjectPrefix(accountName string, clusterName string) strin // } func SendToAgentSubjectName(accountName string, clusterName string, gvk string, namespace string, name string) string { - slug := base64.RawStdEncoding.EncodeToString([]byte(fmt.Sprintf("%s.%s/%s", gvk, namespace, name))) + slug := base64.RawURLEncoding.EncodeToString([]byte(fmt.Sprintf("%s.%s/%s", gvk, namespace, name))) - return fmt.Sprintf("%s.%s.%s.%s", SendToAgentSubjectNamePrefix, accountName, clusterName, slug) + return fmt.Sprintf("%s.%s.%s.%s", sendToAgentSubjectPrefix, accountName, clusterName, slug) } type platformEvent string @@ -59,11 +59,20 @@ const ( type ReceiveFromAgentArgs struct { AccountName string ClusterName string + + GVK string + Namespace string + Name string } func ReceiveFromAgentSubjectName(args ReceiveFromAgentArgs, receiver MessageReceiver, ev platformEvent) string { - slug := "*" - return fmt.Sprintf("%s.%s.%s.%s.%s.%s", ReceiveFromAgentSubjectNamePrefix, args.AccountName, args.ClusterName, slug, receiver, ev) + if args.AccountName == "*" && args.ClusterName == "*" { + slug := "*" + return fmt.Sprintf("%s.%s.%s.%s.%s.%s", receiveFromAgentSubjectPrefix, args.AccountName, args.ClusterName, slug, receiver, ev) + } + + slug := base64.RawURLEncoding.EncodeToString([]byte(fmt.Sprintf("%s.%s/%s", args.GVK, args.Namespace, args.Name))) + return fmt.Sprintf("%s.%s.%s.%s.%s.%s", receiveFromAgentSubjectPrefix, args.AccountName, args.ClusterName, slug, receiver, ev) } // func GetPlatformClusterMessagingTopic(accountName string, clusterName string, controller messageReceiver, ev platformEvent) string { From a955e5db0754b21804445fbaa3830b9a4afdc881 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 25 Jul 2024 18:54:09 +0530 Subject: [PATCH 20/89] fix(infra): nats subject change, and logging improvements --- .tools/nvim/__http__/console/apps.graphql.yml | 13 +-- .../internal/app/process-resource-updates.go | 14 +-- apps/infra/internal/app/app.go | 9 +- .../internal/app/process-error-on-apply.go | 44 +++++++-- .../internal/app/process-resource-updates.go | 98 ++++++++++--------- apps/infra/internal/domain/byok-clusters.go | 2 +- apps/infra/internal/domain/clusters.go | 69 +++++++------ apps/infra/internal/env/env.go | 2 +- apps/infra/internal/framework/framework.go | 3 +- apps/infra/main.go | 13 +++ apps/tenant-agent/types/types.go | 4 +- 11 files changed, 154 insertions(+), 117 deletions(-) diff --git a/.tools/nvim/__http__/console/apps.graphql.yml b/.tools/nvim/__http__/console/apps.graphql.yml index 6a9110f50..c94e2da84 100644 --- a/.tools/nvim/__http__/console/apps.graphql.yml +++ b/.tools/nvim/__http__/console/apps.graphql.yml @@ -73,21 +73,10 @@ label: Create App query: |+ #graphql mutation Core_createApp($envName: String!, $app: AppIn!) { core_createApp(envName: $envName, app: $app) { + id metadata { name } - syncStatus { - state - recordVersion - error - action - lastSyncedAt - } - createdBy{ - userId - userName - userEmail - } } } variables: diff --git a/apps/console/internal/app/process-resource-updates.go b/apps/console/internal/app/process-resource-updates.go index 945c9b2d4..c337c1073 100644 --- a/apps/console/internal/app/process-resource-updates.go +++ b/apps/console/internal/app/process-resource-updates.go @@ -81,12 +81,12 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo var rwu types.ResourceUpdate if err := json.Unmarshal(ru.WatcherUpdate, &rwu); err != nil { - logger.Error("unmarshaling into resource watcher update, got", "err", err) + logger.Error("unmarshaling into resource update, got", "err", err) return nil } if rwu.Object == nil { - logger.Debug("msg.Object is nil, so could not extract any info from message, ignoring ...") + logger.Debug("msg.object is nil, so could not extract any info from message, ignoring ...") return nil } @@ -100,11 +100,6 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo "cluster", ru.ClusterName, ) - mlogger.Debug("validated message") - defer func() { - mlogger.Info("PROCESSED message", "took", fmt.Sprintf("%dms", time.Since(start).Milliseconds())) - }() - if len(strings.TrimSpace(ru.AccountName)) == 0 { mlogger.Warn("message does not contain 'accountName', so won't be able to find a resource uniquely, thus ignoring ...") return nil @@ -115,6 +110,11 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo return nil } + mlogger.Debug("validated message") + defer func() { + mlogger.Info("PROCESSED message", "took", fmt.Sprintf("%dms", time.Since(start).Milliseconds())) + }() + dctx := domain.NewConsoleContext(context.TODO(), "sys-user:console-resource-updater", ru.AccountName) resStatus, err := func() (types.ResourceStatus, error) { diff --git a/apps/infra/internal/app/app.go b/apps/infra/internal/app/app.go index 6aa372f7a..b9a405537 100644 --- a/apps/infra/internal/app/app.go +++ b/apps/infra/internal/app/app.go @@ -2,6 +2,7 @@ package app import ( "context" + "log/slog" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/console" @@ -126,7 +127,7 @@ var Module = fx.Module( consumerName := "infra:resource-updates" return msg_nats.NewJetstreamConsumer(context.TODO(), jsc, msg_nats.JetstreamConsumerArgs{ - Stream: ev.NatsStream, + Stream: ev.NatsReceiveFromAgentStream, ConsumerConfig: msg_nats.ConsumerConfig{ Name: consumerName, Durable: consumerName, @@ -136,7 +137,7 @@ var Module = fx.Module( }) }), - fx.Invoke(func(lf fx.Lifecycle, consumer ReceiveResourceUpdatesConsumer, d domain.Domain, logger logging.Logger) { + fx.Invoke(func(lf fx.Lifecycle, consumer ReceiveResourceUpdatesConsumer, d domain.Domain, logger *slog.Logger) { lf.Append(fx.Hook{ OnStart: func(context.Context) error { go processResourceUpdates(consumer, d, logger) @@ -154,7 +155,7 @@ var Module = fx.Module( consumerName := "infra:error-on-apply" return msg_nats.NewJetstreamConsumer(context.TODO(), jsc, msg_nats.JetstreamConsumerArgs{ - Stream: ev.NatsStream, + Stream: ev.NatsReceiveFromAgentStream, ConsumerConfig: msg_nats.ConsumerConfig{ Name: consumerName, Durable: consumerName, @@ -164,7 +165,7 @@ var Module = fx.Module( }) }), - fx.Invoke(func(lf fx.Lifecycle, consumer ErrorOnApplyConsumer, d domain.Domain, logger logging.Logger) { + fx.Invoke(func(lf fx.Lifecycle, consumer ErrorOnApplyConsumer, d domain.Domain, logger *slog.Logger) { lf.Append(fx.Hook{ OnStart: func(context.Context) error { go ProcessErrorOnApply(consumer, logger, d) diff --git a/apps/infra/internal/app/process-error-on-apply.go b/apps/infra/internal/app/process-error-on-apply.go index 9e889cb26..43d85a050 100644 --- a/apps/infra/internal/app/process-error-on-apply.go +++ b/apps/infra/internal/app/process-error-on-apply.go @@ -3,6 +3,11 @@ package app import ( "context" "encoding/json" + "fmt" + "log/slog" + "strings" + "sync" + "time" "github.com/kloudlite/api/apps/infra/internal/domain" "github.com/kloudlite/api/apps/infra/internal/entities" @@ -10,7 +15,6 @@ import ( t "github.com/kloudlite/api/apps/tenant-agent/types" "github.com/kloudlite/api/pkg/errors" fn "github.com/kloudlite/api/pkg/functions" - "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/api/pkg/messaging" "github.com/kloudlite/api/pkg/messaging/types" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -18,10 +22,19 @@ import ( type ErrorOnApplyConsumer messaging.Consumer -func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, logger logging.Logger, d domain.Domain) { +func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, logger *slog.Logger, d domain.Domain) { counter := 0 + mu := sync.Mutex{} + processMsg := func(msg *types.ConsumeMsg) error { + mu.Lock() counter += 1 + mu.Unlock() + + start := time.Now() + + logger := logger.With("subject", msg.Subject, "counter", counter) + logger.Debug("INCOMING message") em, err := msgOfficeT.UnmarshalErrMessage(msg.Payload) if err != nil { @@ -34,16 +47,28 @@ func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, logger logging.Logger, d } obj := unstructured.Unstructured{Object: errObj.Object} + gvkStr := obj.GetObjectKind().GroupVersionKind().String() - mLogger := logger.WithKV( - "gvk", obj.GroupVersionKind(), - "accountName", em.AccountName, - "clusterName", em.ClusterName, + mlogger := logger.With( + "GVK", gvkStr, + "NN", fmt.Sprintf("%s/%s", obj.GetNamespace(), obj.GetName()), + "account", errObj.AccountName, + "cluster", errObj.ClusterName, ) - mLogger.Infof("[%d] received message", counter) + if len(strings.TrimSpace(errObj.AccountName)) == 0 { + mlogger.Warn("message does not contain 'accountName', so won't be able to find a resource uniquely, thus ignoring ...") + return nil + } + + if len(strings.TrimSpace(errObj.ClusterName)) == 0 { + mlogger.Warn("message does not contain 'clusterName', so won't be able to find a resource uniquely, thus ignoring ...") + return nil + } + + mlogger.Debug("validated message") defer func() { - mLogger.Infof("[%d] processed message", counter) + mlogger.Info("PROCESSED message", "took", fmt.Sprintf("%dms", time.Since(start).Milliseconds())) }() dctx := domain.InfraContext{ @@ -103,9 +128,10 @@ func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, logger logging.Logger, d if err := consumer.Consume(processMsg, types.ConsumeOpts{ OnError: func(err error) error { + logger.Error("while reading messages, got", "err", err) return nil }, }); err != nil { - logger.Errorf(err, "when setting up error-on-apply consumer") + logger.Error("when setting up error-on-apply consumer, got", "err", err) } } diff --git a/apps/infra/internal/app/process-resource-updates.go b/apps/infra/internal/app/process-resource-updates.go index 2363ac206..351d40abd 100644 --- a/apps/infra/internal/app/process-resource-updates.go +++ b/apps/infra/internal/app/process-resource-updates.go @@ -4,7 +4,9 @@ import ( "context" "encoding/json" "fmt" + "log/slog" "strings" + "sync" "time" "github.com/kloudlite/api/pkg/errors" @@ -12,9 +14,7 @@ import ( "github.com/kloudlite/api/apps/infra/internal/domain" "github.com/kloudlite/api/apps/infra/internal/entities" fn "github.com/kloudlite/api/pkg/functions" - "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/operator/operators/resource-watcher/types" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "github.com/kloudlite/api/pkg/messaging" msgTypes "github.com/kloudlite/api/pkg/messaging/types" @@ -47,39 +47,76 @@ var ( secretGVK = fn.GVK("v1", "Secret") ) -func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Domain, logger logging.Logger) { +func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Domain, logger *slog.Logger) { + counter := 0 + mu := sync.Mutex{} + readMsg := func(msg *msgTypes.ConsumeMsg) error { - logger.Debugf("processing msg timestamp %s", msg.Timestamp.Format(time.RFC3339)) + mu.Lock() + counter += 1 + mu.Unlock() + + start := time.Now() + + logger := logger.With("subject", msg.Subject, "counter", counter) + logger.Debug("INCOMING message") ru, err := msgOfficeT.UnmarshalResourceUpdate(msg.Payload) if err != nil { - logger.Errorf(err, "unmarshaling resource update") + logger.Error("unmarshaling resource update, got", "err", err) return nil } var su types.ResourceUpdate if err := json.Unmarshal(ru.WatcherUpdate, &su); err != nil { - logger.Errorf(err, "parsing into status update") + logger.Error("unmarshaling into resource update, got", "err", err) return nil } if su.Object == nil { - logger.Infof("message does not contain 'object', so won't be able to find a resource uniquely, thus ignoring ...") + logger.Debug("msg.object is nil, so could not extract any info from message, ignoring ...") return nil } if len(strings.TrimSpace(ru.AccountName)) == 0 { - logger.Infof("message does not contain 'accountName', so won't be able to find a resource uniquely, thus ignoring ...") + logger.Debug("message does not contain 'accountName', so won't be able to find a resource uniquely, thus ignoring ...") + return nil + } + + if len(strings.TrimSpace(ru.ClusterName)) == 0 { + logger.Debug("message does not contain 'clusterName', so won't be able to find a resource uniquely, thus ignoring ...") return nil } dctx := domain.InfraContext{Context: context.TODO(), UserId: "sys-user-process-infra-updates", AccountName: ru.AccountName} - obj := unstructured.Unstructured{Object: su.Object} + obj := su.Object gvkStr := obj.GetObjectKind().GroupVersionKind().String() + mlogger := logger.With( + "GVK", gvkStr, + "NN", fmt.Sprintf("%s/%s", obj.GetNamespace(), obj.GetName()), + "account", ru.AccountName, + "cluster", ru.ClusterName, + ) + + if len(strings.TrimSpace(ru.AccountName)) == 0 { + mlogger.Warn("message does not contain 'accountName', so won't be able to find a resource uniquely, thus ignoring ...") + return nil + } + + if len(strings.TrimSpace(ru.ClusterName)) == 0 { + mlogger.Warn("message does not contain 'clusterName', so won't be able to find a resource uniquely, thus ignoring ...") + return nil + } + + mlogger.Debug("validated message") + defer func() { + mlogger.Info("PROCESSED message", "took", fmt.Sprintf("%dms", time.Since(start).Milliseconds())) + }() + resStatus, err := func() (types.ResourceStatus, error) { - v, ok := su.Object[types.ResourceStatusKey] + v, ok := su.Object.Object[types.ResourceStatusKey] if !ok { return "", errors.NewE(fmt.Errorf("field %s not found in object", types.ResourceStatusKey)) } @@ -94,18 +131,6 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do return err } - mLogger := logger.WithKV( - "gvk", obj.GetObjectKind().GroupVersionKind(), - "NN", fmt.Sprintf("%s/%s", obj.GetNamespace(), obj.GetName()), - "resource-status", resStatus, - "accountName/clusterName", fmt.Sprintf("%s/%s", ru.AccountName, ru.ClusterName), - ) - - mLogger.Infof("received message") - defer func() { - mLogger.Infof("processed message") - }() - switch gvkStr { case clusterGVK.String(): { @@ -119,26 +144,6 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do } return d.OnClusterUpdateMessage(dctx, clus, resStatus, domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp}) } - // case globalVpnGVK.String(): - // { - // var gvpn entities.GlobalVPNConnection - // if err := fn.JsonConversion(su.Object, &gvpn); err != nil { - // return errors.NewE(err) - // } - // - // if v, ok := su.Object[types.KeyGlobalVPNWgParams]; ok { - // wp, err := fn.JsonConvertP[wgv1.WgParams](v) - // if err != nil { - // return errors.NewE(err) - // } - // gvpn.ParsedWgParams = wp - // } - // - // if resStatus == types.ResourceStatusDeleted { - // return d.OnGlobalVPNConnectionDeleteMessage(dctx, ru.ClusterName, gvpn) - // } - // return d.OnGlobalVPNConnectionUpdateMessage(dctx, ru.ClusterName, gvpn, resStatus, domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp}) - // } case gatewayGVK.String(): { var gvpn entities.GlobalVPNConnection @@ -146,7 +151,7 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do return errors.NewE(err) } - if v, ok := su.Object[types.KeyGatewayWgParams]; ok { + if v, ok := obj.Object[types.KeyGatewayWgParams]; ok { wp, err := fn.JsonConvertP[networkingv1.WireguardKeys](v) if err != nil { return errors.NewE(err) @@ -238,7 +243,6 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do return d.OnNamespaceUpdateMessage(dctx, ru.ClusterName, ns, resStatus, domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp}) } - case ingressGVK.String(): { var ingress networkv1.Ingress @@ -271,7 +275,7 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do } default: { - mLogger.Infof("infra status updates consumer does not acknowledge the gvk %s", gvk(&obj)) + mlogger.Warn("infra resource updates consumer does not acknowledge resource") return nil } } @@ -279,10 +283,10 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do if err := consumer.Consume(readMsg, msgTypes.ConsumeOpts{ OnError: func(err error) error { - logger.Errorf(err, "error while consuming message") + logger.Error("while reading messages, got", "err", err) return nil }, }); err != nil { - logger.Errorf(err, "error while consuming messages") + logger.Error("while consuming messages, got", "err", err) } } diff --git a/apps/infra/internal/domain/byok-clusters.go b/apps/infra/internal/domain/byok-clusters.go index 2005e60af..32383757e 100644 --- a/apps/infra/internal/domain/byok-clusters.go +++ b/apps/infra/internal/domain/byok-clusters.go @@ -80,7 +80,7 @@ func (d *domain) CreateBYOKCluster(ctx InfraContext, cluster entities.BYOKCluste cluster.ClusterToken = ctoken - cluster.MessageQueueTopicName = common.GetTenantClusterMessagingTopic(ctx.AccountName, cluster.Name) + cluster.MessageQueueTopicName = common.SendToAgentSubjectPrefix(ctx.AccountName, cluster.Name) gvpnConn, err := d.ensureGlobalVPNConnection(ctx, cluster.Name, cluster.GlobalVPN) if err != nil { diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 41b6ef710..51cac2548 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -325,7 +325,7 @@ func (d *domain) CreateCluster(ctx InfraContext, cluster entities.Cluster) (*ent }, } }(), - MessageQueueTopicName: common.GetTenantClusterMessagingTopic(ctx.AccountName, cluster.Name), + MessageQueueTopicName: common.SendToAgentSubjectPrefix(ctx.AccountName, cluster.Name), KloudliteRelease: d.env.KloudliteRelease, Output: nil, } @@ -376,10 +376,10 @@ func (d *domain) CreateCluster(ctx InfraContext, cluster entities.Cluster) (*ent } func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) error { - t := time.Now() - defer func() { - d.logger.Infof("syncKloudliteGatewayDevice took %.2fs", time.Since(t).Seconds()) - }() + t := time.Now() + defer func() { + d.logger.Infof("syncKloudliteGatewayDevice took %.2fs", time.Since(t).Seconds()) + }() // 1. parse deployment template b, err := templates.Read(templates.GlobalVPNKloudliteDeviceTemplate) if err != nil { @@ -427,9 +427,9 @@ func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) e publicPeers := make([]wgutils.PublicPeer, 0, len(wgParams.PublicPeers)) for _, p := range wgParams.PublicPeers { - if p.PublicKey != clDevice.PublicKey { - publicPeers = append(publicPeers, p) - } + if p.PublicKey != clDevice.PublicKey { + publicPeers = append(publicPeers, p) + } } deviceSvcHosts := make([]string, 0, len(deviceHosts)) @@ -437,7 +437,7 @@ func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) e deviceSvcHosts = append(deviceSvcHosts, fmt.Sprintf("%s=%s", k, v)) } - wgParams.PublicPeers = publicPeers + wgParams.PublicPeers = publicPeers wgParams.DNS = klDevice.IPAddr wgParams.ListenPort = 31820 @@ -533,17 +533,17 @@ func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) e } deploymentBytes, err := templates.ParseBytes(b, templates.GVPNKloudliteDeviceTemplateVars{ - Name: resourceName, - Namespace: accNs, - WgConfig: wgConfig, + Name: resourceName, + Namespace: accNs, + WgConfig: wgConfig, EnableKubeReverseProxy: false, - KubeReverseProxyImage: d.env.GlobalVPNKubeReverseProxyImage, - AuthzToken: d.env.GlobalVPNKubeReverseProxyAuthzToken, - GatewayDNSServers: strings.Join(dnsServerArgs, ","), - GatewayServiceHosts: strings.Join(deviceSvcHosts, ","), - WireguardPort: wgParams.ListenPort, + KubeReverseProxyImage: d.env.GlobalVPNKubeReverseProxyImage, + AuthzToken: d.env.GlobalVPNKubeReverseProxyAuthzToken, + GatewayDNSServers: strings.Join(dnsServerArgs, ","), + GatewayServiceHosts: strings.Join(deviceSvcHosts, ","), + WireguardPort: wgParams.ListenPort, - KloudliteAccount: gv.AccountName, + KloudliteAccount: gv.AccountName, }) if err != nil { return err @@ -598,7 +598,6 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string return err } - wgParams, deviceHosts, err := d.buildGlobalVPNDeviceWgBaseParams(ctx, gvpnConns, clDevice) if err != nil { return err @@ -611,9 +610,9 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string publicPeers := make([]wgutils.PublicPeer, 0, len(wgParams.PublicPeers)) for _, p := range wgParams.PublicPeers { - if p.PublicKey != klDevice.PublicKey { - publicPeers = append(publicPeers, p) - } + if p.PublicKey != klDevice.PublicKey { + publicPeers = append(publicPeers, p) + } } deviceSvcHosts := make([]string, 0, len(deviceHosts)) @@ -621,7 +620,7 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string deviceSvcHosts = append(deviceSvcHosts, fmt.Sprintf("%s=%s", k, v)) } - wgParams.PublicPeers = publicPeers + wgParams.PublicPeers = publicPeers wgParams.DNS = clDevice.IPAddr wgParams.ListenPort = 31820 @@ -689,17 +688,17 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string } deploymentBytes, err := templates.ParseBytes(b, templates.GVPNKloudliteDeviceTemplateVars{ - Name: resourceName, - Namespace: accNs, - WgConfig: wgConfig, + Name: resourceName, + Namespace: accNs, + WgConfig: wgConfig, EnableKubeReverseProxy: true, - KubeReverseProxyImage: d.env.GlobalVPNKubeReverseProxyImage, - AuthzToken: d.env.GlobalVPNKubeReverseProxyAuthzToken, - GatewayDNSServers: strings.Join(dnsServerArgs, ","), - GatewayServiceHosts: strings.Join(deviceSvcHosts, ","), - WireguardPort: wgParams.ListenPort, + KubeReverseProxyImage: d.env.GlobalVPNKubeReverseProxyImage, + AuthzToken: d.env.GlobalVPNKubeReverseProxyAuthzToken, + GatewayDNSServers: strings.Join(dnsServerArgs, ","), + GatewayServiceHosts: strings.Join(deviceSvcHosts, ","), + WireguardPort: wgParams.ListenPort, - KloudliteAccount: gv.AccountName, + KloudliteAccount: gv.AccountName, }) if err != nil { return err @@ -1078,6 +1077,9 @@ func (d *domain) MarkClusterOnlineAt(ctx InfraContext, clusterName string, times if _, err := d.byokClusterRepo.Patch(ctx, entities.UniqueBYOKClusterFilter(ctx.AccountName, clusterName), repos.Document{ fc.BYOKClusterLastOnlineAt: timestamp, }); err != nil { + if errors.Is(err, repos.ErrNoDocuments) { + return nil + } return errors.NewEf(err, "failed to patch last online time for byok cluster %q,", clusterName) } return nil @@ -1089,6 +1091,9 @@ func (d *domain) MarkClusterOnlineAt(ctx InfraContext, clusterName string, times }, repos.Document{ fc.ClusterLastOnlineAt: timestamp, }); err != nil { + if errors.Is(err, repos.ErrNoDocuments) { + return nil + } return errors.NewEf(err, "failed to patch last online time for cluster %q", clusterName) } diff --git a/apps/infra/internal/env/env.go b/apps/infra/internal/env/env.go index 28d8464c2..d88ecc4a0 100644 --- a/apps/infra/internal/env/env.go +++ b/apps/infra/internal/env/env.go @@ -20,7 +20,7 @@ type Env struct { KloudliteDNSSuffix string `env:"KLOUDLITE_DNS_SUFFIX" required:"true"` NatsURL string `env:"NATS_URL" required:"true"` - NatsStream string `env:"NATS_STREAM" required:"true"` + NatsReceiveFromAgentStream string `env:"NATS_RECEIVE_FROM_AGENT_STREAM" required:"true"` AccountCookieName string `env:"ACCOUNT_COOKIE_NAME" required:"true"` ProviderSecretNamespace string `env:"PROVIDER_SECRET_NAMESPACE" required:"true"` diff --git a/apps/infra/internal/framework/framework.go b/apps/infra/internal/framework/framework.go index 48bfe20a5..38ca29653 100644 --- a/apps/infra/internal/framework/framework.go +++ b/apps/infra/internal/framework/framework.go @@ -3,6 +3,7 @@ package framework import ( "context" "fmt" + "log/slog" "github.com/kloudlite/api/apps/infra/internal/app" "github.com/kloudlite/api/apps/infra/internal/env" @@ -41,7 +42,7 @@ var Module = fx.Module("framework", mongoRepo.NewMongoClientFx[*framework](), - fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.Client, error) { + fx.Provide(func(ev *env.Env, logger *slog.Logger) (*nats.Client, error) { return nats.NewClient(ev.NatsURL, nats.ClientOpts{ Name: "infra", Logger: logger, diff --git a/apps/infra/main.go b/apps/infra/main.go index e945dc663..8f870c166 100644 --- a/apps/infra/main.go +++ b/apps/infra/main.go @@ -3,6 +3,7 @@ package main import ( "context" "flag" + "log/slog" "os" "time" @@ -26,6 +27,10 @@ import ( func main() { var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") + + var debug bool + flag.BoolVar(&debug, "debug", false, "--debug") + flag.Parse() logger, err := logging.New(&logging.Options{Name: "infra", Dev: isDev}) @@ -40,6 +45,14 @@ func main() { return logger }), + fx.Provide(func() *slog.Logger { + return logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: debug, + SetAsDefaultLogger: true, + }) + }), + fx.Provide(func() (*env.Env, error) { e, err := env.LoadEnv() if err != nil { diff --git a/apps/tenant-agent/types/types.go b/apps/tenant-agent/types/types.go index 5415b8810..c0a3b2855 100644 --- a/apps/tenant-agent/types/types.go +++ b/apps/tenant-agent/types/types.go @@ -12,8 +12,7 @@ type AgentMessage struct { AccountName string `json:"accountName"` ClusterName string `json:"clusterName"` - Action Action `json:"action"` - // Yamls []byte `json:"yamls,omitempty"` + Action Action `json:"action"` Object map[string]any `json:"object"` } @@ -24,5 +23,4 @@ type AgentErrMessage struct { Error string `json:"error"` Action Action `json:"action"` Object map[string]any `json:"object"` - // Yamls []byte `json:"yamls"` } From 2d0684f56fcd7a7dafcac5f031dc8c09c2ab4280 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 25 Jul 2024 19:00:30 +0530 Subject: [PATCH 21/89] security: addresses dependabot alters - [Session Middleware Token Injection Vulnerability](https://github.com/kloudlite/api/security/dependabot/31) - [go-retryablehttp can leak basic auth credentials to log files](https://github.com/kloudlite/api/security/dependabot/32) - [gqlparser denial of service vulnerability via the parserDirectives function](https://github.com/kloudlite/api/security/dependabot/33) --- apps/accounts/internal/framework/framework.go | 6 +- apps/accounts/main.go | 9 ++ apps/auth/internal/framework/main.go | 4 +- apps/auth/main.go | 10 ++ apps/comms/internal/framework/framework.go | 3 +- apps/comms/main.go | 18 +++- apps/console/main.go | 2 +- .../internal/app/adapter-resource-apply.go | 4 +- apps/container-registry/internal/app/main.go | 4 +- .../internal/app/process-resource-updates.go | 7 +- .../internal/framework/framework.go | 3 +- apps/container-registry/main.go | 9 ++ .../internal/framework/framework.go | 3 +- apps/message-office/main.go | 5 +- .../internal/framework/framework.go | 4 +- apps/observability/main.go | 9 ++ apps/webhook/internal/framework/main.go | 4 +- apps/webhook/main.go | 10 ++ .../internal/framework/framework.go | 3 +- apps/websocket-server/main.go | 9 ++ go.mod | 47 ++++---- go.sum | 100 ++++++++---------- 22 files changed, 169 insertions(+), 104 deletions(-) diff --git a/apps/accounts/internal/framework/framework.go b/apps/accounts/internal/framework/framework.go index a3181ca81..866c8ddf7 100644 --- a/apps/accounts/internal/framework/framework.go +++ b/apps/accounts/internal/framework/framework.go @@ -3,10 +3,12 @@ package framework import ( "context" "fmt" + "log/slog" + "time" + "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/pkg/nats" - "time" "github.com/kloudlite/api/pkg/kv" "github.com/kloudlite/api/pkg/repos" @@ -33,7 +35,7 @@ var Module = fx.Module("framework", return &fm{env: ev} }), - fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.JetstreamClient, error) { + fx.Provide(func(ev *env.Env, logger *slog.Logger) (*nats.JetstreamClient, error) { name := "accounts:jetstream-client" nc, err := nats.NewClient(ev.NatsURL, nats.ClientOpts{ Name: name, diff --git a/apps/accounts/main.go b/apps/accounts/main.go index 52bd5ca19..9014f4bba 100644 --- a/apps/accounts/main.go +++ b/apps/accounts/main.go @@ -3,6 +3,7 @@ package main import ( "context" "flag" + "log/slog" "os" "time" @@ -35,6 +36,14 @@ func main() { return logger }), + fx.Provide(func() *slog.Logger { + return logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: isDev, + SetAsDefaultLogger: true, + }) + }), + fx.Provide(func() (*env.Env, error) { if e, err := env.LoadEnv(); err != nil { return nil, errors.NewE(err) diff --git a/apps/auth/internal/framework/main.go b/apps/auth/internal/framework/main.go index 9dc3aef1f..449e48b19 100644 --- a/apps/auth/internal/framework/main.go +++ b/apps/auth/internal/framework/main.go @@ -3,6 +3,8 @@ package framework import ( "context" "fmt" + "log/slog" + "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/pkg/kv" @@ -57,7 +59,7 @@ var Module fx.Option = fx.Module( repos.NewMongoClientFx[*fm](), - fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.JetstreamClient, error) { + fx.Provide(func(ev *env.Env, logger *slog.Logger) (*nats.JetstreamClient, error) { name := "auth:jetstream-client" nc, err := nats.NewClient(ev.NatsURL, nats.ClientOpts{ Name: name, diff --git a/apps/auth/main.go b/apps/auth/main.go index 99f40d71f..944ed2adc 100644 --- a/apps/auth/main.go +++ b/apps/auth/main.go @@ -3,6 +3,7 @@ package main import ( "context" "flag" + "log/slog" "time" "github.com/kloudlite/api/pkg/errors" @@ -36,6 +37,15 @@ func main() { return logging.New(&logging.Options{Name: "auth", Dev: isDev}) }, ), + + fx.Provide(func() *slog.Logger { + return logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: isDev, + SetAsDefaultLogger: true, + }) + }), + framework.Module, ) diff --git a/apps/comms/internal/framework/framework.go b/apps/comms/internal/framework/framework.go index ccaa1326d..2058bcc86 100644 --- a/apps/comms/internal/framework/framework.go +++ b/apps/comms/internal/framework/framework.go @@ -3,6 +3,7 @@ package framework import ( "context" "fmt" + "log/slog" "time" "github.com/kloudlite/api/apps/comms/internal/app" @@ -35,7 +36,7 @@ var Module = fx.Module( return &fm{ev} }), - fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.Client, error) { + fx.Provide(func(ev *env.Env, logger *slog.Logger) (*nats.Client, error) { return nats.NewClient(ev.NatsURL, nats.ClientOpts{ Name: "comms", Logger: logger, diff --git a/apps/comms/main.go b/apps/comms/main.go index b1d880522..4927f97f3 100644 --- a/apps/comms/main.go +++ b/apps/comms/main.go @@ -4,6 +4,7 @@ import ( "context" "embed" "flag" + "log/slog" "os" "time" @@ -30,11 +31,18 @@ func main() { webApp := fx.New( fx.NopLogger, - fx.Provide( - func() logging.Logger { - return logger - }, - ), + fx.Provide(func() logging.Logger { + return logger + }), + + fx.Provide(func() *slog.Logger { + return logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: isDev, + SetAsDefaultLogger: true, + }) + }), + fx.Provide(func() (*env.Env, error) { return env.LoadEnv() }), diff --git a/apps/console/main.go b/apps/console/main.go index d70cf275f..d655ba441 100644 --- a/apps/console/main.go +++ b/apps/console/main.go @@ -41,7 +41,7 @@ func main() { }), fx.Provide(func() *slog.Logger { - return logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug, SetDefaultLogger: true}) + return logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug, SetAsDefaultLogger: true}) }), fx.Provide(func() (*env.Env, error) { diff --git a/apps/container-registry/internal/app/adapter-resource-apply.go b/apps/container-registry/internal/app/adapter-resource-apply.go index a4fa7ce93..e9defdefd 100644 --- a/apps/container-registry/internal/app/adapter-resource-apply.go +++ b/apps/container-registry/internal/app/adapter-resource-apply.go @@ -52,7 +52,7 @@ func (a *resourceDispatcherImpl) ApplyToTargetCluster(ctx domain.RegistryContext } err = a.producer.Produce(ctx, msgTypes.ProduceMsg{ - Subject: common.GetTenantClusterMessagingTopic(ctx.AccountName, clusterName), + Subject: common.SendToAgentSubjectName(ctx.AccountName, clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()), Payload: b, }) @@ -76,7 +76,7 @@ func (d *resourceDispatcherImpl) DeleteFromTargetCluster(ctx domain.RegistryCont } err = d.producer.Produce(ctx, msgTypes.ProduceMsg{ - Subject: common.GetTenantClusterMessagingTopic(ctx.AccountName, clusterName), + Subject: common.SendToAgentSubjectName(ctx.AccountName, clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()), Payload: b, }) diff --git a/apps/container-registry/internal/app/main.go b/apps/container-registry/internal/app/main.go index 509dc2c44..7fd954841 100644 --- a/apps/container-registry/internal/app/main.go +++ b/apps/container-registry/internal/app/main.go @@ -109,7 +109,7 @@ var Module = fx.Module("app", }), fx.Provide(func(jsc *nats.JetstreamClient, ev *env.Env) (ReceiveResourceUpdatesConsumer, error) { - topic := common.GetPlatformClusterMessagingTopic("*", "*", common.ContainerRegistryReceiver, common.EventResourceUpdate) + topic := common.ReceiveFromAgentSubjectName(common.ReceiveFromAgentArgs{AccountName: "*", ClusterName: "*"}, common.ContainerRegistryReceiver, common.EventResourceUpdate) consumerName := "cr:resource-updates" return msg_nats.NewJetstreamConsumer(context.TODO(), jsc, msg_nats.JetstreamConsumerArgs{ @@ -136,7 +136,7 @@ var Module = fx.Module("app", }), fx.Provide(func(jsc *nats.JetstreamClient, ev *env.Env) (ErrorOnApplyConsumer, error) { - topic := common.GetPlatformClusterMessagingTopic("*", "*", common.ConsoleReceiver, common.EventErrorOnApply) + topic := common.ReceiveFromAgentSubjectName(common.ReceiveFromAgentArgs{AccountName: "*", ClusterName: "*"}, common.ContainerRegistryReceiver, common.EventErrorOnApply) consumerName := "cr:error-on-apply" diff --git a/apps/container-registry/internal/app/process-resource-updates.go b/apps/container-registry/internal/app/process-resource-updates.go index b9a9825be..ee3ae3925 100644 --- a/apps/container-registry/internal/app/process-resource-updates.go +++ b/apps/container-registry/internal/app/process-resource-updates.go @@ -14,7 +14,6 @@ import ( fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/operator/operators/resource-watcher/types" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" msgOfficeT "github.com/kloudlite/api/apps/message-office/types" "github.com/kloudlite/api/pkg/messaging" @@ -57,14 +56,14 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do return nil } - obj := unstructured.Unstructured{Object: su.Object} + obj := su.Object mLogger := logger.WithKV( "gvk", obj.GetObjectKind().GroupVersionKind(), "accountName/clusterName", fmt.Sprintf("%s/%s", ru.AccountName, ru.ClusterName), ) resStatus, err := func() (types.ResourceStatus, error) { - v, ok := su.Object[types.ResourceStatusKey] + v, ok := obj.Object[types.ResourceStatusKey] if !ok { return "", errors.NewE(fmt.Errorf("field %s not found in object", types.ResourceStatusKey)) } @@ -110,7 +109,7 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do default: { - mLogger.Infof("container registry status updates consumer does not acknowledge the gvk %s", gvk(&obj)) + mLogger.Infof("container registry status updates consumer does not acknowledge the gvk %s", gvk(obj)) return nil } } diff --git a/apps/container-registry/internal/framework/framework.go b/apps/container-registry/internal/framework/framework.go index a2f455b0d..b602c0b45 100644 --- a/apps/container-registry/internal/framework/framework.go +++ b/apps/container-registry/internal/framework/framework.go @@ -3,6 +3,7 @@ package framework import ( "context" "fmt" + "log/slog" "time" "github.com/kloudlite/api/common" @@ -49,7 +50,7 @@ var Module = fx.Module("framework", mongoDb.NewMongoClientFx[*fm](), - fx.Provide(func(logger logging.Logger, ev *env.Env) (*nats.Client, error) { + fx.Provide(func(logger *slog.Logger, ev *env.Env) (*nats.Client, error) { name := "cr" return nats.NewClient(ev.NatsURL, nats.ClientOpts{ Name: name, diff --git a/apps/container-registry/main.go b/apps/container-registry/main.go index 7049e9651..e9bb338c0 100644 --- a/apps/container-registry/main.go +++ b/apps/container-registry/main.go @@ -3,6 +3,7 @@ package main import ( "context" "flag" + "log/slog" "runtime/trace" "github.com/kloudlite/api/apps/container-registry/internal/env" @@ -36,6 +37,14 @@ func main() { }, ), + fx.Provide(func() *slog.Logger { + return logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: isDev, + SetAsDefaultLogger: true, + }) + }), + fn.FxErrorHandler(), framework.Module, ) diff --git a/apps/message-office/internal/framework/framework.go b/apps/message-office/internal/framework/framework.go index 8ad128beb..74faecb5d 100644 --- a/apps/message-office/internal/framework/framework.go +++ b/apps/message-office/internal/framework/framework.go @@ -3,6 +3,7 @@ package framework import ( "context" "fmt" + "log/slog" "github.com/kloudlite/api/pkg/errors" @@ -39,7 +40,7 @@ var Module = fx.Module("framework", return grpc.NewGrpcClient(f.VectorGrpcAddr) }), - fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.JetstreamClient, error) { + fx.Provide(func(ev *env.Env, logger *slog.Logger) (*nats.JetstreamClient, error) { nc, err := nats.NewClient(ev.NatsUrl, nats.ClientOpts{ Name: "message-offfice", Logger: logger, diff --git a/apps/message-office/main.go b/apps/message-office/main.go index 8b5e8585f..cbc4614d9 100644 --- a/apps/message-office/main.go +++ b/apps/message-office/main.go @@ -46,8 +46,9 @@ func main() { fx.Provide(func() *slog.Logger { return logging.NewSlogLogger(logging.SlogOptions{ - ShowCaller: true, - ShowDebugLogs: debug, + ShowCaller: true, + ShowDebugLogs: debug, + SetAsDefaultLogger: true, }) }), diff --git a/apps/observability/internal/framework/framework.go b/apps/observability/internal/framework/framework.go index d4f77e6d4..9fa487961 100644 --- a/apps/observability/internal/framework/framework.go +++ b/apps/observability/internal/framework/framework.go @@ -3,6 +3,7 @@ package framework import ( "context" "fmt" + "log/slog" "net/http" "github.com/kloudlite/api/apps/observability/internal/app" @@ -10,7 +11,6 @@ import ( "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/grpc" "github.com/kloudlite/api/pkg/kv" - "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/api/pkg/nats" "go.uber.org/fx" ) @@ -24,7 +24,7 @@ var Module = fx.Module("framework", return grpc.NewGrpcClient(ev.InfraGrpcAddr) }), - fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.Client, error) { + fx.Provide(func(ev *env.Env, logger *slog.Logger) (*nats.Client, error) { return nats.NewClient(ev.NatsURL, nats.ClientOpts{ Name: "observability-api", Logger: logger, diff --git a/apps/observability/main.go b/apps/observability/main.go index 3140cd0f5..8539637a2 100644 --- a/apps/observability/main.go +++ b/apps/observability/main.go @@ -3,6 +3,7 @@ package main import ( "context" "flag" + "log/slog" "os" "time" @@ -41,6 +42,14 @@ func main() { return logger }), + fx.Provide(func() *slog.Logger { + return logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: isDev, + SetAsDefaultLogger: true, + }) + }), + fx.Provide(func() (*env.Env, error) { if e, err := env.LoadEnv(); err != nil { return nil, errors.NewE(err) diff --git a/apps/webhook/internal/framework/main.go b/apps/webhook/internal/framework/main.go index c5f327261..3dbe45dec 100644 --- a/apps/webhook/internal/framework/main.go +++ b/apps/webhook/internal/framework/main.go @@ -3,6 +3,8 @@ package framework import ( "context" "fmt" + "log/slog" + "github.com/kloudlite/api/apps/webhook/internal/app" "github.com/kloudlite/api/apps/webhook/internal/env" "github.com/kloudlite/api/pkg/errors" @@ -32,7 +34,7 @@ var Module = fx.Module( }, ), - fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.JetstreamClient, error) { + fx.Provide(func(ev *env.Env, logger *slog.Logger) (*nats.JetstreamClient, error) { name := "webhook:jetstream-client" nc, err := nats.NewClient(ev.NatsURL, nats.ClientOpts{ Name: name, diff --git a/apps/webhook/main.go b/apps/webhook/main.go index ffb9378b1..d18e0842b 100644 --- a/apps/webhook/main.go +++ b/apps/webhook/main.go @@ -2,6 +2,7 @@ package main import ( "flag" + "log/slog" "github.com/kloudlite/api/apps/webhook/internal/env" "github.com/kloudlite/api/apps/webhook/internal/framework" @@ -22,6 +23,15 @@ func main() { return logging.New(&logging.Options{Name: "webhooks", Dev: isDev}) }, ), + + fx.Provide(func() *slog.Logger { + return logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: isDev, + SetAsDefaultLogger: true, + }) + }), + fn.FxErrorHandler(), config.EnvFx[env.Env](), framework.Module, diff --git a/apps/websocket-server/internal/framework/framework.go b/apps/websocket-server/internal/framework/framework.go index 334b97239..2e7bbd89c 100644 --- a/apps/websocket-server/internal/framework/framework.go +++ b/apps/websocket-server/internal/framework/framework.go @@ -3,6 +3,7 @@ package framework import ( "context" "fmt" + "log/slog" "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/errors" @@ -28,7 +29,7 @@ var Module = fx.Module("framework", return &fm{env: ev} }), - fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.Client, error) { + fx.Provide(func(ev *env.Env, logger *slog.Logger) (*nats.Client, error) { name := "RUP:nat-client" return nats.NewClient(ev.NatsURL, nats.ClientOpts{ Name: name, diff --git a/apps/websocket-server/main.go b/apps/websocket-server/main.go index 8b8dfae0f..33f96f99a 100644 --- a/apps/websocket-server/main.go +++ b/apps/websocket-server/main.go @@ -3,6 +3,7 @@ package main import ( "context" "flag" + "log/slog" "os" "time" @@ -33,6 +34,14 @@ func main() { return logger }), + fx.Provide(func() *slog.Logger { + return logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: isDev, + SetAsDefaultLogger: true, + }) + }), + fx.Provide(func() (*env.Env, error) { if e, err := env.LoadEnv(); err != nil { return nil, errors.NewE(err) diff --git a/go.mod b/go.mod index 70abb8efb..291c7ebe9 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/kloudlite/api go 1.21.1 require ( - github.com/99designs/gqlgen v0.17.45 + github.com/99designs/gqlgen v0.17.49 github.com/Masterminds/sprig/v3 v3.2.3 github.com/aws/aws-sdk-go v1.50.10 github.com/bradleyfalzon/ghinstallation/v2 v2.0.4 @@ -11,17 +11,17 @@ require ( github.com/go-redis/redis/v8 v8.11.5 github.com/gobuffalo/flect v1.0.2 github.com/gofiber/adaptor/v2 v2.1.23 - github.com/gofiber/fiber/v2 v2.52.2 + github.com/gofiber/fiber/v2 v2.52.5 github.com/gofiber/websocket/v2 v2.0.21 github.com/google/go-github/v43 v43.0.0 github.com/google/go-github/v45 v45.2.0 github.com/gorilla/websocket v1.5.0 - github.com/kloudlite/operator v0.0.0-20240718072819-c625b77c43b2 + github.com/kloudlite/operator v0.0.0-20240725140628-a3dbbc898710 github.com/matoous/go-nanoid/v2 v2.0.0 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.29.1 github.com/sendgrid/sendgrid-go v3.11.1+incompatible - github.com/vektah/gqlparser/v2 v2.5.11 + github.com/vektah/gqlparser/v2 v2.5.16 github.com/xanzy/go-gitlab v0.63.0 github.com/xeipuuv/gojsonschema v1.2.0 github.com/yext/yerrors v0.0.0-20230716030415-7ebf68e23868 // indirect @@ -29,9 +29,9 @@ require ( go.uber.org/fx v1.17.1 go.uber.org/zap v1.26.0 golang.org/x/oauth2 v0.16.0 - golang.org/x/sync v0.6.0 + golang.org/x/sync v0.7.0 google.golang.org/grpc v1.61.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/api v0.28.4 k8s.io/apiextensions-apiserver v0.28.3 @@ -43,6 +43,8 @@ require ( require ( github.com/PaesslerAG/jsonpath v0.1.1 + github.com/charmbracelet/lipgloss v0.10.0 + github.com/charmbracelet/log v0.4.0 github.com/go-chi/chi/v5 v5.0.10 github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 github.com/miekg/dns v1.1.55 @@ -54,24 +56,21 @@ require ( github.com/stretchr/testify v1.9.0 github.com/ztrue/tracerr v0.4.0 golang.org/x/exp v0.0.0-20231006140011-7918f672742d - golang.org/x/net v0.23.0 + golang.org/x/net v0.27.0 golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6 ) require ( github.com/PaesslerAG/gval v1.0.0 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/charmbracelet/lipgloss v0.10.0 // indirect - github.com/charmbracelet/log v0.4.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b // indirect - github.com/hashicorp/go-hclog v1.4.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect github.com/muesli/reflow v0.3.0 // indirect @@ -82,7 +81,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/seancfoley/bintree v1.2.1 // indirect - github.com/sosodev/duration v1.2.0 // indirect + github.com/sosodev/duration v1.3.1 // indirect github.com/stretchr/objx v0.5.2 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -102,7 +101,7 @@ require ( github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/evanphx/json-patch/v5 v5.7.0 // indirect github.com/fasthttp/websocket v1.5.0 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect @@ -120,13 +119,13 @@ require ( github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.6.0 github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-retryablehttp v0.7.2 // indirect + github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.7 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -146,26 +145,26 @@ require ( github.com/shopspring/decimal v1.3.1 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/pflag v1.0.5 - github.com/urfave/cli/v2 v2.27.1 // indirect + github.com/urfave/cli/v2 v2.27.3 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasthttp v1.52.0 // indirect + github.com/valyala/fasthttp v1.55.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect + github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect go.uber.org/dig v1.14.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/term v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.19.0 + golang.org/x/tools v0.23.0 golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index 4637c250f..13efacb0d 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiV cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -github.com/99designs/gqlgen v0.17.45 h1:bH0AH67vIJo8JKNKPJP+pOPpQhZeuVRQLf53dKIpDik= -github.com/99designs/gqlgen v0.17.45/go.mod h1:Bas0XQ+Jiu/Xm5E33jC8sES3G+iC2esHBMXcq0fUPs0= +github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= +github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= @@ -15,8 +15,8 @@ github.com/PaesslerAG/gval v1.0.0/go.mod h1:y/nm5yEyTeX6av0OfKJNp9rBNj2XrGhAf5+v github.com/PaesslerAG/jsonpath v0.1.0/go.mod h1:4BzmtoM/PI8fPO4aQGIusjGxGir2BzcV0grWtFzq1Y8= github.com/PaesslerAG/jsonpath v0.1.1 h1:c1/AToHQMVsduPAa4Vh6xp2U0evy4t8SWp8imEsylIk= github.com/PaesslerAG/jsonpath v0.1.1/go.mod h1:lVboNxFGal/VwW6d9JzIy56bUsYAP6tH/x80vjnCseY= -github.com/PuerkitoBio/goquery v1.9.1 h1:mTL6XjbJTZdpfL+Gwl5U2h1l9yEkJjhmlTeV9VPW7UI= -github.com/PuerkitoBio/goquery v1.9.1/go.mod h1:cW1n6TmIMDoORQU5IU/P1T3tGFunOeXEpGP2WHRwkbY= +github.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4yPeE= +github.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -67,9 +67,8 @@ github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0n github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fasthttp/websocket v1.5.0 h1:B4zbe3xXyvIdnqjOZrafVFklCUq5ZLo/TqCt5JA1wLE= github.com/fasthttp/websocket v1.5.0/go.mod h1:n0BlOQvJdPbTuBkZT0O5+jk/sp/1/VCzquR1BehI2F4= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -99,8 +98,8 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/gofiber/adaptor/v2 v2.1.23 h1:VG0yAPnB2EJZjxy4Ul+Ra9e92PnqwXE97SUVuPGuoAA= github.com/gofiber/adaptor/v2 v2.1.23/go.mod h1:hnYEQBPF2x1JaBHygutJJF5d0+J2eYnKKsUMCSsfxKk= github.com/gofiber/fiber/v2 v2.32.0/go.mod h1:CMy5ZLiXkn6qwthrl03YMyW1NLfj0rhxz2LKl4t7ZTY= -github.com/gofiber/fiber/v2 v2.52.2 h1:b0rYH6b06Df+4NyrbdptQL8ifuxw/Tf2DgfkZkDaxEo= -github.com/gofiber/fiber/v2 v2.52.2/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ= +github.com/gofiber/fiber/v2 v2.52.5 h1:tWoP1MJQjGEe4GB5TUGOi7P2E0ZMMRx5ZTG4rT+yGMo= +github.com/gofiber/fiber/v2 v2.52.5/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ= github.com/gofiber/utils v0.1.2 h1:1SH2YEz4RlNS0tJlMJ0bGwO0JkqPqvq6TbHK9tXZKtk= github.com/gofiber/utils v0.1.2/go.mod h1:pacRFtghAE3UoknMOUiXh2Io/nLWSUHtQCi/3QASsOc= github.com/gofiber/websocket/v2 v2.0.21 h1:mQEiLXBqFsNNlJc5dzFgSGeoqoEXYvIcdBQzAZBdbL0= @@ -150,11 +149,10 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= -github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= -github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= +github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -176,12 +174,12 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= -github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 h1:YnZh3TL6AG4EfoInx1/L5zcPHd2QxgLKseJB1KtHjdQ= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55/go.mod h1:GZj3wZmIw/qCciclRhgQTgmGiqe8wxoVzMXQjbOfnbc= -github.com/kloudlite/operator v0.0.0-20240718072819-c625b77c43b2 h1:K6tlpBcl4PWv6ZiojFTXADYuAvGjcOkrYQbsPvbXaOU= -github.com/kloudlite/operator v0.0.0-20240718072819-c625b77c43b2/go.mod h1:c6FiZvYztvr92/UcIUvQurp3oWMrrEK7deAriHckTPw= +github.com/kloudlite/operator v0.0.0-20240725140628-a3dbbc898710 h1:a+5HIVOce/XVsIGg8JRfaULu9sULJZPp0yDhyBkp3BU= +github.com/kloudlite/operator v0.0.0-20240725140628-a3dbbc898710/go.mod h1:c6FiZvYztvr92/UcIUvQurp3oWMrrEK7deAriHckTPw= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -196,18 +194,16 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/matoous/go-nanoid v1.5.0/go.mod h1:zyD2a71IubI24efhpvkJz+ZwfwagzgSO6UNiFsZKN7U= github.com/matoous/go-nanoid/v2 v2.0.0 h1:d19kur2QuLeHmJBkvYkFdhFBzLoo1XVm2GgTpL+9Tj0= github.com/matoous/go-nanoid/v2 v2.0.0/go.mod h1:FtS4aGPVfEkxKxhdWPAspZpZSh1cOjtM7Ej/So3hR0g= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= -github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= @@ -290,8 +286,8 @@ github.com/shamaton/msgpack/v2 v2.2.0/go.mod h1:6khjYnkx73f7VQU7wjcFS9DFjs+59naV github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sosodev/duration v1.2.0 h1:pqK/FLSjsAADWY74SyWDCjOcd5l7H8GSnnOGEB9A1Us= -github.com/sosodev/duration v1.2.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= +github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4= +github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= @@ -309,23 +305,22 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= -github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli/v2 v2.27.3 h1:/POWahRmdh7uztQ3CYnaDddk0Rm90PyOgIxgW2rr41M= +github.com/urfave/cli/v2 v2.27.3/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.33.0/go.mod h1:KJRK/MXx0J+yd0c5hlR+s1tIHD72sniU8ZJjl97LIw4= github.com/valyala/fasthttp v1.35.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= -github.com/valyala/fasthttp v1.52.0 h1:wqBQpxH71XW0e2g+Og4dzQM8pk34aFYlA1Ga8db7gU0= -github.com/valyala/fasthttp v1.52.0/go.mod h1:hf5C4QnVMkNXMspnsUlfM3WitlgYflyhHYoKol/szxQ= +github.com/valyala/fasthttp v1.55.0 h1:Zkefzgt6a7+bVKHnu/YaYSOPfNYNisSVBo/unVCf8k8= +github.com/valyala/fasthttp v1.55.0/go.mod h1:NkY9JtkrpPKmgwV3HTaS2HWaJss9RSIsRVfcxxoHiOM= github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= -github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= +github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= +github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= github.com/xanzy/go-gitlab v0.63.0 h1:a9fXpKWykUS6dowapFej/2Wjf4aOAEFC1q2ZIcz4IpI= github.com/xanzy/go-gitlab v0.63.0/go.mod h1:F0QEXwmqiBUxCgJm8fE9S+1veX4XC9Z4cfaAbqwk4YM= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= @@ -341,8 +336,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= -github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/yext/yerrors v0.0.0-20230716030415-7ebf68e23868 h1:WHNghr01OczJetcg4v+Znzb1GhGsocXm+bMjRMhRv1c= github.com/yext/yerrors v0.0.0-20230716030415-7ebf68e23868/go.mod h1:zhIgUGzifKsRLyFziQsd8PudAFXXsXaAckJ9+3MojNg= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= @@ -375,15 +370,15 @@ golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -395,8 +390,8 @@ golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= @@ -404,12 +399,10 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -419,20 +412,19 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -441,8 +433,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -450,8 +442,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -471,8 +463,8 @@ google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From d34d20b4342e32abf5370998f1e458931d7c4f48 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Fri, 26 Jul 2024 17:28:04 +0530 Subject: [PATCH 22/89] ci: fixes image repository name --- .github/actions/build-api-images/action.yml | 33 +++++++++++-------- .../internal/entities/resource-mapping.go | 1 - 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/actions/build-api-images/action.yml b/.github/actions/build-api-images/action.yml index eb06318cf..c590f123e 100644 --- a/.github/actions/build-api-images/action.yml +++ b/.github/actions/build-api-images/action.yml @@ -103,6 +103,11 @@ runs: echo "GOCACHE=$GOCACHE" >> $GITHUB_ENV echo "FILES_HASH=${{ hashFiles('**/*.go', '**/go.mod', '**/go.sum')}}" >> $GITHUB_OUTPUT echo "PUSH_IMAGE=false" >> $GITHUB_ENV + if [ "${{ inputs.git_directory }}" != "." ]; then + echo "IMAGE_REPOSITORY_PREFIX=ghcr.io/${{ github.repository }}/$(basename ${{inputs.git_directory}})" >> $GITHUB_ENV + else + echo "IMAGE_REPOSITORY_PREFIX=ghcr.io/${{ github.repository }}" >> $GITHUB_ENV + fi - name: ensures path to setup action exists shell: bash @@ -189,7 +194,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/accounts shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/accounts:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/accounts:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: auth api go build cache if: ${{ inputs.auth-api == 'true' }} @@ -207,7 +212,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/auth shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/auth:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/auth:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: comms api go build cache if: ${{ inputs.comms-api == 'true' }} @@ -225,7 +230,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/comms shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/comms:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/comms:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: console api go build cache if: ${{ inputs.console-api == 'true' }} @@ -243,7 +248,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/console shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/console:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/console:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: container-registry api go build cache if: ${{ inputs.container-registry-api == 'true' }} @@ -261,7 +266,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/container-registry shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/container-registry:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/container-registry:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: gateway api go build cache if: ${{ inputs.gateway-api == 'true' }} @@ -279,7 +284,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/gateway shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/gateway:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/gateway:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: iam api go build cache if: ${{ inputs.iam-api == 'true' }} @@ -297,7 +302,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/iam shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/iam:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/iam:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: infra api go build cache if: ${{ inputs.infra-api == 'true' }} @@ -315,7 +320,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/infra shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/infra:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/infra:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: iot-console api go build cache if: ${{ inputs.iot-console-api == 'true' }} @@ -333,7 +338,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/iot-console shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/iot-console:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/iot-console:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: message-office api go build cache if: ${{ inputs.message-office-api == 'true' }} @@ -351,7 +356,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/message-office shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/message-office:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/message-office:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: observability api go build cache if: ${{ inputs.observability-api == 'true' }} @@ -369,7 +374,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/observability shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/observability:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/observability:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: tenant-agent go build cache if: ${{ inputs.tenant-agent == 'true' }} @@ -387,7 +392,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/tenant-agent shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/tenant-agent:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/tenant-agent:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: webhook api go build cache if: ${{ inputs.webhook-api == 'true' }} @@ -405,7 +410,7 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/webhook shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/webhook:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/webhook:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - name: websocket-server api go build cache if: ${{ inputs.websocket-server-api == 'true' }} @@ -423,5 +428,5 @@ runs: working-directory: ${{ inputs.git_directory }}/apps/websocket-server shell: bash run: | - task container:build-and-push image=ghcr.io/${{ github.repository }}/websocket-server:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/websocket-server:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} diff --git a/apps/console/internal/entities/resource-mapping.go b/apps/console/internal/entities/resource-mapping.go index 58b367c25..987ef6eca 100644 --- a/apps/console/internal/entities/resource-mapping.go +++ b/apps/console/internal/entities/resource-mapping.go @@ -53,7 +53,6 @@ var ResourceMappingIndices = []repos.IndexField{ { Field: []repos.IndexKey{ {Key: fields.AccountName, Value: repos.IndexAsc}, - {Key: fields.ProjectName, Value: repos.IndexAsc}, {Key: fields.EnvironmentName, Value: repos.IndexAsc}, {Key: fc.ResourceMappingResourceType, Value: repos.IndexAsc}, {Key: fc.ResourceMappingResourceName, Value: repos.IndexAsc}, From 82042cc34d801848b0b7c09e5acf536b492349fa Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Mon, 29 Jul 2024 13:44:59 +0530 Subject: [PATCH 23/89] feat: gateway-kube-proxy, logging and banner updates --- cmd/gateway-kube-proxy/Dockerfile | 2 +- cmd/gateway-kube-proxy/Taskfile.yml | 18 ++++-- cmd/gateway-kube-proxy/main.go | 26 ++++---- cmd/pod-logs-proxy/Dockerfile | 4 -- cmd/pod-logs-proxy/Taskfile.yml | 32 ---------- cmd/pod-logs-proxy/main.go | 92 ----------------------------- common/banner.go | 27 ++++++++- pkg/logging/http-logger.go | 70 ++++++++++++++++++---- pkg/wgutils/peer-config.go | 9 +-- 9 files changed, 119 insertions(+), 161 deletions(-) delete mode 100644 cmd/pod-logs-proxy/Dockerfile delete mode 100644 cmd/pod-logs-proxy/Taskfile.yml delete mode 100644 cmd/pod-logs-proxy/main.go diff --git a/cmd/gateway-kube-proxy/Dockerfile b/cmd/gateway-kube-proxy/Dockerfile index 235126e47..7d33cde77 100644 --- a/cmd/gateway-kube-proxy/Dockerfile +++ b/cmd/gateway-kube-proxy/Dockerfile @@ -1,5 +1,5 @@ #syntax=docker/dockerfile:1 -FROM --platform=$TARGETPLATFORM cgr.dev/chainguard/static:latest-glibc +FROM cgr.dev/chainguard/static:latest-glibc ARG BINARY TARGETARCH COPY --chown=1001 $BINARY-$TARGETARCH ./gateway-kube-proxy ENTRYPOINT ["./gateway-kube-proxy"] diff --git a/cmd/gateway-kube-proxy/Taskfile.yml b/cmd/gateway-kube-proxy/Taskfile.yml index 2d1848e7f..c49d2f317 100644 --- a/cmd/gateway-kube-proxy/Taskfile.yml +++ b/cmd/gateway-kube-proxy/Taskfile.yml @@ -1,26 +1,29 @@ version: 3 includes: - go: ../../.tools/taskfiles/go-build.yml + go: ../../.tools/taskfiles/go-build.Taskfile.yml + docker: ../../.tools/taskfiles/docker.Taskfile.yml vars: app: gateway-kube-proxy + binary: ./bin/{{.app}} tasks: build: cmds: - task: go:build vars: - Out: ./bin/{{.app}}-{{.GOARCH}} + out: "{{.binary}}-{{.GOARCH}}" + GOARCH: "{{.GOARCH}}" run: cmds: - fwatcher --exec 'go run ./main.go --addr :8090 --proxy-addr 127.0.0.1:8111 --authz sample' --ext .go container:build-and-push: - preconditions: - - sh: '[[ -n "{{.Image}}" ]]' - msg: "var Image is not set" + requires: + vars: + - image cmds: - task: build vars: @@ -28,4 +31,7 @@ tasks: - task: build vars: GOARCH: arm64 - - docker buildx build --platform linux/amd64,linux/arm64 --output=type=image,compression=zstd,force-compression=true,compression-level=14,push=true --build-arg BINARY="./bin/{{.app}}" -t {{.Image}} . + - task: docker:build-and-push + vars: + args: "--platform linux/amd64,linux/arm64 --build-arg BINARY={{.binary}} ." + image: "{{.image}}" diff --git a/cmd/gateway-kube-proxy/main.go b/cmd/gateway-kube-proxy/main.go index b325672ac..60428a694 100644 --- a/cmd/gateway-kube-proxy/main.go +++ b/cmd/gateway-kube-proxy/main.go @@ -3,13 +3,14 @@ package main import ( "flag" "fmt" - "log/slog" "net/http" "net/http/httputil" "strings" "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/pkg/logging" ) func main() { @@ -28,20 +29,25 @@ func main() { panic("authz token is required, use --authz ") } - logger := slog.Default() + common.PrintKloudliteBanner() + + logger := logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: debug, + SetAsDefaultLogger: true, + }) reverseProxyMap := make(map[string]*httputil.ReverseProxy) r := chi.NewRouter() - r.Use(func(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.URL.Path == "/healthy" { - next.ServeHTTP(w, r) - return - } - middleware.Logger(next).ServeHTTP(w, r) - }) + httpLogger := logging.NewHttpLogger(logger, logging.HttpLoggerOptions{ + ShowQuery: true, + ShowHeaders: true, + SilentPaths: []string{}, }) + r.Use(httpLogger.Use) + _ = middleware.Logger + // r.Use(middleware.Logger) kloudliteAuthzHeader := "X-Kloudlite-Authz" diff --git a/cmd/pod-logs-proxy/Dockerfile b/cmd/pod-logs-proxy/Dockerfile deleted file mode 100644 index d18479a8c..000000000 --- a/cmd/pod-logs-proxy/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM --platform=$TARGETPLATFORM cgr.dev/chainguard/static:latest-glibc -ARG BINARY TARGETARCH -COPY --chown=1001 $BINARY-$TARGETARCH ./pod-logs-proxy -ENTRYPOINT ["./pod-logs-proxy"] diff --git a/cmd/pod-logs-proxy/Taskfile.yml b/cmd/pod-logs-proxy/Taskfile.yml deleted file mode 100644 index ff891c478..000000000 --- a/cmd/pod-logs-proxy/Taskfile.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: 3 - -includes: - go: ../../.tools/taskfiles/go-build.Taskfile.yml - -vars: - app: pod-logs-proxy - -tasks: - build: - cmds: - - task: go:build - vars: - GOARCH: '{{.GOARCH}}' - out: ./bin/{{.app}}-{{.GOARCH}} - - run: - cmds: - - fwatcher --exec 'go run ./main.go --addr :8111 --kube-addr 127.0.0.1:8080' --exts .go - - container:build-and-push: - preconditions: - - sh: '[[ -n "{{.image}}" ]]' - msg: "var Image is not set" - cmds: - - task: build - vars: - GOARCH: amd64 - - task: build - vars: - GOARCH: arm64 - - docker buildx build --platform linux/amd64,linux/arm64 --output=type=image,compression=zstd,force-compression=true,compression-level=14,push=true --build-arg BINARY="./bin/{{.app}}" -t {{.image}} . diff --git a/cmd/pod-logs-proxy/main.go b/cmd/pod-logs-proxy/main.go deleted file mode 100644 index 09af998f5..000000000 --- a/cmd/pod-logs-proxy/main.go +++ /dev/null @@ -1,92 +0,0 @@ -package main - -import ( - "bufio" - "errors" - "flag" - "io" - "log/slog" - "net/http" - - "github.com/go-chi/chi/v5" - "github.com/go-chi/chi/v5/middleware" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" -) - -func main() { - var addr string - var kubeAddr string - - flag.StringVar(&addr, "addr", ":8080", "--addr ") - flag.StringVar(&kubeAddr, "kube-addr", "", "--kube-addr ") - flag.Parse() - - kcli, err := func() (*kubernetes.Clientset, error) { - if kubeAddr == "" { - rcfg, err := rest.InClusterConfig() - if err != nil { - return nil, err - } - return kubernetes.NewForConfig(rcfg) - } - return kubernetes.NewForConfig(&rest.Config{Host: kubeAddr}) - }() - if err != nil { - panic(err) - } - - logger := slog.Default() - - r := chi.NewRouter() - r.Use(func(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.URL.Path == "/healthy" { - next.ServeHTTP(w, r) - return - } - middleware.Logger(next).ServeHTTP(w, r) - }) - }) - - r.HandleFunc("/healthy", func(w http.ResponseWriter, req *http.Request) { - w.WriteHeader(http.StatusOK) - }) - - // r.Route("/api/v1/namespaces/{namespace}/pods", func(r chi.Router) { - r.Get("/*", func(w http.ResponseWriter, req *http.Request) { - urlp := req.URL.Path - - kreq := kcli.RESTClient().Get().AbsPath(urlp) - for k, vv := range req.URL.Query() { - kreq = kreq.Param(k, vv[0]) - } - logger.Debug("request", "url", kreq.URL(), "query", kreq.URL().Query()) - rc, err := kreq.Stream(req.Context()) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - w.Header().Add("Content-Type", "application/json") - defer rc.Close() - - reader := bufio.NewReader(rc) - for { - b, err := reader.ReadBytes('\n') - w.Write(b) - w.(http.Flusher).Flush() - if err != nil { - if !errors.Is(err, io.EOF) { - logger.Error("got non EOF reading from stream", "error", err) - } - return - } - } - }) - // }) - - logger.Info("starting pod logs proxy http server", "addr", addr) - if err := http.ListenAndServe(addr, r); err != nil { - panic(err) - } -} diff --git a/common/banner.go b/common/banner.go index bb96916f9..713606929 100644 --- a/common/banner.go +++ b/common/banner.go @@ -4,7 +4,7 @@ import "fmt" var BuiltAt string -const KloudliteBanner = ` +const KloudliteReadyBanner = ` , ##### ######## @@ -26,5 +26,30 @@ const KloudliteBanner = ` ` func PrintReadyBanner() { + fmt.Printf(KloudliteReadyBanner, BuiltAt) +} + +const KloudliteBanner = ` + , + ##### + ######## + ######## + ######## ##### + ######## *######### ██╗ ██╗██╗ ██████╗ ██╗ ██╗██████╗ ██╗ ██╗████████╗███████╗ + ######## ############### ██║ ██╔╝██║ ██╔═══██╗██║ ██║██╔══██╗██║ ██║╚══██╔══╝██╔════╝ + ######## *################### █████╔╝ ██║ ██║ ██║██║ ██║██║ ██║██║ ██║ ██║ █████╗ + #######/ ######################## ██╔═██╗ ██║ ██║ ██║██║ ██║██║ ██║██║ ██║ ██║ ██╔══╝ + #######( ################### ██║ ██╗███████╗╚██████╔╝╚██████╔╝██████╔╝███████╗██║ ██║ ███████╗ + (#######. ##############* ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚══════╝ + ######## #(####### + (#######. ####* + ######## + /######(. Built At: %s + ##### + , + +` + +func PrintKloudliteBanner() { fmt.Printf(KloudliteBanner, BuiltAt) } diff --git a/pkg/logging/http-logger.go b/pkg/logging/http-logger.go index 5131f1165..b0c4c8f01 100644 --- a/pkg/logging/http-logger.go +++ b/pkg/logging/http-logger.go @@ -1,21 +1,69 @@ package logging import ( - "os" - - "github.com/rs/zerolog" + "fmt" + "log/slog" + "net/http" + "time" ) -type HttpLogger interface { +type loggingResponseWriter struct { + http.ResponseWriter + statusCode int +} + +func NewLoggingResponseWriter(w http.ResponseWriter) *loggingResponseWriter { + return &loggingResponseWriter{w, http.StatusOK} +} + +func (lrw *loggingResponseWriter) WriteHeader(code int) { + lrw.statusCode = code + lrw.ResponseWriter.WriteHeader(code) +} + +func (lrw *loggingResponseWriter) Flush() { + flusher := lrw.ResponseWriter.(http.Flusher) + flusher.Flush() +} + +type HttpLogger struct { + *slog.Logger + opts HttpLoggerOptions +} + +type HttpLoggerOptions struct { + ShowQuery bool + ShowHeaders bool + SilentPaths []string } -type httpLogger struct { - zerolog.Logger +func NewHttpLogger(logger *slog.Logger, opts HttpLoggerOptions) *HttpLogger { + return &HttpLogger{logger, opts} } -func NewHttpLogger() HttpLogger { - z := zerolog.New(os.Stdout).With().Caller().Timestamp().Logger() - return &httpLogger{ - Logger: z, - } +func (h *HttpLogger) Use(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + for i := range h.opts.SilentPaths { + if r.URL.Path == h.opts.SilentPaths[i] { + next.ServeHTTP(w, r) + return + } + } + + lrw := NewLoggingResponseWriter(w) + + timestart := time.Now() + + route := r.URL.Path + if r.URL.RawQuery != "" { + route = fmt.Sprintf("%s?%s", route, r.URL.RawQuery) + } + + h.Logger.Info(fmt.Sprintf("❯❯ %s %s", r.Method, route)) + defer func() { + h.Logger.Info(fmt.Sprintf("❮❮ %d %s %s took %.2fs", lrw.statusCode, r.Method, route, time.Since(timestart).Seconds())) + }() + + next.ServeHTTP(lrw, r) + }) } diff --git a/pkg/wgutils/peer-config.go b/pkg/wgutils/peer-config.go index 35f69f234..b83ad491c 100644 --- a/pkg/wgutils/peer-config.go +++ b/pkg/wgutils/peer-config.go @@ -28,7 +28,8 @@ type WgConfigParams struct { PrivateKey string ListenPort uint16 - DNS string + DNS string + WithDNS bool PostUp []string PostDown []string @@ -47,9 +48,9 @@ PrivateKey = {{.PrivateKey}} ListenPort = {{.ListenPort}} {{- end }} -{{- /* {{- if .DNS }} */}} -{{- /* DNS = {{.DNS}} */}} -{{- /* {{- end }} */}} +{{- if (and .DNS .WithDNS) }} +DNS = {{.DNS}} +{{- end }} {{- range .PostUp -}} PostUp = {{.}} From 41b9e534b41c90e7c7dcf5385f78beb11b4f9944 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Mon, 29 Jul 2024 13:48:34 +0530 Subject: [PATCH 24/89] fix(infra): updates graphql, and platform wg device dns fixes --- .../app/graph/byokcluster.resolvers.go | 2 +- .../graph/cloudprovidersecret.resolvers.go | 2 +- .../internal/app/graph/cluster.resolvers.go | 2 +- .../app/graph/common-types.resolvers.go | 2 +- .../app/graph/domainentry.resolvers.go | 2 +- .../internal/app/graph/generated/generated.go | 1702 ++++++++--------- .../internal/app/graph/globalvpn.resolvers.go | 2 +- .../app/graph/globalvpndevice.resolvers.go | 2 +- .../app/graph/helmrelease.resolvers.go | 2 +- .../internal/app/graph/model/models_gen.go | 22 +- .../internal/app/graph/namespace.resolvers.go | 2 +- .../internal/app/graph/node.resolvers.go | 2 +- .../internal/app/graph/nodepool.resolvers.go | 2 +- .../app/graph/persistentvolume.resolvers.go | 2 +- .../graph/persistentvolumeclaim.resolvers.go | 2 +- .../internal/app/graph/schema.resolvers.go | 9 +- .../app/graph/volumeattachment.resolvers.go | 2 +- apps/infra/internal/domain/clusters.go | 1 + apps/infra/internal/env/env.go | 2 +- 19 files changed, 881 insertions(+), 883 deletions(-) diff --git a/apps/infra/internal/app/graph/byokcluster.resolvers.go b/apps/infra/internal/app/graph/byokcluster.resolvers.go index 46d8ca0a7..617515ec1 100644 --- a/apps/infra/internal/app/graph/byokcluster.resolvers.go +++ b/apps/infra/internal/app/graph/byokcluster.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/cloudprovidersecret.resolvers.go b/apps/infra/internal/app/graph/cloudprovidersecret.resolvers.go index 2997d3223..4d093cfe1 100644 --- a/apps/infra/internal/app/graph/cloudprovidersecret.resolvers.go +++ b/apps/infra/internal/app/graph/cloudprovidersecret.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/cluster.resolvers.go b/apps/infra/internal/app/graph/cluster.resolvers.go index 774412bcf..491752b11 100644 --- a/apps/infra/internal/app/graph/cluster.resolvers.go +++ b/apps/infra/internal/app/graph/cluster.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/common-types.resolvers.go b/apps/infra/internal/app/graph/common-types.resolvers.go index 31f26a31c..ea5ce8f54 100644 --- a/apps/infra/internal/app/graph/common-types.resolvers.go +++ b/apps/infra/internal/app/graph/common-types.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/domainentry.resolvers.go b/apps/infra/internal/app/graph/domainentry.resolvers.go index 0139c2db5..dc1325dcf 100644 --- a/apps/infra/internal/app/graph/domainentry.resolvers.go +++ b/apps/infra/internal/app/graph/domainentry.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/generated/generated.go b/apps/infra/internal/app/graph/generated/generated.go index d79f22e6c..2dcfb60b8 100644 --- a/apps/infra/internal/app/graph/generated/generated.go +++ b/apps/infra/internal/app/graph/generated/generated.go @@ -11367,7 +11367,7 @@ func (ec *executionContext) _BYOKCluster_accountName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11411,7 +11411,7 @@ func (ec *executionContext) _BYOKCluster_clusterSvcCIDR(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_clusterSvcCIDR(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_clusterSvcCIDR(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11455,7 +11455,7 @@ func (ec *executionContext) _BYOKCluster_clusterToken(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_clusterToken(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_clusterToken(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11499,7 +11499,7 @@ func (ec *executionContext) _BYOKCluster_createdBy(ctx context.Context, field gr return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11551,7 +11551,7 @@ func (ec *executionContext) _BYOKCluster_creationTime(ctx context.Context, field return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11595,7 +11595,7 @@ func (ec *executionContext) _BYOKCluster_displayName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11639,7 +11639,7 @@ func (ec *executionContext) _BYOKCluster_globalVPN(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_globalVPN(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_globalVPN(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11683,7 +11683,7 @@ func (ec *executionContext) _BYOKCluster_id(ctx context.Context, field graphql.C return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11724,7 +11724,7 @@ func (ec *executionContext) _BYOKCluster_lastOnlineAt(ctx context.Context, field return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_lastOnlineAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_lastOnlineAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11768,7 +11768,7 @@ func (ec *executionContext) _BYOKCluster_lastUpdatedBy(ctx context.Context, fiel return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11817,7 +11817,7 @@ func (ec *executionContext) _BYOKCluster_markedForDeletion(ctx context.Context, return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11861,7 +11861,7 @@ func (ec *executionContext) _BYOKCluster_messageQueueTopicName(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_messageQueueTopicName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_messageQueueTopicName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11905,7 +11905,7 @@ func (ec *executionContext) _BYOKCluster_metadata(ctx context.Context, field gra return ec.marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -11965,7 +11965,7 @@ func (ec *executionContext) _BYOKCluster_recordVersion(ctx context.Context, fiel return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -12009,7 +12009,7 @@ func (ec *executionContext) _BYOKCluster_syncStatus(ctx context.Context, field g return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -12067,7 +12067,7 @@ func (ec *executionContext) _BYOKCluster_updateTime(ctx context.Context, field g return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -12111,7 +12111,7 @@ func (ec *executionContext) _BYOKCluster_visibility(ctx context.Context, field g return ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__ClusterVisbility2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesClusterVisbility(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_visibility(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_visibility(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -12161,7 +12161,7 @@ func (ec *executionContext) _BYOKCluster_clusterDNSSuffix(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKCluster_clusterDNSSuffix(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKCluster_clusterDNSSuffix(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKCluster", Field: field, @@ -12205,7 +12205,7 @@ func (ec *executionContext) _BYOKClusterEdge_cursor(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKClusterEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKClusterEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKClusterEdge", Field: field, @@ -12249,7 +12249,7 @@ func (ec *executionContext) _BYOKClusterEdge_node(ctx context.Context, field gra return ec.marshalNBYOKCluster2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐBYOKCluster(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKClusterEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKClusterEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKClusterEdge", Field: field, @@ -12331,7 +12331,7 @@ func (ec *executionContext) _BYOKClusterPaginatedRecords_edges(ctx context.Conte return ec.marshalNBYOKClusterEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐBYOKClusterEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKClusterPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKClusterPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKClusterPaginatedRecords", Field: field, @@ -12381,7 +12381,7 @@ func (ec *executionContext) _BYOKClusterPaginatedRecords_pageInfo(ctx context.Co return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKClusterPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKClusterPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKClusterPaginatedRecords", Field: field, @@ -12435,7 +12435,7 @@ func (ec *executionContext) _BYOKClusterPaginatedRecords_totalCount(ctx context. return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKClusterPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKClusterPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKClusterPaginatedRecords", Field: field, @@ -12479,7 +12479,7 @@ func (ec *executionContext) _BYOKSetupInstruction_command(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKSetupInstruction_command(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKSetupInstruction_command(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKSetupInstruction", Field: field, @@ -12523,7 +12523,7 @@ func (ec *executionContext) _BYOKSetupInstruction_title(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BYOKSetupInstruction_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BYOKSetupInstruction_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BYOKSetupInstruction", Field: field, @@ -12567,7 +12567,7 @@ func (ec *executionContext) _CheckAwsAccessOutput_result(ctx context.Context, fi return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CheckAwsAccessOutput_result(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CheckAwsAccessOutput_result(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CheckAwsAccessOutput", Field: field, @@ -12608,7 +12608,7 @@ func (ec *executionContext) _CheckAwsAccessOutput_installationUrl(ctx context.Co return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CheckAwsAccessOutput_installationUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CheckAwsAccessOutput_installationUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CheckAwsAccessOutput", Field: field, @@ -12652,7 +12652,7 @@ func (ec *executionContext) _CheckNameAvailabilityOutput_result(ctx context.Cont return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CheckNameAvailabilityOutput_result(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CheckNameAvailabilityOutput_result(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CheckNameAvailabilityOutput", Field: field, @@ -12696,7 +12696,7 @@ func (ec *executionContext) _CheckNameAvailabilityOutput_suggestedNames(ctx cont return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CheckNameAvailabilityOutput_suggestedNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CheckNameAvailabilityOutput_suggestedNames(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CheckNameAvailabilityOutput", Field: field, @@ -12740,7 +12740,7 @@ func (ec *executionContext) _CloudProviderSecret_accountName(ctx context.Context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -12781,7 +12781,7 @@ func (ec *executionContext) _CloudProviderSecret_aws(ctx context.Context, field return ec.marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_aws(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_aws(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -12839,7 +12839,7 @@ func (ec *executionContext) _CloudProviderSecret_cloudProviderName(ctx context.C return ec.marshalNGithub__com___kloudlite___operator___apis___common____types__CloudProvider2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesCloudProvider(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_cloudProviderName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_cloudProviderName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -12883,7 +12883,7 @@ func (ec *executionContext) _CloudProviderSecret_createdBy(ctx context.Context, return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -12935,7 +12935,7 @@ func (ec *executionContext) _CloudProviderSecret_creationTime(ctx context.Contex return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -12979,7 +12979,7 @@ func (ec *executionContext) _CloudProviderSecret_displayName(ctx context.Context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -13020,7 +13020,7 @@ func (ec *executionContext) _CloudProviderSecret_gcp(ctx context.Context, field return ec.marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_gcp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_gcp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -13068,7 +13068,7 @@ func (ec *executionContext) _CloudProviderSecret_id(ctx context.Context, field g return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -13112,7 +13112,7 @@ func (ec *executionContext) _CloudProviderSecret_lastUpdatedBy(ctx context.Conte return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -13161,7 +13161,7 @@ func (ec *executionContext) _CloudProviderSecret_markedForDeletion(ctx context.C return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -13205,7 +13205,7 @@ func (ec *executionContext) _CloudProviderSecret_metadata(ctx context.Context, f return ec.marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -13265,7 +13265,7 @@ func (ec *executionContext) _CloudProviderSecret_recordVersion(ctx context.Conte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -13309,7 +13309,7 @@ func (ec *executionContext) _CloudProviderSecret_updateTime(ctx context.Context, return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecret_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecret_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecret", Field: field, @@ -13353,7 +13353,7 @@ func (ec *executionContext) _CloudProviderSecretEdge_cursor(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecretEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecretEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecretEdge", Field: field, @@ -13397,7 +13397,7 @@ func (ec *executionContext) _CloudProviderSecretEdge_node(ctx context.Context, f return ec.marshalNCloudProviderSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCloudProviderSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecretEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecretEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecretEdge", Field: field, @@ -13469,7 +13469,7 @@ func (ec *executionContext) _CloudProviderSecretPaginatedRecords_edges(ctx conte return ec.marshalNCloudProviderSecretEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐCloudProviderSecretEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecretPaginatedRecords", Field: field, @@ -13519,7 +13519,7 @@ func (ec *executionContext) _CloudProviderSecretPaginatedRecords_pageInfo(ctx co return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecretPaginatedRecords", Field: field, @@ -13573,7 +13573,7 @@ func (ec *executionContext) _CloudProviderSecretPaginatedRecords_totalCount(ctx return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloudProviderSecretPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloudProviderSecretPaginatedRecords", Field: field, @@ -13617,7 +13617,7 @@ func (ec *executionContext) _Cluster_accountName(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -13658,7 +13658,7 @@ func (ec *executionContext) _Cluster_apiVersion(ctx context.Context, field graph return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -13702,7 +13702,7 @@ func (ec *executionContext) _Cluster_createdBy(ctx context.Context, field graphq return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -13754,7 +13754,7 @@ func (ec *executionContext) _Cluster_creationTime(ctx context.Context, field gra return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -13798,7 +13798,7 @@ func (ec *executionContext) _Cluster_displayName(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -13839,7 +13839,7 @@ func (ec *executionContext) _Cluster_globalVPN(ctx context.Context, field graphq return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_globalVPN(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_globalVPN(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -13883,7 +13883,7 @@ func (ec *executionContext) _Cluster_id(ctx context.Context, field graphql.Colle return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -13924,7 +13924,7 @@ func (ec *executionContext) _Cluster_kind(ctx context.Context, field graphql.Col return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -13965,7 +13965,7 @@ func (ec *executionContext) _Cluster_lastOnlineAt(ctx context.Context, field gra return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_lastOnlineAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_lastOnlineAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -14009,7 +14009,7 @@ func (ec *executionContext) _Cluster_lastUpdatedBy(ctx context.Context, field gr return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -14058,7 +14058,7 @@ func (ec *executionContext) _Cluster_markedForDeletion(ctx context.Context, fiel return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -14102,7 +14102,7 @@ func (ec *executionContext) _Cluster_metadata(ctx context.Context, field graphql return ec.marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -14162,7 +14162,7 @@ func (ec *executionContext) _Cluster_recordVersion(ctx context.Context, field gr return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -14206,7 +14206,7 @@ func (ec *executionContext) _Cluster_spec(ctx context.Context, field graphql.Col return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__ClusterSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1ClusterSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -14281,7 +14281,7 @@ func (ec *executionContext) _Cluster_status(ctx context.Context, field graphql.C return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -14341,7 +14341,7 @@ func (ec *executionContext) _Cluster_syncStatus(ctx context.Context, field graph return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -14399,7 +14399,7 @@ func (ec *executionContext) _Cluster_updateTime(ctx context.Context, field graph return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -14440,7 +14440,7 @@ func (ec *executionContext) _Cluster_adminKubeconfig(ctx context.Context, field return ec.marshalOEncodedValue2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐEncodedValue(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_adminKubeconfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_adminKubeconfig(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -14490,7 +14490,7 @@ func (ec *executionContext) _Cluster_clusterDNSSuffix(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Cluster_clusterDNSSuffix(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Cluster_clusterDNSSuffix(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Cluster", Field: field, @@ -14534,7 +14534,7 @@ func (ec *executionContext) _ClusterEdge_cursor(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterEdge", Field: field, @@ -14578,7 +14578,7 @@ func (ec *executionContext) _ClusterEdge_node(ctx context.Context, field graphql return ec.marshalNCluster2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCluster(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterEdge", Field: field, @@ -14662,7 +14662,7 @@ func (ec *executionContext) _ClusterPaginatedRecords_edges(ctx context.Context, return ec.marshalNClusterEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterPaginatedRecords", Field: field, @@ -14712,7 +14712,7 @@ func (ec *executionContext) _ClusterPaginatedRecords_pageInfo(ctx context.Contex return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterPaginatedRecords", Field: field, @@ -14766,7 +14766,7 @@ func (ec *executionContext) _ClusterPaginatedRecords_totalCount(ctx context.Cont return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterPaginatedRecords", Field: field, @@ -14807,7 +14807,7 @@ func (ec *executionContext) _CursorPagination_after(ctx context.Context, field g return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_after(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_after(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -14848,7 +14848,7 @@ func (ec *executionContext) _CursorPagination_before(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_before(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_before(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -14889,7 +14889,7 @@ func (ec *executionContext) _CursorPagination_first(ctx context.Context, field g return ec.marshalOInt2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_first(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_first(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -14930,7 +14930,7 @@ func (ec *executionContext) _CursorPagination_last(ctx context.Context, field gr return ec.marshalOInt2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_last(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_last(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -14971,7 +14971,7 @@ func (ec *executionContext) _CursorPagination_orderBy(ctx context.Context, field return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_orderBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_orderBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -15012,7 +15012,7 @@ func (ec *executionContext) _CursorPagination_sortDirection(ctx context.Context, return ec.marshalOCursorPaginationSortDirection2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐSortDirection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_sortDirection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_sortDirection(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -15056,7 +15056,7 @@ func (ec *executionContext) _DomainEntry_accountName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntry_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntry_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntry", Field: field, @@ -15100,7 +15100,7 @@ func (ec *executionContext) _DomainEntry_clusterName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntry_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntry_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntry", Field: field, @@ -15144,7 +15144,7 @@ func (ec *executionContext) _DomainEntry_createdBy(ctx context.Context, field gr return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntry_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntry_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntry", Field: field, @@ -15196,7 +15196,7 @@ func (ec *executionContext) _DomainEntry_creationTime(ctx context.Context, field return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntry_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntry_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntry", Field: field, @@ -15240,7 +15240,7 @@ func (ec *executionContext) _DomainEntry_displayName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntry_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntry_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntry", Field: field, @@ -15284,7 +15284,7 @@ func (ec *executionContext) _DomainEntry_domainName(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntry_domainName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntry_domainName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntry", Field: field, @@ -15328,7 +15328,7 @@ func (ec *executionContext) _DomainEntry_id(ctx context.Context, field graphql.C return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntry_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntry", Field: field, @@ -15372,7 +15372,7 @@ func (ec *executionContext) _DomainEntry_lastUpdatedBy(ctx context.Context, fiel return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntry_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntry_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntry", Field: field, @@ -15421,7 +15421,7 @@ func (ec *executionContext) _DomainEntry_markedForDeletion(ctx context.Context, return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntry_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntry_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntry", Field: field, @@ -15465,7 +15465,7 @@ func (ec *executionContext) _DomainEntry_recordVersion(ctx context.Context, fiel return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntry_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntry_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntry", Field: field, @@ -15509,7 +15509,7 @@ func (ec *executionContext) _DomainEntry_updateTime(ctx context.Context, field g return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntry_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntry_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntry", Field: field, @@ -15553,7 +15553,7 @@ func (ec *executionContext) _DomainEntryEdge_cursor(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntryEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntryEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntryEdge", Field: field, @@ -15597,7 +15597,7 @@ func (ec *executionContext) _DomainEntryEdge_node(ctx context.Context, field gra return ec.marshalNDomainEntry2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntryEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntryEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntryEdge", Field: field, @@ -15665,7 +15665,7 @@ func (ec *executionContext) _DomainEntryPaginatedRecords_edges(ctx context.Conte return ec.marshalNDomainEntryEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐDomainEntryEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntryPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntryPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntryPaginatedRecords", Field: field, @@ -15715,7 +15715,7 @@ func (ec *executionContext) _DomainEntryPaginatedRecords_pageInfo(ctx context.Co return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntryPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntryPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntryPaginatedRecords", Field: field, @@ -15769,7 +15769,7 @@ func (ec *executionContext) _DomainEntryPaginatedRecords_totalCount(ctx context. return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DomainEntryPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DomainEntryPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DomainEntryPaginatedRecords", Field: field, @@ -15813,7 +15813,7 @@ func (ec *executionContext) _EncodedValue_value(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EncodedValue_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EncodedValue_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EncodedValue", Field: field, @@ -15857,7 +15857,7 @@ func (ec *executionContext) _EncodedValue_encoding(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EncodedValue_encoding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EncodedValue_encoding(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EncodedValue", Field: field, @@ -15901,7 +15901,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams_awsAccountId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams_awsAccountId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams", Field: field, @@ -15945,7 +15945,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams_cfParamTrustedARN(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams_cfParamTrustedARN(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams", Field: field, @@ -15989,7 +15989,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams_externalID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams_externalID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams", Field: field, @@ -16033,7 +16033,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams_roleARN(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams_roleARN(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams", Field: field, @@ -16077,7 +16077,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAuthSecretKeys_accessKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAuthSecretKeys_accessKey(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSAuthSecretKeys", Field: field, @@ -16121,7 +16121,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAuthSecretKeys_cfParamUserName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAuthSecretKeys_cfParamUserName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSAuthSecretKeys", Field: field, @@ -16165,7 +16165,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAuthSecretKeys_secretKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSAuthSecretKeys_secretKey(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSAuthSecretKeys", Field: field, @@ -16206,7 +16206,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesAWSAssumeRoleParams(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_assumeRoleParams(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_assumeRoleParams(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials", Field: field, @@ -16260,7 +16260,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsAuthMechanism(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_authMechanism(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_authMechanism(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials", Field: field, @@ -16301,7 +16301,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__AWSAuthSecretKeys2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesAWSAuthSecretKeys(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_authSecretKeys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_authSecretKeys(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials", Field: field, @@ -16350,7 +16350,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamInstanceProfileName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamInstanceProfileName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials", Field: field, @@ -16391,7 +16391,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamRoleName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamRoleName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials", Field: field, @@ -16432,7 +16432,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamStackName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_cfParamStackName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials", Field: field, @@ -16476,7 +16476,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__ClusterVisibilityMode2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesClusterVisibilityMode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__ClusterVisbility_mode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__ClusterVisbility_mode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__ClusterVisbility", Field: field, @@ -16517,7 +16517,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__ClusterVisbility_publicEndpoint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__ClusterVisbility_publicEndpoint(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__ClusterVisbility", Field: field, @@ -16561,7 +16561,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials_serviceAccountJSON(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials_serviceAccountJSON(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials", Field: field, @@ -16597,12 +16597,12 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte if resTmp == nil { return graphql.Null } - res := resTmp.(interface{}) + res := resTmp.(any) fc.Result = res return ec.marshalOAny2interface(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_defaultValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__InputField", Field: field, @@ -16643,7 +16643,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_displayUnit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_displayUnit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__InputField", Field: field, @@ -16687,7 +16687,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_inputType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_inputType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__InputField", Field: field, @@ -16731,7 +16731,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_label(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_label(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__InputField", Field: field, @@ -16772,7 +16772,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_max(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_max(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__InputField", Field: field, @@ -16813,7 +16813,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_min(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_min(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__InputField", Field: field, @@ -16854,7 +16854,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_multiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_multiplier(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__InputField", Field: field, @@ -16898,7 +16898,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__InputField", Field: field, @@ -16939,7 +16939,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_required(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_required(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__InputField", Field: field, @@ -16980,7 +16980,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_unit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__InputField_unit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__InputField", Field: field, @@ -17021,7 +17021,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate", Field: field, @@ -17065,7 +17065,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate", Field: field, @@ -17109,7 +17109,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate", Field: field, @@ -17153,7 +17153,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__InputField2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesInputFieldᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_fields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate", Field: field, @@ -17216,7 +17216,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate", Field: field, @@ -17260,7 +17260,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate", Field: field, @@ -17304,7 +17304,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__OutputField2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesOutputFieldᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_outputs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate_outputs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate", Field: field, @@ -17356,7 +17356,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_active(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_active(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry", Field: field, @@ -17397,7 +17397,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry", Field: field, @@ -17441,7 +17441,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry", Field: field, @@ -17485,7 +17485,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry", Field: field, @@ -17529,7 +17529,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__InputField2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesInputFieldᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_fields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry", Field: field, @@ -17592,7 +17592,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry", Field: field, @@ -17636,7 +17636,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_logoUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_logoUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry", Field: field, @@ -17680,7 +17680,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry", Field: field, @@ -17724,7 +17724,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__OutputField2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesOutputFieldᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_outputs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_outputs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry", Field: field, @@ -17776,7 +17776,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MresTemplate2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplateᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_resources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry_resources(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry", Field: field, @@ -17836,7 +17836,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__OutputField_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__OutputField_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__OutputField", Field: field, @@ -17880,7 +17880,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__OutputField_label(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__OutputField_label(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__OutputField", Field: field, @@ -17924,7 +17924,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__OutputField_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__OutputField_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___infra___internal___entities__OutputField", Field: field, @@ -17968,7 +17968,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUp return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___common__CreatedOrUpdatedBy", Field: field, @@ -18012,7 +18012,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUp return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___common__CreatedOrUpdatedBy", Field: field, @@ -18056,7 +18056,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUp return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___common__CreatedOrUpdatedBy", Field: field, @@ -18100,7 +18100,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncAction2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncAction(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_action(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_action(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -18141,7 +18141,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_error(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_error(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -18182,7 +18182,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_lastSyncedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_lastSyncedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -18226,7 +18226,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -18270,7 +18270,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncState2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_state(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -18311,7 +18311,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_syncScheduledAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_syncScheduledAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -18355,7 +18355,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsCredentials(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_credentials(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_credentials(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig", Field: field, @@ -18402,7 +18402,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSK3sMastersConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_k3sMasters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_k3sMasters(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig", Field: field, @@ -18457,7 +18457,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_nodePools(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_nodePools(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig", Field: field, @@ -18501,7 +18501,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_region(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_region(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig", Field: field, @@ -18542,7 +18542,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_spotNodePools(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_spotNodePools(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig", Field: field, @@ -18583,7 +18583,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsVPCParams(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_vpc(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_vpc(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig", Field: field, @@ -18630,7 +18630,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_iamInstanceProfileRole(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_iamInstanceProfileRole(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig", Field: field, @@ -18674,7 +18674,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_instanceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_instanceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig", Field: field, @@ -18715,7 +18715,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig", Field: field, @@ -18759,7 +18759,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_nvidiaGpuEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_nvidiaGpuEnabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig", Field: field, @@ -18803,7 +18803,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_rootVolumeSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_rootVolumeSize(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig", Field: field, @@ -18847,7 +18847,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_rootVolumeType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_rootVolumeType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig", Field: field, @@ -18891,7 +18891,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_availabilityZone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_availabilityZone(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -18932,7 +18932,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_ec2Pool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_ec2Pool(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -18979,7 +18979,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_iamInstanceProfileRole(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_iamInstanceProfileRole(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -19023,7 +19023,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_nvidiaGpuEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_nvidiaGpuEnabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -19067,7 +19067,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AWSPoolType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSPoolType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_poolType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_poolType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -19111,7 +19111,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_region(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_region(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -19155,7 +19155,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -19199,7 +19199,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -19240,7 +19240,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_spotPool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_spotPool(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -19294,7 +19294,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -19338,7 +19338,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcSubnetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcSubnetId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -19382,7 +19382,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsAuthMechanism(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials_authMechanism(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials_authMechanism(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials", Field: field, @@ -19426,7 +19426,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___common____types__SecretRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesSecretRef(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials_secretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials_secretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials", Field: field, @@ -19476,7 +19476,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig_instanceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig_instanceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig", Field: field, @@ -19517,7 +19517,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig", Field: field, @@ -19558,7 +19558,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___common____types__MinMaxFloat2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesMinMaxFloat(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode_memoryPerVcpu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode_memoryPerVcpu(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode", Field: field, @@ -19608,7 +19608,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___common____types__MinMaxFloat2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesMinMaxFloat(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode_vcpu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode_vcpu(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode", Field: field, @@ -19658,7 +19658,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode_instanceTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode_instanceTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode", Field: field, @@ -19699,7 +19699,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotCPUNode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_cpuNode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_cpuNode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig", Field: field, @@ -19746,7 +19746,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotGpuNode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_gpuNode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_gpuNode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig", Field: field, @@ -19791,7 +19791,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig", Field: field, @@ -19835,7 +19835,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_spotFleetTaggingRoleName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_spotFleetTaggingRoleName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig", Field: field, @@ -19879,7 +19879,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_availabilityZone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_availabilityZone(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID", Field: field, @@ -19923,7 +19923,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID", Field: field, @@ -19967,7 +19967,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams", Field: field, @@ -20011,7 +20011,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSubnetWithIDᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_publicSubnets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_publicSubnets(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams", Field: field, @@ -20061,7 +20061,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_jobName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_jobName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput", Field: field, @@ -20105,7 +20105,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_jobNamespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_jobNamespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput", Field: field, @@ -20146,7 +20146,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_keyAWSVPCId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_keyAWSVPCId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput", Field: field, @@ -20187,7 +20187,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_keyAWSVPCPublicSubnets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_keyAWSVPCPublicSubnets(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput", Field: field, @@ -20231,7 +20231,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_keyK3sAgentJoinToken(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_keyK3sAgentJoinToken(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput", Field: field, @@ -20275,7 +20275,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_keyK3sServerJoinToken(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_keyK3sServerJoinToken(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput", Field: field, @@ -20319,7 +20319,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_keyKubeconfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_keyKubeconfig(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput", Field: field, @@ -20363,7 +20363,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_secretName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput_secretName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput", Field: field, @@ -20407,7 +20407,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_accountId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_accountId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20451,7 +20451,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20495,7 +20495,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__ClusterSpecAvailabilityMode2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1ClusterSpecAvailabilityMode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_availabilityMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_availabilityMode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20536,7 +20536,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSClusterConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_aws(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_aws(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20594,7 +20594,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_backupToS3Enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_backupToS3Enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20635,7 +20635,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_cloudflareEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_cloudflareEnabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20679,7 +20679,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___common____types__CloudProvider2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesCloudProvider(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_cloudProvider(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_cloudProvider(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20720,7 +20720,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterInternalDnsHost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterInternalDnsHost(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20761,7 +20761,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterServiceCIDR(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterServiceCIDR(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20802,7 +20802,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___common____types__SecretKeyRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesSecretKeyRef(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterTokenRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_clusterTokenRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20851,7 +20851,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GCPClusterConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_gcp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_gcp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20909,7 +20909,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_kloudliteRelease(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_kloudliteRelease(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20953,7 +20953,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_messageQueueTopicName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_messageQueueTopicName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -20994,7 +20994,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__ClusterOutput2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1ClusterOutput(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_output(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_output(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -21056,7 +21056,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_publicDNSHost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_publicDNSHost(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -21100,7 +21100,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_taintMasterNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec_taintMasterNodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec", Field: field, @@ -21144,7 +21144,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___common____types__SecretRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesSecretRef(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_credentialsRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_credentialsRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig", Field: field, @@ -21194,7 +21194,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_gcpProjectID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_gcpProjectID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig", Field: field, @@ -21235,7 +21235,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__GCPMasterNodesConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GCPMasterNodesConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_masterNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_masterNodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig", Field: field, @@ -21287,7 +21287,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_region(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_region(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig", Field: field, @@ -21331,7 +21331,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__GCPServiceAccount2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GCPServiceAccount(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_serviceAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_serviceAccount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig", Field: field, @@ -21380,7 +21380,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GcpVPCParams(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_vpc(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_vpc(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig", Field: field, @@ -21425,7 +21425,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPMasterNodesConfig_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPMasterNodesConfig_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPMasterNodesConfig", Field: field, @@ -21469,7 +21469,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPMasterNodesConfig_rootVolumeSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPMasterNodesConfig_rootVolumeSize(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPMasterNodesConfig", Field: field, @@ -21513,7 +21513,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPMasterNodesConfig_rootVolumeType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPMasterNodesConfig_rootVolumeType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPMasterNodesConfig", Field: field, @@ -21557,7 +21557,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_availabilityZone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_availabilityZone(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig", Field: field, @@ -21601,7 +21601,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_bootVolumeSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_bootVolumeSize(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig", Field: field, @@ -21645,7 +21645,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_bootVolumeType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_bootVolumeType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig", Field: field, @@ -21689,7 +21689,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___common____types__SecretRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesSecretRef(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_credentials(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_credentials(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig", Field: field, @@ -21739,7 +21739,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_gcpProjectID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_gcpProjectID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig", Field: field, @@ -21783,7 +21783,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_machineType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_machineType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig", Field: field, @@ -21824,7 +21824,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig", Field: field, @@ -21868,7 +21868,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__GCPPoolType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GCPPoolType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_poolType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_poolType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig", Field: field, @@ -21912,7 +21912,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_region(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_region(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig", Field: field, @@ -21956,7 +21956,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__GCPServiceAccount2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GCPServiceAccount(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_serviceAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_serviceAccount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig", Field: field, @@ -22005,7 +22005,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GcpVPCParams(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_vpc(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_vpc(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig", Field: field, @@ -22050,7 +22050,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPServiceAccount_email(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPServiceAccount_email(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPServiceAccount", Field: field, @@ -22094,7 +22094,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPServiceAccount_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPServiceAccount_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPServiceAccount", Field: field, @@ -22135,7 +22135,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPServiceAccount_scopes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPServiceAccount_scopes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GCPServiceAccount", Field: field, @@ -22179,7 +22179,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams", Field: field, @@ -22223,7 +22223,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps_availabilityZone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps_availabilityZone(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps", Field: field, @@ -22267,7 +22267,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps_kloudliteRelease(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps_kloudliteRelease(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps", Field: field, @@ -22308,7 +22308,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps_lastRecreatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps_lastRecreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps", Field: field, @@ -22352,7 +22352,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps_role(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps_role(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps", Field: field, @@ -22393,7 +22393,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_aws(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_aws(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec", Field: field, @@ -22461,7 +22461,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNGithub__com___kloudlite___operator___apis___common____types__CloudProvider2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesCloudProvider(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_cloudProvider(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_cloudProvider(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec", Field: field, @@ -22502,7 +22502,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GCPNodePoolConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_gcp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_gcp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec", Field: field, @@ -22570,7 +22570,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_maxCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_maxCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec", Field: field, @@ -22614,7 +22614,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_minCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_minCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec", Field: field, @@ -22655,7 +22655,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_nodeLabels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_nodeLabels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec", Field: field, @@ -22696,7 +22696,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalOK8s__io___api___core___v1__Taint2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Taintᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_nodeTaints(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec_nodeTaints(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec", Field: field, @@ -22747,7 +22747,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodeProps_lastRecreatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodeProps_lastRecreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__NodeProps", Field: field, @@ -22791,7 +22791,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodeSpec_nodepoolName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__NodeSpec_nodepoolName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__NodeSpec", Field: field, @@ -22835,7 +22835,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MinMaxFloat_max(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MinMaxFloat_max(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__MinMaxFloat", Field: field, @@ -22879,7 +22879,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MinMaxFloat_min(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MinMaxFloat_min(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__MinMaxFloat", Field: field, @@ -22923,7 +22923,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__SecretKeyRef", Field: field, @@ -22967,7 +22967,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__SecretKeyRef", Field: field, @@ -23008,7 +23008,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretKeyRef_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__SecretKeyRef", Field: field, @@ -23052,7 +23052,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__SecretRef", Field: field, @@ -23093,7 +23093,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__SecretRef", Field: field, @@ -23137,7 +23137,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_chartName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_chartName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec", Field: field, @@ -23181,7 +23181,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_chartRepoURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_chartRepoURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec", Field: field, @@ -23225,7 +23225,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_chartVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_chartVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec", Field: field, @@ -23266,7 +23266,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__JobVars2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1JobVars(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_jobVars(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_jobVars(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec", Field: field, @@ -23317,7 +23317,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_postInstall(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_postInstall(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec", Field: field, @@ -23358,7 +23358,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_postUninstall(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_postUninstall(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec", Field: field, @@ -23399,7 +23399,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_preInstall(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_preInstall(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec", Field: field, @@ -23440,7 +23440,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_preUninstall(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_preUninstall(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec", Field: field, @@ -23481,7 +23481,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_releaseName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_releaseName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec", Field: field, @@ -23525,7 +23525,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_values(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec_values(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartSpec", Field: field, @@ -23566,7 +23566,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__CheckMeta2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMetaᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_checkList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_checkList(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus", Field: field, @@ -23619,7 +23619,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_checks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_checks(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus", Field: field, @@ -23663,7 +23663,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_isReady(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_isReady(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus", Field: field, @@ -23704,7 +23704,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_lastReadyGeneration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_lastReadyGeneration(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus", Field: field, @@ -23745,7 +23745,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_lastReconcileTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_lastReconcileTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus", Field: field, @@ -23786,7 +23786,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___pkg___raw____json__RawJson2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgRawJSONRawJSON(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus", Field: field, @@ -23834,7 +23834,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_releaseNotes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_releaseNotes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus", Field: field, @@ -23878,7 +23878,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_releaseStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_releaseStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus", Field: field, @@ -23919,7 +23919,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__ResourceRef2ᚕᚖgithubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐResourceRefᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_resources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus_resources(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus", Field: field, @@ -23970,7 +23970,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOK8s__io___api___core___v1__Affinity2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Affinity(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__JobVars_affinity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__JobVars_affinity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__JobVars", Field: field, @@ -24019,7 +24019,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__JobVars_backOffLimit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__JobVars_backOffLimit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__JobVars", Field: field, @@ -24060,7 +24060,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__JobVars_nodeSelector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__JobVars_nodeSelector(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__JobVars", Field: field, @@ -24101,7 +24101,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOK8s__io___api___core___v1__Toleration2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Tolerationᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__JobVars_tolerations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__JobVars_tolerations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__JobVars", Field: field, @@ -24154,7 +24154,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_debug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_debug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -24195,7 +24195,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_error(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_error(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -24236,7 +24236,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_generation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_generation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -24277,7 +24277,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_info(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_info(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -24318,7 +24318,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -24359,7 +24359,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_startedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_startedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -24400,7 +24400,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__State2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_state(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -24444,7 +24444,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -24485,7 +24485,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_debug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_debug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", Field: field, @@ -24526,7 +24526,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", Field: field, @@ -24567,7 +24567,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_hide(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_hide(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", Field: field, @@ -24611,7 +24611,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", Field: field, @@ -24655,7 +24655,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", Field: field, @@ -24699,7 +24699,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", Field: field, @@ -24743,7 +24743,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", Field: field, @@ -24787,7 +24787,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", Field: field, @@ -24831,7 +24831,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", Field: field, @@ -24872,7 +24872,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__CheckMeta2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMetaᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checkList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checkList(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -24925,7 +24925,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checks(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -24969,7 +24969,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_isReady(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_isReady(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -25010,7 +25010,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReadyGeneration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReadyGeneration(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -25051,7 +25051,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReconcileTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReconcileTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -25092,7 +25092,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOGithub__com___kloudlite___operator___pkg___raw____json__RawJson2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgRawJSONRawJSON(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -25137,7 +25137,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__ResourceRef2ᚕgithubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐResourceRefᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_resources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_resources(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -25183,12 +25183,12 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___raw____j if resTmp == nil { return graphql.Null } - res := resTmp.(interface{}) + res := resTmp.(any) fc.Result = res return ec.marshalOAny2interface(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___raw____json__RawJson_RawMessage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___raw____json__RawJson_RawMessage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___raw____json__RawJson", Field: field, @@ -25232,7 +25232,7 @@ func (ec *executionContext) _GlobalVPN_accountName(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25276,7 +25276,7 @@ func (ec *executionContext) _GlobalVPN_allocatableCIDRSuffix(ctx context.Context return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_allocatableCIDRSuffix(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_allocatableCIDRSuffix(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25320,7 +25320,7 @@ func (ec *executionContext) _GlobalVPN_CIDR(ctx context.Context, field graphql.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_CIDR(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_CIDR(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25364,7 +25364,7 @@ func (ec *executionContext) _GlobalVPN_createdBy(ctx context.Context, field grap return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25416,7 +25416,7 @@ func (ec *executionContext) _GlobalVPN_creationTime(ctx context.Context, field g return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25460,7 +25460,7 @@ func (ec *executionContext) _GlobalVPN_displayName(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25504,7 +25504,7 @@ func (ec *executionContext) _GlobalVPN_id(ctx context.Context, field graphql.Col return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25548,7 +25548,7 @@ func (ec *executionContext) _GlobalVPN_kloudliteClusterLocalDevice(ctx context.C return ec.marshalNGlobalVPNKloudliteClusterLocalDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGlobalVPNKloudliteClusterLocalDevice(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_kloudliteClusterLocalDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_kloudliteClusterLocalDevice(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25598,7 +25598,7 @@ func (ec *executionContext) _GlobalVPN_kloudliteGatewayDevice(ctx context.Contex return ec.marshalNGlobalVPNKloudliteGatewayDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGlobalVPNKloudliteGatewayDevice(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_kloudliteGatewayDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_kloudliteGatewayDevice(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25648,7 +25648,7 @@ func (ec *executionContext) _GlobalVPN_lastUpdatedBy(ctx context.Context, field return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25697,7 +25697,7 @@ func (ec *executionContext) _GlobalVPN_markedForDeletion(ctx context.Context, fi return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25741,7 +25741,7 @@ func (ec *executionContext) _GlobalVPN_metadata(ctx context.Context, field graph return ec.marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25801,7 +25801,7 @@ func (ec *executionContext) _GlobalVPN_nonClusterUseAllowedIPs(ctx context.Conte return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_nonClusterUseAllowedIPs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_nonClusterUseAllowedIPs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25845,7 +25845,7 @@ func (ec *executionContext) _GlobalVPN_numAllocatedClusterCIDRs(ctx context.Cont return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_numAllocatedClusterCIDRs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_numAllocatedClusterCIDRs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25889,7 +25889,7 @@ func (ec *executionContext) _GlobalVPN_numAllocatedDevices(ctx context.Context, return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_numAllocatedDevices(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_numAllocatedDevices(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25933,7 +25933,7 @@ func (ec *executionContext) _GlobalVPN_numReservedIPsForNonClusterUse(ctx contex return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_numReservedIPsForNonClusterUse(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_numReservedIPsForNonClusterUse(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -25977,7 +25977,7 @@ func (ec *executionContext) _GlobalVPN_recordVersion(ctx context.Context, field return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -26021,7 +26021,7 @@ func (ec *executionContext) _GlobalVPN_updateTime(ctx context.Context, field gra return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -26065,7 +26065,7 @@ func (ec *executionContext) _GlobalVPN_wgInterface(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPN_wgInterface(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPN_wgInterface(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPN", Field: field, @@ -26109,7 +26109,7 @@ func (ec *executionContext) _GlobalVPNDevice_accountName(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26153,7 +26153,7 @@ func (ec *executionContext) _GlobalVPNDevice_createdBy(ctx context.Context, fiel return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26202,7 +26202,7 @@ func (ec *executionContext) _GlobalVPNDevice_creationMethod(ctx context.Context, return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_creationMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_creationMethod(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26246,7 +26246,7 @@ func (ec *executionContext) _GlobalVPNDevice_creationTime(ctx context.Context, f return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26290,7 +26290,7 @@ func (ec *executionContext) _GlobalVPNDevice_displayName(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26334,7 +26334,7 @@ func (ec *executionContext) _GlobalVPNDevice_globalVPNName(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_globalVPNName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_globalVPNName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26378,7 +26378,7 @@ func (ec *executionContext) _GlobalVPNDevice_id(ctx context.Context, field graph return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26422,7 +26422,7 @@ func (ec *executionContext) _GlobalVPNDevice_ipAddr(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_ipAddr(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_ipAddr(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26466,7 +26466,7 @@ func (ec *executionContext) _GlobalVPNDevice_lastUpdatedBy(ctx context.Context, return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26515,7 +26515,7 @@ func (ec *executionContext) _GlobalVPNDevice_markedForDeletion(ctx context.Conte return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26559,7 +26559,7 @@ func (ec *executionContext) _GlobalVPNDevice_metadata(ctx context.Context, field return ec.marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26619,7 +26619,7 @@ func (ec *executionContext) _GlobalVPNDevice_privateKey(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_privateKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_privateKey(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26660,7 +26660,7 @@ func (ec *executionContext) _GlobalVPNDevice_publicEndpoint(ctx context.Context, return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_publicEndpoint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_publicEndpoint(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26704,7 +26704,7 @@ func (ec *executionContext) _GlobalVPNDevice_publicKey(ctx context.Context, fiel return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_publicKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_publicKey(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26748,7 +26748,7 @@ func (ec *executionContext) _GlobalVPNDevice_recordVersion(ctx context.Context, return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26792,7 +26792,7 @@ func (ec *executionContext) _GlobalVPNDevice_updateTime(ctx context.Context, fie return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26833,7 +26833,7 @@ func (ec *executionContext) _GlobalVPNDevice_wireguardConfig(ctx context.Context return ec.marshalOEncodedValue2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐEncodedValue(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevice_wireguardConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevice_wireguardConfig(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevice", Field: field, @@ -26883,7 +26883,7 @@ func (ec *executionContext) _GlobalVPNDeviceEdge_cursor(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDeviceEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDeviceEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDeviceEdge", Field: field, @@ -26927,7 +26927,7 @@ func (ec *executionContext) _GlobalVPNDeviceEdge_node(ctx context.Context, field return ec.marshalNGlobalVPNDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐGlobalVPNDevice(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDeviceEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDeviceEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDeviceEdge", Field: field, @@ -27007,7 +27007,7 @@ func (ec *executionContext) _GlobalVPNDevicePaginatedRecords_edges(ctx context.C return ec.marshalNGlobalVPNDeviceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGlobalVPNDeviceEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevicePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevicePaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevicePaginatedRecords", Field: field, @@ -27057,7 +27057,7 @@ func (ec *executionContext) _GlobalVPNDevicePaginatedRecords_pageInfo(ctx contex return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevicePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevicePaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevicePaginatedRecords", Field: field, @@ -27111,7 +27111,7 @@ func (ec *executionContext) _GlobalVPNDevicePaginatedRecords_totalCount(ctx cont return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNDevicePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNDevicePaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNDevicePaginatedRecords", Field: field, @@ -27155,7 +27155,7 @@ func (ec *executionContext) _GlobalVPNEdge_cursor(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNEdge", Field: field, @@ -27199,7 +27199,7 @@ func (ec *executionContext) _GlobalVPNEdge_node(ctx context.Context, field graph return ec.marshalNGlobalVPN2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐGlobalVPN(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNEdge", Field: field, @@ -27283,7 +27283,7 @@ func (ec *executionContext) _GlobalVPNKloudliteClusterLocalDevice_ipAddr(ctx con return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNKloudliteClusterLocalDevice_ipAddr(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNKloudliteClusterLocalDevice_ipAddr(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNKloudliteClusterLocalDevice", Field: field, @@ -27327,7 +27327,7 @@ func (ec *executionContext) _GlobalVPNKloudliteClusterLocalDevice_name(ctx conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNKloudliteClusterLocalDevice_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNKloudliteClusterLocalDevice_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNKloudliteClusterLocalDevice", Field: field, @@ -27371,7 +27371,7 @@ func (ec *executionContext) _GlobalVPNKloudliteGatewayDevice_ipAddr(ctx context. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNKloudliteGatewayDevice_ipAddr(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNKloudliteGatewayDevice_ipAddr(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNKloudliteGatewayDevice", Field: field, @@ -27415,7 +27415,7 @@ func (ec *executionContext) _GlobalVPNKloudliteGatewayDevice_name(ctx context.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNKloudliteGatewayDevice_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNKloudliteGatewayDevice_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNKloudliteGatewayDevice", Field: field, @@ -27459,7 +27459,7 @@ func (ec *executionContext) _GlobalVPNPaginatedRecords_edges(ctx context.Context return ec.marshalNGlobalVPNEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGlobalVPNEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNPaginatedRecords", Field: field, @@ -27509,7 +27509,7 @@ func (ec *executionContext) _GlobalVPNPaginatedRecords_pageInfo(ctx context.Cont return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNPaginatedRecords", Field: field, @@ -27563,7 +27563,7 @@ func (ec *executionContext) _GlobalVPNPaginatedRecords_totalCount(ctx context.Co return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GlobalVPNPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GlobalVPNPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GlobalVPNPaginatedRecords", Field: field, @@ -27607,7 +27607,7 @@ func (ec *executionContext) _HelmRelease_accountName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -27648,7 +27648,7 @@ func (ec *executionContext) _HelmRelease_apiVersion(ctx context.Context, field g return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -27692,7 +27692,7 @@ func (ec *executionContext) _HelmRelease_clusterName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -27736,7 +27736,7 @@ func (ec *executionContext) _HelmRelease_createdBy(ctx context.Context, field gr return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -27788,7 +27788,7 @@ func (ec *executionContext) _HelmRelease_creationTime(ctx context.Context, field return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -27832,7 +27832,7 @@ func (ec *executionContext) _HelmRelease_displayName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -27876,7 +27876,7 @@ func (ec *executionContext) _HelmRelease_id(ctx context.Context, field graphql.C return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -27917,7 +27917,7 @@ func (ec *executionContext) _HelmRelease_kind(ctx context.Context, field graphql return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -27961,7 +27961,7 @@ func (ec *executionContext) _HelmRelease_lastUpdatedBy(ctx context.Context, fiel return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -28010,7 +28010,7 @@ func (ec *executionContext) _HelmRelease_markedForDeletion(ctx context.Context, return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -28051,7 +28051,7 @@ func (ec *executionContext) _HelmRelease_metadata(ctx context.Context, field gra return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -28111,7 +28111,7 @@ func (ec *executionContext) _HelmRelease_recordVersion(ctx context.Context, fiel return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -28152,7 +28152,7 @@ func (ec *executionContext) _HelmRelease_spec(ctx context.Context, field graphql return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__HelmChartSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HelmChartSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -28215,7 +28215,7 @@ func (ec *executionContext) _HelmRelease_status(ctx context.Context, field graph return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__HelmChartStatus2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HelmChartStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -28279,7 +28279,7 @@ func (ec *executionContext) _HelmRelease_syncStatus(ctx context.Context, field g return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -28337,7 +28337,7 @@ func (ec *executionContext) _HelmRelease_updateTime(ctx context.Context, field g return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmRelease_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmRelease_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmRelease", Field: field, @@ -28381,7 +28381,7 @@ func (ec *executionContext) _HelmReleaseEdge_cursor(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmReleaseEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmReleaseEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmReleaseEdge", Field: field, @@ -28425,7 +28425,7 @@ func (ec *executionContext) _HelmReleaseEdge_node(ctx context.Context, field gra return ec.marshalNHelmRelease2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐHelmRelease(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmReleaseEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmReleaseEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmReleaseEdge", Field: field, @@ -28503,7 +28503,7 @@ func (ec *executionContext) _HelmReleasePaginatedRecords_edges(ctx context.Conte return ec.marshalNHelmReleaseEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐHelmReleaseEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmReleasePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmReleasePaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmReleasePaginatedRecords", Field: field, @@ -28553,7 +28553,7 @@ func (ec *executionContext) _HelmReleasePaginatedRecords_pageInfo(ctx context.Co return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmReleasePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmReleasePaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmReleasePaginatedRecords", Field: field, @@ -28607,7 +28607,7 @@ func (ec *executionContext) _HelmReleasePaginatedRecords_totalCount(ctx context. return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HelmReleasePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HelmReleasePaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HelmReleasePaginatedRecords", Field: field, @@ -28648,7 +28648,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AWSElasticBlockStoreVolu return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource", Field: field, @@ -28689,7 +28689,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AWSElasticBlockStoreVolu return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource_partition(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource_partition(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource", Field: field, @@ -28730,7 +28730,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AWSElasticBlockStoreVolu return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource", Field: field, @@ -28774,7 +28774,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AWSElasticBlockStoreVolu return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource_volumeID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource_volumeID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource", Field: field, @@ -28815,7 +28815,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Affinity_nodeAffinity(ct return ec.marshalOK8s__io___api___core___v1__NodeAffinity2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NodeAffinity(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Affinity_nodeAffinity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Affinity_nodeAffinity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Affinity", Field: field, @@ -28862,7 +28862,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Affinity_podAffinity(ctx return ec.marshalOK8s__io___api___core___v1__PodAffinity2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PodAffinity(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Affinity_podAffinity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Affinity_podAffinity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Affinity", Field: field, @@ -28909,7 +28909,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Affinity_podAntiAffinity return ec.marshalOK8s__io___api___core___v1__PodAntiAffinity2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PodAntiAffinity(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Affinity_podAntiAffinity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Affinity_podAntiAffinity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Affinity", Field: field, @@ -28956,7 +28956,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AzureDiskVolumeSource_ca return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_cachingMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_cachingMode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AzureDiskVolumeSource", Field: field, @@ -29000,7 +29000,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AzureDiskVolumeSource_di return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_diskName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_diskName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AzureDiskVolumeSource", Field: field, @@ -29044,7 +29044,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AzureDiskVolumeSource_di return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_diskURI(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_diskURI(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AzureDiskVolumeSource", Field: field, @@ -29085,7 +29085,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AzureDiskVolumeSource_fs return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AzureDiskVolumeSource", Field: field, @@ -29126,7 +29126,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AzureDiskVolumeSource_ki return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AzureDiskVolumeSource", Field: field, @@ -29167,7 +29167,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AzureDiskVolumeSource_re return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureDiskVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AzureDiskVolumeSource", Field: field, @@ -29208,7 +29208,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AzureFilePersistentVolum return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureFilePersistentVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureFilePersistentVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AzureFilePersistentVolumeSource", Field: field, @@ -29252,7 +29252,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AzureFilePersistentVolum return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureFilePersistentVolumeSource_secretName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureFilePersistentVolumeSource_secretName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AzureFilePersistentVolumeSource", Field: field, @@ -29293,7 +29293,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AzureFilePersistentVolum return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureFilePersistentVolumeSource_secretNamespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureFilePersistentVolumeSource_secretNamespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AzureFilePersistentVolumeSource", Field: field, @@ -29337,7 +29337,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__AzureFilePersistentVolum return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureFilePersistentVolumeSource_shareName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__AzureFilePersistentVolumeSource_shareName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__AzureFilePersistentVolumeSource", Field: field, @@ -29378,7 +29378,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CSIPersistentVolumeSourc return ec.marshalOK8s__io___api___core___v1__SecretReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_controllerExpandSecretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_controllerExpandSecretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CSIPersistentVolumeSource", Field: field, @@ -29425,7 +29425,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CSIPersistentVolumeSourc return ec.marshalOK8s__io___api___core___v1__SecretReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_controllerPublishSecretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_controllerPublishSecretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CSIPersistentVolumeSource", Field: field, @@ -29475,7 +29475,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CSIPersistentVolumeSourc return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_driver(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_driver(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CSIPersistentVolumeSource", Field: field, @@ -29516,7 +29516,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CSIPersistentVolumeSourc return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CSIPersistentVolumeSource", Field: field, @@ -29557,7 +29557,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CSIPersistentVolumeSourc return ec.marshalOK8s__io___api___core___v1__SecretReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_nodeExpandSecretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_nodeExpandSecretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CSIPersistentVolumeSource", Field: field, @@ -29604,7 +29604,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CSIPersistentVolumeSourc return ec.marshalOK8s__io___api___core___v1__SecretReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_nodePublishSecretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_nodePublishSecretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CSIPersistentVolumeSource", Field: field, @@ -29651,7 +29651,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CSIPersistentVolumeSourc return ec.marshalOK8s__io___api___core___v1__SecretReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_nodeStageSecretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_nodeStageSecretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CSIPersistentVolumeSource", Field: field, @@ -29698,7 +29698,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CSIPersistentVolumeSourc return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CSIPersistentVolumeSource", Field: field, @@ -29739,7 +29739,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CSIPersistentVolumeSourc return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_volumeAttributes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_volumeAttributes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CSIPersistentVolumeSource", Field: field, @@ -29783,7 +29783,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CSIPersistentVolumeSourc return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_volumeHandle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CSIPersistentVolumeSource_volumeHandle(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CSIPersistentVolumeSource", Field: field, @@ -29827,7 +29827,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CephFSPersistentVolumeSo return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_monitors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_monitors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CephFSPersistentVolumeSource", Field: field, @@ -29868,7 +29868,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CephFSPersistentVolumeSo return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_path(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CephFSPersistentVolumeSource", Field: field, @@ -29909,7 +29909,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CephFSPersistentVolumeSo return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CephFSPersistentVolumeSource", Field: field, @@ -29950,7 +29950,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CephFSPersistentVolumeSo return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_secretFile(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_secretFile(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CephFSPersistentVolumeSource", Field: field, @@ -29991,7 +29991,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CephFSPersistentVolumeSo return ec.marshalOK8s__io___api___core___v1__SecretReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_secretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_secretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CephFSPersistentVolumeSource", Field: field, @@ -30038,7 +30038,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CephFSPersistentVolumeSo return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CephFSPersistentVolumeSource_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CephFSPersistentVolumeSource", Field: field, @@ -30079,7 +30079,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CinderPersistentVolumeSo return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CinderPersistentVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CinderPersistentVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CinderPersistentVolumeSource", Field: field, @@ -30120,7 +30120,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CinderPersistentVolumeSo return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CinderPersistentVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CinderPersistentVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CinderPersistentVolumeSource", Field: field, @@ -30161,7 +30161,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CinderPersistentVolumeSo return ec.marshalOK8s__io___api___core___v1__SecretReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CinderPersistentVolumeSource_secretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CinderPersistentVolumeSource_secretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CinderPersistentVolumeSource", Field: field, @@ -30211,7 +30211,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__CinderPersistentVolumeSo return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CinderPersistentVolumeSource_volumeID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__CinderPersistentVolumeSource_volumeID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__CinderPersistentVolumeSource", Field: field, @@ -30252,7 +30252,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FCVolumeSource_fsType(ct return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FCVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FCVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FCVolumeSource", Field: field, @@ -30293,7 +30293,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FCVolumeSource_lun(ctx c return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FCVolumeSource_lun(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FCVolumeSource_lun(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FCVolumeSource", Field: field, @@ -30334,7 +30334,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FCVolumeSource_readOnly( return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FCVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FCVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FCVolumeSource", Field: field, @@ -30375,7 +30375,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FCVolumeSource_targetWWN return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FCVolumeSource_targetWWNs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FCVolumeSource_targetWWNs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FCVolumeSource", Field: field, @@ -30416,7 +30416,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FCVolumeSource_wwids(ctx return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FCVolumeSource_wwids(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FCVolumeSource_wwids(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FCVolumeSource", Field: field, @@ -30460,7 +30460,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FlexPersistentVolumeSour return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlexPersistentVolumeSource_driver(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlexPersistentVolumeSource_driver(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FlexPersistentVolumeSource", Field: field, @@ -30501,7 +30501,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FlexPersistentVolumeSour return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlexPersistentVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlexPersistentVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FlexPersistentVolumeSource", Field: field, @@ -30542,7 +30542,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FlexPersistentVolumeSour return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlexPersistentVolumeSource_options(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlexPersistentVolumeSource_options(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FlexPersistentVolumeSource", Field: field, @@ -30583,7 +30583,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FlexPersistentVolumeSour return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlexPersistentVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlexPersistentVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FlexPersistentVolumeSource", Field: field, @@ -30624,7 +30624,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FlexPersistentVolumeSour return ec.marshalOK8s__io___api___core___v1__SecretReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlexPersistentVolumeSource_secretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlexPersistentVolumeSource_secretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FlexPersistentVolumeSource", Field: field, @@ -30671,7 +30671,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FlockerVolumeSource_data return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlockerVolumeSource_datasetName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlockerVolumeSource_datasetName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FlockerVolumeSource", Field: field, @@ -30712,7 +30712,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__FlockerVolumeSource_data return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlockerVolumeSource_datasetUUID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__FlockerVolumeSource_datasetUUID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__FlockerVolumeSource", Field: field, @@ -30753,7 +30753,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__GCEPersistentDiskVolumeS return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GCEPersistentDiskVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GCEPersistentDiskVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__GCEPersistentDiskVolumeSource", Field: field, @@ -30794,7 +30794,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__GCEPersistentDiskVolumeS return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GCEPersistentDiskVolumeSource_partition(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GCEPersistentDiskVolumeSource_partition(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__GCEPersistentDiskVolumeSource", Field: field, @@ -30838,7 +30838,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__GCEPersistentDiskVolumeS return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GCEPersistentDiskVolumeSource_pdName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GCEPersistentDiskVolumeSource_pdName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__GCEPersistentDiskVolumeSource", Field: field, @@ -30879,7 +30879,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__GCEPersistentDiskVolumeS return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GCEPersistentDiskVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GCEPersistentDiskVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__GCEPersistentDiskVolumeSource", Field: field, @@ -30923,7 +30923,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__GlusterfsPersistentVolum return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GlusterfsPersistentVolumeSource_endpoints(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GlusterfsPersistentVolumeSource_endpoints(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__GlusterfsPersistentVolumeSource", Field: field, @@ -30964,7 +30964,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__GlusterfsPersistentVolum return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GlusterfsPersistentVolumeSource_endpointsNamespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GlusterfsPersistentVolumeSource_endpointsNamespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__GlusterfsPersistentVolumeSource", Field: field, @@ -31008,7 +31008,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__GlusterfsPersistentVolum return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GlusterfsPersistentVolumeSource_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GlusterfsPersistentVolumeSource_path(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__GlusterfsPersistentVolumeSource", Field: field, @@ -31049,7 +31049,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__GlusterfsPersistentVolum return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GlusterfsPersistentVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__GlusterfsPersistentVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__GlusterfsPersistentVolumeSource", Field: field, @@ -31093,7 +31093,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__HostPathVolumeSource_pat return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__HostPathVolumeSource_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__HostPathVolumeSource_path(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__HostPathVolumeSource", Field: field, @@ -31134,7 +31134,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__HostPathVolumeSource_typ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__HostPathVolumeSource_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__HostPathVolumeSource_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__HostPathVolumeSource", Field: field, @@ -31175,7 +31175,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ISCSIPersistentVolumeSou return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_chapAuthDiscovery(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_chapAuthDiscovery(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ISCSIPersistentVolumeSource", Field: field, @@ -31216,7 +31216,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ISCSIPersistentVolumeSou return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_chapAuthSession(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_chapAuthSession(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ISCSIPersistentVolumeSource", Field: field, @@ -31257,7 +31257,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ISCSIPersistentVolumeSou return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ISCSIPersistentVolumeSource", Field: field, @@ -31298,7 +31298,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ISCSIPersistentVolumeSou return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_initiatorName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_initiatorName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ISCSIPersistentVolumeSource", Field: field, @@ -31342,7 +31342,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ISCSIPersistentVolumeSou return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_iqn(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_iqn(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ISCSIPersistentVolumeSource", Field: field, @@ -31383,7 +31383,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ISCSIPersistentVolumeSou return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_iscsiInterface(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_iscsiInterface(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ISCSIPersistentVolumeSource", Field: field, @@ -31427,7 +31427,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ISCSIPersistentVolumeSou return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_lun(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_lun(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ISCSIPersistentVolumeSource", Field: field, @@ -31468,7 +31468,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ISCSIPersistentVolumeSou return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_portals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_portals(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ISCSIPersistentVolumeSource", Field: field, @@ -31509,7 +31509,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ISCSIPersistentVolumeSou return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ISCSIPersistentVolumeSource", Field: field, @@ -31550,7 +31550,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ISCSIPersistentVolumeSou return ec.marshalOK8s__io___api___core___v1__SecretReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_secretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_secretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ISCSIPersistentVolumeSource", Field: field, @@ -31600,7 +31600,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ISCSIPersistentVolumeSou return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_targetPortal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ISCSIPersistentVolumeSource_targetPortal(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ISCSIPersistentVolumeSource", Field: field, @@ -31641,7 +31641,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__LocalVolumeSource_fsType return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__LocalVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__LocalVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__LocalVolumeSource", Field: field, @@ -31685,7 +31685,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__LocalVolumeSource_path(c return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__LocalVolumeSource_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__LocalVolumeSource_path(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__LocalVolumeSource", Field: field, @@ -31729,7 +31729,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NFSVolumeSource_path(ctx return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NFSVolumeSource_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NFSVolumeSource_path(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NFSVolumeSource", Field: field, @@ -31770,7 +31770,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NFSVolumeSource_readOnly return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NFSVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NFSVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NFSVolumeSource", Field: field, @@ -31814,7 +31814,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NFSVolumeSource_server(c return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NFSVolumeSource_server(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NFSVolumeSource_server(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NFSVolumeSource", Field: field, @@ -31855,7 +31855,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NamespaceCondition_lastT return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceCondition_lastTransitionTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceCondition_lastTransitionTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NamespaceCondition", Field: field, @@ -31896,7 +31896,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NamespaceCondition_messa return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceCondition_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceCondition_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NamespaceCondition", Field: field, @@ -31937,7 +31937,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NamespaceCondition_reaso return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceCondition_reason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceCondition_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NamespaceCondition", Field: field, @@ -31981,7 +31981,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NamespaceCondition_statu return ec.marshalNK8s__io___api___core___v1__ConditionStatus2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ConditionStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceCondition_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceCondition_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NamespaceCondition", Field: field, @@ -32025,7 +32025,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NamespaceCondition_type( return ec.marshalNK8s__io___api___core___v1__NamespaceConditionType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NamespaceConditionType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceCondition_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceCondition_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NamespaceCondition", Field: field, @@ -32066,7 +32066,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NamespaceSpec_finalizers return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceSpec_finalizers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceSpec_finalizers(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NamespaceSpec", Field: field, @@ -32107,7 +32107,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NamespaceStatus_conditio return ec.marshalOK8s__io___api___core___v1__NamespaceCondition2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NamespaceConditionᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceStatus_conditions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceStatus_conditions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NamespaceStatus", Field: field, @@ -32160,7 +32160,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NamespaceStatus_phase(ct return ec.marshalOK8s__io___api___core___v1__NamespacePhase2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NamespacePhase(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceStatus_phase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NamespaceStatus_phase(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NamespaceStatus", Field: field, @@ -32201,7 +32201,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NodeAffinity_preferredDu return ec.marshalOK8s__io___api___core___v1__PreferredSchedulingTerm2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PreferredSchedulingTermᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeAffinity_preferredDuringSchedulingIgnoredDuringExecution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeAffinity_preferredDuringSchedulingIgnoredDuringExecution(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NodeAffinity", Field: field, @@ -32248,7 +32248,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NodeAffinity_requiredDur return ec.marshalOK8s__io___api___core___v1__NodeSelector2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NodeSelector(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeAffinity_requiredDuringSchedulingIgnoredDuringExecution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeAffinity_requiredDuringSchedulingIgnoredDuringExecution(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NodeAffinity", Field: field, @@ -32296,7 +32296,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NodeSelector_nodeSelecto return ec.marshalNK8s__io___api___core___v1__NodeSelectorTerm2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NodeSelectorTermᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelector_nodeSelectorTerms(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelector_nodeSelectorTerms(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NodeSelector", Field: field, @@ -32346,7 +32346,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NodeSelectorRequirement_ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelectorRequirement_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelectorRequirement_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NodeSelectorRequirement", Field: field, @@ -32390,7 +32390,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NodeSelectorRequirement_ return ec.marshalNK8s__io___api___core___v1__NodeSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NodeSelectorOperator(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelectorRequirement_operator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelectorRequirement_operator(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NodeSelectorRequirement", Field: field, @@ -32431,7 +32431,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NodeSelectorRequirement_ return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelectorRequirement_values(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelectorRequirement_values(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NodeSelectorRequirement", Field: field, @@ -32472,7 +32472,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NodeSelectorTerm_matchEx return ec.marshalOK8s__io___api___core___v1__NodeSelectorRequirement2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NodeSelectorRequirementᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelectorTerm_matchExpressions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelectorTerm_matchExpressions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NodeSelectorTerm", Field: field, @@ -32521,7 +32521,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__NodeSelectorTerm_matchFi return ec.marshalOK8s__io___api___core___v1__NodeSelectorRequirement2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NodeSelectorRequirementᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelectorTerm_matchFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__NodeSelectorTerm_matchFields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__NodeSelectorTerm", Field: field, @@ -32570,7 +32570,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ObjectReference_apiVersi return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ObjectReference", Field: field, @@ -32611,7 +32611,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ObjectReference_fieldPat return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_fieldPath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_fieldPath(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ObjectReference", Field: field, @@ -32652,7 +32652,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ObjectReference_kind(ctx return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ObjectReference", Field: field, @@ -32693,7 +32693,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ObjectReference_name(ctx return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ObjectReference", Field: field, @@ -32734,7 +32734,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ObjectReference_namespac return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ObjectReference", Field: field, @@ -32775,7 +32775,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ObjectReference_resource return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_resourceVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_resourceVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ObjectReference", Field: field, @@ -32816,7 +32816,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ObjectReference_uid(ctx return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_uid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ObjectReference_uid(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ObjectReference", Field: field, @@ -32857,7 +32857,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimCon return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_lastProbeTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_lastProbeTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimCondition", Field: field, @@ -32898,7 +32898,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimCon return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_lastTransitionTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_lastTransitionTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimCondition", Field: field, @@ -32939,7 +32939,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimCon return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimCondition", Field: field, @@ -32980,7 +32980,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimCon return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_reason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimCondition", Field: field, @@ -33024,7 +33024,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimCon return ec.marshalNK8s__io___api___core___v1__ConditionStatus2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ConditionStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimCondition", Field: field, @@ -33068,7 +33068,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimCon return ec.marshalNK8s__io___api___core___v1__PersistentVolumeClaimConditionType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeClaimConditionType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimCondition_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimCondition", Field: field, @@ -33109,7 +33109,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpe return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_accessModes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_accessModes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimSpec", Field: field, @@ -33150,7 +33150,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpe return ec.marshalOK8s__io___api___core___v1__TypedLocalObjectReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TypedLocalObjectReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_dataSource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_dataSource(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimSpec", Field: field, @@ -33199,7 +33199,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpe return ec.marshalOK8s__io___api___core___v1__TypedObjectReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TypedObjectReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_dataSourceRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_dataSourceRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimSpec", Field: field, @@ -33250,7 +33250,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpe return ec.marshalOK8s__io___api___core___v1__ResourceRequirements2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceRequirements(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_resources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_resources(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimSpec", Field: field, @@ -33299,7 +33299,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpe return ec.marshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelector(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_selector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_selector(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimSpec", Field: field, @@ -33346,7 +33346,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpe return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_storageClassName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_storageClassName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimSpec", Field: field, @@ -33387,7 +33387,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpe return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeMode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimSpec", Field: field, @@ -33428,7 +33428,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpe return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimSpec", Field: field, @@ -33469,7 +33469,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSta return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_accessModes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_accessModes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimStatus", Field: field, @@ -33510,7 +33510,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSta return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_allocatedResources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_allocatedResources(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimStatus", Field: field, @@ -33551,7 +33551,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSta return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_allocatedResourceStatuses(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_allocatedResourceStatuses(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimStatus", Field: field, @@ -33592,7 +33592,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSta return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_capacity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_capacity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimStatus", Field: field, @@ -33633,7 +33633,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSta return ec.marshalOK8s__io___api___core___v1__PersistentVolumeClaimCondition2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeClaimConditionᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_conditions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_conditions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimStatus", Field: field, @@ -33688,7 +33688,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSta return ec.marshalOK8s__io___api___core___v1__PersistentVolumeClaimPhase2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeClaimPhase(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_phase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_phase(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeClaimStatus", Field: field, @@ -33729,7 +33729,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_acc return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_accessModes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_accessModes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -33770,7 +33770,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_aws return ec.marshalOK8s__io___api___core___v1__AWSElasticBlockStoreVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1AWSElasticBlockStoreVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_awsElasticBlockStore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_awsElasticBlockStore(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -33821,7 +33821,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_azu return ec.marshalOK8s__io___api___core___v1__AzureDiskVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1AzureDiskVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_azureDisk(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_azureDisk(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -33876,7 +33876,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_azu return ec.marshalOK8s__io___api___core___v1__AzureFilePersistentVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1AzureFilePersistentVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_azureFile(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_azureFile(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -33927,7 +33927,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_cap return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_capacity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_capacity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -33968,7 +33968,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_cep return ec.marshalOK8s__io___api___core___v1__CephFSPersistentVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1CephFSPersistentVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_cephfs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_cephfs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34023,7 +34023,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_cin return ec.marshalOK8s__io___api___core___v1__CinderPersistentVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1CinderPersistentVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_cinder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_cinder(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34074,7 +34074,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_cla return ec.marshalOK8s__io___api___core___v1__ObjectReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ObjectReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_claimRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_claimRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34131,7 +34131,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_csi return ec.marshalOK8s__io___api___core___v1__CSIPersistentVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1CSIPersistentVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_csi(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_csi(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34194,7 +34194,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_fc( return ec.marshalOK8s__io___api___core___v1__FCVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1FCVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_fc(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_fc(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34247,7 +34247,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_fle return ec.marshalOK8s__io___api___core___v1__FlexPersistentVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1FlexPersistentVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_flexVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_flexVolume(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34300,7 +34300,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_flo return ec.marshalOK8s__io___api___core___v1__FlockerVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1FlockerVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_flocker(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_flocker(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34347,7 +34347,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_gce return ec.marshalOK8s__io___api___core___v1__GCEPersistentDiskVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1GCEPersistentDiskVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_gcePersistentDisk(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_gcePersistentDisk(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34398,7 +34398,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_glu return ec.marshalOK8s__io___api___core___v1__GlusterfsPersistentVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1GlusterfsPersistentVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_glusterfs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_glusterfs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34449,7 +34449,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_hos return ec.marshalOK8s__io___api___core___v1__HostPathVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1HostPathVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_hostPath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_hostPath(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34496,7 +34496,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_isc return ec.marshalOK8s__io___api___core___v1__ISCSIPersistentVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ISCSIPersistentVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_iscsi(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_iscsi(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34561,7 +34561,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_loc return ec.marshalOK8s__io___api___core___v1__LocalVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1LocalVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_local(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_local(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34608,7 +34608,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_mou return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_mountOptions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_mountOptions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34649,7 +34649,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_nfs return ec.marshalOK8s__io___api___core___v1__NFSVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NFSVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_nfs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_nfs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34698,7 +34698,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_nod return ec.marshalOK8s__io___api___core___v1__VolumeNodeAffinity2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1VolumeNodeAffinity(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_nodeAffinity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_nodeAffinity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34743,7 +34743,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_per return ec.marshalOK8s__io___api___core___v1__PersistentVolumeReclaimPolicy2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeReclaimPolicy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_persistentVolumeReclaimPolicy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_persistentVolumeReclaimPolicy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34784,7 +34784,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_pho return ec.marshalOK8s__io___api___core___v1__PhotonPersistentDiskVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PhotonPersistentDiskVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_photonPersistentDisk(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_photonPersistentDisk(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34831,7 +34831,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_por return ec.marshalOK8s__io___api___core___v1__PortworxVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PortworxVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_portworxVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_portworxVolume(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34880,7 +34880,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_quo return ec.marshalOK8s__io___api___core___v1__QuobyteVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1QuobyteVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_quobyte(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_quobyte(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34935,7 +34935,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_rbd return ec.marshalOK8s__io___api___core___v1__RBDPersistentVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1RBDPersistentVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_rbd(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_rbd(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -34994,7 +34994,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_sca return ec.marshalOK8s__io___api___core___v1__ScaleIOPersistentVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ScaleIOPersistentVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_scaleIO(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_scaleIO(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -35057,7 +35057,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_sto return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_storageClassName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_storageClassName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -35098,7 +35098,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_sto return ec.marshalOK8s__io___api___core___v1__StorageOSPersistentVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1StorageOSPersistentVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_storageos(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_storageos(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -35151,7 +35151,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_vol return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_volumeMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_volumeMode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -35192,7 +35192,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_vsp return ec.marshalOK8s__io___api___core___v1__VsphereVirtualDiskVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1VsphereVirtualDiskVolumeSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_vsphereVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_vsphereVolume(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeSpec", Field: field, @@ -35243,7 +35243,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeStatus_l return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeStatus_lastPhaseTransitionTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeStatus_lastPhaseTransitionTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeStatus", Field: field, @@ -35284,7 +35284,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeStatus_m return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeStatus_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeStatus_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeStatus", Field: field, @@ -35325,7 +35325,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeStatus_p return ec.marshalOK8s__io___api___core___v1__PersistentVolumePhase2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumePhase(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeStatus_phase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeStatus_phase(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeStatus", Field: field, @@ -35366,7 +35366,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeStatus_r return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeStatus_reason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeStatus_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PersistentVolumeStatus", Field: field, @@ -35407,7 +35407,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PhotonPersistentDiskVolu return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PhotonPersistentDiskVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PhotonPersistentDiskVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PhotonPersistentDiskVolumeSource", Field: field, @@ -35451,7 +35451,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PhotonPersistentDiskVolu return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PhotonPersistentDiskVolumeSource_pdID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PhotonPersistentDiskVolumeSource_pdID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PhotonPersistentDiskVolumeSource", Field: field, @@ -35492,7 +35492,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PodAffinity_preferredDur return ec.marshalOK8s__io___api___core___v1__WeightedPodAffinityTerm2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1WeightedPodAffinityTermᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinity_preferredDuringSchedulingIgnoredDuringExecution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinity_preferredDuringSchedulingIgnoredDuringExecution(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PodAffinity", Field: field, @@ -35539,7 +35539,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PodAffinity_requiredDuri return ec.marshalOK8s__io___api___core___v1__PodAffinityTerm2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PodAffinityTermᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinity_requiredDuringSchedulingIgnoredDuringExecution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinity_requiredDuringSchedulingIgnoredDuringExecution(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PodAffinity", Field: field, @@ -35590,7 +35590,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PodAffinityTerm_labelSel return ec.marshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelector(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinityTerm_labelSelector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinityTerm_labelSelector(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PodAffinityTerm", Field: field, @@ -35637,7 +35637,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PodAffinityTerm_namespac return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinityTerm_namespaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinityTerm_namespaces(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PodAffinityTerm", Field: field, @@ -35678,7 +35678,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PodAffinityTerm_namespac return ec.marshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelector(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinityTerm_namespaceSelector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinityTerm_namespaceSelector(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PodAffinityTerm", Field: field, @@ -35728,7 +35728,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PodAffinityTerm_topology return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinityTerm_topologyKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinityTerm_topologyKey(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PodAffinityTerm", Field: field, @@ -35769,7 +35769,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PodAntiAffinity_preferre return ec.marshalOK8s__io___api___core___v1__WeightedPodAffinityTerm2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1WeightedPodAffinityTermᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAntiAffinity_preferredDuringSchedulingIgnoredDuringExecution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAntiAffinity_preferredDuringSchedulingIgnoredDuringExecution(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PodAntiAffinity", Field: field, @@ -35816,7 +35816,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PodAntiAffinity_required return ec.marshalOK8s__io___api___core___v1__PodAffinityTerm2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PodAffinityTermᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAntiAffinity_requiredDuringSchedulingIgnoredDuringExecution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAntiAffinity_requiredDuringSchedulingIgnoredDuringExecution(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PodAntiAffinity", Field: field, @@ -35867,7 +35867,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PortworxVolumeSource_fsT return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PortworxVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PortworxVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PortworxVolumeSource", Field: field, @@ -35908,7 +35908,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PortworxVolumeSource_rea return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PortworxVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PortworxVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PortworxVolumeSource", Field: field, @@ -35952,7 +35952,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PortworxVolumeSource_vol return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PortworxVolumeSource_volumeID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PortworxVolumeSource_volumeID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PortworxVolumeSource", Field: field, @@ -35996,7 +35996,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PreferredSchedulingTerm_ return ec.marshalNK8s__io___api___core___v1__NodeSelectorTerm2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NodeSelectorTerm(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PreferredSchedulingTerm_preference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PreferredSchedulingTerm_preference(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PreferredSchedulingTerm", Field: field, @@ -36046,7 +36046,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PreferredSchedulingTerm_ return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PreferredSchedulingTerm_weight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PreferredSchedulingTerm_weight(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__PreferredSchedulingTerm", Field: field, @@ -36087,7 +36087,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__QuobyteVolumeSource_grou return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_group(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_group(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__QuobyteVolumeSource", Field: field, @@ -36128,7 +36128,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__QuobyteVolumeSource_read return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__QuobyteVolumeSource", Field: field, @@ -36172,7 +36172,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__QuobyteVolumeSource_regi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_registry(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_registry(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__QuobyteVolumeSource", Field: field, @@ -36213,7 +36213,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__QuobyteVolumeSource_tena return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_tenant(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_tenant(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__QuobyteVolumeSource", Field: field, @@ -36254,7 +36254,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__QuobyteVolumeSource_user return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__QuobyteVolumeSource", Field: field, @@ -36298,7 +36298,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__QuobyteVolumeSource_volu return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_volume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__QuobyteVolumeSource_volume(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__QuobyteVolumeSource", Field: field, @@ -36339,7 +36339,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__RBDPersistentVolumeSourc return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__RBDPersistentVolumeSource", Field: field, @@ -36383,7 +36383,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__RBDPersistentVolumeSourc return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_image(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_image(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__RBDPersistentVolumeSource", Field: field, @@ -36424,7 +36424,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__RBDPersistentVolumeSourc return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_keyring(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_keyring(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__RBDPersistentVolumeSource", Field: field, @@ -36468,7 +36468,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__RBDPersistentVolumeSourc return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_monitors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_monitors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__RBDPersistentVolumeSource", Field: field, @@ -36509,7 +36509,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__RBDPersistentVolumeSourc return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_pool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_pool(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__RBDPersistentVolumeSource", Field: field, @@ -36550,7 +36550,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__RBDPersistentVolumeSourc return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__RBDPersistentVolumeSource", Field: field, @@ -36591,7 +36591,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__RBDPersistentVolumeSourc return ec.marshalOK8s__io___api___core___v1__SecretReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_secretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_secretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__RBDPersistentVolumeSource", Field: field, @@ -36638,7 +36638,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__RBDPersistentVolumeSourc return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersistentVolumeSource_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__RBDPersistentVolumeSource", Field: field, @@ -36682,7 +36682,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ResourceClaim_name(ctx c return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ResourceClaim_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ResourceClaim_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ResourceClaim", Field: field, @@ -36723,7 +36723,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ResourceRequirements_cla return ec.marshalOK8s__io___api___core___v1__ResourceClaim2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceClaimᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ResourceRequirements_claims(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ResourceRequirements_claims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ResourceRequirements", Field: field, @@ -36768,7 +36768,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ResourceRequirements_lim return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ResourceRequirements_limits(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ResourceRequirements_limits(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ResourceRequirements", Field: field, @@ -36809,7 +36809,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ResourceRequirements_req return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ResourceRequirements_requests(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ResourceRequirements_requests(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ResourceRequirements", Field: field, @@ -36850,7 +36850,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ScaleIOPersistentVolumeS return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ScaleIOPersistentVolumeSource", Field: field, @@ -36894,7 +36894,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ScaleIOPersistentVolumeS return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_gateway(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_gateway(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ScaleIOPersistentVolumeSource", Field: field, @@ -36935,7 +36935,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ScaleIOPersistentVolumeS return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_protectionDomain(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_protectionDomain(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ScaleIOPersistentVolumeSource", Field: field, @@ -36976,7 +36976,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ScaleIOPersistentVolumeS return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ScaleIOPersistentVolumeSource", Field: field, @@ -37017,7 +37017,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ScaleIOPersistentVolumeS return ec.marshalOK8s__io___api___core___v1__SecretReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1SecretReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_secretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_secretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ScaleIOPersistentVolumeSource", Field: field, @@ -37064,7 +37064,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ScaleIOPersistentVolumeS return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_sslEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_sslEnabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ScaleIOPersistentVolumeSource", Field: field, @@ -37105,7 +37105,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ScaleIOPersistentVolumeS return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_storageMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_storageMode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ScaleIOPersistentVolumeSource", Field: field, @@ -37146,7 +37146,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ScaleIOPersistentVolumeS return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_storagePool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_storagePool(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ScaleIOPersistentVolumeSource", Field: field, @@ -37190,7 +37190,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ScaleIOPersistentVolumeS return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_system(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_system(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ScaleIOPersistentVolumeSource", Field: field, @@ -37231,7 +37231,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__ScaleIOPersistentVolumeS return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_volumeName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_volumeName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__ScaleIOPersistentVolumeSource", Field: field, @@ -37272,7 +37272,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__SecretReference_name(ctx return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__SecretReference_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__SecretReference_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__SecretReference", Field: field, @@ -37313,7 +37313,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__SecretReference_namespac return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__SecretReference_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__SecretReference_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__SecretReference", Field: field, @@ -37354,7 +37354,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__StorageOSPersistentVolum return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__StorageOSPersistentVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__StorageOSPersistentVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__StorageOSPersistentVolumeSource", Field: field, @@ -37395,7 +37395,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__StorageOSPersistentVolum return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__StorageOSPersistentVolumeSource_readOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__StorageOSPersistentVolumeSource_readOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__StorageOSPersistentVolumeSource", Field: field, @@ -37436,7 +37436,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__StorageOSPersistentVolum return ec.marshalOK8s__io___api___core___v1__ObjectReference2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ObjectReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__StorageOSPersistentVolumeSource_secretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__StorageOSPersistentVolumeSource_secretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__StorageOSPersistentVolumeSource", Field: field, @@ -37493,7 +37493,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__StorageOSPersistentVolum return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__StorageOSPersistentVolumeSource_volumeName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__StorageOSPersistentVolumeSource_volumeName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__StorageOSPersistentVolumeSource", Field: field, @@ -37534,7 +37534,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__StorageOSPersistentVolum return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__StorageOSPersistentVolumeSource_volumeNamespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__StorageOSPersistentVolumeSource_volumeNamespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__StorageOSPersistentVolumeSource", Field: field, @@ -37578,7 +37578,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Taint_effect(ctx context return ec.marshalNK8s__io___api___core___v1__TaintEffect2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TaintEffect(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Taint_effect(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Taint_effect(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Taint", Field: field, @@ -37622,7 +37622,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Taint_key(ctx context.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Taint_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Taint_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Taint", Field: field, @@ -37663,7 +37663,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Taint_timeAdded(ctx cont return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Taint_timeAdded(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Taint_timeAdded(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Taint", Field: field, @@ -37704,7 +37704,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Taint_value(ctx context. return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Taint_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Taint_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Taint", Field: field, @@ -37745,7 +37745,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Toleration_effect(ctx co return ec.marshalOK8s__io___api___core___v1__TaintEffect2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TaintEffect(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_effect(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_effect(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Toleration", Field: field, @@ -37786,7 +37786,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Toleration_key(ctx conte return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Toleration", Field: field, @@ -37827,7 +37827,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Toleration_operator(ctx return ec.marshalOK8s__io___api___core___v1__TolerationOperator2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationOperator(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_operator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_operator(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Toleration", Field: field, @@ -37868,7 +37868,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Toleration_tolerationSec return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_tolerationSeconds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_tolerationSeconds(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Toleration", Field: field, @@ -37909,7 +37909,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Toleration_value(ctx con return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Toleration", Field: field, @@ -37950,7 +37950,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TypedLocalObjectReferenc return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedLocalObjectReference_apiGroup(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedLocalObjectReference_apiGroup(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TypedLocalObjectReference", Field: field, @@ -37994,7 +37994,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TypedLocalObjectReferenc return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedLocalObjectReference_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedLocalObjectReference_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TypedLocalObjectReference", Field: field, @@ -38038,7 +38038,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TypedLocalObjectReferenc return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedLocalObjectReference_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedLocalObjectReference_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TypedLocalObjectReference", Field: field, @@ -38079,7 +38079,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TypedObjectReference_api return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedObjectReference_apiGroup(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedObjectReference_apiGroup(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TypedObjectReference", Field: field, @@ -38123,7 +38123,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TypedObjectReference_kin return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedObjectReference_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedObjectReference_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TypedObjectReference", Field: field, @@ -38167,7 +38167,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TypedObjectReference_nam return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedObjectReference_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedObjectReference_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TypedObjectReference", Field: field, @@ -38208,7 +38208,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TypedObjectReference_nam return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedObjectReference_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TypedObjectReference_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TypedObjectReference", Field: field, @@ -38249,7 +38249,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__VolumeNodeAffinity_requi return ec.marshalOK8s__io___api___core___v1__NodeSelector2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NodeSelector(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__VolumeNodeAffinity_required(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__VolumeNodeAffinity_required(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__VolumeNodeAffinity", Field: field, @@ -38294,7 +38294,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__VsphereVirtualDiskVolume return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource_fsType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource_fsType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource", Field: field, @@ -38335,7 +38335,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__VsphereVirtualDiskVolume return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource_storagePolicyID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource_storagePolicyID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource", Field: field, @@ -38376,7 +38376,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__VsphereVirtualDiskVolume return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource_storagePolicyName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource_storagePolicyName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource", Field: field, @@ -38420,7 +38420,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__VsphereVirtualDiskVolume return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource_volumePath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource_volumePath(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource", Field: field, @@ -38464,7 +38464,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__WeightedPodAffinityTerm_ return ec.marshalNK8s__io___api___core___v1__PodAffinityTerm2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PodAffinityTerm(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__WeightedPodAffinityTerm_podAffinityTerm(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__WeightedPodAffinityTerm_podAffinityTerm(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__WeightedPodAffinityTerm", Field: field, @@ -38518,7 +38518,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__WeightedPodAffinityTerm_ return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__WeightedPodAffinityTerm_weight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__WeightedPodAffinityTerm_weight(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__WeightedPodAffinityTerm", Field: field, @@ -38559,7 +38559,7 @@ func (ec *executionContext) _K8s__io___api___storage___v1__VolumeAttachmentSourc return ec.marshalOK8s__io___api___core___v1__PersistentVolumeSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentSource_inlineVolumeSpec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentSource_inlineVolumeSpec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___storage___v1__VolumeAttachmentSource", Field: field, @@ -38662,7 +38662,7 @@ func (ec *executionContext) _K8s__io___api___storage___v1__VolumeAttachmentSourc return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentSource_persistentVolumeName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentSource_persistentVolumeName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___storage___v1__VolumeAttachmentSource", Field: field, @@ -38706,7 +38706,7 @@ func (ec *executionContext) _K8s__io___api___storage___v1__VolumeAttachmentSpec_ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentSpec_attacher(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentSpec_attacher(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___storage___v1__VolumeAttachmentSpec", Field: field, @@ -38750,7 +38750,7 @@ func (ec *executionContext) _K8s__io___api___storage___v1__VolumeAttachmentSpec_ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentSpec_nodeName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentSpec_nodeName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___storage___v1__VolumeAttachmentSpec", Field: field, @@ -38794,7 +38794,7 @@ func (ec *executionContext) _K8s__io___api___storage___v1__VolumeAttachmentSpec_ return ec.marshalNK8s__io___api___storage___v1__VolumeAttachmentSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPIStorageV1VolumeAttachmentSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentSpec_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentSpec_source(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___storage___v1__VolumeAttachmentSpec", Field: field, @@ -38844,7 +38844,7 @@ func (ec *executionContext) _K8s__io___api___storage___v1__VolumeAttachmentStatu return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentStatus_attached(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentStatus_attached(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___storage___v1__VolumeAttachmentStatus", Field: field, @@ -38885,7 +38885,7 @@ func (ec *executionContext) _K8s__io___api___storage___v1__VolumeAttachmentStatu return ec.marshalOK8s__io___api___storage___v1__VolumeError2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPIStorageV1VolumeError(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentStatus_attachError(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentStatus_attachError(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___storage___v1__VolumeAttachmentStatus", Field: field, @@ -38932,7 +38932,7 @@ func (ec *executionContext) _K8s__io___api___storage___v1__VolumeAttachmentStatu return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentStatus_attachmentMetadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentStatus_attachmentMetadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___storage___v1__VolumeAttachmentStatus", Field: field, @@ -38973,7 +38973,7 @@ func (ec *executionContext) _K8s__io___api___storage___v1__VolumeAttachmentStatu return ec.marshalOK8s__io___api___storage___v1__VolumeError2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPIStorageV1VolumeError(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentStatus_detachError(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAttachmentStatus_detachError(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___storage___v1__VolumeAttachmentStatus", Field: field, @@ -39020,7 +39020,7 @@ func (ec *executionContext) _K8s__io___api___storage___v1__VolumeError_message(c return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeError_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeError_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___storage___v1__VolumeError", Field: field, @@ -39061,7 +39061,7 @@ func (ec *executionContext) _K8s__io___api___storage___v1__VolumeError_time(ctx return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeError_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeError_time(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___storage___v1__VolumeError", Field: field, @@ -39105,7 +39105,7 @@ func (ec *executionContext) _K8s__io___apimachinery___pkg___api___resource__Quan return ec.marshalNK8s__io___apimachinery___pkg___api___resource__Format2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgAPIResourceFormat(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___api___resource__Quantity_Format(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___api___resource__Quantity_Format(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___apimachinery___pkg___api___resource__Quantity", Field: field, @@ -39146,7 +39146,7 @@ func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__La return ec.marshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchExpressions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchExpressions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector", Field: field, @@ -39195,7 +39195,7 @@ func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__La return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchLabels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchLabels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector", Field: field, @@ -39239,7 +39239,7 @@ func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__La return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement", Field: field, @@ -39283,7 +39283,7 @@ func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__La return ec.marshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_operator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_operator(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement", Field: field, @@ -39324,7 +39324,7 @@ func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__La return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_values(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_values(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement", Field: field, @@ -39365,7 +39365,7 @@ func (ec *executionContext) _MatchFilter_array(ctx context.Context, field graphq return ec.marshalOAny2ᚕinterfaceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MatchFilter_array(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MatchFilter_array(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MatchFilter", Field: field, @@ -39406,7 +39406,7 @@ func (ec *executionContext) _MatchFilter_exact(ctx context.Context, field graphq return ec.marshalOAny2interface(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MatchFilter_exact(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MatchFilter_exact(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MatchFilter", Field: field, @@ -39450,7 +39450,7 @@ func (ec *executionContext) _MatchFilter_matchType(ctx context.Context, field gr return ec.marshalNGithub__com___kloudlite___api___pkg___repos__MatchType2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MatchFilter_matchType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MatchFilter_matchType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MatchFilter", Field: field, @@ -39491,7 +39491,7 @@ func (ec *executionContext) _MatchFilter_notInArray(ctx context.Context, field g return ec.marshalOAny2ᚕinterfaceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MatchFilter_notInArray(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MatchFilter_notInArray(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MatchFilter", Field: field, @@ -39532,7 +39532,7 @@ func (ec *executionContext) _MatchFilter_regex(ctx context.Context, field graphq return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MatchFilter_regex(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MatchFilter_regex(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MatchFilter", Field: field, @@ -39573,7 +39573,7 @@ func (ec *executionContext) _Metadata_annotations(ctx context.Context, field gra return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_annotations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -39617,7 +39617,7 @@ func (ec *executionContext) _Metadata_creationTimestamp(ctx context.Context, fie return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_creationTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_creationTimestamp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -39658,7 +39658,7 @@ func (ec *executionContext) _Metadata_deletionTimestamp(ctx context.Context, fie return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_deletionTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_deletionTimestamp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -39702,7 +39702,7 @@ func (ec *executionContext) _Metadata_generation(ctx context.Context, field grap return ec.marshalNInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_generation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_generation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -39743,7 +39743,7 @@ func (ec *executionContext) _Metadata_labels(ctx context.Context, field graphql. return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -39787,7 +39787,7 @@ func (ec *executionContext) _Metadata_name(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -39828,7 +39828,7 @@ func (ec *executionContext) _Metadata_namespace(ctx context.Context, field graph return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -39872,7 +39872,7 @@ func (ec *executionContext) _MsvcTemplate_category(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MsvcTemplate_category(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MsvcTemplate_category(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MsvcTemplate", Field: field, @@ -39916,7 +39916,7 @@ func (ec *executionContext) _MsvcTemplate_displayName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MsvcTemplate_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MsvcTemplate_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MsvcTemplate", Field: field, @@ -39960,7 +39960,7 @@ func (ec *executionContext) _MsvcTemplate_items(ctx context.Context, field graph return ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry2ᚕgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐMsvcTemplateEntryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MsvcTemplate_items(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MsvcTemplate_items(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MsvcTemplate", Field: field, @@ -42632,7 +42632,7 @@ func (ec *executionContext) _Namespace_accountName(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -42673,7 +42673,7 @@ func (ec *executionContext) _Namespace_apiVersion(ctx context.Context, field gra return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -42717,7 +42717,7 @@ func (ec *executionContext) _Namespace_clusterName(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -42761,7 +42761,7 @@ func (ec *executionContext) _Namespace_createdBy(ctx context.Context, field grap return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -42813,7 +42813,7 @@ func (ec *executionContext) _Namespace_creationTime(ctx context.Context, field g return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -42857,7 +42857,7 @@ func (ec *executionContext) _Namespace_displayName(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -42901,7 +42901,7 @@ func (ec *executionContext) _Namespace_id(ctx context.Context, field graphql.Col return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -42942,7 +42942,7 @@ func (ec *executionContext) _Namespace_kind(ctx context.Context, field graphql.C return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -42986,7 +42986,7 @@ func (ec *executionContext) _Namespace_lastUpdatedBy(ctx context.Context, field return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -43035,7 +43035,7 @@ func (ec *executionContext) _Namespace_markedForDeletion(ctx context.Context, fi return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -43076,7 +43076,7 @@ func (ec *executionContext) _Namespace_metadata(ctx context.Context, field graph return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -43136,7 +43136,7 @@ func (ec *executionContext) _Namespace_recordVersion(ctx context.Context, field return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -43177,7 +43177,7 @@ func (ec *executionContext) _Namespace_spec(ctx context.Context, field graphql.C return ec.marshalOK8s__io___api___core___v1__NamespaceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NamespaceSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -43222,7 +43222,7 @@ func (ec *executionContext) _Namespace_status(ctx context.Context, field graphql return ec.marshalOK8s__io___api___core___v1__NamespaceStatus2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NamespaceStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -43272,7 +43272,7 @@ func (ec *executionContext) _Namespace_syncStatus(ctx context.Context, field gra return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -43330,7 +43330,7 @@ func (ec *executionContext) _Namespace_updateTime(ctx context.Context, field gra return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Namespace_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Namespace_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Namespace", Field: field, @@ -43374,7 +43374,7 @@ func (ec *executionContext) _NamespaceEdge_cursor(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NamespaceEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NamespaceEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NamespaceEdge", Field: field, @@ -43418,7 +43418,7 @@ func (ec *executionContext) _NamespaceEdge_node(ctx context.Context, field graph return ec.marshalNNamespace2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐNamespace(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NamespaceEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NamespaceEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NamespaceEdge", Field: field, @@ -43496,7 +43496,7 @@ func (ec *executionContext) _NamespacePaginatedRecords_edges(ctx context.Context return ec.marshalNNamespaceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐNamespaceEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NamespacePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NamespacePaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NamespacePaginatedRecords", Field: field, @@ -43546,7 +43546,7 @@ func (ec *executionContext) _NamespacePaginatedRecords_pageInfo(ctx context.Cont return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NamespacePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NamespacePaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NamespacePaginatedRecords", Field: field, @@ -43600,7 +43600,7 @@ func (ec *executionContext) _NamespacePaginatedRecords_totalCount(ctx context.Co return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NamespacePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NamespacePaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NamespacePaginatedRecords", Field: field, @@ -43644,7 +43644,7 @@ func (ec *executionContext) _Node_accountName(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -43685,7 +43685,7 @@ func (ec *executionContext) _Node_apiVersion(ctx context.Context, field graphql. return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -43729,7 +43729,7 @@ func (ec *executionContext) _Node_clusterName(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -43773,7 +43773,7 @@ func (ec *executionContext) _Node_creationTime(ctx context.Context, field graphq return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -43817,7 +43817,7 @@ func (ec *executionContext) _Node_id(ctx context.Context, field graphql.Collecte return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -43858,7 +43858,7 @@ func (ec *executionContext) _Node_kind(ctx context.Context, field graphql.Collec return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -43899,7 +43899,7 @@ func (ec *executionContext) _Node_markedForDeletion(ctx context.Context, field g return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -43940,7 +43940,7 @@ func (ec *executionContext) _Node_metadata(ctx context.Context, field graphql.Co return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -44000,7 +44000,7 @@ func (ec *executionContext) _Node_recordVersion(ctx context.Context, field graph return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -44044,7 +44044,7 @@ func (ec *executionContext) _Node_spec(ctx context.Context, field graphql.Collec return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__NodeSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1NodeSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -44089,7 +44089,7 @@ func (ec *executionContext) _Node_status(ctx context.Context, field graphql.Coll return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -44149,7 +44149,7 @@ func (ec *executionContext) _Node_syncStatus(ctx context.Context, field graphql. return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -44207,7 +44207,7 @@ func (ec *executionContext) _Node_updateTime(ctx context.Context, field graphql. return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Node", Field: field, @@ -44251,7 +44251,7 @@ func (ec *executionContext) _NodeEdge_cursor(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodeEdge", Field: field, @@ -44295,7 +44295,7 @@ func (ec *executionContext) _NodeEdge_node(ctx context.Context, field graphql.Co return ec.marshalNNode2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐNode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodeEdge", Field: field, @@ -44367,7 +44367,7 @@ func (ec *executionContext) _NodePaginatedRecords_edges(ctx context.Context, fie return ec.marshalNNodeEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐNodeEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePaginatedRecords", Field: field, @@ -44417,7 +44417,7 @@ func (ec *executionContext) _NodePaginatedRecords_pageInfo(ctx context.Context, return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePaginatedRecords", Field: field, @@ -44471,7 +44471,7 @@ func (ec *executionContext) _NodePaginatedRecords_totalCount(ctx context.Context return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePaginatedRecords", Field: field, @@ -44515,7 +44515,7 @@ func (ec *executionContext) _NodePool_accountName(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -44556,7 +44556,7 @@ func (ec *executionContext) _NodePool_apiVersion(ctx context.Context, field grap return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -44600,7 +44600,7 @@ func (ec *executionContext) _NodePool_clusterName(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -44644,7 +44644,7 @@ func (ec *executionContext) _NodePool_createdBy(ctx context.Context, field graph return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -44696,7 +44696,7 @@ func (ec *executionContext) _NodePool_creationTime(ctx context.Context, field gr return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -44740,7 +44740,7 @@ func (ec *executionContext) _NodePool_displayName(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -44784,7 +44784,7 @@ func (ec *executionContext) _NodePool_id(ctx context.Context, field graphql.Coll return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -44825,7 +44825,7 @@ func (ec *executionContext) _NodePool_kind(ctx context.Context, field graphql.Co return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -44869,7 +44869,7 @@ func (ec *executionContext) _NodePool_lastUpdatedBy(ctx context.Context, field g return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -44918,7 +44918,7 @@ func (ec *executionContext) _NodePool_markedForDeletion(ctx context.Context, fie return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -44959,7 +44959,7 @@ func (ec *executionContext) _NodePool_metadata(ctx context.Context, field graphq return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -45019,7 +45019,7 @@ func (ec *executionContext) _NodePool_recordVersion(ctx context.Context, field g return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -45063,7 +45063,7 @@ func (ec *executionContext) _NodePool_spec(ctx context.Context, field graphql.Co return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1NodePoolSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -45120,7 +45120,7 @@ func (ec *executionContext) _NodePool_status(ctx context.Context, field graphql. return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -45180,7 +45180,7 @@ func (ec *executionContext) _NodePool_syncStatus(ctx context.Context, field grap return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -45238,7 +45238,7 @@ func (ec *executionContext) _NodePool_updateTime(ctx context.Context, field grap return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePool_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePool_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePool", Field: field, @@ -45282,7 +45282,7 @@ func (ec *executionContext) _NodePoolEdge_cursor(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePoolEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePoolEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePoolEdge", Field: field, @@ -45326,7 +45326,7 @@ func (ec *executionContext) _NodePoolEdge_node(ctx context.Context, field graphq return ec.marshalNNodePool2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐNodePool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePoolEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePoolEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePoolEdge", Field: field, @@ -45404,7 +45404,7 @@ func (ec *executionContext) _NodePoolPaginatedRecords_edges(ctx context.Context, return ec.marshalNNodePoolEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐNodePoolEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePoolPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePoolPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePoolPaginatedRecords", Field: field, @@ -45454,7 +45454,7 @@ func (ec *executionContext) _NodePoolPaginatedRecords_pageInfo(ctx context.Conte return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePoolPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePoolPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePoolPaginatedRecords", Field: field, @@ -45508,7 +45508,7 @@ func (ec *executionContext) _NodePoolPaginatedRecords_totalCount(ctx context.Con return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodePoolPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodePoolPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NodePoolPaginatedRecords", Field: field, @@ -45549,7 +45549,7 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_endCursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -45590,7 +45590,7 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasNextPage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -45631,7 +45631,7 @@ func (ec *executionContext) _PageInfo_hasPrevPage(ctx context.Context, field gra return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasPrevPage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -45672,7 +45672,7 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_startCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_startCursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -45716,7 +45716,7 @@ func (ec *executionContext) _PersistentVolume_accountName(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -45757,7 +45757,7 @@ func (ec *executionContext) _PersistentVolume_apiVersion(ctx context.Context, fi return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -45801,7 +45801,7 @@ func (ec *executionContext) _PersistentVolume_clusterName(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -45845,7 +45845,7 @@ func (ec *executionContext) _PersistentVolume_createdBy(ctx context.Context, fie return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -45897,7 +45897,7 @@ func (ec *executionContext) _PersistentVolume_creationTime(ctx context.Context, return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -45941,7 +45941,7 @@ func (ec *executionContext) _PersistentVolume_displayName(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -45985,7 +45985,7 @@ func (ec *executionContext) _PersistentVolume_id(ctx context.Context, field grap return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -46026,7 +46026,7 @@ func (ec *executionContext) _PersistentVolume_kind(ctx context.Context, field gr return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -46070,7 +46070,7 @@ func (ec *executionContext) _PersistentVolume_lastUpdatedBy(ctx context.Context, return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -46119,7 +46119,7 @@ func (ec *executionContext) _PersistentVolume_markedForDeletion(ctx context.Cont return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -46160,7 +46160,7 @@ func (ec *executionContext) _PersistentVolume_metadata(ctx context.Context, fiel return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -46220,7 +46220,7 @@ func (ec *executionContext) _PersistentVolume_recordVersion(ctx context.Context, return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -46261,7 +46261,7 @@ func (ec *executionContext) _PersistentVolume_spec(ctx context.Context, field gr return ec.marshalOK8s__io___api___core___v1__PersistentVolumeSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -46364,7 +46364,7 @@ func (ec *executionContext) _PersistentVolume_status(ctx context.Context, field return ec.marshalOK8s__io___api___core___v1__PersistentVolumeStatus2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -46418,7 +46418,7 @@ func (ec *executionContext) _PersistentVolume_syncStatus(ctx context.Context, fi return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -46476,7 +46476,7 @@ func (ec *executionContext) _PersistentVolume_updateTime(ctx context.Context, fi return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolume_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolume_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolume", Field: field, @@ -46520,7 +46520,7 @@ func (ec *executionContext) _PersistentVolumeClaim_accountName(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -46561,7 +46561,7 @@ func (ec *executionContext) _PersistentVolumeClaim_apiVersion(ctx context.Contex return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -46605,7 +46605,7 @@ func (ec *executionContext) _PersistentVolumeClaim_clusterName(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -46649,7 +46649,7 @@ func (ec *executionContext) _PersistentVolumeClaim_createdBy(ctx context.Context return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -46701,7 +46701,7 @@ func (ec *executionContext) _PersistentVolumeClaim_creationTime(ctx context.Cont return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -46745,7 +46745,7 @@ func (ec *executionContext) _PersistentVolumeClaim_displayName(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -46789,7 +46789,7 @@ func (ec *executionContext) _PersistentVolumeClaim_id(ctx context.Context, field return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -46830,7 +46830,7 @@ func (ec *executionContext) _PersistentVolumeClaim_kind(ctx context.Context, fie return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -46874,7 +46874,7 @@ func (ec *executionContext) _PersistentVolumeClaim_lastUpdatedBy(ctx context.Con return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -46923,7 +46923,7 @@ func (ec *executionContext) _PersistentVolumeClaim_markedForDeletion(ctx context return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -46964,7 +46964,7 @@ func (ec *executionContext) _PersistentVolumeClaim_metadata(ctx context.Context, return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -47024,7 +47024,7 @@ func (ec *executionContext) _PersistentVolumeClaim_recordVersion(ctx context.Con return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -47065,7 +47065,7 @@ func (ec *executionContext) _PersistentVolumeClaim_spec(ctx context.Context, fie return ec.marshalOK8s__io___api___core___v1__PersistentVolumeClaimSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeClaimSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -47124,7 +47124,7 @@ func (ec *executionContext) _PersistentVolumeClaim_status(ctx context.Context, f return ec.marshalOK8s__io___api___core___v1__PersistentVolumeClaimStatus2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeClaimStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -47182,7 +47182,7 @@ func (ec *executionContext) _PersistentVolumeClaim_syncStatus(ctx context.Contex return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -47240,7 +47240,7 @@ func (ec *executionContext) _PersistentVolumeClaim_updateTime(ctx context.Contex return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaim_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaim_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaim", Field: field, @@ -47284,7 +47284,7 @@ func (ec *executionContext) _PersistentVolumeClaimEdge_cursor(ctx context.Contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaimEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaimEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaimEdge", Field: field, @@ -47328,7 +47328,7 @@ func (ec *executionContext) _PersistentVolumeClaimEdge_node(ctx context.Context, return ec.marshalNPersistentVolumeClaim2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐPersistentVolumeClaim(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaimEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaimEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaimEdge", Field: field, @@ -47406,7 +47406,7 @@ func (ec *executionContext) _PersistentVolumeClaimPaginatedRecords_edges(ctx con return ec.marshalNPersistentVolumeClaimEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPersistentVolumeClaimEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaimPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaimPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaimPaginatedRecords", Field: field, @@ -47456,7 +47456,7 @@ func (ec *executionContext) _PersistentVolumeClaimPaginatedRecords_pageInfo(ctx return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaimPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaimPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaimPaginatedRecords", Field: field, @@ -47510,7 +47510,7 @@ func (ec *executionContext) _PersistentVolumeClaimPaginatedRecords_totalCount(ct return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeClaimPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeClaimPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeClaimPaginatedRecords", Field: field, @@ -47554,7 +47554,7 @@ func (ec *executionContext) _PersistentVolumeEdge_cursor(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeEdge", Field: field, @@ -47598,7 +47598,7 @@ func (ec *executionContext) _PersistentVolumeEdge_node(ctx context.Context, fiel return ec.marshalNPersistentVolume2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐPersistentVolume(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumeEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumeEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumeEdge", Field: field, @@ -47676,7 +47676,7 @@ func (ec *executionContext) _PersistentVolumePaginatedRecords_edges(ctx context. return ec.marshalNPersistentVolumeEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPersistentVolumeEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumePaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumePaginatedRecords", Field: field, @@ -47726,7 +47726,7 @@ func (ec *executionContext) _PersistentVolumePaginatedRecords_pageInfo(ctx conte return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumePaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumePaginatedRecords", Field: field, @@ -47780,7 +47780,7 @@ func (ec *executionContext) _PersistentVolumePaginatedRecords_totalCount(ctx con return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PersistentVolumePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PersistentVolumePaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PersistentVolumePaginatedRecords", Field: field, @@ -49665,7 +49665,7 @@ func (ec *executionContext) _Query_infra_listManagedServiceTemplates(ctx context return ec.marshalOMsvcTemplate2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐMsvcTemplateᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_infra_listManagedServiceTemplates(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_infra_listManagedServiceTemplates(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -50583,7 +50583,7 @@ func (ec *executionContext) _Query__service(ctx context.Context, field graphql.C return ec.marshalN_Service2githubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐService(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query__service(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query__service(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -50702,7 +50702,7 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -50760,7 +50760,7 @@ func (ec *executionContext) _VolumeAttachment_accountName(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -50801,7 +50801,7 @@ func (ec *executionContext) _VolumeAttachment_apiVersion(ctx context.Context, fi return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -50845,7 +50845,7 @@ func (ec *executionContext) _VolumeAttachment_clusterName(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -50889,7 +50889,7 @@ func (ec *executionContext) _VolumeAttachment_createdBy(ctx context.Context, fie return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -50941,7 +50941,7 @@ func (ec *executionContext) _VolumeAttachment_creationTime(ctx context.Context, return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -50985,7 +50985,7 @@ func (ec *executionContext) _VolumeAttachment_displayName(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -51029,7 +51029,7 @@ func (ec *executionContext) _VolumeAttachment_id(ctx context.Context, field grap return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -51070,7 +51070,7 @@ func (ec *executionContext) _VolumeAttachment_kind(ctx context.Context, field gr return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -51114,7 +51114,7 @@ func (ec *executionContext) _VolumeAttachment_lastUpdatedBy(ctx context.Context, return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -51163,7 +51163,7 @@ func (ec *executionContext) _VolumeAttachment_markedForDeletion(ctx context.Cont return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -51204,7 +51204,7 @@ func (ec *executionContext) _VolumeAttachment_metadata(ctx context.Context, fiel return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -51264,7 +51264,7 @@ func (ec *executionContext) _VolumeAttachment_recordVersion(ctx context.Context, return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -51308,7 +51308,7 @@ func (ec *executionContext) _VolumeAttachment_spec(ctx context.Context, field gr return ec.marshalNK8s__io___api___storage___v1__VolumeAttachmentSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPIStorageV1VolumeAttachmentSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -51357,7 +51357,7 @@ func (ec *executionContext) _VolumeAttachment_status(ctx context.Context, field return ec.marshalOK8s__io___api___storage___v1__VolumeAttachmentStatus2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPIStorageV1VolumeAttachmentStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -51411,7 +51411,7 @@ func (ec *executionContext) _VolumeAttachment_syncStatus(ctx context.Context, fi return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -51469,7 +51469,7 @@ func (ec *executionContext) _VolumeAttachment_updateTime(ctx context.Context, fi return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachment_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachment_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachment", Field: field, @@ -51513,7 +51513,7 @@ func (ec *executionContext) _VolumeAttachmentEdge_cursor(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachmentEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachmentEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachmentEdge", Field: field, @@ -51557,7 +51557,7 @@ func (ec *executionContext) _VolumeAttachmentEdge_node(ctx context.Context, fiel return ec.marshalNVolumeAttachment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐVolumeAttachment(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachmentEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachmentEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachmentEdge", Field: field, @@ -51635,7 +51635,7 @@ func (ec *executionContext) _VolumeAttachmentPaginatedRecords_edges(ctx context. return ec.marshalNVolumeAttachmentEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐVolumeAttachmentEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachmentPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachmentPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachmentPaginatedRecords", Field: field, @@ -51685,7 +51685,7 @@ func (ec *executionContext) _VolumeAttachmentPaginatedRecords_pageInfo(ctx conte return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachmentPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachmentPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachmentPaginatedRecords", Field: field, @@ -51739,7 +51739,7 @@ func (ec *executionContext) _VolumeAttachmentPaginatedRecords_totalCount(ctx con return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_VolumeAttachmentPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VolumeAttachmentPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "VolumeAttachmentPaginatedRecords", Field: field, @@ -51780,7 +51780,7 @@ func (ec *executionContext) __Service_sdl(ctx context.Context, field graphql.Col return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext__Service_sdl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext__Service_sdl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "_Service", Field: field, @@ -51824,7 +51824,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -51865,7 +51865,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -51909,7 +51909,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_locations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -51953,7 +51953,7 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_args(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -52007,7 +52007,7 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_isRepeatable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -52051,7 +52051,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -52092,7 +52092,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -52136,7 +52136,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -52177,7 +52177,7 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -52221,7 +52221,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -52262,7 +52262,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -52306,7 +52306,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_args(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -52360,7 +52360,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -52426,7 +52426,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -52467,7 +52467,7 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -52511,7 +52511,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -52552,7 +52552,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -52596,7 +52596,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -52659,7 +52659,7 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_defaultValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -52700,7 +52700,7 @@ func (ec *executionContext) ___Schema_description(ctx context.Context, field gra return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -52744,7 +52744,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_types(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -52810,7 +52810,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_queryType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -52873,7 +52873,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_mutationType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -52936,7 +52936,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_subscriptionType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -53002,7 +53002,7 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_directives(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -53058,7 +53058,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -53099,7 +53099,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -53140,7 +53140,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -53247,7 +53247,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_interfaces(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -53310,7 +53310,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_possibleTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -53435,7 +53435,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_inputFields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -53486,7 +53486,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_ofType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -53549,7 +53549,7 @@ func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field gr return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_specifiedByURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -58667,7 +58667,7 @@ func (ec *executionContext) _BYOKCluster(ctx context.Context, sel ast.SelectionS case "lastOnlineAt": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -59096,7 +59096,7 @@ func (ec *executionContext) _CloudProviderSecret(ctx context.Context, sel ast.Se case "aws": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -59211,7 +59211,7 @@ func (ec *executionContext) _CloudProviderSecret(ctx context.Context, sel ast.Se case "gcp": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -59553,7 +59553,7 @@ func (ec *executionContext) _Cluster(ctx context.Context, sel ast.SelectionSet, case "lastOnlineAt": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -59682,7 +59682,7 @@ func (ec *executionContext) _Cluster(ctx context.Context, sel ast.SelectionSet, case "adminKubeconfig": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -60905,7 +60905,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt case "lastSyncedAt": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -60948,7 +60948,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt case "syncScheduledAt": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -62426,7 +62426,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator case "startedAt": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -62459,7 +62459,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator case "state": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -62635,7 +62635,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator case "checkList": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -62668,7 +62668,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator case "checks": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -62708,7 +62708,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator case "lastReconcileTime": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -62741,7 +62741,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator case "message": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -63291,7 +63291,7 @@ func (ec *executionContext) _GlobalVPNDevice(ctx context.Context, sel ast.Select case "wireguardConfig": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -63742,7 +63742,7 @@ func (ec *executionContext) _HelmRelease(ctx context.Context, sel ast.SelectionS case "spec": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -63775,7 +63775,7 @@ func (ec *executionContext) _HelmRelease(ctx context.Context, sel ast.SelectionS case "status": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -66576,7 +66576,7 @@ func (ec *executionContext) _Metadata(ctx context.Context, sel ast.SelectionSet, case "annotations": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -66645,7 +66645,7 @@ func (ec *executionContext) _Metadata(ctx context.Context, sel ast.SelectionSet, case "deletionTimestamp": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -66683,7 +66683,7 @@ func (ec *executionContext) _Metadata(ctx context.Context, sel ast.SelectionSet, case "labels": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -67092,7 +67092,7 @@ func (ec *executionContext) _Namespace(ctx context.Context, sel ast.SelectionSet case "spec": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -67125,7 +67125,7 @@ func (ec *executionContext) _Namespace(ctx context.Context, sel ast.SelectionSet case "status": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68095,7 +68095,7 @@ func (ec *executionContext) _PersistentVolume(ctx context.Context, sel ast.Selec case "spec": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68128,7 +68128,7 @@ func (ec *executionContext) _PersistentVolume(ctx context.Context, sel ast.Selec case "status": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68346,7 +68346,7 @@ func (ec *executionContext) _PersistentVolumeClaim(ctx context.Context, sel ast. case "spec": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68379,7 +68379,7 @@ func (ec *executionContext) _PersistentVolumeClaim(ctx context.Context, sel ast. case "status": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68703,7 +68703,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listClusters": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68722,7 +68722,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getCluster": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68741,7 +68741,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listBYOKClusters": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68760,7 +68760,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getBYOKCluster": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68779,7 +68779,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infrat_getBYOKClusterSetupInstructions": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68798,7 +68798,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listGlobalVPNs": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68817,7 +68817,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getGlobalVPN": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68836,7 +68836,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listGlobalVPNDevices": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68855,7 +68855,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getGlobalVPNDevice": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68874,7 +68874,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listNodePools": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68893,7 +68893,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getNodePool": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68912,7 +68912,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listProviderSecrets": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68931,7 +68931,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getProviderSecret": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68950,7 +68950,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listDomainEntries": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -68969,7 +68969,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getDomainEntry": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69010,7 +69010,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listHelmReleases": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69029,7 +69029,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getHelmRelease": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69048,7 +69048,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listManagedServiceTemplates": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69067,7 +69067,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getManagedServiceTemplate": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69086,7 +69086,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listPVCs": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69105,7 +69105,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getPVC": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69124,7 +69124,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listNamespaces": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69143,7 +69143,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getNamespace": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69162,7 +69162,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listPVs": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69181,7 +69181,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getPV": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69200,7 +69200,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listVolumeAttachments": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69219,7 +69219,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getVolumeAttachment": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -69448,7 +69448,7 @@ func (ec *executionContext) _VolumeAttachment(ctx context.Context, sel ast.Selec case "status": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) diff --git a/apps/infra/internal/app/graph/globalvpn.resolvers.go b/apps/infra/internal/app/graph/globalvpn.resolvers.go index 9d75386b9..def2082fb 100644 --- a/apps/infra/internal/app/graph/globalvpn.resolvers.go +++ b/apps/infra/internal/app/graph/globalvpn.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/globalvpndevice.resolvers.go b/apps/infra/internal/app/graph/globalvpndevice.resolvers.go index 5b0a89882..b9a6398b2 100644 --- a/apps/infra/internal/app/graph/globalvpndevice.resolvers.go +++ b/apps/infra/internal/app/graph/globalvpndevice.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/helmrelease.resolvers.go b/apps/infra/internal/app/graph/helmrelease.resolvers.go index 8e81e09c4..073ed5f96 100644 --- a/apps/infra/internal/app/graph/helmrelease.resolvers.go +++ b/apps/infra/internal/app/graph/helmrelease.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/model/models_gen.go b/apps/infra/internal/app/graph/model/models_gen.go index 6a049210d..9314b21eb 100644 --- a/apps/infra/internal/app/graph/model/models_gen.go +++ b/apps/infra/internal/app/graph/model/models_gen.go @@ -132,16 +132,16 @@ type GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentialsIn struct } type GithubComKloudliteAPIAppsInfraInternalEntitiesInputField struct { - DefaultValue interface{} `json:"defaultValue,omitempty"` - DisplayUnit *string `json:"displayUnit,omitempty"` - InputType string `json:"inputType"` - Label string `json:"label"` - Max *float64 `json:"max,omitempty"` - Min *float64 `json:"min,omitempty"` - Multiplier *float64 `json:"multiplier,omitempty"` - Name string `json:"name"` - Required *bool `json:"required,omitempty"` - Unit *string `json:"unit,omitempty"` + DefaultValue any `json:"defaultValue,omitempty"` + DisplayUnit *string `json:"displayUnit,omitempty"` + InputType string `json:"inputType"` + Label string `json:"label"` + Max *float64 `json:"max,omitempty"` + Min *float64 `json:"min,omitempty"` + Multiplier *float64 `json:"multiplier,omitempty"` + Name string `json:"name"` + Required *bool `json:"required,omitempty"` + Unit *string `json:"unit,omitempty"` } type GithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplate struct { @@ -489,7 +489,7 @@ type GithubComKloudliteOperatorPkgOperatorCheckMeta struct { } type GithubComKloudliteOperatorPkgRawJSONRawJSON struct { - RawMessage interface{} `json:"RawMessage,omitempty"` + RawMessage any `json:"RawMessage,omitempty"` } type GlobalVPNDeviceEdge struct { diff --git a/apps/infra/internal/app/graph/namespace.resolvers.go b/apps/infra/internal/app/graph/namespace.resolvers.go index 851f87ad6..d10469bec 100644 --- a/apps/infra/internal/app/graph/namespace.resolvers.go +++ b/apps/infra/internal/app/graph/namespace.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/node.resolvers.go b/apps/infra/internal/app/graph/node.resolvers.go index f235c112d..aec8a02eb 100644 --- a/apps/infra/internal/app/graph/node.resolvers.go +++ b/apps/infra/internal/app/graph/node.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/nodepool.resolvers.go b/apps/infra/internal/app/graph/nodepool.resolvers.go index 0d9b7648f..e59d72f8d 100644 --- a/apps/infra/internal/app/graph/nodepool.resolvers.go +++ b/apps/infra/internal/app/graph/nodepool.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/persistentvolume.resolvers.go b/apps/infra/internal/app/graph/persistentvolume.resolvers.go index d66a1366a..625f4718e 100644 --- a/apps/infra/internal/app/graph/persistentvolume.resolvers.go +++ b/apps/infra/internal/app/graph/persistentvolume.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/persistentvolumeclaim.resolvers.go b/apps/infra/internal/app/graph/persistentvolumeclaim.resolvers.go index 25a852589..0490b6acc 100644 --- a/apps/infra/internal/app/graph/persistentvolumeclaim.resolvers.go +++ b/apps/infra/internal/app/graph/persistentvolumeclaim.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/app/graph/schema.resolvers.go b/apps/infra/internal/app/graph/schema.resolvers.go index 642bd1893..7e1cdb407 100644 --- a/apps/infra/internal/app/graph/schema.resolvers.go +++ b/apps/infra/internal/app/graph/schema.resolvers.go @@ -2,13 +2,12 @@ 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.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" "encoding/base64" "fmt" - "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/apps/infra/internal/app/graph/generated" @@ -855,7 +854,5 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type ( - mutationResolver struct{ *Resolver } - queryResolver struct{ *Resolver } -) +type mutationResolver struct{ *Resolver } +type queryResolver struct{ *Resolver } diff --git a/apps/infra/internal/app/graph/volumeattachment.resolvers.go b/apps/infra/internal/app/graph/volumeattachment.resolvers.go index 25c145bc2..8bbb10345 100644 --- a/apps/infra/internal/app/graph/volumeattachment.resolvers.go +++ b/apps/infra/internal/app/graph/volumeattachment.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 51cac2548..18527d2cb 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -622,6 +622,7 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string wgParams.PublicPeers = publicPeers wgParams.DNS = clDevice.IPAddr + wgParams.WithDNS = true wgParams.ListenPort = 31820 dnsServerArgs := make([]string, 0, len(gvpnConns)) diff --git a/apps/infra/internal/env/env.go b/apps/infra/internal/env/env.go index d88ecc4a0..ab93e31b1 100644 --- a/apps/infra/internal/env/env.go +++ b/apps/infra/internal/env/env.go @@ -19,7 +19,7 @@ type Env struct { KloudliteDNSSuffix string `env:"KLOUDLITE_DNS_SUFFIX" required:"true"` - NatsURL string `env:"NATS_URL" required:"true"` + NatsURL string `env:"NATS_URL" required:"true"` NatsReceiveFromAgentStream string `env:"NATS_RECEIVE_FROM_AGENT_STREAM" required:"true"` AccountCookieName string `env:"ACCOUNT_COOKIE_NAME" required:"true"` From 4d24a6826c46061cdc1e3539945a43e7b028262d Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Mon, 29 Jul 2024 13:49:27 +0530 Subject: [PATCH 25/89] refactor(observability): logging improvements --- apps/observability/internal/app/app.go | 2 +- apps/observability/internal/framework/framework.go | 8 +++++++- apps/observability/main.go | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/apps/observability/internal/app/app.go b/apps/observability/internal/app/app.go index cce090f42..8741b1068 100644 --- a/apps/observability/internal/app/app.go +++ b/apps/observability/internal/app/app.go @@ -201,7 +201,7 @@ var Module = fx.Module( } if len(pods) == 0 { - // it sends http.StatusTooEarly, for the client to retry request after some time + // INFO: it sends http.StatusTooEarly, for the client to retry request after some time logger.Infof("no pods found") http.Error(w, "no pods found", http.StatusTooEarly) return diff --git a/apps/observability/internal/framework/framework.go b/apps/observability/internal/framework/framework.go index 9fa487961..417e9f0da 100644 --- a/apps/observability/internal/framework/framework.go +++ b/apps/observability/internal/framework/framework.go @@ -55,7 +55,13 @@ var Module = fx.Module("framework", return http.NewServeMux() }), - fx.Invoke(func(lf fx.Lifecycle, ev *env.Env, mux *http.ServeMux) { + fx.Invoke(func(lf fx.Lifecycle, ev *env.Env, mux *http.ServeMux, logger *slog.Logger) { + mux.HandleFunc("/_healthy", func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + }) + + logger.Info("starting observability api HTTP server on", "port", ev.HttpPort) + server := &http.Server{Addr: fmt.Sprintf(":%d", ev.HttpPort), Handler: mux} lf.Append(fx.Hook{ OnStart: func(context.Context) error { diff --git a/apps/observability/main.go b/apps/observability/main.go index 8539637a2..950d25881 100644 --- a/apps/observability/main.go +++ b/apps/observability/main.go @@ -21,6 +21,9 @@ import ( func main() { var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") + + var debug bool + flag.BoolVar(&debug, "debug", false, "--debug") flag.Parse() ev, err := env.LoadEnv() @@ -45,7 +48,7 @@ func main() { fx.Provide(func() *slog.Logger { return logging.NewSlogLogger(logging.SlogOptions{ ShowCaller: true, - ShowDebugLogs: isDev, + ShowDebugLogs: debug, SetAsDefaultLogger: true, }) }), From c157e0a8ea0b8919a988a244a50e13226efd1090 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Mon, 29 Jul 2024 14:04:32 +0530 Subject: [PATCH 26/89] ci: adds gateway kube proxy to workflow --- .github/actions/build-api-images/action.yml | 23 ++++++++++++++++++++- cmd/gateway-kube-proxy/main.go | 4 ---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/actions/build-api-images/action.yml b/.github/actions/build-api-images/action.yml index c590f123e..4e9eec6db 100644 --- a/.github/actions/build-api-images/action.yml +++ b/.github/actions/build-api-images/action.yml @@ -86,6 +86,10 @@ inputs: description: 'build websocket-server api' default: false + gateway-kube-proxy: + description: 'build gateway kube proxy' + default: false + runs: using: 'composite' steps: @@ -103,7 +107,7 @@ runs: echo "GOCACHE=$GOCACHE" >> $GITHUB_ENV echo "FILES_HASH=${{ hashFiles('**/*.go', '**/go.mod', '**/go.sum')}}" >> $GITHUB_OUTPUT echo "PUSH_IMAGE=false" >> $GITHUB_ENV - if [ "${{ inputs.git_directory }}" != "." ]; then + if [ "$(basename ${{ inputs.git_directory }})" != "." ]; then echo "IMAGE_REPOSITORY_PREFIX=ghcr.io/${{ github.repository }}/$(basename ${{inputs.git_directory}})" >> $GITHUB_ENV else echo "IMAGE_REPOSITORY_PREFIX=ghcr.io/${{ github.repository }}" >> $GITHUB_ENV @@ -430,3 +434,20 @@ runs: run: | task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/websocket-server:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + - name: gateway kube proxy api build cache + if: ${{ inputs.gateway-kube-proxy == 'true' }} + uses: actions/cache@v4 + with: + path: |+ + ${{ env.GOMODCACHE }} + ${{ env.GOCACHE }} + key: go-${{ runner.os }}-gateway-kube-proxy-${{ steps.env-vars.outputs.FILES_HASH }} + save-always: true + restore-keys: go-${{ runner.os }}-gateway-kube-proxy- + + - name: gateway logs proxy + if: ${{ inputs.gateway-kube-proxy == 'true' }} + working-directory: ${{ inputs.git_directory }}/cmd/gateway-kube-proxy + shell: bash + run: | + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/cmd/gateway-kube-proxy:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} diff --git a/cmd/gateway-kube-proxy/main.go b/cmd/gateway-kube-proxy/main.go index 60428a694..5bf13c796 100644 --- a/cmd/gateway-kube-proxy/main.go +++ b/cmd/gateway-kube-proxy/main.go @@ -8,7 +8,6 @@ import ( "strings" "github.com/go-chi/chi/v5" - "github.com/go-chi/chi/v5/middleware" "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/logging" ) @@ -46,8 +45,6 @@ func main() { SilentPaths: []string{}, }) r.Use(httpLogger.Use) - _ = middleware.Logger - // r.Use(middleware.Logger) kloudliteAuthzHeader := "X-Kloudlite-Authz" @@ -65,7 +62,6 @@ func main() { return } - // clusterName := sp[0] clusterName := chi.URLParam(req, "cluster_name") urlh := strings.ReplaceAll(proxyAddr, "{{.CLUSTER_NAME}}", clusterName) From 5ac5cf9622b79f94776b9a4a38a1dd5aa61a7dd4 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Mon, 29 Jul 2024 14:39:34 +0530 Subject: [PATCH 27/89] ci: adds gateway-kube-proxy to workflow --- .github/workflows/building-with-nix.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/building-with-nix.yml b/.github/workflows/building-with-nix.yml index 1fdc31721..5462b6bc2 100644 --- a/.github/workflows/building-with-nix.yml +++ b/.github/workflows/building-with-nix.yml @@ -46,6 +46,7 @@ jobs: - name: tenant-agent - name: webhook-api - name: websocket-server-api + - name: gateway-kube-proxy runs-on: ubuntu-latest name: ${{ matrix.images.name }} @@ -79,4 +80,4 @@ jobs: tenant-agent: ${{ matrix.images.name == 'tenant-agent' }} webhook-api: ${{ matrix.images.name == 'webhook-api' }} websocket-server-api: ${{ matrix.images.name == 'websocket-server-api' }} - + gateway-kube-proxy: ${{ matrix.images.name == 'gateway-kube-proxy' }} From 5ae3d3151c4a0e31e344d3f46a525504d86e888c Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 6 Aug 2024 12:23:24 +0530 Subject: [PATCH 28/89] fix(clone-environment): also clones imported managed resources --- apps/console/internal/app/dns-server.go | 7 +- apps/console/internal/domain/environment.go | 27 +++- .../domain/imported-managed-resource.go | 139 +++++++++++------- apps/console/internal/domain/secret.go | 17 ++- apps/console/internal/entities/secret.go | 8 +- apps/iam/main.go | 2 +- pkg/logging/slog-logger.go | 5 + 7 files changed, 133 insertions(+), 72 deletions(-) diff --git a/apps/console/internal/app/dns-server.go b/apps/console/internal/app/dns-server.go index 5ad42ef95..603310786 100644 --- a/apps/console/internal/app/dns-server.go +++ b/apps/console/internal/app/dns-server.go @@ -66,11 +66,16 @@ func (h *dnsHandler) resolver(ctx context.Context, domain string, qtype uint16) m.RecursionDesired = true question := m.Question[0] - sp := strings.SplitN(question.Name, fmt.Sprintf(".%s", h.kloudliteDNSSuffix), 2) + sp := strings.SplitN(strings.ToLower(question.Name), fmt.Sprintf(".%s", h.kloudliteDNSSuffix), 2) if len(sp) < 2 { return nil, fmt.Errorf("failed to split into 2 over .%s", h.kloudliteDNSSuffix) } + if strings.HasSuffix(sp[0], ".local") { + // INFO: domains ending with .local are supposed to be reserved for local machine only + return h.newRR(question.Name, 7*24*60*60, "127.0.0.1") + } + comps := strings.Split(sp[0], ".") accountName := comps[len(comps)-1] hostname := strings.Join(comps[:len(comps)-1], ".") diff --git a/apps/console/internal/domain/environment.go b/apps/console/internal/domain/environment.go index ce18b88ce..476941dda 100644 --- a/apps/console/internal/domain/environment.go +++ b/apps/console/internal/domain/environment.go @@ -319,8 +319,13 @@ func (d *domain) CloneEnvironment(ctx ConsoleContext, args CloneEnvironmentArgs) } secrets, err := d.secretRepo.Find(ctx, repos.Query{ - Filter: filters, - Sort: nil, + Filter: d.secretRepo.MergeMatchFilters(filters, map[string]repos.MatchFilter{ + fc.SecretFor: { + MatchType: repos.MatchTypeExact, + Exact: nil, + }, + }), + Sort: nil, }) if err != nil { return nil, errors.NewE(err) @@ -333,6 +338,7 @@ func (d *domain) CloneEnvironment(ctx ConsoleContext, args CloneEnvironmentArgs) if err != nil { return nil, errors.NewE(err) } + routers, err := d.routerRepo.Find(ctx, repos.Query{ Filter: filters, Sort: nil, @@ -341,6 +347,14 @@ func (d *domain) CloneEnvironment(ctx ConsoleContext, args CloneEnvironmentArgs) return nil, errors.NewE(err) } + mresources, err := d.importedMresRepo.Find(ctx, repos.Query{ + Filter: filters, + Sort: nil, + }) + if err != nil { + return nil, errors.NewE(err) + } + resourceMetadata := func(dn string) common.ResourceMetadata { return common.ResourceMetadata{ DisplayName: dn, @@ -449,6 +463,15 @@ func (d *domain) CloneEnvironment(ctx ConsoleContext, args CloneEnvironmentArgs) } } + for i := range mresources { + if _, err := d.createAndApplyImportedManagedResource(resCtx, CreateAndApplyImportedManagedResourceArgs{ + ImportedManagedResourceName: mresources[i].Name, + ManagedResourceRefID: mresources[i].ManagedResourceRef.ID, + }); err != nil { + return nil, err + } + } + if err := d.syncImagePullSecretsToEnvironment(ctx, args.DestinationEnvName); err != nil { return nil, err } diff --git a/apps/console/internal/domain/imported-managed-resource.go b/apps/console/internal/domain/imported-managed-resource.go index 810850f82..18f1796e5 100644 --- a/apps/console/internal/domain/imported-managed-resource.go +++ b/apps/console/internal/domain/imported-managed-resource.go @@ -23,63 +23,12 @@ func (d *domain) ImportManagedResource(ctx ManagedResourceContext, mresName stri return nil, errors.Newf("synced output secret not found") } - outputSecret := mr.SyncedOutputSecretRef - - outputSecret.ObjectMeta = metav1.ObjectMeta{ - Name: importName, - Namespace: d.getEnvironmentTargetNamespace(*ctx.EnvironmentName), - } - - imr, err := d.importedMresRepo.Create(ctx, &entities.ImportedManagedResource{ - Name: importName, - ManagedResourceRef: entities.ManagedResourceRef{ - ID: mr.Id, - Name: mresName, - Namespace: mr.Namespace, - }, - SecretRef: common_types.SecretRef{ - Name: importName, - Namespace: outputSecret.Namespace, - }, - ResourceMetadata: common.ResourceMetadata{ - DisplayName: importName, - CreatedBy: common.CreatedOrUpdatedBy{ - UserId: ctx.UserId, - UserName: ctx.UserName, - UserEmail: ctx.UserEmail, - }, - LastUpdatedBy: common.CreatedOrUpdatedBy{ - UserId: ctx.UserId, - UserName: ctx.UserName, - UserEmail: ctx.UserEmail, - }, - }, - AccountName: ctx.AccountName, - EnvironmentName: *ctx.EnvironmentName, - SyncStatus: t.GenSyncStatus(t.SyncActionApply, mr.RecordVersion), - }) - if err != nil { - return nil, errors.NewE(err) - } - - if _, err := d.createSecret(ResourceContext{ConsoleContext: ctx.ConsoleContext, EnvironmentName: *ctx.EnvironmentName}, entities.Secret{ - Secret: *outputSecret, - AccountName: ctx.AccountName, - EnvironmentName: *ctx.EnvironmentName, - For: &entities.SecretCreatedFor{ - RefId: imr.Id, - ResourceType: entities.ResourceTypeImportedManagedResource, - Name: mresName, - Namespace: mr.Namespace, - }, - IsReadOnly: true, - }); err != nil { - return nil, errors.NewE(err) - } - - d.resourceEventPublisher.PublishEnvironmentResourceEvent(ctx.ConsoleContext, imr.EnvironmentName, entities.ResourceTypeManagedResource, imr.ManagedResourceRef.Name, PublishUpdate) - - return imr, nil + return d.createAndApplyImportedManagedResource( + ResourceContext{ConsoleContext: ctx.ConsoleContext, EnvironmentName: *ctx.EnvironmentName}, + CreateAndApplyImportedManagedResourceArgs{ + ImportedManagedResourceName: importName, + ManagedResourceRefID: mr.Id, + }) } func (d *domain) DeleteImportedManagedResource(ctx ResourceContext, importName string) error { @@ -150,6 +99,82 @@ func (d *domain) findImportedMRes(ctx ResourceContext, importName string) (*enti return imr, nil } +type CreateAndApplyImportedManagedResourceArgs struct { + ImportedManagedResourceName string + ManagedResourceRefID repos.ID +} + +func (d *domain) createAndApplyImportedManagedResource(ctx ResourceContext, args CreateAndApplyImportedManagedResourceArgs) (*entities.ImportedManagedResource, error) { + mr, err := d.mresRepo.FindById(ctx, args.ManagedResourceRefID) + if err != nil { + return nil, err + } + + if mr.SyncedOutputSecretRef == nil { + return nil, errors.Newf("synced output secret not found") + } + + outputSecret := mr.SyncedOutputSecretRef + + envTargetNamespace := d.getEnvironmentTargetNamespace(ctx.EnvironmentName) + + outputSecret.ObjectMeta = metav1.ObjectMeta{ + Name: args.ImportedManagedResourceName, + Namespace: envTargetNamespace, + } + + imr, err := d.importedMresRepo.Create(ctx, &entities.ImportedManagedResource{ + Name: args.ImportedManagedResourceName, + ManagedResourceRef: entities.ManagedResourceRef{ + ID: mr.Id, + Name: mr.Name, + Namespace: mr.Namespace, + }, + SecretRef: common_types.SecretRef{ + Name: args.ImportedManagedResourceName, + Namespace: envTargetNamespace, + }, + ResourceMetadata: common.ResourceMetadata{ + DisplayName: args.ImportedManagedResourceName, + CreatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + }, + LastUpdatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + }, + }, + AccountName: ctx.AccountName, + EnvironmentName: ctx.EnvironmentName, + SyncStatus: t.GenSyncStatus(t.SyncActionApply, mr.RecordVersion), + }) + if err != nil { + return nil, errors.NewE(err) + } + + if _, err := d.createSecret(ctx, entities.Secret{ + Secret: *outputSecret, + AccountName: ctx.AccountName, + EnvironmentName: ctx.EnvironmentName, + For: &entities.SecretCreatedFor{ + RefId: imr.Id, + ResourceType: entities.ResourceTypeImportedManagedResource, + Name: imr.Name, + Namespace: mr.Namespace, + }, + IsReadOnly: true, + }); err != nil { + return nil, errors.NewE(err) + } + + d.resourceEventPublisher.PublishEnvironmentResourceEvent(ctx.ConsoleContext, imr.EnvironmentName, entities.ResourceTypeImportedManagedResource, imr.Name, PublishUpdate) + + return imr, nil +} + func (d *domain) OnImportedManagedResourceDeleteMessage(ctx ConsoleContext, imrId repos.ID) error { return d.importedMresRepo.DeleteById(ctx, imrId) } diff --git a/apps/console/internal/domain/secret.go b/apps/console/internal/domain/secret.go index 492e25c90..87194c51d 100644 --- a/apps/console/internal/domain/secret.go +++ b/apps/console/internal/domain/secret.go @@ -250,17 +250,20 @@ func (d *domain) deleteSecret(ctx ResourceContext, name string) error { return errors.NewE(err) } - usecret, err := d.secretRepo.Patch( - ctx, - ctx.DBFilters().Add(fields.MetadataName, name), - common.PatchForMarkDeletion(), - ) + defer func() { + d.resourceEventPublisher.PublishResourceEvent(ctx, entities.ResourceTypeSecret, name, PublishUpdate) + }() + + filters := ctx.DBFilters().Add(fields.MetadataName, name) + + usecret, err := d.secretRepo.Patch(ctx, filters, common.PatchForMarkDeletion()) if err != nil { + if errors.Is(err, repos.ErrNoDocuments) { + return nil + } return errors.NewE(err) } - d.resourceEventPublisher.PublishResourceEvent(ctx, entities.ResourceTypeSecret, usecret.Name, PublishUpdate) - if err := d.deleteK8sResource(ctx, usecret.EnvironmentName, &usecret.Secret); err != nil { if errors.Is(err, ErrNoClusterAttached) { return d.secretRepo.DeleteById(ctx, usecret.Id) diff --git a/apps/console/internal/entities/secret.go b/apps/console/internal/entities/secret.go index 5bcb1fb2b..133c62709 100644 --- a/apps/console/internal/entities/secret.go +++ b/apps/console/internal/entities/secret.go @@ -27,10 +27,10 @@ type Secret struct { } type SecretCreatedFor struct { - RefId repos.ID `json:"refId"` - ResourceType ResourceType `json:"resourceType"` - Name string `json:"name"` - Namespace string `json:"namespace"` + RefId repos.ID `json:"refId"` + ResourceType ResourceType `json:"resourceType"` + Name string `json:"name"` + Namespace string `json:"namespace"` } func (s *Secret) GetDisplayName() string { diff --git a/apps/iam/main.go b/apps/iam/main.go index b6594807e..2e356368a 100644 --- a/apps/iam/main.go +++ b/apps/iam/main.go @@ -28,6 +28,7 @@ func main() { fx.Provide(func() logging.Logger { return logger }), + fx.Provide(func() (*env.Env, error) { return env.LoadEnv() }), @@ -45,5 +46,4 @@ func main() { common.PrintReadyBanner() <-app.Done() - } diff --git a/pkg/logging/slog-logger.go b/pkg/logging/slog-logger.go index 1e0e02d29..2b220328a 100644 --- a/pkg/logging/slog-logger.go +++ b/pkg/logging/slog-logger.go @@ -21,6 +21,11 @@ type SlogOptions struct { } func NewSlogLogger(opts SlogOptions) *slog.Logger { + // INFO: force colored output, otherwise honor the env-var `CLICOLOR_FORCE` + if _, ok := os.LookupEnv("CLICOLOR_FORCE"); !ok { + os.Setenv("CLICOLOR_FORCE", "1") + } + if opts.Writer == nil { opts.Writer = os.Stderr } From 06d4f4b0fd453d75e3507890f1a3f162bac10c0a Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Fri, 16 Aug 2024 15:57:08 +0530 Subject: [PATCH 29/89] sending contact us email and details in discord channel --- apps/auth/internal/app/app.go | 10 +- apps/auth/internal/domain/domain.go | 1 - .../email-templates/contact-us/email.html | 182 ++++++++++++++++++ .../email-templates/contact-us/email.mjml | 35 ++++ .../email-templates/contact-us/email.txt | 10 + apps/comms/internal/app/grpc-server.go | 30 +++ apps/comms/internal/domain/mail-parser.go | 7 + apps/webhook/Taskfile.yml | 7 + apps/webhook/internal/app/app.go | 13 ++ apps/webhook/internal/app/git-webhook.go | 50 ++++- apps/webhook/internal/domain/api.go | 18 ++ apps/webhook/internal/domain/domain.go | 42 ++++ apps/webhook/internal/env/env.go | 3 + apps/webhook/internal/framework/main.go | 6 + go.mod | 1 - go.sum | 9 - grpc-interfaces/comms.proto | 10 + .../kloudlite.io/rpc/comms/comms.pb.go | 153 +++++++++++++-- .../kloudlite.io/rpc/comms/comms_grpc.pb.go | 37 ++++ 19 files changed, 588 insertions(+), 36 deletions(-) create mode 100644 apps/comms/email-templates/contact-us/email.html create mode 100644 apps/comms/email-templates/contact-us/email.mjml create mode 100644 apps/comms/email-templates/contact-us/email.txt create mode 100644 apps/webhook/internal/domain/api.go create mode 100644 apps/webhook/internal/domain/domain.go diff --git a/apps/auth/internal/app/app.go b/apps/auth/internal/app/app.go index a73d828f4..6a1efe60e 100644 --- a/apps/auth/internal/app/app.go +++ b/apps/auth/internal/app/app.go @@ -2,17 +2,12 @@ package app import ( "context" - "github.com/kloudlite/api/apps/auth/internal/entities" - "github.com/99designs/gqlgen/graphql" "github.com/gofiber/fiber/v2" - "github.com/kloudlite/api/pkg/nats" - "go.uber.org/fx" - "google.golang.org/grpc" - "github.com/kloudlite/api/apps/auth/internal/app/graph" "github.com/kloudlite/api/apps/auth/internal/app/graph/generated" "github.com/kloudlite/api/apps/auth/internal/domain" + "github.com/kloudlite/api/apps/auth/internal/entities" "github.com/kloudlite/api/apps/auth/internal/env" "github.com/kloudlite/api/common" "github.com/kloudlite/api/constants" @@ -20,7 +15,10 @@ import ( "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/comms" httpServer "github.com/kloudlite/api/pkg/http-server" "github.com/kloudlite/api/pkg/kv" + "github.com/kloudlite/api/pkg/nats" "github.com/kloudlite/api/pkg/repos" + "go.uber.org/fx" + "google.golang.org/grpc" ) type CommsClientConnection *grpc.ClientConn diff --git a/apps/auth/internal/domain/domain.go b/apps/auth/internal/domain/domain.go index 7419a7bab..b752dd56a 100644 --- a/apps/auth/internal/domain/domain.go +++ b/apps/auth/internal/domain/domain.go @@ -3,7 +3,6 @@ package domain import ( "context" "github.com/kloudlite/api/apps/auth/internal/entities" - "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/repos" ) diff --git a/apps/comms/email-templates/contact-us/email.html b/apps/comms/email-templates/contact-us/email.html new file mode 100644 index 000000000..a4a7b7c79 --- /dev/null +++ b/apps/comms/email-templates/contact-us/email.html @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ +
+ + + + + + + +
+ + + + + + +
+ +
+
+
+ +
+
+ +
+ + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + +
+
Hello {{.Name}},
+
+
I’m Karthik, the founder of Kloudlite Inc and I’d like to personally thank you for contacting us.
+
+
We have received your details and our team will get back to you shortly.
+
+
I’d love to hear what you think of our product and if there is anything we can improve. If you have any questions, please reply to this email. I’m always happy to help!
+
+
Best Regards,
+
+
Karthik
+
+
+ +
+
+ +
+ + + diff --git a/apps/comms/email-templates/contact-us/email.mjml b/apps/comms/email-templates/contact-us/email.mjml new file mode 100644 index 000000000..adaca51e4 --- /dev/null +++ b/apps/comms/email-templates/contact-us/email.mjml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + Hello {{.Name}}, + + + I’m Karthik, the founder of Kloudlite Inc and I’d like to personally thank you for contacting us. + + + We have received your details and our team will get back to you shortly. + + + I’d love to hear what you think of our product and if there is anything we can improve. If you have any questions, please reply to this email. I’m always happy to help! + + + Best Regards, + + + Karthik + + + + + + diff --git a/apps/comms/email-templates/contact-us/email.txt b/apps/comms/email-templates/contact-us/email.txt new file mode 100644 index 000000000..ddd45ac84 --- /dev/null +++ b/apps/comms/email-templates/contact-us/email.txt @@ -0,0 +1,10 @@ +Hello {{.Name}}, + +I’m Karthik, the founder of Kloudlite Inc and I’d like to personally thank you for contacting us. + +We have received your details and our team will get back to you shortly. + +I’d love to hear what you think of our product and if there is anything we can improve. If you have any questions, please reply to this email. I’m always happy to help! + +Best Regards, +Karthik diff --git a/apps/comms/internal/app/grpc-server.go b/apps/comms/internal/app/grpc-server.go index 9e9a88e64..c861d553c 100644 --- a/apps/comms/internal/app/grpc-server.go +++ b/apps/comms/internal/app/grpc-server.go @@ -206,6 +206,36 @@ func (r *commsSvc) SendVerificationEmail(ctx context.Context, input *comms.Verif } return &comms.Void{}, nil } + +func (r *commsSvc) SendContactUsEmail(ctx context.Context, input *comms.SendContactUsEmailInput) (*comms.Void, error) { + plainText := new(bytes.Buffer) + args := map[string]any{ + "Name": func() string { + if input.Name != "" { + return input.Name + } + return "there" + }(), + "CompanyName": input.CompanyName, + "Country": input.Country, + "Message": input.Message, + } + + if err := r.eTemplattes.ContactUsEmail.PlainText.Execute(plainText, args); err != nil { + return nil, errors.NewEf(err, "failed to execute plain text template") + } + + html := new(bytes.Buffer) + if err := r.eTemplattes.ContactUsEmail.Html.Execute(html, args); err != nil { + return nil, errors.NewEf(err, "failed to execute html template") + } + + if err := r.sendSupportEmail(ctx, r.eTemplattes.ContactUsEmail.Subject, input.Email, input.Name, plainText.String(), html.String()); err != nil { + return nil, errors.NewE(err) + } + return &comms.Void{}, nil +} + func newCommsSvc(mailer mail.Mailer, ev *env.Env, et *domain.EmailTemplates) comms.CommsServer { return &commsSvc{ mailer: mailer, diff --git a/apps/comms/internal/domain/mail-parser.go b/apps/comms/internal/domain/mail-parser.go index 5f4ad5a18..9a2deaa4f 100644 --- a/apps/comms/internal/domain/mail-parser.go +++ b/apps/comms/internal/domain/mail-parser.go @@ -26,6 +26,7 @@ type EmailTemplates struct { WelcomeEmail *EmailTemplate WaitingEmail *EmailTemplate AlertEmail *EmailTemplate + ContactUsEmail *EmailTemplate } func parseMailTemplate(et EmailTemplatesDir, templateName string, subject string) (*EmailTemplate, error) { @@ -85,6 +86,11 @@ func GetEmailTemplates(et EmailTemplatesDir) (*EmailTemplates, error) { return nil, err } + contactUs, err := parseMailTemplate(et, "contact-us", "[Kloudlite] Contact Us") + if err != nil { + return nil, err + } + alert, err := parseMailTemplate(et, "alert", "[Kloudlite] Console Notification") return &EmailTemplates{ @@ -94,6 +100,7 @@ func GetEmailTemplates(et EmailTemplatesDir) (*EmailTemplates, error) { UserVerificationEmail: userVerification, WelcomeEmail: welcome, WaitingEmail: waiting, + ContactUsEmail: contactUs, AlertEmail: alert, }, nil } diff --git a/apps/webhook/Taskfile.yml b/apps/webhook/Taskfile.yml index ff19ddbd8..d1f49b09b 100644 --- a/apps/webhook/Taskfile.yml +++ b/apps/webhook/Taskfile.yml @@ -24,6 +24,13 @@ tasks: out: "{{.binary}}-{{.GOARCH}}" GOARCH: "{{.GOARCH}}" + webhook:run: + dotenv: + - .secrets/env + cmds: + - go build -o bin/webhook . + - ./bin/webhook --dev + container:build-and-push: requires: vars: diff --git a/apps/webhook/internal/app/app.go b/apps/webhook/internal/app/app.go index 9e74243b0..fc053d5e4 100644 --- a/apps/webhook/internal/app/app.go +++ b/apps/webhook/internal/app/app.go @@ -1,17 +1,30 @@ package app import ( + "github.com/kloudlite/api/apps/webhook/internal/domain" + "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/comms" + "github.com/kloudlite/api/pkg/grpc" "github.com/kloudlite/api/pkg/messaging" msgnats "github.com/kloudlite/api/pkg/messaging/nats" "github.com/kloudlite/api/pkg/nats" "go.uber.org/fx" ) +type CommsGrpcClient grpc.Client + var Module = fx.Module( "app", fx.Provide(func(client *nats.JetstreamClient) messaging.Producer { return msgnats.NewJetstreamProducer(client) }), + fx.Provide( + func(conn CommsGrpcClient) comms.CommsClient { + return comms.NewCommsClient(conn) + }, + ), + + domain.Module, + LoadGitWebhook(), ) diff --git a/apps/webhook/internal/app/git-webhook.go b/apps/webhook/internal/app/git-webhook.go index d4d8c9fac..67c9b8383 100644 --- a/apps/webhook/internal/app/git-webhook.go +++ b/apps/webhook/internal/app/git-webhook.go @@ -1,11 +1,13 @@ package app import ( + "bytes" "crypto/hmac" "crypto/sha256" "encoding/hex" "encoding/json" "fmt" + "github.com/kloudlite/api/apps/webhook/internal/domain" "github.com/kloudlite/api/common" "github.com/kloudlite/api/constants" httpServer "github.com/kloudlite/api/pkg/http-server" @@ -102,8 +104,54 @@ func gitRepoUrl(provider string, hookBody []byte) (string, error) { func LoadGitWebhook() fx.Option { return fx.Invoke( - func(server httpServer.Server, envVars *env.Env, producer messaging.Producer, logr logging.Logger) error { + func(server httpServer.Server, envVars *env.Env, producer messaging.Producer, logr logging.Logger, d domain.Domain) error { app := server.Raw() + + app.Get("/healthy", func(c *fiber.Ctx) error { + return c.SendString("OK") + }) + + app.Post("/contact-us", func(ctx *fiber.Ctx) error { + var data *domain.ContactUsData + + if err := ctx.BodyParser(&data); err != nil { + return ctx.Status(fiber.StatusBadRequest).JSON(fiber.Map{"error": "Invalid request payload"}) + } + + err := d.SendContactUsEmail(ctx.Context(), data) + if err != nil { + return errors.NewE(err) + } + + discordMessage := fmt.Sprintf( + ""+ + "🚨 **NEW CONTACT US SUBMISSION** 🚨\n**Name:** %s\n**Email:** %s\n**Mobile:** %d\n**Company:** %s\n**Country:** %s\n**Message:** %s\n", + data.Name, data.Email, data.MobileNumber, data.CompanyName, data.Country, data.Message, + ) + + payload := map[string]string{ + "content": discordMessage, + } + + payloadBytes, err := json.Marshal(payload) + if err != nil { + return ctx.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Failed to marshal Discord payload"}) + } + + discordWebhookURL := envVars.DiscordWebhookUrl + resp, err := http.Post(discordWebhookURL, "application/json", bytes.NewBuffer(payloadBytes)) + if err != nil { + return ctx.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Failed to send message to Discord"}) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusNoContent { + return ctx.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Discord API returned an error"}) + } + + return ctx.Status(fiber.StatusOK).JSON(fiber.Map{"success": true}) + }) + app.Post( "/git/:provider", func(ctx *fiber.Ctx) error { logger := logr.WithName("git-webhook") diff --git a/apps/webhook/internal/domain/api.go b/apps/webhook/internal/domain/api.go new file mode 100644 index 000000000..88d703de2 --- /dev/null +++ b/apps/webhook/internal/domain/api.go @@ -0,0 +1,18 @@ +package domain + +import ( + "context" +) + +type ContactUsData struct { + Name string `json:"name"` + Email string `json:"email"` + MobileNumber int64 `json:"mobileNumber"` + CompanyName string `json:"CompanyName"` + Country string `json:"country"` + Message string `json:"message"` +} + +type Domain interface { + SendContactUsEmail(ctx context.Context, contactUsData *ContactUsData) error +} diff --git a/apps/webhook/internal/domain/domain.go b/apps/webhook/internal/domain/domain.go new file mode 100644 index 000000000..00fca3321 --- /dev/null +++ b/apps/webhook/internal/domain/domain.go @@ -0,0 +1,42 @@ +package domain + +import ( + "context" + "github.com/kloudlite/api/apps/webhook/internal/env" + "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/comms" + "github.com/kloudlite/api/pkg/errors" + "go.uber.org/fx" +) + +type domain struct { + env *env.Env + commsClient comms.CommsClient +} + +func (d *domain) SendContactUsEmail(ctx context.Context, contactUsData *ContactUsData) error { + _, err := d.commsClient.SendContactUsEmail(ctx, &comms.SendContactUsEmailInput{ + Email: contactUsData.Email, + Name: contactUsData.Name, + CompanyName: contactUsData.CompanyName, + Country: contactUsData.Country, + Message: contactUsData.Message, + MobileNumber: contactUsData.MobileNumber, + }) + if err != nil { + return errors.NewE(err) + } + + return nil +} + +var Module = fx.Module("domain", + fx.Provide(func( + env *env.Env, + commsClient comms.CommsClient, + ) (Domain, error) { + return &domain{ + env: env, + commsClient: commsClient, + }, nil + }), +) diff --git a/apps/webhook/internal/env/env.go b/apps/webhook/internal/env/env.go index 190c34bf0..a3ee6688b 100644 --- a/apps/webhook/internal/env/env.go +++ b/apps/webhook/internal/env/env.go @@ -9,4 +9,7 @@ type Env struct { GithubAuthzSecret string `env:"GITHUB_AUTHZ_SECRET" required:"false"` GitlabAuthzSecret string `env:"GITLAB_AUTHZ_SECRET" required:"false"` NatsURL string `env:"NATS_URL" required:"false"` + + CommsService string `env:"COMMS_SERVICE" required:"true"` + DiscordWebhookUrl string `env:"DISCORD_WEBHOOK_URL" required:"false"` } diff --git a/apps/webhook/internal/framework/main.go b/apps/webhook/internal/framework/main.go index 3dbe45dec..3627c7730 100644 --- a/apps/webhook/internal/framework/main.go +++ b/apps/webhook/internal/framework/main.go @@ -3,6 +3,7 @@ package framework import ( "context" "fmt" + "github.com/kloudlite/api/pkg/grpc" "log/slog" "github.com/kloudlite/api/apps/webhook/internal/app" @@ -61,5 +62,10 @@ var Module = fx.Module( }, }) }), + + fx.Provide(func(ev *env.Env) (app.CommsGrpcClient, error) { + return grpc.NewGrpcClient(ev.CommsService) + }), + app.Module, ) diff --git a/go.mod b/go.mod index 291c7ebe9..9098e4b8e 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,6 @@ require ( github.com/kloudlite/operator v0.0.0-20240725140628-a3dbbc898710 github.com/matoous/go-nanoid/v2 v2.0.0 github.com/pkg/errors v0.9.1 - github.com/rs/zerolog v1.29.1 github.com/sendgrid/sendgrid-go v3.11.1+incompatible github.com/vektah/gqlparser/v2 v2.5.16 github.com/xanzy/go-gitlab v0.63.0 diff --git a/go.sum b/go.sum index 13efacb0d..1e170c254 100644 --- a/go.sum +++ b/go.sum @@ -46,7 +46,6 @@ github.com/charmbracelet/log v0.4.0 h1:G9bQAcx8rWA2T3pWvx7YtPTPwgqpk7D68BX21IRW8 github.com/charmbracelet/log v0.4.0/go.mod h1:63bXt/djrizTec0l11H20t8FDSvA4CRZJ1KH22MdptM= github.com/codingconcepts/env v0.0.0-20200821220118-a8fbf8d84482 h1:5/aEFreBh9hH/0G+33xtczJCvMaulqsm9nDuu2BZUEo= github.com/codingconcepts/env v0.0.0-20200821220118-a8fbf8d84482/go.mod h1:TM9ug+H/2cI3EjyIDr5xKCkFGyNE59URgH1wu5NyU8E= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -94,7 +93,6 @@ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEe github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofiber/adaptor/v2 v2.1.23 h1:VG0yAPnB2EJZjxy4Ul+Ra9e92PnqwXE97SUVuPGuoAA= github.com/gofiber/adaptor/v2 v2.1.23/go.mod h1:hnYEQBPF2x1JaBHygutJJF5d0+J2eYnKKsUMCSsfxKk= github.com/gofiber/fiber/v2 v2.32.0/go.mod h1:CMy5ZLiXkn6qwthrl03YMyW1NLfj0rhxz2LKl4t7ZTY= @@ -194,10 +192,8 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/matoous/go-nanoid v1.5.0/go.mod h1:zyD2a71IubI24efhpvkJz+ZwfwagzgSO6UNiFsZKN7U= github.com/matoous/go-nanoid/v2 v2.0.0 h1:d19kur2QuLeHmJBkvYkFdhFBzLoo1XVm2GgTpL+9Tj0= github.com/matoous/go-nanoid/v2 v2.0.0/go.mod h1:FtS4aGPVfEkxKxhdWPAspZpZSh1cOjtM7Ej/So3hR0g= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= @@ -262,9 +258,6 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= @@ -407,8 +400,6 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/grpc-interfaces/comms.proto b/grpc-interfaces/comms.proto index 7ee2785ea..e678b0629 100644 --- a/grpc-interfaces/comms.proto +++ b/grpc-interfaces/comms.proto @@ -9,6 +9,7 @@ service Comms { rpc SendProjectMemberInviteEmail(ProjectMemberInviteEmailInput) returns (Void); rpc SendWelcomeEmail(WelcomeEmailInput) returns (Void); rpc SendWaitingEmail(WelcomeEmailInput) returns (Void); + rpc SendContactUsEmail(SendContactUsEmailInput) returns (Void); } message VerificationEmailInput{ @@ -44,5 +45,14 @@ message ProjectMemberInviteEmailInput{ string name = 5; } +message SendContactUsEmailInput{ + string email = 1; + string name = 2; + string companyName = 3; + string country = 4; + int64 mobileNumber = 5; + string message = 6; +} + message Void{ } diff --git a/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go b/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go index cde4c60ca..2fcdace2b 100644 --- a/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go @@ -359,6 +359,93 @@ func (x *ProjectMemberInviteEmailInput) GetName() string { return "" } +type SendContactUsEmailInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + CompanyName string `protobuf:"bytes,3,opt,name=companyName,proto3" json:"companyName,omitempty"` + Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"` + MobileNumber int64 `protobuf:"varint,5,opt,name=mobileNumber,proto3" json:"mobileNumber,omitempty"` + Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *SendContactUsEmailInput) Reset() { + *x = SendContactUsEmailInput{} + if protoimpl.UnsafeEnabled { + mi := &file_comms_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendContactUsEmailInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendContactUsEmailInput) ProtoMessage() {} + +func (x *SendContactUsEmailInput) ProtoReflect() protoreflect.Message { + mi := &file_comms_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendContactUsEmailInput.ProtoReflect.Descriptor instead. +func (*SendContactUsEmailInput) Descriptor() ([]byte, []int) { + return file_comms_proto_rawDescGZIP(), []int{5} +} + +func (x *SendContactUsEmailInput) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *SendContactUsEmailInput) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SendContactUsEmailInput) GetCompanyName() string { + if x != nil { + return x.CompanyName + } + return "" +} + +func (x *SendContactUsEmailInput) GetCountry() string { + if x != nil { + return x.Country + } + return "" +} + +func (x *SendContactUsEmailInput) GetMobileNumber() int64 { + if x != nil { + return x.MobileNumber + } + return 0 +} + +func (x *SendContactUsEmailInput) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + type Void struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -368,7 +455,7 @@ type Void struct { func (x *Void) Reset() { *x = Void{} if protoimpl.UnsafeEnabled { - mi := &file_comms_proto_msgTypes[5] + mi := &file_comms_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -381,7 +468,7 @@ func (x *Void) String() string { func (*Void) ProtoMessage() {} func (x *Void) ProtoReflect() protoreflect.Message { - mi := &file_comms_proto_msgTypes[5] + mi := &file_comms_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -394,7 +481,7 @@ func (x *Void) ProtoReflect() protoreflect.Message { // Deprecated: Use Void.ProtoReflect.Descriptor instead. func (*Void) Descriptor() ([]byte, []int) { - return file_comms_proto_rawDescGZIP(), []int{5} + return file_comms_proto_rawDescGZIP(), []int{6} } var File_comms_proto protoreflect.FileDescriptor @@ -441,7 +528,19 @@ var file_comms_proto_rawDesc = []byte{ 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x06, 0x0a, 0x04, 0x56, 0x6f, 0x69, 0x64, 0x32, 0xe7, 0x02, 0x0a, 0x05, 0x43, 0x6f, 0x6d, 0x6d, + 0xbd, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x55, + 0x73, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x6e, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, + 0x06, 0x0a, 0x04, 0x56, 0x6f, 0x69, 0x64, 0x32, 0x9e, 0x03, 0x0a, 0x05, 0x43, 0x6f, 0x6d, 0x6d, 0x73, 0x12, 0x37, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x17, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, @@ -464,9 +563,12 @@ var file_comms_proto_rawDesc = []byte{ 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x2e, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x1a, 0x05, 0x2e, 0x56, 0x6f, 0x69, - 0x64, 0x42, 0x18, 0x5a, 0x16, 0x6b, 0x6c, 0x6f, 0x75, 0x64, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x69, - 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x64, 0x12, 0x35, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, + 0x55, 0x73, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x63, 0x74, 0x55, 0x73, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x70, 0x75, + 0x74, 0x1a, 0x05, 0x2e, 0x56, 0x6f, 0x69, 0x64, 0x42, 0x18, 0x5a, 0x16, 0x6b, 0x6c, 0x6f, 0x75, + 0x64, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x69, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -481,14 +583,15 @@ func file_comms_proto_rawDescGZIP() []byte { return file_comms_proto_rawDescData } -var file_comms_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_comms_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_comms_proto_goTypes = []interface{}{ (*VerificationEmailInput)(nil), // 0: VerificationEmailInput (*WelcomeEmailInput)(nil), // 1: WelcomeEmailInput (*PasswordResetEmailInput)(nil), // 2: PasswordResetEmailInput (*AccountMemberInviteEmailInput)(nil), // 3: AccountMemberInviteEmailInput (*ProjectMemberInviteEmailInput)(nil), // 4: ProjectMemberInviteEmailInput - (*Void)(nil), // 5: Void + (*SendContactUsEmailInput)(nil), // 5: SendContactUsEmailInput + (*Void)(nil), // 6: Void } var file_comms_proto_depIdxs = []int32{ 0, // 0: Comms.SendVerificationEmail:input_type -> VerificationEmailInput @@ -497,14 +600,16 @@ var file_comms_proto_depIdxs = []int32{ 4, // 3: Comms.SendProjectMemberInviteEmail:input_type -> ProjectMemberInviteEmailInput 1, // 4: Comms.SendWelcomeEmail:input_type -> WelcomeEmailInput 1, // 5: Comms.SendWaitingEmail:input_type -> WelcomeEmailInput - 5, // 6: Comms.SendVerificationEmail:output_type -> Void - 5, // 7: Comms.SendPasswordResetEmail:output_type -> Void - 5, // 8: Comms.SendAccountMemberInviteEmail:output_type -> Void - 5, // 9: Comms.SendProjectMemberInviteEmail:output_type -> Void - 5, // 10: Comms.SendWelcomeEmail:output_type -> Void - 5, // 11: Comms.SendWaitingEmail:output_type -> Void - 6, // [6:12] is the sub-list for method output_type - 0, // [0:6] is the sub-list for method input_type + 5, // 6: Comms.SendContactUsEmail:input_type -> SendContactUsEmailInput + 6, // 7: Comms.SendVerificationEmail:output_type -> Void + 6, // 8: Comms.SendPasswordResetEmail:output_type -> Void + 6, // 9: Comms.SendAccountMemberInviteEmail:output_type -> Void + 6, // 10: Comms.SendProjectMemberInviteEmail:output_type -> Void + 6, // 11: Comms.SendWelcomeEmail:output_type -> Void + 6, // 12: Comms.SendWaitingEmail:output_type -> Void + 6, // 13: Comms.SendContactUsEmail:output_type -> Void + 7, // [7:14] is the sub-list for method output_type + 0, // [0:7] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -577,6 +682,18 @@ func file_comms_proto_init() { } } file_comms_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendContactUsEmailInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_comms_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Void); i { case 0: return &v.state @@ -595,7 +712,7 @@ func file_comms_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_comms_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, 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 a8a8a4083..2105b41ad 100644 --- a/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go @@ -25,6 +25,7 @@ const ( Comms_SendProjectMemberInviteEmail_FullMethodName = "/Comms/SendProjectMemberInviteEmail" Comms_SendWelcomeEmail_FullMethodName = "/Comms/SendWelcomeEmail" Comms_SendWaitingEmail_FullMethodName = "/Comms/SendWaitingEmail" + Comms_SendContactUsEmail_FullMethodName = "/Comms/SendContactUsEmail" ) // CommsClient is the client API for Comms service. @@ -37,6 +38,7 @@ type CommsClient interface { SendProjectMemberInviteEmail(ctx context.Context, in *ProjectMemberInviteEmailInput, opts ...grpc.CallOption) (*Void, error) SendWelcomeEmail(ctx context.Context, in *WelcomeEmailInput, opts ...grpc.CallOption) (*Void, error) SendWaitingEmail(ctx context.Context, in *WelcomeEmailInput, opts ...grpc.CallOption) (*Void, error) + SendContactUsEmail(ctx context.Context, in *SendContactUsEmailInput, opts ...grpc.CallOption) (*Void, error) } type commsClient struct { @@ -101,6 +103,15 @@ func (c *commsClient) SendWaitingEmail(ctx context.Context, in *WelcomeEmailInpu return out, nil } +func (c *commsClient) SendContactUsEmail(ctx context.Context, in *SendContactUsEmailInput, opts ...grpc.CallOption) (*Void, error) { + out := new(Void) + err := c.cc.Invoke(ctx, Comms_SendContactUsEmail_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // CommsServer is the server API for Comms service. // All implementations must embed UnimplementedCommsServer // for forward compatibility @@ -111,6 +122,7 @@ type CommsServer interface { SendProjectMemberInviteEmail(context.Context, *ProjectMemberInviteEmailInput) (*Void, error) SendWelcomeEmail(context.Context, *WelcomeEmailInput) (*Void, error) SendWaitingEmail(context.Context, *WelcomeEmailInput) (*Void, error) + SendContactUsEmail(context.Context, *SendContactUsEmailInput) (*Void, error) mustEmbedUnimplementedCommsServer() } @@ -136,6 +148,9 @@ func (UnimplementedCommsServer) SendWelcomeEmail(context.Context, *WelcomeEmailI func (UnimplementedCommsServer) SendWaitingEmail(context.Context, *WelcomeEmailInput) (*Void, error) { return nil, status.Errorf(codes.Unimplemented, "method SendWaitingEmail not implemented") } +func (UnimplementedCommsServer) SendContactUsEmail(context.Context, *SendContactUsEmailInput) (*Void, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendContactUsEmail not implemented") +} func (UnimplementedCommsServer) mustEmbedUnimplementedCommsServer() {} // UnsafeCommsServer may be embedded to opt out of forward compatibility for this service. @@ -257,6 +272,24 @@ func _Comms_SendWaitingEmail_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Comms_SendContactUsEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendContactUsEmailInput) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CommsServer).SendContactUsEmail(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Comms_SendContactUsEmail_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CommsServer).SendContactUsEmail(ctx, req.(*SendContactUsEmailInput)) + } + return interceptor(ctx, in, info, handler) +} + // Comms_ServiceDesc is the grpc.ServiceDesc for Comms service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -288,6 +321,10 @@ var Comms_ServiceDesc = grpc.ServiceDesc{ MethodName: "SendWaitingEmail", Handler: _Comms_SendWaitingEmail_Handler, }, + { + MethodName: "SendContactUsEmail", + Handler: _Comms_SendContactUsEmail_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "comms.proto", From ebd6b6dd5c1e2e2687cd469457d45f2f82f28822 Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Wed, 21 Aug 2024 16:58:57 +0530 Subject: [PATCH 30/89] modified email template for contact us --- .../email-templates/contact-us/email.html | 5 --- .../email-templates/contact-us/email.mjml | 3 -- .../email-templates/contact-us/email.txt | 2 - apps/webhook/internal/app/git-webhook.go | 44 ++++++++++--------- apps/webhook/internal/domain/api.go | 2 +- grpc-interfaces/comms.proto | 2 +- .../kloudlite.io/rpc/comms/comms.pb.go | 8 ++-- 7 files changed, 29 insertions(+), 37 deletions(-) diff --git a/apps/comms/email-templates/contact-us/email.html b/apps/comms/email-templates/contact-us/email.html index a4a7b7c79..3a32602a4 100644 --- a/apps/comms/email-templates/contact-us/email.html +++ b/apps/comms/email-templates/contact-us/email.html @@ -151,11 +151,6 @@
We have received your details and our team will get back to you shortly.
- - -
I’d love to hear what you think of our product and if there is anything we can improve. If you have any questions, please reply to this email. I’m always happy to help!
- -
Best Regards,
diff --git a/apps/comms/email-templates/contact-us/email.mjml b/apps/comms/email-templates/contact-us/email.mjml index adaca51e4..1083e32fb 100644 --- a/apps/comms/email-templates/contact-us/email.mjml +++ b/apps/comms/email-templates/contact-us/email.mjml @@ -19,9 +19,6 @@ We have received your details and our team will get back to you shortly. - - I’d love to hear what you think of our product and if there is anything we can improve. If you have any questions, please reply to this email. I’m always happy to help! - Best Regards, diff --git a/apps/comms/email-templates/contact-us/email.txt b/apps/comms/email-templates/contact-us/email.txt index ddd45ac84..adb60115d 100644 --- a/apps/comms/email-templates/contact-us/email.txt +++ b/apps/comms/email-templates/contact-us/email.txt @@ -4,7 +4,5 @@ I’m Karthik, the founder of Kloudlite Inc and I’d like to personally thank y We have received your details and our team will get back to you shortly. -I’d love to hear what you think of our product and if there is anything we can improve. If you have any questions, please reply to this email. I’m always happy to help! - Best Regards, Karthik diff --git a/apps/webhook/internal/app/git-webhook.go b/apps/webhook/internal/app/git-webhook.go index 67c9b8383..269990ddd 100644 --- a/apps/webhook/internal/app/git-webhook.go +++ b/apps/webhook/internal/app/git-webhook.go @@ -123,30 +123,32 @@ func LoadGitWebhook() fx.Option { return errors.NewE(err) } - discordMessage := fmt.Sprintf( - ""+ - "🚨 **NEW CONTACT US SUBMISSION** 🚨\n**Name:** %s\n**Email:** %s\n**Mobile:** %d\n**Company:** %s\n**Country:** %s\n**Message:** %s\n", - data.Name, data.Email, data.MobileNumber, data.CompanyName, data.Country, data.Message, - ) - - payload := map[string]string{ - "content": discordMessage, - } + discordWebhookURL := envVars.DiscordWebhookUrl + if discordWebhookURL != "" { + discordMessage := fmt.Sprintf( + ""+ + "🚨 **NEW CONTACT US SUBMISSION** 🚨\n**Name:** %s\n**Email:** %s\n**Mobile:** %s\n**Company:** %s\n**Country:** %s\n**Message:** %s\n", + data.Name, data.Email, data.MobileNumber, data.CompanyName, data.Country, data.Message, + ) + + payload := map[string]string{ + "content": discordMessage, + } - payloadBytes, err := json.Marshal(payload) - if err != nil { - return ctx.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Failed to marshal Discord payload"}) - } + payloadBytes, err := json.Marshal(payload) + if err != nil { + return ctx.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Failed to marshal Discord payload"}) + } - discordWebhookURL := envVars.DiscordWebhookUrl - resp, err := http.Post(discordWebhookURL, "application/json", bytes.NewBuffer(payloadBytes)) - if err != nil { - return ctx.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Failed to send message to Discord"}) - } - defer resp.Body.Close() + resp, err := http.Post(discordWebhookURL, "application/json", bytes.NewBuffer(payloadBytes)) + if err != nil { + return ctx.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Failed to send message to Discord"}) + } + defer resp.Body.Close() - if resp.StatusCode != http.StatusNoContent { - return ctx.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Discord API returned an error"}) + if resp.StatusCode != http.StatusNoContent { + return ctx.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Discord API returned an error"}) + } } return ctx.Status(fiber.StatusOK).JSON(fiber.Map{"success": true}) diff --git a/apps/webhook/internal/domain/api.go b/apps/webhook/internal/domain/api.go index 88d703de2..e561c8239 100644 --- a/apps/webhook/internal/domain/api.go +++ b/apps/webhook/internal/domain/api.go @@ -7,7 +7,7 @@ import ( type ContactUsData struct { Name string `json:"name"` Email string `json:"email"` - MobileNumber int64 `json:"mobileNumber"` + MobileNumber string `json:"mobileNumber"` CompanyName string `json:"CompanyName"` Country string `json:"country"` Message string `json:"message"` diff --git a/grpc-interfaces/comms.proto b/grpc-interfaces/comms.proto index e678b0629..9734c26b0 100644 --- a/grpc-interfaces/comms.proto +++ b/grpc-interfaces/comms.proto @@ -50,7 +50,7 @@ message SendContactUsEmailInput{ string name = 2; string companyName = 3; string country = 4; - int64 mobileNumber = 5; + string mobileNumber = 5; string message = 6; } diff --git a/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go b/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go index 2fcdace2b..35c93117b 100644 --- a/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go @@ -368,7 +368,7 @@ type SendContactUsEmailInput struct { Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` CompanyName string `protobuf:"bytes,3,opt,name=companyName,proto3" json:"companyName,omitempty"` Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"` - MobileNumber int64 `protobuf:"varint,5,opt,name=mobileNumber,proto3" json:"mobileNumber,omitempty"` + MobileNumber string `protobuf:"bytes,5,opt,name=mobileNumber,proto3" json:"mobileNumber,omitempty"` Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` } @@ -432,11 +432,11 @@ func (x *SendContactUsEmailInput) GetCountry() string { return "" } -func (x *SendContactUsEmailInput) GetMobileNumber() int64 { +func (x *SendContactUsEmailInput) GetMobileNumber() string { if x != nil { return x.MobileNumber } - return 0 + return "" } func (x *SendContactUsEmailInput) GetMessage() string { @@ -537,7 +537,7 @@ var file_comms_proto_rawDesc = []byte{ 0x61, 0x6e, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x4e, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x06, 0x0a, 0x04, 0x56, 0x6f, 0x69, 0x64, 0x32, 0x9e, 0x03, 0x0a, 0x05, 0x43, 0x6f, 0x6d, 0x6d, From 5c9ba72671b7845a1894ba78a025f703042f1323 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Wed, 21 Aug 2024 16:55:46 +0530 Subject: [PATCH 31/89] fix: updates apps on cluster, when removing all device intercepts gh-issue: https://github.com/kloudlite/kloudlite/issues/276 --- apps/console/internal/domain/app.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/console/internal/domain/app.go b/apps/console/internal/domain/app.go index 0a166c571..db23bca45 100644 --- a/apps/console/internal/domain/app.go +++ b/apps/console/internal/domain/app.go @@ -268,10 +268,14 @@ func (d *domain) RemoveDeviceIntercepts(ctx ResourceContext, deviceName string) fc.AppSpecInterceptEnabled: false, } - _, err := d.appRepo.PatchById(ctx, apps[i].Id, patchForUpdate) + up, err := d.appRepo.PatchById(ctx, apps[i].Id, patchForUpdate) if err != nil { return errors.NewE(err) } + + if err := d.applyApp(ctx, up); err != nil { + return errors.NewE(err) + } } return nil @@ -286,14 +290,13 @@ func (d *domain) OnAppUpdateMessage(ctx ResourceContext, app entities.App, statu if xApp == nil { return errors.Newf("no apps found") } + recordVersion, err := d.MatchRecordVersion(app.Annotations, xApp.RecordVersion) if err != nil { return errors.NewE(err) } - uapp, err := d.appRepo.PatchById( - ctx, - xApp.Id, + uapp, err := d.appRepo.PatchById(ctx, xApp.Id, common.PatchForSyncFromAgent(&app, recordVersion, status, common.PatchOpts{ MessageTimestamp: opts.MessageTimestamp, })) From 143bb32ec9c8707fc3240fd59351a280bc3bd6f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2024 19:01:28 +0530 Subject: [PATCH 32/89] [PR:dependabot](https://github.com/kloudlite/api/pull/345) Bumps [github.com/gofiber/fiber/v2](https://github.com/gofiber/fiber) from 2.52.2 to 2.52.5. - [Release notes](https://github.com/gofiber/fiber/releases) - [Commits](https://github.com/gofiber/fiber/compare/v2.52.2...v2.52.5) --- updated-dependencies: - dependency-name: github.com/gofiber/fiber/v2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Anshuman Bhaskar From cdbfc513b5a35f1c8f3a2b4c45764eff7e4190f3 Mon Sep 17 00:00:00 2001 From: Anshuman Bhaskar Date: Wed, 28 Aug 2024 17:09:11 +0530 Subject: [PATCH 33/89] [PR](https://github.com/kloudlite/api/pull/362) --- apps/console/internal/app/dns-server.go | 13 +- .../internal/app/graph/app.resolvers.go | 2 +- .../graph/clustermanagedservice.resolvers.go | 2 +- .../app/graph/common-types.resolvers.go | 2 +- .../internal/app/graph/config.resolvers.go | 2 +- .../internal/app/graph/entity.resolvers.go | 2 +- .../app/graph/environment.resolvers.go | 16 +- .../app/graph/externalapp.resolvers.go | 2 +- .../app/graph/generated/federation.go | 12 +- .../internal/app/graph/generated/generated.go | 1158 +++++++++-------- .../app/graph/imagepullsecret.resolvers.go | 2 +- .../importedmanagedresource.resolvers.go | 2 +- .../app/graph/managedresource.resolvers.go | 2 +- .../internal/app/graph/model/models_gen.go | 6 +- .../internal/app/graph/router.resolvers.go | 2 +- .../internal/app/graph/schema.resolvers.go | 9 +- .../internal/app/graph/secret.resolvers.go | 2 +- .../struct-to-graphql/common-types.graphqls | 2 + apps/console/internal/domain/environment.go | 1 + .../internal/domain/service-binding.go | 20 +- .../field-constants/generated_constants.go | 1 + go.mod | 24 +- go.sum | 52 +- pkg/grpc/server.go | 11 +- 24 files changed, 726 insertions(+), 621 deletions(-) diff --git a/apps/console/internal/app/dns-server.go b/apps/console/internal/app/dns-server.go index 603310786..c0eea26e4 100644 --- a/apps/console/internal/app/dns-server.go +++ b/apps/console/internal/app/dns-server.go @@ -8,7 +8,7 @@ import ( "time" "github.com/kloudlite/api/apps/console/internal/domain" - "github.com/kloudlite/operator/pkg/errors" + "github.com/kloudlite/api/pkg/errors" "github.com/miekg/dns" ) @@ -37,7 +37,9 @@ func (h *dnsHandler) ServeDNS(w dns.ResponseWriter, r *dns.Msg) { for _, question := range r.Question { answers, err := h.resolver(ctx, question.Name, question.Qtype) if err != nil { - logger.Error("FAILED to resolve dns record, got", "err", err, "question", question.Name) + if !errors.Is(err, errNoServiceBinding) && !errors.Is(err, errInvalidDNSQuery) { + logger.Error("FAILED to resolve dns record, got", "err", err, "question", question.Name) + } msg.Rcode = dns.RcodeNameError continue } @@ -58,7 +60,10 @@ func (h *dnsHandler) newRR(domain string, ttl int, ip string) ([]dns.RR, error) return []dns.RR{r}, nil } -var errNoServiceBinding = errors.Newf("no service binding found") +var ( + errNoServiceBinding = errors.Newf("no service binding found") + errInvalidDNSQuery = errors.Newf("invalid dns query") +) func (h *dnsHandler) resolver(ctx context.Context, domain string, qtype uint16) ([]dns.RR, error) { m := new(dns.Msg) @@ -68,7 +73,7 @@ func (h *dnsHandler) resolver(ctx context.Context, domain string, qtype uint16) question := m.Question[0] sp := strings.SplitN(strings.ToLower(question.Name), fmt.Sprintf(".%s", h.kloudliteDNSSuffix), 2) if len(sp) < 2 { - return nil, fmt.Errorf("failed to split into 2 over .%s", h.kloudliteDNSSuffix) + return nil, errInvalidDNSQuery } if strings.HasSuffix(sp[0], ".local") { diff --git a/apps/console/internal/app/graph/app.resolvers.go b/apps/console/internal/app/graph/app.resolvers.go index 6a37886fd..cf0b1403e 100644 --- a/apps/console/internal/app/graph/app.resolvers.go +++ b/apps/console/internal/app/graph/app.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/console/internal/app/graph/clustermanagedservice.resolvers.go b/apps/console/internal/app/graph/clustermanagedservice.resolvers.go index af83dd1c6..996e62f2e 100644 --- a/apps/console/internal/app/graph/clustermanagedservice.resolvers.go +++ b/apps/console/internal/app/graph/clustermanagedservice.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/console/internal/app/graph/common-types.resolvers.go b/apps/console/internal/app/graph/common-types.resolvers.go index 3b8069bb2..354f6d418 100644 --- a/apps/console/internal/app/graph/common-types.resolvers.go +++ b/apps/console/internal/app/graph/common-types.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/console/internal/app/graph/config.resolvers.go b/apps/console/internal/app/graph/config.resolvers.go index 1a44c2e8b..169a03c63 100644 --- a/apps/console/internal/app/graph/config.resolvers.go +++ b/apps/console/internal/app/graph/config.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/console/internal/app/graph/entity.resolvers.go b/apps/console/internal/app/graph/entity.resolvers.go index 148845117..3d586beb9 100644 --- a/apps/console/internal/app/graph/entity.resolvers.go +++ b/apps/console/internal/app/graph/entity.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/console/internal/app/graph/environment.resolvers.go b/apps/console/internal/app/graph/environment.resolvers.go index 95395c4f3..56fb103eb 100644 --- a/apps/console/internal/app/graph/environment.resolvers.go +++ b/apps/console/internal/app/graph/environment.resolvers.go @@ -2,13 +2,14 @@ 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.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" - "github.com/kloudlite/api/pkg/errors" "time" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/apps/console/internal/app/graph/generated" "github.com/kloudlite/api/apps/console/internal/app/graph/model" "github.com/kloudlite/api/apps/console/internal/entities" @@ -33,6 +34,11 @@ func (r *environmentResolver) Spec(ctx context.Context, obj *entities.Environmen if err := fn.JsonConversion(obj.Spec, &m); err != nil { return nil, errors.NewE(err) } + + if m.Suspend == nil { + m.Suspend = fn.New(false) + } + return m, nil } @@ -69,5 +75,7 @@ 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 } -type environmentInResolver struct{ *Resolver } +type ( + environmentResolver struct{ *Resolver } + environmentInResolver struct{ *Resolver } +) diff --git a/apps/console/internal/app/graph/externalapp.resolvers.go b/apps/console/internal/app/graph/externalapp.resolvers.go index c8d8d08ff..22b281900 100644 --- a/apps/console/internal/app/graph/externalapp.resolvers.go +++ b/apps/console/internal/app/graph/externalapp.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/console/internal/app/graph/generated/federation.go b/apps/console/internal/app/graph/generated/federation.go index 07b6640b3..0758f308a 100644 --- a/apps/console/internal/app/graph/generated/federation.go +++ b/apps/console/internal/app/graph/generated/federation.go @@ -177,8 +177,18 @@ func entityResolverNameForBuild(ctx context.Context, rep map[string]interface{}) ok bool ) _ = val + // if all of the KeyFields values for this resolver are null, + // we shouldn't use use it + allNull := true m = rep - if _, ok = m["id"]; !ok { + val, ok = m["id"] + if !ok { + break + } + if allNull { + allNull = val == nil + } + if allNull { break } return "findBuildByID", nil diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 32f179a92..90af2eebd 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -427,6 +427,7 @@ type ComplexityRoot struct { Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec struct { Routing func(childComplexity int) int + Suspend func(childComplexity int) int TargetNamespace func(childComplexity int) int } @@ -2676,6 +2677,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec.Routing(childComplexity), true + case "Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec.suspend": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec.Suspend == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec.Suspend(childComplexity), true + case "Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec.targetNamespace": if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec.TargetNamespace == nil { break @@ -5878,6 +5886,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting @ type Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec @shareable { routing: Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting + suspend: Boolean targetNamespace: String } @@ -6211,6 +6220,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingI input Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpecIn { routing: Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingIn + suspend: Boolean targetNamespace: String } @@ -8852,7 +8862,7 @@ func (ec *executionContext) _App_accountName(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -8893,7 +8903,7 @@ func (ec *executionContext) _App_apiVersion(ctx context.Context, field graphql.C return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -8934,7 +8944,7 @@ func (ec *executionContext) _App_ciBuildId(ctx context.Context, field graphql.Co return ec.marshalOID2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_ciBuildId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_ciBuildId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -8978,7 +8988,7 @@ func (ec *executionContext) _App_createdBy(ctx context.Context, field graphql.Co return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9030,7 +9040,7 @@ func (ec *executionContext) _App_creationTime(ctx context.Context, field graphql return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9074,7 +9084,7 @@ func (ec *executionContext) _App_displayName(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9115,7 +9125,7 @@ func (ec *executionContext) _App_enabled(ctx context.Context, field graphql.Coll return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9159,7 +9169,7 @@ func (ec *executionContext) _App_environmentName(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9203,7 +9213,7 @@ func (ec *executionContext) _App_id(ctx context.Context, field graphql.Collected return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9244,7 +9254,7 @@ func (ec *executionContext) _App_kind(ctx context.Context, field graphql.Collect return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9288,7 +9298,7 @@ func (ec *executionContext) _App_lastUpdatedBy(ctx context.Context, field graphq return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9337,7 +9347,7 @@ func (ec *executionContext) _App_markedForDeletion(ctx context.Context, field gr return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9378,7 +9388,7 @@ func (ec *executionContext) _App_metadata(ctx context.Context, field graphql.Col return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9438,7 +9448,7 @@ func (ec *executionContext) _App_recordVersion(ctx context.Context, field graphq return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9482,7 +9492,7 @@ func (ec *executionContext) _App_spec(ctx context.Context, field graphql.Collect return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9551,7 +9561,7 @@ func (ec *executionContext) _App_status(ctx context.Context, field graphql.Colle return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9611,7 +9621,7 @@ func (ec *executionContext) _App_syncStatus(ctx context.Context, field graphql.C return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9669,7 +9679,7 @@ func (ec *executionContext) _App_updateTime(ctx context.Context, field graphql.C return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9710,7 +9720,7 @@ func (ec *executionContext) _App_build(ctx context.Context, field graphql.Collec return ec.marshalOBuild2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐBuild(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_build(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_build(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9755,7 +9765,7 @@ func (ec *executionContext) _App_serviceHost(ctx context.Context, field graphql. return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_App_serviceHost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_App_serviceHost(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "App", Field: field, @@ -9799,7 +9809,7 @@ func (ec *executionContext) _AppEdge_cursor(ctx context.Context, field graphql.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AppEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AppEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AppEdge", Field: field, @@ -9843,7 +9853,7 @@ func (ec *executionContext) _AppEdge_node(ctx context.Context, field graphql.Col return ec.marshalNApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐApp(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AppEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AppEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AppEdge", Field: field, @@ -9929,7 +9939,7 @@ func (ec *executionContext) _AppPaginatedRecords_edges(ctx context.Context, fiel return ec.marshalNAppEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐAppEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AppPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AppPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AppPaginatedRecords", Field: field, @@ -9979,7 +9989,7 @@ func (ec *executionContext) _AppPaginatedRecords_pageInfo(ctx context.Context, f return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AppPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AppPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AppPaginatedRecords", Field: field, @@ -10033,7 +10043,7 @@ func (ec *executionContext) _AppPaginatedRecords_totalCount(ctx context.Context, return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AppPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AppPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AppPaginatedRecords", Field: field, @@ -10103,7 +10113,7 @@ func (ec *executionContext) _Build_id(ctx context.Context, field graphql.Collect return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Build_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Build_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Build", Field: field, @@ -10147,7 +10157,7 @@ func (ec *executionContext) _ClusterManagedService_accountName(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10188,7 +10198,7 @@ func (ec *executionContext) _ClusterManagedService_apiVersion(ctx context.Contex return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10232,7 +10242,7 @@ func (ec *executionContext) _ClusterManagedService_clusterName(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10276,7 +10286,7 @@ func (ec *executionContext) _ClusterManagedService_createdBy(ctx context.Context return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10328,7 +10338,7 @@ func (ec *executionContext) _ClusterManagedService_creationTime(ctx context.Cont return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10372,7 +10382,7 @@ func (ec *executionContext) _ClusterManagedService_displayName(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10416,7 +10426,7 @@ func (ec *executionContext) _ClusterManagedService_id(ctx context.Context, field return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10457,7 +10467,7 @@ func (ec *executionContext) _ClusterManagedService_isArchived(ctx context.Contex return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_isArchived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_isArchived(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10498,7 +10508,7 @@ func (ec *executionContext) _ClusterManagedService_kind(ctx context.Context, fie return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10542,7 +10552,7 @@ func (ec *executionContext) _ClusterManagedService_lastUpdatedBy(ctx context.Con return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10591,7 +10601,7 @@ func (ec *executionContext) _ClusterManagedService_markedForDeletion(ctx context return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10632,7 +10642,7 @@ func (ec *executionContext) _ClusterManagedService_metadata(ctx context.Context, return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10692,7 +10702,7 @@ func (ec *executionContext) _ClusterManagedService_recordVersion(ctx context.Con return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10733,7 +10743,7 @@ func (ec *executionContext) _ClusterManagedService_spec(ctx context.Context, fie return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ClusterManagedServiceSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10780,7 +10790,7 @@ func (ec *executionContext) _ClusterManagedService_status(ctx context.Context, f return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10840,7 +10850,7 @@ func (ec *executionContext) _ClusterManagedService_syncStatus(ctx context.Contex return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10898,7 +10908,7 @@ func (ec *executionContext) _ClusterManagedService_updateTime(ctx context.Contex return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedService_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedService_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedService", Field: field, @@ -10942,7 +10952,7 @@ func (ec *executionContext) _ClusterManagedServiceEdge_cursor(ctx context.Contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedServiceEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedServiceEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedServiceEdge", Field: field, @@ -10986,7 +10996,7 @@ func (ec *executionContext) _ClusterManagedServiceEdge_node(ctx context.Context, return ec.marshalNClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedServiceEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedServiceEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedServiceEdge", Field: field, @@ -11066,7 +11076,7 @@ func (ec *executionContext) _ClusterManagedServicePaginatedRecords_edges(ctx con return ec.marshalNClusterManagedServiceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedServicePaginatedRecords", Field: field, @@ -11116,7 +11126,7 @@ func (ec *executionContext) _ClusterManagedServicePaginatedRecords_pageInfo(ctx return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedServicePaginatedRecords", Field: field, @@ -11170,7 +11180,7 @@ func (ec *executionContext) _ClusterManagedServicePaginatedRecords_totalCount(ct return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ClusterManagedServicePaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ClusterManagedServicePaginatedRecords", Field: field, @@ -11214,7 +11224,7 @@ func (ec *executionContext) _Config_accountName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11255,7 +11265,7 @@ func (ec *executionContext) _Config_apiVersion(ctx context.Context, field graphq return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11296,7 +11306,7 @@ func (ec *executionContext) _Config_binaryData(ctx context.Context, field graphq return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_binaryData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_binaryData(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11340,7 +11350,7 @@ func (ec *executionContext) _Config_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_Config_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11392,7 +11402,7 @@ func (ec *executionContext) _Config_creationTime(ctx context.Context, field grap return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11433,7 +11443,7 @@ func (ec *executionContext) _Config_data(ctx context.Context, field graphql.Coll return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11477,7 +11487,7 @@ func (ec *executionContext) _Config_displayName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11521,7 +11531,7 @@ func (ec *executionContext) _Config_environmentName(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11565,7 +11575,7 @@ func (ec *executionContext) _Config_id(ctx context.Context, field graphql.Collec return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11606,7 +11616,7 @@ func (ec *executionContext) _Config_immutable(ctx context.Context, field graphql return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_immutable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_immutable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11647,7 +11657,7 @@ func (ec *executionContext) _Config_kind(ctx context.Context, field graphql.Coll return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11691,7 +11701,7 @@ func (ec *executionContext) _Config_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_Config_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11740,7 +11750,7 @@ func (ec *executionContext) _Config_markedForDeletion(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11781,7 +11791,7 @@ func (ec *executionContext) _Config_metadata(ctx context.Context, field graphql. return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11841,7 +11851,7 @@ func (ec *executionContext) _Config_recordVersion(ctx context.Context, field gra return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11885,7 +11895,7 @@ func (ec *executionContext) _Config_syncStatus(ctx context.Context, field graphq return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11943,7 +11953,7 @@ func (ec *executionContext) _Config_updateTime(ctx context.Context, field graphq return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Config_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Config_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Config", Field: field, @@ -11987,7 +11997,7 @@ func (ec *executionContext) _ConfigEdge_cursor(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigEdge", Field: field, @@ -12031,7 +12041,7 @@ func (ec *executionContext) _ConfigEdge_node(ctx context.Context, field graphql. return ec.marshalNConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigEdge", Field: field, @@ -12111,7 +12121,7 @@ func (ec *executionContext) _ConfigKeyRef_configName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigKeyRef_configName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigKeyRef_configName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigKeyRef", Field: field, @@ -12155,7 +12165,7 @@ func (ec *executionContext) _ConfigKeyRef_key(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigKeyRef_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigKeyRef_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigKeyRef", Field: field, @@ -12199,7 +12209,7 @@ func (ec *executionContext) _ConfigKeyValueRef_configName(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigKeyValueRef_configName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigKeyValueRef_configName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigKeyValueRef", Field: field, @@ -12243,7 +12253,7 @@ func (ec *executionContext) _ConfigKeyValueRef_key(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigKeyValueRef_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigKeyValueRef_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigKeyValueRef", Field: field, @@ -12287,7 +12297,7 @@ func (ec *executionContext) _ConfigKeyValueRef_value(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigKeyValueRef_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigKeyValueRef_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigKeyValueRef", Field: field, @@ -12331,7 +12341,7 @@ func (ec *executionContext) _ConfigPaginatedRecords_edges(ctx context.Context, f return ec.marshalNConfigEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐConfigEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigPaginatedRecords", Field: field, @@ -12381,7 +12391,7 @@ func (ec *executionContext) _ConfigPaginatedRecords_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_ConfigPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigPaginatedRecords", Field: field, @@ -12435,7 +12445,7 @@ func (ec *executionContext) _ConfigPaginatedRecords_totalCount(ctx context.Conte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigPaginatedRecords", Field: field, @@ -12479,7 +12489,7 @@ func (ec *executionContext) _ConsoleCheckNameAvailabilityOutput_result(ctx conte return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleCheckNameAvailabilityOutput_result(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConsoleCheckNameAvailabilityOutput_result(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConsoleCheckNameAvailabilityOutput", Field: field, @@ -12520,7 +12530,7 @@ func (ec *executionContext) _ConsoleCheckNameAvailabilityOutput_suggestedNames(c return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConsoleCheckNameAvailabilityOutput_suggestedNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConsoleCheckNameAvailabilityOutput_suggestedNames(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConsoleCheckNameAvailabilityOutput", Field: field, @@ -12561,7 +12571,7 @@ func (ec *executionContext) _CursorPagination_after(ctx context.Context, field g return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_after(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_after(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -12602,7 +12612,7 @@ func (ec *executionContext) _CursorPagination_before(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_before(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_before(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -12643,7 +12653,7 @@ func (ec *executionContext) _CursorPagination_first(ctx context.Context, field g return ec.marshalOInt2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_first(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_first(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -12684,7 +12694,7 @@ func (ec *executionContext) _CursorPagination_last(ctx context.Context, field gr return ec.marshalOInt2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_last(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_last(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -12725,7 +12735,7 @@ func (ec *executionContext) _CursorPagination_orderBy(ctx context.Context, field return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_orderBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_orderBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -12766,7 +12776,7 @@ func (ec *executionContext) _CursorPagination_sortDirection(ctx context.Context, return ec.marshalOCursorPaginationSortDirection2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐSortDirection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CursorPagination_sortDirection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CursorPagination_sortDirection(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CursorPagination", Field: field, @@ -12869,7 +12879,7 @@ func (ec *executionContext) _Environment_accountName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -12910,7 +12920,7 @@ func (ec *executionContext) _Environment_apiVersion(ctx context.Context, field g return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -12954,7 +12964,7 @@ func (ec *executionContext) _Environment_clusterName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -12998,7 +13008,7 @@ func (ec *executionContext) _Environment_createdBy(ctx context.Context, field gr return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13050,7 +13060,7 @@ func (ec *executionContext) _Environment_creationTime(ctx context.Context, field return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13094,7 +13104,7 @@ func (ec *executionContext) _Environment_displayName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13138,7 +13148,7 @@ func (ec *executionContext) _Environment_id(ctx context.Context, field graphql.C return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13179,7 +13189,7 @@ func (ec *executionContext) _Environment_isArchived(ctx context.Context, field g return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_isArchived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_isArchived(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13220,7 +13230,7 @@ func (ec *executionContext) _Environment_kind(ctx context.Context, field graphql return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13264,7 +13274,7 @@ func (ec *executionContext) _Environment_lastUpdatedBy(ctx context.Context, fiel return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13313,7 +13323,7 @@ func (ec *executionContext) _Environment_markedForDeletion(ctx context.Context, return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13354,7 +13364,7 @@ func (ec *executionContext) _Environment_metadata(ctx context.Context, field gra return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13414,7 +13424,7 @@ func (ec *executionContext) _Environment_recordVersion(ctx context.Context, fiel return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13455,7 +13465,7 @@ func (ec *executionContext) _Environment_spec(ctx context.Context, field graphql return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvironmentSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13465,6 +13475,8 @@ func (ec *executionContext) fieldContext_Environment_spec(ctx context.Context, f switch field.Name { case "routing": return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_routing(ctx, field) + case "suspend": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_suspend(ctx, field) case "targetNamespace": return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_targetNamespace(ctx, field) } @@ -13502,7 +13514,7 @@ func (ec *executionContext) _Environment_status(ctx context.Context, field graph return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13562,7 +13574,7 @@ func (ec *executionContext) _Environment_syncStatus(ctx context.Context, field g return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13620,7 +13632,7 @@ func (ec *executionContext) _Environment_updateTime(ctx context.Context, field g return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Environment_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Environment_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Environment", Field: field, @@ -13664,7 +13676,7 @@ func (ec *executionContext) _EnvironmentEdge_cursor(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EnvironmentEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EnvironmentEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EnvironmentEdge", Field: field, @@ -13708,7 +13720,7 @@ func (ec *executionContext) _EnvironmentEdge_node(ctx context.Context, field gra return ec.marshalNEnvironment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐEnvironment(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EnvironmentEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EnvironmentEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EnvironmentEdge", Field: field, @@ -13788,7 +13800,7 @@ func (ec *executionContext) _EnvironmentPaginatedRecords_edges(ctx context.Conte return ec.marshalNEnvironmentEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐEnvironmentEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EnvironmentPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EnvironmentPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EnvironmentPaginatedRecords", Field: field, @@ -13838,7 +13850,7 @@ func (ec *executionContext) _EnvironmentPaginatedRecords_pageInfo(ctx context.Co return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EnvironmentPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EnvironmentPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EnvironmentPaginatedRecords", Field: field, @@ -13892,7 +13904,7 @@ func (ec *executionContext) _EnvironmentPaginatedRecords_totalCount(ctx context. return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EnvironmentPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EnvironmentPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EnvironmentPaginatedRecords", Field: field, @@ -13936,7 +13948,7 @@ func (ec *executionContext) _ExternalApp_accountName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -13977,7 +13989,7 @@ func (ec *executionContext) _ExternalApp_apiVersion(ctx context.Context, field g return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14021,7 +14033,7 @@ func (ec *executionContext) _ExternalApp_createdBy(ctx context.Context, field gr return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14073,7 +14085,7 @@ func (ec *executionContext) _ExternalApp_creationTime(ctx context.Context, field return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14117,7 +14129,7 @@ func (ec *executionContext) _ExternalApp_displayName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14161,7 +14173,7 @@ func (ec *executionContext) _ExternalApp_environmentName(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14205,7 +14217,7 @@ func (ec *executionContext) _ExternalApp_id(ctx context.Context, field graphql.C return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14246,7 +14258,7 @@ func (ec *executionContext) _ExternalApp_kind(ctx context.Context, field graphql return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14290,7 +14302,7 @@ func (ec *executionContext) _ExternalApp_lastUpdatedBy(ctx context.Context, fiel return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14339,7 +14351,7 @@ func (ec *executionContext) _ExternalApp_markedForDeletion(ctx context.Context, return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14380,7 +14392,7 @@ func (ec *executionContext) _ExternalApp_metadata(ctx context.Context, field gra return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14440,7 +14452,7 @@ func (ec *executionContext) _ExternalApp_recordVersion(ctx context.Context, fiel return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14481,7 +14493,7 @@ func (ec *executionContext) _ExternalApp_spec(ctx context.Context, field graphql return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ExternalAppSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14530,7 +14542,7 @@ func (ec *executionContext) _ExternalApp_status(ctx context.Context, field graph return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14590,7 +14602,7 @@ func (ec *executionContext) _ExternalApp_syncStatus(ctx context.Context, field g return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14648,7 +14660,7 @@ func (ec *executionContext) _ExternalApp_updateTime(ctx context.Context, field g return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalApp_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalApp_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalApp", Field: field, @@ -14692,7 +14704,7 @@ func (ec *executionContext) _ExternalAppEdge_cursor(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalAppEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalAppEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalAppEdge", Field: field, @@ -14736,7 +14748,7 @@ func (ec *executionContext) _ExternalAppEdge_node(ctx context.Context, field gra return ec.marshalNExternalApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐExternalApp(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalAppEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalAppEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalAppEdge", Field: field, @@ -14814,7 +14826,7 @@ func (ec *executionContext) _ExternalAppPaginatedRecords_edges(ctx context.Conte return ec.marshalNExternalAppEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐExternalAppEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalAppPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalAppPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalAppPaginatedRecords", Field: field, @@ -14864,7 +14876,7 @@ func (ec *executionContext) _ExternalAppPaginatedRecords_pageInfo(ctx context.Co return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalAppPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalAppPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalAppPaginatedRecords", Field: field, @@ -14918,7 +14930,7 @@ func (ec *executionContext) _ExternalAppPaginatedRecords_totalCount(ctx context. return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalAppPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalAppPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ExternalAppPaginatedRecords", Field: field, @@ -14962,7 +14974,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___console___in return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__ManagedResourceRef_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__ManagedResourceRef_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___console___internal___entities__ManagedResourceRef", Field: field, @@ -15006,7 +15018,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___console___in return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__ManagedResourceRef_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__ManagedResourceRef_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___console___internal___entities__ManagedResourceRef", Field: field, @@ -15050,7 +15062,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___console___in return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__ManagedResourceRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__ManagedResourceRef_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___console___internal___entities__ManagedResourceRef", Field: field, @@ -15094,7 +15106,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___console___in return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor", Field: field, @@ -15138,7 +15150,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___console___in return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor", Field: field, @@ -15182,7 +15194,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___console___in return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_refId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_refId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor", Field: field, @@ -15226,7 +15238,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___console___in return ec.marshalNGithub__com___kloudlite___api___apps___console___internal___entities__ResourceType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsConsoleInternalEntitiesResourceType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_resourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___apps___console___internal___entities__SecretCreatedFor", Field: field, @@ -15270,7 +15282,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUp return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___common__CreatedOrUpdatedBy", Field: field, @@ -15314,7 +15326,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUp return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___common__CreatedOrUpdatedBy", Field: field, @@ -15358,7 +15370,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUp return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___common__CreatedOrUpdatedBy", Field: field, @@ -15402,7 +15414,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncAction2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncAction(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_action(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_action(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -15443,7 +15455,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_error(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_error(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -15484,7 +15496,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_lastSyncedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_lastSyncedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -15528,7 +15540,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -15572,7 +15584,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncState2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_state(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -15613,7 +15625,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_syncScheduledAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___pkg___types__SyncStatus_syncScheduledAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___api___pkg___types__SyncStatus", Field: field, @@ -15654,7 +15666,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__MsvcRef", Field: field, @@ -15695,7 +15707,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__MsvcRef", Field: field, @@ -15739,7 +15751,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__MsvcRef", Field: field, @@ -15783,7 +15795,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__MsvcRef_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__MsvcRef", Field: field, @@ -15827,7 +15839,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__SecretRef", Field: field, @@ -15868,7 +15880,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___common_ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___common____types__SecretRef_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___common____types__SecretRef", Field: field, @@ -15909,7 +15921,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_args(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -15950,7 +15962,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_command(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_command(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -15991,7 +16003,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnv2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnvᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_env(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_env(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -16046,7 +16058,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvFrom2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_envFrom(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_envFrom(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -16096,7 +16108,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_image(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_image(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -16137,7 +16149,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_imagePullPolicy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_imagePullPolicy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -16178,7 +16190,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Probe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Probe(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_livenessProbe(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_livenessProbe(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -16238,7 +16250,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -16279,7 +16291,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Probe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Probe(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_readinessProbe(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_readinessProbe(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -16336,7 +16348,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerResource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceCpu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceCpu(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -16383,7 +16395,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerResource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceMemory(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceMemory(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -16430,7 +16442,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolume2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_volumes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_volumes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", Field: field, @@ -16484,7 +16496,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings_appPort(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings_appPort(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings", Field: field, @@ -16528,7 +16540,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings_devicePort(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings_devicePort(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings", Field: field, @@ -16569,7 +16581,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_backendProtocol(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_backendProtocol(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppRouter", Field: field, @@ -16610,7 +16622,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__BasicAuth2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1BasicAuth(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_basicAuth(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_basicAuth(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppRouter", Field: field, @@ -16659,7 +16671,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Cors2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Cors(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_cors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_cors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppRouter", Field: field, @@ -16711,7 +16723,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_domains(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_domains(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppRouter", Field: field, @@ -16752,7 +16764,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Https2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPS(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_https(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_https(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppRouter", Field: field, @@ -16801,7 +16813,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_ingressClass(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_ingressClass(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppRouter", Field: field, @@ -16842,7 +16854,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_maxBodySizeInMB(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_maxBodySizeInMB(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppRouter", Field: field, @@ -16883,7 +16895,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__RateLimit2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RateLimit(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_rateLimit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_rateLimit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppRouter", Field: field, @@ -16934,7 +16946,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Route2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Routeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_routes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppRouter_routes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppRouter", Field: field, @@ -16988,7 +17000,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainer2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_containers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_containers(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17055,7 +17067,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17096,7 +17108,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_freeze(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_freeze(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17137,7 +17149,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__HPA2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Hpa(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_hpa(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_hpa(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17190,7 +17202,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Intercept2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Intercept(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_intercept(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_intercept(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17239,7 +17251,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_nodeSelector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_nodeSelector(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17280,7 +17292,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_region(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_region(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17321,7 +17333,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_replicas(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_replicas(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17362,7 +17374,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__AppRouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppRouter(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_router(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_router(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17423,7 +17435,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_serviceAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_serviceAccount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17464,7 +17476,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__AppSvc2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvcᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_services(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_services(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17511,7 +17523,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOK8s__io___api___core___v1__Toleration2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Tolerationᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_tolerations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_tolerations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17564,7 +17576,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOK8s__io___api___core___v1__TopologySpreadConstraint2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraintᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_topologySpreadConstraints(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_topologySpreadConstraints(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", Field: field, @@ -17626,7 +17638,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_port(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_port(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSvc", Field: field, @@ -17667,7 +17679,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_protocol(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_protocol(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSvc", Field: field, @@ -17711,7 +17723,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__BasicAuth_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__BasicAuth_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__BasicAuth", Field: field, @@ -17752,7 +17764,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__BasicAuth_secretName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__BasicAuth_secretName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__BasicAuth", Field: field, @@ -17793,7 +17805,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__BasicAuth_username(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__BasicAuth_username(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__BasicAuth", Field: field, @@ -17837,7 +17849,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedServiceSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_msvcSpec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec", Field: field, @@ -17889,7 +17901,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec_targetNamespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServiceSpec", Field: field, @@ -17933,7 +17945,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", Field: field, @@ -17974,7 +17986,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_optional(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_optional(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", Field: field, @@ -18015,7 +18027,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refKey(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", Field: field, @@ -18056,7 +18068,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", Field: field, @@ -18097,7 +18109,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", Field: field, @@ -18138,7 +18150,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", Field: field, @@ -18179,7 +18191,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_max(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_max(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerResource", Field: field, @@ -18220,7 +18232,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_min(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_min(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerResource", Field: field, @@ -18261,7 +18273,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_items(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_items(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume", Field: field, @@ -18311,7 +18323,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_mountPath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_mountPath(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume", Field: field, @@ -18355,7 +18367,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_refName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_refName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume", Field: field, @@ -18399,7 +18411,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume", Field: field, @@ -18440,7 +18452,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_fileName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_fileName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem", Field: field, @@ -18484,7 +18496,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem", Field: field, @@ -18525,7 +18537,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Cors_allowCredentials(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Cors_allowCredentials(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Cors", Field: field, @@ -18566,7 +18578,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Cors_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Cors_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Cors", Field: field, @@ -18607,7 +18619,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Cors_origins(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Cors_origins(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Cors", Field: field, @@ -18651,7 +18663,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_refName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_refName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__EnvFrom", Field: field, @@ -18695,7 +18707,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__EnvFrom", Field: field, @@ -18736,7 +18748,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode2ᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐEnvironmentRoutingMode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting_mode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting_mode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting", Field: field, @@ -18777,7 +18789,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting_privateIngressClass(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting_privateIngressClass(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting", Field: field, @@ -18818,7 +18830,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting_publicIngressClass(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting_publicIngressClass(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting", Field: field, @@ -18859,7 +18871,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvironmentRouting(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_routing(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_routing(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec", Field: field, @@ -18880,6 +18892,47 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_suspend(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1EnvironmentSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_suspend(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.Suspend, 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_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_suspend(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec", + 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) _Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_targetNamespace(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1EnvironmentSpec) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_targetNamespace(ctx, field) if err != nil { @@ -18908,7 +18961,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_targetNamespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_targetNamespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec", Field: field, @@ -18949,7 +19002,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Intercept2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Intercept(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec_intercept(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec_intercept(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec", Field: field, @@ -19001,7 +19054,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec_record(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec_record(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec", Field: field, @@ -19045,7 +19098,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ExternalAppRecordType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ExternalAppRecordType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec_recordType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec_recordType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ExternalAppSpec", Field: field, @@ -19089,7 +19142,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HPA", Field: field, @@ -19130,7 +19183,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_maxReplicas(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_maxReplicas(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HPA", Field: field, @@ -19171,7 +19224,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_minReplicas(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_minReplicas(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HPA", Field: field, @@ -19212,7 +19265,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdCpu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdCpu(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HPA", Field: field, @@ -19253,7 +19306,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdMemory(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdMemory(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HPA", Field: field, @@ -19294,7 +19347,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_httpHeaders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_httpHeaders(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe", Field: field, @@ -19338,7 +19391,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_path(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe", Field: field, @@ -19382,7 +19435,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_port(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_port(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe", Field: field, @@ -19423,7 +19476,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Https_clusterIssuer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Https_clusterIssuer(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Https", Field: field, @@ -19467,7 +19520,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Https_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Https_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Https", Field: field, @@ -19508,7 +19561,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Https_forceRedirect(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Https_forceRedirect(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Https", Field: field, @@ -19552,7 +19605,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Intercept", Field: field, @@ -19593,7 +19646,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppInterceptPortMappingsᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_portMappings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_portMappings(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Intercept", Field: field, @@ -19643,7 +19696,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toDevice(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Intercept", Field: field, @@ -19684,7 +19737,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec_resourceNamePrefix(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec_resourceNamePrefix(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec", Field: field, @@ -19728,7 +19781,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1MresResourceTemplate(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec_resourceTemplate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec_resourceTemplate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec", Field: field, @@ -19779,7 +19832,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_nodeSelector(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec", Field: field, @@ -19823,7 +19876,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ServiceTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ServiceTemplate(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_serviceTemplate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec", Field: field, @@ -19872,7 +19925,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOK8s__io___api___core___v1__Toleration2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Tolerationᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec_tolerations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ManagedServiceSpec", Field: field, @@ -19928,7 +19981,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate", Field: field, @@ -19972,7 +20025,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate", Field: field, @@ -20016,7 +20069,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNGithub__com___kloudlite___operator___apis___common____types__MsvcRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesMsvcRef(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate_msvcRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate_msvcRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate", Field: field, @@ -20067,7 +20120,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__MresResourceTemplate", Field: field, @@ -20108,7 +20161,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_failureThreshold(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_failureThreshold(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", Field: field, @@ -20149,7 +20202,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPGetProbe(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_httpGet(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_httpGet(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", Field: field, @@ -20198,7 +20251,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_initialDelay(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_initialDelay(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", Field: field, @@ -20239,7 +20292,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_interval(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_interval(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", Field: field, @@ -20280,7 +20333,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ShellProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ShellProbe(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_shell(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_shell(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", Field: field, @@ -20325,7 +20378,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__TcpProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1TCPProbe(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_tcp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_tcp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", Field: field, @@ -20373,7 +20426,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", Field: field, @@ -20414,7 +20467,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RateLimit_connections(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RateLimit_connections(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RateLimit", Field: field, @@ -20455,7 +20508,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RateLimit_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RateLimit_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RateLimit", Field: field, @@ -20496,7 +20549,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RateLimit_rpm(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RateLimit_rpm(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RateLimit", Field: field, @@ -20537,7 +20590,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RateLimit_rps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RateLimit_rps(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RateLimit", Field: field, @@ -20581,7 +20634,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Route_app(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Route_app(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Route", Field: field, @@ -20625,7 +20678,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Route_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Route_path(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Route", Field: field, @@ -20669,7 +20722,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Route_port(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Route_port(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Route", Field: field, @@ -20710,7 +20763,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Route_rewrite(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Route_rewrite(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__Route", Field: field, @@ -20751,7 +20804,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_backendProtocol(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_backendProtocol(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RouterSpec", Field: field, @@ -20792,7 +20845,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__BasicAuth2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1BasicAuth(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_basicAuth(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_basicAuth(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RouterSpec", Field: field, @@ -20841,7 +20894,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Cors2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Cors(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_cors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_cors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RouterSpec", Field: field, @@ -20893,7 +20946,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_domains(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_domains(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RouterSpec", Field: field, @@ -20934,7 +20987,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Https2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPS(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_https(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_https(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RouterSpec", Field: field, @@ -20983,7 +21036,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_ingressClass(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_ingressClass(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RouterSpec", Field: field, @@ -21024,7 +21077,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_maxBodySizeInMB(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_maxBodySizeInMB(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RouterSpec", Field: field, @@ -21065,7 +21118,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__RateLimit2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1RateLimit(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_rateLimit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_rateLimit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RouterSpec", Field: field, @@ -21116,7 +21169,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Route2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Routeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_routes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__RouterSpec_routes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__RouterSpec", Field: field, @@ -21170,7 +21223,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate", Field: field, @@ -21214,7 +21267,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate", Field: field, @@ -21255,7 +21308,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplate", Field: field, @@ -21296,7 +21349,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__ShellProbe", Field: field, @@ -21340,7 +21393,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___crds___v1__TcpProbe", Field: field, @@ -21381,7 +21434,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_debug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_debug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -21422,7 +21475,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_error(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_error(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -21463,7 +21516,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_generation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_generation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -21504,7 +21557,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_info(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_info(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -21545,7 +21598,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -21586,7 +21639,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_startedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_startedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -21627,7 +21680,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__State2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_state(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -21671,7 +21724,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Check", Field: field, @@ -21712,7 +21765,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_debug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_debug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", Field: field, @@ -21753,7 +21806,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", Field: field, @@ -21794,7 +21847,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_hide(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_hide(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", Field: field, @@ -21838,7 +21891,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", Field: field, @@ -21882,7 +21935,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", Field: field, @@ -21926,7 +21979,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", Field: field, @@ -21970,7 +22023,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", Field: field, @@ -22014,7 +22067,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", Field: field, @@ -22058,7 +22111,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", Field: field, @@ -22099,7 +22152,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__CheckMeta2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMetaᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checkList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checkList(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -22152,7 +22205,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checks(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -22196,7 +22249,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_isReady(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_isReady(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -22237,7 +22290,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReadyGeneration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReadyGeneration(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -22278,7 +22331,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReconcileTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReconcileTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -22319,7 +22372,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOGithub__com___kloudlite___operator___pkg___raw____json__RawJson2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgRawJSONRawJSON(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -22364,7 +22417,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__ResourceRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorResourceRefᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_resources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_resources(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___operator__Status", Field: field, @@ -22410,12 +22463,12 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___raw____j if resTmp == nil { return graphql.Null } - res := resTmp.(interface{}) + res := resTmp.(any) fc.Result = res return ec.marshalOAny2interface(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___raw____json__RawJson_RawMessage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___raw____json__RawJson_RawMessage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___pkg___raw____json__RawJson", Field: field, @@ -22459,7 +22512,7 @@ func (ec *executionContext) _ImagePullSecret_accountName(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -22503,7 +22556,7 @@ func (ec *executionContext) _ImagePullSecret_createdBy(ctx context.Context, fiel return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -22555,7 +22608,7 @@ func (ec *executionContext) _ImagePullSecret_creationTime(ctx context.Context, f return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -22599,7 +22652,7 @@ func (ec *executionContext) _ImagePullSecret_displayName(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -22640,7 +22693,7 @@ func (ec *executionContext) _ImagePullSecret_dockerConfigJson(ctx context.Contex return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_dockerConfigJson(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_dockerConfigJson(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -22681,7 +22734,7 @@ func (ec *executionContext) _ImagePullSecret_environments(ctx context.Context, f return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_environments(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_environments(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -22725,7 +22778,7 @@ func (ec *executionContext) _ImagePullSecret_format(ctx context.Context, field g return ec.marshalNGithub__com___kloudlite___api___apps___console___internal___entities__PullSecretFormat2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsConsoleInternalEntitiesPullSecretFormat(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_format(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_format(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -22769,7 +22822,7 @@ func (ec *executionContext) _ImagePullSecret_id(ctx context.Context, field graph return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -22813,7 +22866,7 @@ func (ec *executionContext) _ImagePullSecret_lastUpdatedBy(ctx context.Context, return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -22862,7 +22915,7 @@ func (ec *executionContext) _ImagePullSecret_markedForDeletion(ctx context.Conte return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -22906,7 +22959,7 @@ func (ec *executionContext) _ImagePullSecret_metadata(ctx context.Context, field return ec.marshalNMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -22966,7 +23019,7 @@ func (ec *executionContext) _ImagePullSecret_recordVersion(ctx context.Context, return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -23007,7 +23060,7 @@ func (ec *executionContext) _ImagePullSecret_registryPassword(ctx context.Contex return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_registryPassword(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_registryPassword(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -23048,7 +23101,7 @@ func (ec *executionContext) _ImagePullSecret_registryURL(ctx context.Context, fi return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_registryURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_registryURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -23089,7 +23142,7 @@ func (ec *executionContext) _ImagePullSecret_registryUsername(ctx context.Contex return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_registryUsername(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_registryUsername(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -23133,7 +23186,7 @@ func (ec *executionContext) _ImagePullSecret_syncStatus(ctx context.Context, fie return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -23191,7 +23244,7 @@ func (ec *executionContext) _ImagePullSecret_updateTime(ctx context.Context, fie return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecret_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecret_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecret", Field: field, @@ -23235,7 +23288,7 @@ func (ec *executionContext) _ImagePullSecretEdge_cursor(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecretEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecretEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecretEdge", Field: field, @@ -23279,7 +23332,7 @@ func (ec *executionContext) _ImagePullSecretEdge_node(ctx context.Context, field return ec.marshalNImagePullSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImagePullSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecretEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecretEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecretEdge", Field: field, @@ -23359,7 +23412,7 @@ func (ec *executionContext) _ImagePullSecretPaginatedRecords_edges(ctx context.C return ec.marshalNImagePullSecretEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImagePullSecretEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecretPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecretPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecretPaginatedRecords", Field: field, @@ -23409,7 +23462,7 @@ func (ec *executionContext) _ImagePullSecretPaginatedRecords_pageInfo(ctx contex return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecretPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecretPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecretPaginatedRecords", Field: field, @@ -23463,7 +23516,7 @@ func (ec *executionContext) _ImagePullSecretPaginatedRecords_totalCount(ctx cont return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImagePullSecretPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImagePullSecretPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImagePullSecretPaginatedRecords", Field: field, @@ -23507,7 +23560,7 @@ func (ec *executionContext) _ImportedManagedResource_accountName(ctx context.Con return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -23551,7 +23604,7 @@ func (ec *executionContext) _ImportedManagedResource_createdBy(ctx context.Conte return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -23603,7 +23656,7 @@ func (ec *executionContext) _ImportedManagedResource_creationTime(ctx context.Co return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -23647,7 +23700,7 @@ func (ec *executionContext) _ImportedManagedResource_displayName(ctx context.Con return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -23691,7 +23744,7 @@ func (ec *executionContext) _ImportedManagedResource_environmentName(ctx context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -23735,7 +23788,7 @@ func (ec *executionContext) _ImportedManagedResource_id(ctx context.Context, fie return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -23779,7 +23832,7 @@ func (ec *executionContext) _ImportedManagedResource_lastUpdatedBy(ctx context.C return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -23831,7 +23884,7 @@ func (ec *executionContext) _ImportedManagedResource_managedResourceRef(ctx cont return ec.marshalNGithub__com___kloudlite___api___apps___console___internal___entities__ManagedResourceRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsConsoleInternalEntitiesManagedResourceRef(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_managedResourceRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_managedResourceRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -23880,7 +23933,7 @@ func (ec *executionContext) _ImportedManagedResource_markedForDeletion(ctx conte return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -23924,7 +23977,7 @@ func (ec *executionContext) _ImportedManagedResource_name(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -23968,7 +24021,7 @@ func (ec *executionContext) _ImportedManagedResource_recordVersion(ctx context.C return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -24012,7 +24065,7 @@ func (ec *executionContext) _ImportedManagedResource_secretRef(ctx context.Conte return ec.marshalNGithub__com___kloudlite___operator___apis___common____types__SecretRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesSecretRef(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_secretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_secretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -24062,7 +24115,7 @@ func (ec *executionContext) _ImportedManagedResource_syncStatus(ctx context.Cont return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -24120,7 +24173,7 @@ func (ec *executionContext) _ImportedManagedResource_updateTime(ctx context.Cont return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -24161,7 +24214,7 @@ func (ec *executionContext) _ImportedManagedResource_managedResource(ctx context return ec.marshalOManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResource_managedResource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResource_managedResource(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResource", Field: field, @@ -24251,7 +24304,7 @@ func (ec *executionContext) _ImportedManagedResourceEdge_cursor(ctx context.Cont return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResourceEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResourceEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResourceEdge", Field: field, @@ -24295,7 +24348,7 @@ func (ec *executionContext) _ImportedManagedResourceEdge_node(ctx context.Contex return ec.marshalNImportedManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImportedManagedResource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResourceEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResourceEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResourceEdge", Field: field, @@ -24371,7 +24424,7 @@ func (ec *executionContext) _ImportedManagedResourcePaginatedRecords_edges(ctx c return ec.marshalNImportedManagedResourceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐImportedManagedResourceEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResourcePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResourcePaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResourcePaginatedRecords", Field: field, @@ -24421,7 +24474,7 @@ func (ec *executionContext) _ImportedManagedResourcePaginatedRecords_pageInfo(ct return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResourcePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResourcePaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResourcePaginatedRecords", Field: field, @@ -24475,7 +24528,7 @@ func (ec *executionContext) _ImportedManagedResourcePaginatedRecords_totalCount( return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ImportedManagedResourcePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ImportedManagedResourcePaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ImportedManagedResourcePaginatedRecords", Field: field, @@ -24516,7 +24569,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Secret_apiVersion(ctx co return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Secret", Field: field, @@ -24557,7 +24610,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Secret_data(ctx context. return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Secret", Field: field, @@ -24598,7 +24651,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Secret_immutable(ctx con return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_immutable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_immutable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Secret", Field: field, @@ -24639,7 +24692,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Secret_kind(ctx context. return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Secret", Field: field, @@ -24680,7 +24733,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Secret_metadata(ctx cont return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Secret", Field: field, @@ -24737,7 +24790,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Secret_stringData(ctx co return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_stringData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_stringData(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Secret", Field: field, @@ -24778,7 +24831,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Secret_type(ctx context. 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_K8s__io___api___core___v1__Secret_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Secret_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Secret", Field: field, @@ -24819,7 +24872,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Toleration_effect(ctx co return ec.marshalOK8s__io___api___core___v1__TaintEffect2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TaintEffect(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_effect(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_effect(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Toleration", Field: field, @@ -24860,7 +24913,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Toleration_key(ctx conte return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Toleration", Field: field, @@ -24901,7 +24954,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Toleration_operator(ctx return ec.marshalOK8s__io___api___core___v1__TolerationOperator2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationOperator(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_operator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_operator(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Toleration", Field: field, @@ -24942,7 +24995,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Toleration_tolerationSec return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_tolerationSeconds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_tolerationSeconds(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Toleration", Field: field, @@ -24983,7 +25036,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Toleration_value(ctx con return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__Toleration", Field: field, @@ -25024,7 +25077,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint return ec.marshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelector(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_labelSelector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_labelSelector(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TopologySpreadConstraint", Field: field, @@ -25071,7 +25124,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_matchLabelKeys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_matchLabelKeys(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TopologySpreadConstraint", Field: field, @@ -25115,7 +25168,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_maxSkew(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_maxSkew(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TopologySpreadConstraint", Field: field, @@ -25156,7 +25209,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_minDomains(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_minDomains(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TopologySpreadConstraint", Field: field, @@ -25197,7 +25250,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_nodeAffinityPolicy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_nodeAffinityPolicy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TopologySpreadConstraint", Field: field, @@ -25238,7 +25291,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_nodeTaintsPolicy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_nodeTaintsPolicy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TopologySpreadConstraint", Field: field, @@ -25282,7 +25335,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_topologyKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_topologyKey(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TopologySpreadConstraint", Field: field, @@ -25326,7 +25379,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint return ec.marshalNK8s__io___api___core___v1__UnsatisfiableConstraintAction2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1UnsatisfiableConstraintAction(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_whenUnsatisfiable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_whenUnsatisfiable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___api___core___v1__TopologySpreadConstraint", Field: field, @@ -25367,7 +25420,7 @@ func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__La return ec.marshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchExpressions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchExpressions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector", Field: field, @@ -25416,7 +25469,7 @@ func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__La return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchLabels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchLabels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector", Field: field, @@ -25460,7 +25513,7 @@ func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__La return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement", Field: field, @@ -25504,7 +25557,7 @@ func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__La return ec.marshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_operator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_operator(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement", Field: field, @@ -25545,7 +25598,7 @@ func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__La return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_values(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_values(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement", Field: field, @@ -25589,7 +25642,7 @@ func (ec *executionContext) _ManagedResource_accountName(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -25630,7 +25683,7 @@ func (ec *executionContext) _ManagedResource_apiVersion(ctx context.Context, fie return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -25674,7 +25727,7 @@ func (ec *executionContext) _ManagedResource_clusterName(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_clusterName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -25718,7 +25771,7 @@ func (ec *executionContext) _ManagedResource_createdBy(ctx context.Context, fiel return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -25770,7 +25823,7 @@ func (ec *executionContext) _ManagedResource_creationTime(ctx context.Context, f return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -25814,7 +25867,7 @@ func (ec *executionContext) _ManagedResource_displayName(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -25855,7 +25908,7 @@ func (ec *executionContext) _ManagedResource_enabled(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -25899,7 +25952,7 @@ func (ec *executionContext) _ManagedResource_environmentName(ctx context.Context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -25943,7 +25996,7 @@ func (ec *executionContext) _ManagedResource_id(ctx context.Context, field graph return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -25987,7 +26040,7 @@ func (ec *executionContext) _ManagedResource_isImported(ctx context.Context, fie return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_isImported(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_isImported(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26028,7 +26081,7 @@ func (ec *executionContext) _ManagedResource_kind(ctx context.Context, field gra return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26072,7 +26125,7 @@ func (ec *executionContext) _ManagedResource_lastUpdatedBy(ctx context.Context, return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26124,7 +26177,7 @@ func (ec *executionContext) _ManagedResource_managedServiceName(ctx context.Cont return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_managedServiceName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_managedServiceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26165,7 +26218,7 @@ func (ec *executionContext) _ManagedResource_markedForDeletion(ctx context.Conte return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26206,7 +26259,7 @@ func (ec *executionContext) _ManagedResource_metadata(ctx context.Context, field return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26266,7 +26319,7 @@ func (ec *executionContext) _ManagedResource_mresRef(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_mresRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_mresRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26310,7 +26363,7 @@ func (ec *executionContext) _ManagedResource_recordVersion(ctx context.Context, return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26354,7 +26407,7 @@ func (ec *executionContext) _ManagedResource_spec(ctx context.Context, field gra return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ManagedResourceSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_spec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26401,7 +26454,7 @@ func (ec *executionContext) _ManagedResource_status(ctx context.Context, field g return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26458,7 +26511,7 @@ func (ec *executionContext) _ManagedResource_syncedOutputSecretRef(ctx context.C return ec.marshalOK8s__io___api___core___v1__Secret2ᚖk8sᚗioᚋapiᚋcoreᚋv1ᚐSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_syncedOutputSecretRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_syncedOutputSecretRef(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26518,7 +26571,7 @@ func (ec *executionContext) _ManagedResource_syncStatus(ctx context.Context, fie return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_syncStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26576,7 +26629,7 @@ func (ec *executionContext) _ManagedResource_updateTime(ctx context.Context, fie return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResource_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResource_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResource", Field: field, @@ -26620,7 +26673,7 @@ func (ec *executionContext) _ManagedResourceEdge_cursor(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResourceEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResourceEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResourceEdge", Field: field, @@ -26664,7 +26717,7 @@ func (ec *executionContext) _ManagedResourceEdge_node(ctx context.Context, field return ec.marshalNManagedResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResourceEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResourceEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResourceEdge", Field: field, @@ -26754,7 +26807,7 @@ func (ec *executionContext) _ManagedResourceKeyRef_key(ctx context.Context, fiel return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResourceKeyRef_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResourceKeyRef_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResourceKeyRef", Field: field, @@ -26798,7 +26851,7 @@ func (ec *executionContext) _ManagedResourceKeyRef_mresName(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResourceKeyRef_mresName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResourceKeyRef_mresName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResourceKeyRef", Field: field, @@ -26842,7 +26895,7 @@ func (ec *executionContext) _ManagedResourceKeyValueRef_key(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResourceKeyValueRef_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResourceKeyValueRef_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResourceKeyValueRef", Field: field, @@ -26886,7 +26939,7 @@ func (ec *executionContext) _ManagedResourceKeyValueRef_mresName(ctx context.Con return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResourceKeyValueRef_mresName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResourceKeyValueRef_mresName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResourceKeyValueRef", Field: field, @@ -26930,7 +26983,7 @@ func (ec *executionContext) _ManagedResourceKeyValueRef_value(ctx context.Contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResourceKeyValueRef_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResourceKeyValueRef_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResourceKeyValueRef", Field: field, @@ -26974,7 +27027,7 @@ func (ec *executionContext) _ManagedResourcePaginatedRecords_edges(ctx context.C return ec.marshalNManagedResourceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐManagedResourceEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResourcePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResourcePaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResourcePaginatedRecords", Field: field, @@ -27024,7 +27077,7 @@ func (ec *executionContext) _ManagedResourcePaginatedRecords_pageInfo(ctx contex return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResourcePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResourcePaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResourcePaginatedRecords", Field: field, @@ -27078,7 +27131,7 @@ func (ec *executionContext) _ManagedResourcePaginatedRecords_totalCount(ctx cont return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ManagedResourcePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ManagedResourcePaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ManagedResourcePaginatedRecords", Field: field, @@ -27119,7 +27172,7 @@ func (ec *executionContext) _MatchFilter_array(ctx context.Context, field graphq return ec.marshalOAny2ᚕinterfaceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MatchFilter_array(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MatchFilter_array(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MatchFilter", Field: field, @@ -27160,7 +27213,7 @@ func (ec *executionContext) _MatchFilter_exact(ctx context.Context, field graphq return ec.marshalOAny2interface(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MatchFilter_exact(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MatchFilter_exact(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MatchFilter", Field: field, @@ -27204,7 +27257,7 @@ func (ec *executionContext) _MatchFilter_matchType(ctx context.Context, field gr return ec.marshalNGithub__com___kloudlite___api___pkg___repos__MatchType2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MatchFilter_matchType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MatchFilter_matchType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MatchFilter", Field: field, @@ -27245,7 +27298,7 @@ func (ec *executionContext) _MatchFilter_notInArray(ctx context.Context, field g return ec.marshalOAny2ᚕinterfaceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MatchFilter_notInArray(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MatchFilter_notInArray(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MatchFilter", Field: field, @@ -27286,7 +27339,7 @@ func (ec *executionContext) _MatchFilter_regex(ctx context.Context, field graphq return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MatchFilter_regex(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MatchFilter_regex(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MatchFilter", Field: field, @@ -27327,7 +27380,7 @@ func (ec *executionContext) _Metadata_annotations(ctx context.Context, field gra return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_annotations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -27371,7 +27424,7 @@ func (ec *executionContext) _Metadata_creationTimestamp(ctx context.Context, fie return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_creationTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_creationTimestamp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -27412,7 +27465,7 @@ func (ec *executionContext) _Metadata_deletionTimestamp(ctx context.Context, fie return ec.marshalODate2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_deletionTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_deletionTimestamp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -27456,7 +27509,7 @@ func (ec *executionContext) _Metadata_generation(ctx context.Context, field grap return ec.marshalNInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_generation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_generation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -27497,7 +27550,7 @@ func (ec *executionContext) _Metadata_labels(ctx context.Context, field graphql. return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -27541,7 +27594,7 @@ func (ec *executionContext) _Metadata_name(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -27582,7 +27635,7 @@ func (ec *executionContext) _Metadata_namespace(ctx context.Context, field graph return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Metadata_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_namespace(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Metadata", Field: field, @@ -31106,7 +31159,7 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_endCursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -31147,7 +31200,7 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasNextPage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -31188,7 +31241,7 @@ func (ec *executionContext) _PageInfo_hasPrevPage(ctx context.Context, field gra return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasPrevPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasPrevPage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -31229,7 +31282,7 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_startCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_startCursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -31270,7 +31323,7 @@ func (ec *executionContext) _Port_port(ctx context.Context, field graphql.Collec return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Port_port(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Port_port(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Port", Field: field, @@ -31311,7 +31364,7 @@ func (ec *executionContext) _Port_targetPort(ctx context.Context, field graphql. return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Port_targetPort(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Port_targetPort(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Port", Field: field, @@ -34474,7 +34527,7 @@ func (ec *executionContext) _Query__service(ctx context.Context, field graphql.C return ec.marshalN_Service2githubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐService(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query__service(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query__service(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -34593,7 +34646,7 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -34651,7 +34704,7 @@ func (ec *executionContext) _Router_accountName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_accountName(ctx 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: "Router", Field: field, @@ -34692,7 +34745,7 @@ func (ec *executionContext) _Router_apiVersion(ctx context.Context, field graphq return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_apiVersion(ctx 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: "Router", Field: field, @@ -34736,7 +34789,7 @@ func (ec *executionContext) _Router_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_Router_createdBy(ctx 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: "Router", Field: field, @@ -34788,7 +34841,7 @@ func (ec *executionContext) _Router_creationTime(ctx context.Context, field grap return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_creationTime(ctx 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: "Router", Field: field, @@ -34832,7 +34885,7 @@ func (ec *executionContext) _Router_displayName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_displayName(ctx 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: "Router", Field: field, @@ -34873,7 +34926,7 @@ func (ec *executionContext) _Router_enabled(ctx context.Context, field graphql.C return ec.marshalOBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_enabled(ctx 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: "Router", Field: field, @@ -34917,7 +34970,7 @@ func (ec *executionContext) _Router_environmentName(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_environmentName(ctx 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: "Router", Field: field, @@ -34961,7 +35014,7 @@ func (ec *executionContext) _Router_id(ctx context.Context, field graphql.Collec return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_id(ctx 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: "Router", Field: field, @@ -35002,7 +35055,7 @@ func (ec *executionContext) _Router_kind(ctx context.Context, field graphql.Coll return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_kind(ctx 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: "Router", Field: field, @@ -35046,7 +35099,7 @@ func (ec *executionContext) _Router_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_Router_lastUpdatedBy(ctx 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: "Router", Field: field, @@ -35095,7 +35148,7 @@ func (ec *executionContext) _Router_markedForDeletion(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_markedForDeletion(ctx 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: "Router", Field: field, @@ -35136,7 +35189,7 @@ func (ec *executionContext) _Router_metadata(ctx context.Context, field graphql. return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_metadata(ctx 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: "Router", Field: field, @@ -35196,7 +35249,7 @@ func (ec *executionContext) _Router_recordVersion(ctx context.Context, field gra return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_recordVersion(ctx 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: "Router", Field: field, @@ -35240,7 +35293,7 @@ func (ec *executionContext) _Router_spec(ctx context.Context, field graphql.Coll 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_Router_spec(ctx 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: "Router", Field: field, @@ -35301,7 +35354,7 @@ func (ec *executionContext) _Router_status(ctx context.Context, field graphql.Co return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2githubᚗcomᚋkloudliteᚋoperatorᚋpkgᚋoperatorᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_status(ctx 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: "Router", Field: field, @@ -35361,7 +35414,7 @@ func (ec *executionContext) _Router_syncStatus(ctx context.Context, field graphq return ec.marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_syncStatus(ctx 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: "Router", Field: field, @@ -35419,7 +35472,7 @@ func (ec *executionContext) _Router_updateTime(ctx context.Context, field graphq return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Router_updateTime(ctx 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: "Router", Field: field, @@ -35463,7 +35516,7 @@ func (ec *executionContext) _RouterEdge_cursor(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RouterEdge_cursor(ctx 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: "RouterEdge", Field: field, @@ -35507,7 +35560,7 @@ func (ec *executionContext) _RouterEdge_node(ctx context.Context, field graphql. return ec.marshalNRouter2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RouterEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RouterEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "RouterEdge", Field: field, @@ -35587,7 +35640,7 @@ func (ec *executionContext) _RouterPaginatedRecords_edges(ctx context.Context, f return ec.marshalNRouterEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRouterEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RouterPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RouterPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "RouterPaginatedRecords", Field: field, @@ -35637,7 +35690,7 @@ 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(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RouterPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "RouterPaginatedRecords", Field: field, @@ -35691,7 +35744,7 @@ func (ec *executionContext) _RouterPaginatedRecords_totalCount(ctx context.Conte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RouterPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RouterPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "RouterPaginatedRecords", Field: field, @@ -35735,7 +35788,7 @@ func (ec *executionContext) _Secret_accountName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -35776,7 +35829,7 @@ func (ec *executionContext) _Secret_apiVersion(ctx context.Context, field graphq return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_apiVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -35820,7 +35873,7 @@ 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(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -35872,7 +35925,7 @@ func (ec *executionContext) _Secret_creationTime(ctx context.Context, field grap return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_creationTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -35913,7 +35966,7 @@ func (ec *executionContext) _Secret_data(ctx context.Context, field graphql.Coll return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -35957,7 +36010,7 @@ func (ec *executionContext) _Secret_displayName(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36001,7 +36054,7 @@ func (ec *executionContext) _Secret_environmentName(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36042,7 +36095,7 @@ func (ec *executionContext) _Secret_for(ctx context.Context, field graphql.Colle 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(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_for(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36096,7 +36149,7 @@ 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(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36137,7 +36190,7 @@ func (ec *executionContext) _Secret_immutable(ctx context.Context, field graphql return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_immutable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_immutable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36181,7 +36234,7 @@ func (ec *executionContext) _Secret_isReadyOnly(ctx context.Context, field graph return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_isReadyOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_isReadyOnly(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36222,7 +36275,7 @@ func (ec *executionContext) _Secret_kind(ctx context.Context, field graphql.Coll return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36266,7 +36319,7 @@ 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(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_lastUpdatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36315,7 +36368,7 @@ func (ec *executionContext) _Secret_markedForDeletion(ctx context.Context, field return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_markedForDeletion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36356,7 +36409,7 @@ 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(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36416,7 +36469,7 @@ func (ec *executionContext) _Secret_recordVersion(ctx context.Context, field gra return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_recordVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36457,7 +36510,7 @@ func (ec *executionContext) _Secret_stringData(ctx context.Context, field graphq return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_stringData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_stringData(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36501,7 +36554,7 @@ func (ec *executionContext) _Secret_syncStatus(ctx context.Context, field graphq 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(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_syncStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36556,7 +36609,7 @@ func (ec *executionContext) _Secret_type(ctx context.Context, field graphql.Coll 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(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36600,7 +36653,7 @@ func (ec *executionContext) _Secret_updateTime(ctx context.Context, field graphq return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Secret_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Secret_updateTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Secret", Field: field, @@ -36644,7 +36697,7 @@ func (ec *executionContext) _SecretEdge_cursor(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SecretEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SecretEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SecretEdge", Field: field, @@ -36688,7 +36741,7 @@ func (ec *executionContext) _SecretEdge_node(ctx context.Context, field graphql. return ec.marshalNSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐSecret(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SecretEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SecretEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SecretEdge", Field: field, @@ -36774,7 +36827,7 @@ func (ec *executionContext) _SecretKeyRef_key(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SecretKeyRef_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SecretKeyRef_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SecretKeyRef", Field: field, @@ -36818,7 +36871,7 @@ func (ec *executionContext) _SecretKeyRef_secretName(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SecretKeyRef_secretName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SecretKeyRef_secretName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SecretKeyRef", Field: field, @@ -36862,7 +36915,7 @@ func (ec *executionContext) _SecretKeyValueRef_key(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SecretKeyValueRef_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SecretKeyValueRef_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SecretKeyValueRef", Field: field, @@ -36906,7 +36959,7 @@ func (ec *executionContext) _SecretKeyValueRef_secretName(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SecretKeyValueRef_secretName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SecretKeyValueRef_secretName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SecretKeyValueRef", Field: field, @@ -36950,7 +37003,7 @@ func (ec *executionContext) _SecretKeyValueRef_value(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SecretKeyValueRef_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SecretKeyValueRef_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SecretKeyValueRef", Field: field, @@ -36994,7 +37047,7 @@ func (ec *executionContext) _SecretPaginatedRecords_edges(ctx context.Context, f return ec.marshalNSecretEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSecretEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SecretPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SecretPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SecretPaginatedRecords", Field: field, @@ -37044,7 +37097,7 @@ func (ec *executionContext) _SecretPaginatedRecords_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_SecretPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SecretPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SecretPaginatedRecords", Field: field, @@ -37098,7 +37151,7 @@ func (ec *executionContext) _SecretPaginatedRecords_totalCount(ctx context.Conte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SecretPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SecretPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SecretPaginatedRecords", Field: field, @@ -37139,7 +37192,7 @@ func (ec *executionContext) __Service_sdl(ctx context.Context, field graphql.Col return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext__Service_sdl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext__Service_sdl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "_Service", Field: field, @@ -37183,7 +37236,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -37224,7 +37277,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -37268,7 +37321,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_locations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -37312,7 +37365,7 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_args(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -37366,7 +37419,7 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_isRepeatable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -37410,7 +37463,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -37451,7 +37504,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -37495,7 +37548,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -37536,7 +37589,7 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -37580,7 +37633,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -37621,7 +37674,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -37665,7 +37718,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_args(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -37719,7 +37772,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -37785,7 +37838,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -37826,7 +37879,7 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -37870,7 +37923,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -37911,7 +37964,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -37955,7 +38008,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -38018,7 +38071,7 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_defaultValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -38059,7 +38112,7 @@ func (ec *executionContext) ___Schema_description(ctx context.Context, field gra return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -38103,7 +38156,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_types(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -38169,7 +38222,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_queryType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -38232,7 +38285,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_mutationType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -38295,7 +38348,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_subscriptionType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -38361,7 +38414,7 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_directives(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -38417,7 +38470,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -38458,7 +38511,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -38499,7 +38552,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -38606,7 +38659,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_interfaces(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -38669,7 +38722,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_possibleTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -38794,7 +38847,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_inputFields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -38845,7 +38898,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_ofType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -38908,7 +38961,7 @@ func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field gr return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_specifiedByURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -40372,7 +40425,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a asMap[k] = v } - fieldsInOrder := [...]string{"routing", "targetNamespace"} + fieldsInOrder := [...]string{"routing", "suspend", "targetNamespace"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -40386,6 +40439,13 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, err } it.Routing = data + case "suspend": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("suspend")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.Suspend = data case "targetNamespace": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("targetNamespace")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) @@ -42920,7 +42980,7 @@ func (ec *executionContext) _App(ctx context.Context, sel ast.SelectionSet, obj case "build": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -42953,7 +43013,7 @@ func (ec *executionContext) _App(ctx context.Context, sel ast.SelectionSet, obj case "serviceHost": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -43233,7 +43293,7 @@ func (ec *executionContext) _ClusterManagedService(ctx context.Context, sel ast. case "spec": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -43443,7 +43503,7 @@ func (ec *executionContext) _Config(ctx context.Context, sel ast.SelectionSet, o case "binaryData": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -43517,7 +43577,7 @@ func (ec *executionContext) _Config(ctx context.Context, sel ast.SelectionSet, o case "data": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -44076,7 +44136,7 @@ func (ec *executionContext) _Environment(ctx context.Context, sel ast.SelectionS case "spec": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -44358,7 +44418,7 @@ func (ec *executionContext) _ExternalApp(ctx context.Context, sel ast.SelectionS case "spec": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -44751,7 +44811,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt case "lastSyncedAt": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -44794,7 +44854,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___pkg___types__SyncSt case "syncScheduledAt": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -45606,6 +45666,8 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec") case "routing": out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_routing(ctx, field, obj) + case "suspend": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_suspend(ctx, field, obj) case "targetNamespace": out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec_targetNamespace(ctx, field, obj) default: @@ -46485,7 +46547,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator case "checkList": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -46518,7 +46580,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator case "checks": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -46558,7 +46620,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator case "lastReconcileTime": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -46591,7 +46653,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator case "message": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -46624,7 +46686,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator case "resources": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -47236,7 +47298,7 @@ func (ec *executionContext) _ImportedManagedResource(ctx context.Context, sel as case "managedResource": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -47398,7 +47460,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Secret(ctx context.Conte case "data": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -47437,7 +47499,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Secret(ctx context.Conte case "stringData": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -47470,7 +47532,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__Secret(ctx context.Conte case "type": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48173,7 +48235,7 @@ func (ec *executionContext) _Metadata(ctx context.Context, sel ast.SelectionSet, case "annotations": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48242,7 +48304,7 @@ func (ec *executionContext) _Metadata(ctx context.Context, sel ast.SelectionSet, case "deletionTimestamp": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48280,7 +48342,7 @@ func (ec *executionContext) _Metadata(ctx context.Context, sel ast.SelectionSet, case "labels": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48681,7 +48743,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_listEnvironments": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48700,7 +48762,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_getEnvironment": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48741,7 +48803,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_listImagePullSecrets": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48760,7 +48822,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_getImagePullSecret": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48801,7 +48863,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_listApps": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48820,7 +48882,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_getApp": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48883,7 +48945,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_listExternalApps": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48902,7 +48964,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_getExternalApp": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48943,7 +49005,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_getConfigValues": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48962,7 +49024,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_listConfigs": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -48981,7 +49043,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_getConfig": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49022,7 +49084,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_getSecretValues": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49041,7 +49103,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_listSecrets": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49060,7 +49122,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_getSecret": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49101,7 +49163,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_listRouters": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49120,7 +49182,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_getRouter": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49205,7 +49267,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_listClusterManagedServices": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49224,7 +49286,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "infra_getClusterManagedService": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49243,7 +49305,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_listManagedResources": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49262,7 +49324,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_getManagedResource": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49303,7 +49365,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "core_listImportedManagedResources": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49743,7 +49805,7 @@ func (ec *executionContext) _Secret(ctx context.Context, sel ast.SelectionSet, o case "data": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49786,7 +49848,7 @@ func (ec *executionContext) _Secret(ctx context.Context, sel ast.SelectionSet, o case "for": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49878,7 +49940,7 @@ func (ec *executionContext) _Secret(ctx context.Context, sel ast.SelectionSet, o case "stringData": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -49916,7 +49978,7 @@ func (ec *executionContext) _Secret(ctx context.Context, sel ast.SelectionSet, o case "type": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) diff --git a/apps/console/internal/app/graph/imagepullsecret.resolvers.go b/apps/console/internal/app/graph/imagepullsecret.resolvers.go index 221f056a4..ecef7dcc3 100644 --- a/apps/console/internal/app/graph/imagepullsecret.resolvers.go +++ b/apps/console/internal/app/graph/imagepullsecret.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/console/internal/app/graph/importedmanagedresource.resolvers.go b/apps/console/internal/app/graph/importedmanagedresource.resolvers.go index aacb9cee1..233bf165e 100644 --- a/apps/console/internal/app/graph/importedmanagedresource.resolvers.go +++ b/apps/console/internal/app/graph/importedmanagedresource.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/console/internal/app/graph/managedresource.resolvers.go b/apps/console/internal/app/graph/managedresource.resolvers.go index 69a7381d0..3233969e4 100644 --- a/apps/console/internal/app/graph/managedresource.resolvers.go +++ b/apps/console/internal/app/graph/managedresource.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/console/internal/app/graph/model/models_gen.go b/apps/console/internal/app/graph/model/models_gen.go index bfe50fee4..cb37a2a0e 100644 --- a/apps/console/internal/app/graph/model/models_gen.go +++ b/apps/console/internal/app/graph/model/models_gen.go @@ -342,11 +342,13 @@ type GithubComKloudliteOperatorApisCrdsV1EnvironmentRoutingIn struct { type GithubComKloudliteOperatorApisCrdsV1EnvironmentSpec struct { Routing *GithubComKloudliteOperatorApisCrdsV1EnvironmentRouting `json:"routing,omitempty"` + Suspend *bool `json:"suspend,omitempty"` TargetNamespace *string `json:"targetNamespace,omitempty"` } type GithubComKloudliteOperatorApisCrdsV1EnvironmentSpecIn struct { Routing *GithubComKloudliteOperatorApisCrdsV1EnvironmentRoutingIn `json:"routing,omitempty"` + Suspend *bool `json:"suspend,omitempty"` TargetNamespace *string `json:"targetNamespace,omitempty"` } @@ -613,11 +615,11 @@ type GithubComKloudliteOperatorPkgOperatorStatusIn struct { } type GithubComKloudliteOperatorPkgRawJSONRawJSON struct { - RawMessage interface{} `json:"RawMessage,omitempty"` + RawMessage any `json:"RawMessage,omitempty"` } type GithubComKloudliteOperatorPkgRawJSONRawJSONIn struct { - RawMessage interface{} `json:"RawMessage,omitempty"` + RawMessage any `json:"RawMessage,omitempty"` } type ImagePullSecretEdge struct { diff --git a/apps/console/internal/app/graph/router.resolvers.go b/apps/console/internal/app/graph/router.resolvers.go index b69be7b32..aee6b6f5a 100644 --- a/apps/console/internal/app/graph/router.resolvers.go +++ b/apps/console/internal/app/graph/router.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index 395f3b8e4..2b4477ef9 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -2,12 +2,11 @@ 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.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" "fmt" - "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/apps/console/internal/app/graph/generated" @@ -986,7 +985,5 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type ( - mutationResolver struct{ *Resolver } - queryResolver struct{ *Resolver } -) +type mutationResolver struct{ *Resolver } +type queryResolver struct{ *Resolver } diff --git a/apps/console/internal/app/graph/secret.resolvers.go b/apps/console/internal/app/graph/secret.resolvers.go index ff6ad460f..1091a42b7 100644 --- a/apps/console/internal/app/graph/secret.resolvers.go +++ b/apps/console/internal/app/graph/secret.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.45 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls index c89eeac85..8b91086d3 100644 --- a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -147,6 +147,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting @ type Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpec @shareable { routing: Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRouting + suspend: Boolean targetNamespace: String } @@ -480,6 +481,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingI input Github__com___kloudlite___operator___apis___crds___v1__EnvironmentSpecIn { routing: Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingIn + suspend: Boolean targetNamespace: String } diff --git a/apps/console/internal/domain/environment.go b/apps/console/internal/domain/environment.go index 476941dda..8a3cb6679 100644 --- a/apps/console/internal/domain/environment.go +++ b/apps/console/internal/domain/environment.go @@ -534,6 +534,7 @@ func (d *domain) UpdateEnvironment(ctx ConsoleContext, env entities.Environment) common.PatchOpts{ XPatch: repos.Document{ fc.EnvironmentSpecRouting: env.Spec.Routing, + fc.EnvironmentSpecSuspend: env.Spec.Suspend, }, }, ) diff --git a/apps/console/internal/domain/service-binding.go b/apps/console/internal/domain/service-binding.go index 5679a8f06..e830c8183 100644 --- a/apps/console/internal/domain/service-binding.go +++ b/apps/console/internal/domain/service-binding.go @@ -11,7 +11,19 @@ import ( // OnServiceBindingDeleteMessage implements Domain. func (d *domain) OnServiceBindingDeleteMessage(ctx ConsoleContext, svcb *networkingv1.ServiceBinding) error { - panic("unimplemented") + if svcb == nil { + return errors.Newf("no service binding found") + } + + if svcb.Spec.Hostname == "" { + return nil + } + + if err := d.serviceBindingRepo.DeleteOne(ctx, repos.Filter{fc.AccountName: ctx.AccountName, fc.ServiceBindingSpecHostname: svcb.Spec.Hostname}); err != nil { + return err + } + + return nil } // OnServiceBindingUpdateMessage implements Domain. @@ -24,9 +36,13 @@ func (d *domain) OnServiceBindingUpdateMessage(ctx ConsoleContext, svcb *network return nil } + if svcb.Spec.ServiceIP == nil { + return nil + } + if _, err := d.serviceBindingRepo.Upsert(ctx, repos.Filter{ fc.AccountName: ctx.AccountName, - // fc.ClusterName: opts.ClusterName, + // fc.ClusterName: opts.ClusterName, // fc.MetadataName: svcb.Name, fc.ServiceBindingSpecHostname: svcb.Spec.Hostname, }, &entities.ServiceBinding{ diff --git a/apps/console/internal/entities/field-constants/generated_constants.go b/apps/console/internal/entities/field-constants/generated_constants.go index 7902670b4..dbfe519ac 100644 --- a/apps/console/internal/entities/field-constants/generated_constants.go +++ b/apps/console/internal/entities/field-constants/generated_constants.go @@ -110,6 +110,7 @@ const ( EnvironmentSpecRoutingMode = "spec.routing.mode" EnvironmentSpecRoutingPrivateIngressClass = "spec.routing.privateIngressClass" EnvironmentSpecRoutingPublicIngressClass = "spec.routing.publicIngressClass" + EnvironmentSpecSuspend = "spec.suspend" EnvironmentSpecTargetNamespace = "spec.targetNamespace" ) diff --git a/go.mod b/go.mod index 9098e4b8e..ce261d87b 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/google/go-github/v43 v43.0.0 github.com/google/go-github/v45 v45.2.0 github.com/gorilla/websocket v1.5.0 - github.com/kloudlite/operator v0.0.0-20240725140628-a3dbbc898710 + github.com/kloudlite/operator v0.0.0-20240828110352-a9cc09ec2511 github.com/matoous/go-nanoid/v2 v2.0.0 github.com/pkg/errors v0.9.1 github.com/sendgrid/sendgrid-go v3.11.1+incompatible @@ -32,10 +32,10 @@ require ( google.golang.org/grpc v1.61.0 google.golang.org/protobuf v1.34.1 gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/api v0.28.4 - k8s.io/apiextensions-apiserver v0.28.3 - k8s.io/apimachinery v0.28.4 - k8s.io/client-go v0.28.3 + k8s.io/api v0.29.0 + k8s.io/apiextensions-apiserver v0.29.0 + k8s.io/apimachinery v0.29.0 + k8s.io/client-go v0.29.0 sigs.k8s.io/controller-runtime v0.16.3 sigs.k8s.io/yaml v1.3.0 ) @@ -48,8 +48,8 @@ require ( github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 github.com/miekg/dns v1.1.55 github.com/nats-io/nats.go v1.31.0 - github.com/onsi/ginkgo/v2 v2.12.0 - github.com/onsi/gomega v1.27.10 + github.com/onsi/ginkgo/v2 v2.13.0 + github.com/onsi/gomega v1.29.0 github.com/seancfoley/ipaddress-go v1.5.4 github.com/shamaton/msgpack/v2 v2.2.0 github.com/stretchr/testify v1.9.0 @@ -90,7 +90,7 @@ require ( cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.2.0 // indirect + github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/andybalholm/brotli v1.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -101,7 +101,7 @@ require ( github.com/evanphx/json-patch/v5 v5.7.0 // indirect github.com/fasthttp/websocket v1.5.0 // indirect github.com/fatih/color v1.16.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect @@ -168,10 +168,10 @@ require ( gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/component-base v0.28.3 // indirect + k8s.io/component-base v0.29.0 // indirect k8s.io/klog/v2 v2.110.1 // indirect - k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) diff --git a/go.sum b/go.sum index 1e170c254..5a3647830 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,9 @@ github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym3 github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/PaesslerAG/gval v1.0.0 h1:GEKnRwkWDdf9dOmKcNrar9EA1bz1z9DqPIO1+iLzhd8= @@ -60,8 +61,8 @@ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= +github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fasthttp/websocket v1.5.0 h1:B4zbe3xXyvIdnqjOZrafVFklCUq5ZLo/TqCt5JA1wLE= @@ -70,8 +71,8 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk= github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= @@ -176,8 +177,8 @@ github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2 github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 h1:YnZh3TL6AG4EfoInx1/L5zcPHd2QxgLKseJB1KtHjdQ= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55/go.mod h1:GZj3wZmIw/qCciclRhgQTgmGiqe8wxoVzMXQjbOfnbc= -github.com/kloudlite/operator v0.0.0-20240725140628-a3dbbc898710 h1:a+5HIVOce/XVsIGg8JRfaULu9sULJZPp0yDhyBkp3BU= -github.com/kloudlite/operator v0.0.0-20240725140628-a3dbbc898710/go.mod h1:c6FiZvYztvr92/UcIUvQurp3oWMrrEK7deAriHckTPw= +github.com/kloudlite/operator v0.0.0-20240828110352-a9cc09ec2511 h1:6+Dt7TsoCI9U0UIk6BNxdFCB2YZ4nkjBqSrG3qoyGdw= +github.com/kloudlite/operator v0.0.0-20240828110352-a9cc09ec2511/go.mod h1:VkreINDW43qeTsDv9gfGH5M9c5OG/jPGYOGxj8otsGY= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -235,10 +236,10 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= -github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -406,7 +407,6 @@ golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= @@ -472,27 +472,27 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= -k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= -k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= -k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= -k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= -k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= -k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= -k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= +k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= +k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= +k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= +k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= +k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= +k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= +k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= +k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= -k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/pkg/grpc/server.go b/pkg/grpc/server.go index b510c47e3..f8918e7e5 100644 --- a/pkg/grpc/server.go +++ b/pkg/grpc/server.go @@ -58,11 +58,12 @@ func NewGrpcServer(opts ServerOpts) (Server, error) { grpc.StreamInterceptor(func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { p, ok := peer.FromContext(stream.Context()) if ok { - if opts.Slogger != nil { - opts.Slogger.Debug("new grpc connection", "from", p.Addr.String()) - } else { - opts.Logger.Debugf("[Stream] New connection from %s", p.Addr.String()) - } + _ = p.Addr.String() + // if opts.Slogger != nil { + // opts.Slogger.Debug("new grpc connection", "from", p.Addr.String()) + // } else { + // opts.Logger.Debugf("[Stream] New connection from %s", p.Addr.String()) + // } } return handler(srv, stream) }), From f11f65d0243364f53ea5d612057b27c814df310d Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 29 Aug 2024 10:27:26 +0530 Subject: [PATCH 34/89] fix: cleans up service binding dns records, when synced without `spec.hostname` --- apps/console/internal/app/dns-server.go | 3 +++ .../internal/domain/service-binding.go | 20 ++++++++++--------- apps/console/main.go | 3 +-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/apps/console/internal/app/dns-server.go b/apps/console/internal/app/dns-server.go index c0eea26e4..6b6257f5d 100644 --- a/apps/console/internal/app/dns-server.go +++ b/apps/console/internal/app/dns-server.go @@ -73,11 +73,13 @@ func (h *dnsHandler) resolver(ctx context.Context, domain string, qtype uint16) question := m.Question[0] sp := strings.SplitN(strings.ToLower(question.Name), fmt.Sprintf(".%s", h.kloudliteDNSSuffix), 2) if len(sp) < 2 { + h.logger.Debug("INVALID DNS QUERY", "domain", domain, "qtype", qtype) return nil, errInvalidDNSQuery } if strings.HasSuffix(sp[0], ".local") { // INFO: domains ending with .local are supposed to be reserved for local machine only + h.logger.Debug("LOCAL DOMAIN", "domain", domain, "qtype", qtype) return h.newRR(question.Name, 7*24*60*60, "127.0.0.1") } @@ -87,6 +89,7 @@ func (h *dnsHandler) resolver(ctx context.Context, domain string, qtype uint16) sb, err := h.serviceBindingDomain.FindServiceBindingByHostname(ctx, accountName, hostname) if err != nil { + h.logger.Debug("failed to find service binding, got", "err", err, "domain", domain, "qtype", qtype) return nil, errors.NewEf(err, "failed to find service binding") } diff --git a/apps/console/internal/domain/service-binding.go b/apps/console/internal/domain/service-binding.go index e830c8183..62f5a78ae 100644 --- a/apps/console/internal/domain/service-binding.go +++ b/apps/console/internal/domain/service-binding.go @@ -32,20 +32,22 @@ func (d *domain) OnServiceBindingUpdateMessage(ctx ConsoleContext, svcb *network return errors.Newf("no service binding found") } - if svcb.Spec.Hostname == "" { - return nil + filter := repos.Filter{ + fc.AccountName: ctx.AccountName, + fc.ServiceBindingSpecHostname: svcb.Spec.Hostname, } - if svcb.Spec.ServiceIP == nil { + if svcb.Spec.ServiceIP == nil || svcb.Spec.Hostname == "" { + // INFO: it means that service binding has been de-allocated + if err := d.serviceBindingRepo.DeleteOne(ctx, filter); err != nil { + if !errors.Is(err, repos.ErrNoDocuments) { + return err + } + } return nil } - if _, err := d.serviceBindingRepo.Upsert(ctx, repos.Filter{ - fc.AccountName: ctx.AccountName, - // fc.ClusterName: opts.ClusterName, - // fc.MetadataName: svcb.Name, - fc.ServiceBindingSpecHostname: svcb.Spec.Hostname, - }, &entities.ServiceBinding{ + if _, err := d.serviceBindingRepo.Upsert(ctx, filter, &entities.ServiceBinding{ ServiceBinding: *svcb, AccountName: ctx.AccountName, ClusterName: opts.ClusterName, diff --git a/apps/console/main.go b/apps/console/main.go index d655ba441..d9af441ee 100644 --- a/apps/console/main.go +++ b/apps/console/main.go @@ -5,7 +5,6 @@ import ( "flag" "log/slog" "os" - "strings" "time" "github.com/kloudlite/api/pkg/errors" @@ -28,7 +27,7 @@ func main() { flag.BoolVar(&debug, "debug", false, "--debug") flag.Parse() - logger, err := logging.New(&logging.Options{Name: "console", ShowDebugLog: isDev || strings.ToLower(os.Getenv("LOG_LEVEL")) == "debug"}) + logger, err := logging.New(&logging.Options{Name: "console", ShowDebugLog: debug}) if err != nil { panic(err) } From 315890a47877a970c75b184afb040951cb91f93c Mon Sep 17 00:00:00 2001 From: nxtcoder36 Date: Tue, 3 Sep 2024 12:57:50 +0530 Subject: [PATCH 35/89] 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 36/89] 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 37/89] 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 38/89] 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 ( From 248b2ffd8d302f4f7b3c578c73e5028129052a65 Mon Sep 17 00:00:00 2001 From: Karthik Thirumalasetti Date: Wed, 4 Sep 2024 17:54:40 +0530 Subject: [PATCH 39/89] Update LICENSE Signed-off-by: Karthik Thirumalasetti --- LICENSE | 1018 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 561 insertions(+), 457 deletions(-) diff --git a/LICENSE b/LICENSE index bf4132c31..0ad25db4b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,295 +1,354 @@ - Server Side Public License - VERSION 1, MARCH 5, 2022 - - Copyright © 2023 Kloudlite Labs Pvt Ltd. - - Everyone is permitted to copy and distribute verbatim copies of this - license document, but changing it is not allowed. + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. TERMS AND CONDITIONS 0. Definitions. - - “This License” refers to Server Side Public License. - - “Copyright” also means copyright-like laws that apply to other kinds of - works, such as semiconductor masks. - - “The Program” refers to any copyrightable work licensed under this - License. Each licensee is addressed as “you”. “Licensees” and - “recipients” may be individuals or organizations. - - To “modify” a work means to copy from or adapt all or part of the work in - a fashion requiring copyright permission, other than the making of an - exact copy. The resulting work is called a “modified version” of the - earlier work or a work “based on” the earlier work. - - A “covered work” means either the unmodified Program or a work based on - the Program. - - To “propagate” a work means to do anything with it that, without - permission, would make you directly or secondarily liable for - infringement under applicable copyright law, except executing it on a - computer or modifying a private copy. Propagation includes copying, - distribution (with or without modification), making available to the - public, and in some countries other activities as well. - - To “convey” a work means any kind of propagation that enables other - parties to make or receive copies. Mere interaction with a user through a - computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays “Appropriate Legal Notices” to the - extent that it includes a convenient and prominently visible feature that - (1) displays an appropriate copyright notice, and (2) tells the user that - there is no warranty for the work (except to the extent that warranties - are provided), that licensees may convey the work under this License, and - how to view a copy of this License. If the interface presents a list of - user commands or options, such as a menu, a prominent item in the list - meets this criterion. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. 1. Source Code. - The “source code” for a work means the preferred form of the work for - making modifications to it. “Object code” means any non-source form of a - work. - - A “Standard Interface” means an interface that either is an official - standard defined by a recognized standards body, or, in the case of - interfaces specified for a particular programming language, one that is - widely used among developers working in that language. The “System - Libraries” of an executable work include anything, other than the work as - a whole, that (a) is included in the normal form of packaging a Major - Component, but which is not part of that Major Component, and (b) serves - only to enable use of the work with that Major Component, or to implement - a Standard Interface for which an implementation is available to the - public in source code form. A “Major Component”, in this context, means a - major essential component (kernel, window system, and so on) of the - specific operating system (if any) on which the executable work runs, or - a compiler used to produce the work, or an object code interpreter used - to run it. - - The “Corresponding Source” for a work in object code form means all the - source code needed to generate, install, and (for an executable work) run - the object code and to modify the work, including scripts to control - those activities. However, it does not include the work's System - Libraries, or general-purpose tools or generally available free programs - which are used unmodified in performing those activities but which are - not part of the work. For example, Corresponding Source includes - interface definition files associated with source files for the work, and - the source code for shared libraries and dynamically linked subprograms - that the work is specifically designed to require, such as by intimate - data communication or control flow between those subprograms and other - parts of the work. - - The Corresponding Source need not include anything that users can - regenerate automatically from other parts of the Corresponding Source. - - The Corresponding Source for a work in source code form is that same work. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. 2. Basic Permissions. All rights granted under this License are granted for the term of - copyright on the Program, and are irrevocable provided the stated - conditions are met. This License explicitly affirms your unlimited - permission to run the unmodified Program, subject to section 13. The - output from running a covered work is covered by this License only if the - output, given its content, constitutes a covered work. This License - acknowledges your rights of fair use or other equivalent, as provided by - copyright law. Subject to section 13, you may make, run and propagate - covered works that you do not convey, without conditions so long as your - license otherwise remains in force. You may convey covered works to - others for the sole purpose of having them make modifications exclusively - for you, or provide you with facilities for running those works, provided - that you comply with the terms of this License in conveying all - material for which you do not control copyright. Those thus making or - running the covered works for you must do so exclusively on your - behalf, under your direction and control, on terms that prohibit them - from making any copies of your copyrighted material outside their - relationship with you. - - Conveying under any other circumstances is permitted solely under the - conditions stated below. Sublicensing is not allowed; section 10 makes it - unnecessary. +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological - measure under any applicable law fulfilling obligations under article 11 - of the WIPO copyright treaty adopted on 20 December 1996, or similar laws - prohibiting or restricting circumvention of such measures. +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. When you convey a covered work, you waive any legal power to forbid - circumvention of technological measures to the extent such circumvention is - effected by exercising rights under this License with respect to the - covered work, and you disclaim any intention to limit operation or - modification of the work as a means of enforcing, against the work's users, - your or third parties' legal rights to forbid circumvention of - technological measures. +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you - receive it, in any medium, provided that you conspicuously and - appropriately publish on each copy an appropriate copyright notice; keep - intact all notices stating that this License and any non-permissive terms - added in accord with section 7 apply to the code; keep intact all notices - of the absence of any warranty; and give all recipients a copy of this - License along with the Program. You may charge any price or no price for - each copy that you convey, and you may offer support or warranty - protection for a fee. +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to - produce it from the Program, in the form of source code under the terms - of section 4, provided that you also meet all of these conditions: +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: - a) The work must carry prominent notices stating that you modified it, - and giving a relevant date. + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. - b) The work must carry prominent notices stating that it is released - under this License and any conditions added under section 7. This - requirement modifies the requirement in section 4 to “keep intact all - notices”. + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". - c) You must license the entire work, as a whole, under this License to - anyone who comes into possession of a copy. This License will therefore - apply, along with any applicable section 7 additional terms, to the - whole of the work, and all its parts, regardless of how they are - packaged. This License gives no permission to license the work in any - other way, but it does not invalidate such permission if you have - separately received it. + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your work - need not make them do so. + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent - works, which are not by their nature extensions of the covered work, and - which are not combined with it such as to form a larger program, in or on - a volume of a storage or distribution medium, is called an “aggregate” if - the compilation and its resulting copyright are not used to limit the - access or legal rights of the compilation's users beyond what the - individual works permit. Inclusion of a covered work in an aggregate does - not cause this License to apply to the other parts of the aggregate. - +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + 6. Conveying Non-Source Forms. - You may convey a covered work in object code form under the terms of - sections 4 and 5, provided that you also convey the machine-readable - Corresponding Source under the terms of this License, in one of these - ways: + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium customarily - used for software interchange. - + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a written - offer, valid for at least three years and valid for as long as you - offer spare parts or customer support for that product model, to give - anyone who possesses the object code either (1) a copy of the - Corresponding Source for all the software in the product that is - covered by this License, on a durable physical medium customarily used - for software interchange, for a price no more than your reasonable cost - of physically performing this conveying of source, or (2) access to - copy the Corresponding Source from a network server at no charge. - + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This alternative is - allowed only occasionally and noncommercially, and only if you received - the object code with such an offer, in accord with subsection 6b. - - d) Convey the object code by offering access from a designated place - (gratis or for a charge), and offer equivalent access to the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to copy - the object code is a network server, the Corresponding Source may be on - a different server (operated by you or a third party) that supports - equivalent copying facilities, provided you maintain clear directions - next to the object code saying where to find the Corresponding Source. - Regardless of what server hosts the Corresponding Source, you remain - obligated to ensure that it is available for as long as needed to - satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided you - inform other peers where the object code and Corresponding Source of - the work are being offered to the general public at no charge under - subsection 6d. + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded - from the Corresponding Source as a System Library, need not be included - in conveying the object code work. - - A “User Product” is either (1) a “consumer product”, which means any - tangible personal property which is normally used for personal, family, - or household purposes, or (2) anything designed or sold for incorporation - into a dwelling. In determining whether a product is a consumer product, - doubtful cases shall be resolved in favor of coverage. For a particular - product received by a particular user, “normally used” refers to a - typical or common use of that class of product, regardless of the status - of the particular user or of the way in which the particular user - actually uses, or expects or is expected to use, the product. A product - is a consumer product regardless of whether the product has substantial - commercial, industrial or non-consumer uses, unless such uses represent - the only significant mode of use of the product. - - “Installation Information” for a User Product means any methods, - procedures, authorization keys, or other information required to install - and execute modified versions of a covered work in that User Product from - a modified version of its Corresponding Source. The information must - suffice to ensure that the continued functioning of the modified object - code is in no case prevented or interfered with solely because - modification has been made. +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. If you convey an object code work under this section in, or with, or - specifically for use in, a User Product, and the conveying occurs as part - of a transaction in which the right of possession and use of the User - Product is transferred to the recipient in perpetuity or for a fixed term - (regardless of how the transaction is characterized), the Corresponding - Source conveyed under this section must be accompanied by the - Installation Information. But this requirement does not apply if neither - you nor any third party retains the ability to install modified object - code on the User Product (for example, the work has been installed in - ROM). +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). The requirement to provide Installation Information does not include a - requirement to continue to provide support service, warranty, or updates - for a work that has been modified or installed by the recipient, or for - the User Product in which it has been modified or installed. Access - to a network may be denied when the modification itself materially - and adversely affects the operation of the network or violates the - rules and protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, in - accord with this section must be in a format that is publicly documented - (and with an implementation available to the public in source code form), - and must require no special password or key for unpacking, reading or - copying. +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. 7. Additional Terms. - “Additional permissions” are terms that supplement the terms of this - License by making exceptions from one or more of its conditions. - Additional permissions that are applicable to the entire Program shall be - treated as though they were included in this License, to the extent that - they are valid under applicable law. If additional permissions apply only - to part of the Program, that part may be used separately under those - permissions, but the entire Program remains governed by this License - without regard to the additional permissions. When you convey a copy of - a covered work, you may at your option remove any additional permissions - from that copy, or from any part of it. (Additional permissions may be - written to require their own removal in certain cases when you modify the - work.) You may place additional permissions on material, added by you to - a covered work, for which you have or can give appropriate copyright - permission. - - Notwithstanding any other provision of this License, for material you add - to a covered work, you may (if authorized by the copyright holders of - that material) supplement the terms of this License with terms: + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or @@ -305,253 +364,298 @@ d) Limiting the use for publicity purposes of names of licensors or authors of the material; or - e) Declining to grant rights under trademark law for use of some trade - names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that material - by anyone who conveys the material (or modified versions of it) with - contractual assumptions of liability to the recipient, for any - liability that these contractual assumptions directly impose on those - licensors and authors. - - All other non-permissive additional terms are considered “further - restrictions” within the meaning of section 10. If the Program as you - received it, or any part of it, contains a notice stating that it is - governed by this License along with a term that is a further restriction, - you may remove that term. If a license document contains a further - restriction but permits relicensing or conveying under this License, you - may add to a covered work material governed by the terms of that license - document, provided that the further restriction does not survive such - relicensing or conveying. - - If you add terms to a covered work in accord with this section, you must - place, in the relevant source files, a statement of the additional terms - that apply to those files, or a notice indicating where to find the - applicable terms. Additional terms, permissive or non-permissive, may be - stated in the form of a separately written license, or stated as - exceptions; the above requirements apply either way. + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly - provided under this License. Any attempt otherwise to propagate or modify - it is void, and will automatically terminate your rights under this - License (including any patent licenses granted under the third paragraph - of section 11). - - However, if you cease all violation of this License, then your license - from a particular copyright holder is reinstated (a) provisionally, - unless and until the copyright holder explicitly and finally terminates - your license, and (b) permanently, if the copyright holder fails to - notify you of the violation by some reasonable means prior to 60 days - after the cessation. - - Moreover, your license from a particular copyright holder is reinstated - permanently if the copyright holder notifies you of the violation by some - reasonable means, this is the first time you have received notice of - violation of this License (for any work) from that copyright holder, and - you cure the violation prior to 30 days after your receipt of the notice. +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. Termination of your rights under this section does not terminate the - licenses of parties who have received copies or rights from you under - this License. If your rights have been terminated and not permanently - reinstated, you do not qualify to receive new licenses for the same - material under section 10. +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. 9. Acceptance Not Required for Having Copies. - You are not required to accept this License in order to receive or run a - copy of the Program. Ancillary propagation of a covered work occurring - solely as a consequence of using peer-to-peer transmission to receive a - copy likewise does not require acceptance. However, nothing other than - this License grants you permission to propagate or modify any covered - work. These actions infringe copyright if you do not accept this License. - Therefore, by modifying or propagating a covered work, you indicate your - acceptance of this License to do so. + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. - Each time you convey a covered work, the recipient automatically receives - a license from the original licensors, to run, modify and propagate that - work, subject to this License. You are not responsible for enforcing - compliance by third parties with this License. - - An “entity transaction” is a transaction transferring control of an - organization, or substantially all assets of one, or subdividing an - organization, or merging organizations. If propagation of a covered work - results from an entity transaction, each party to that transaction who - receives a copy of the work also receives whatever licenses to the work - the party's predecessor in interest had or could give under the previous - paragraph, plus a right to possession of the Corresponding Source of the - work from the predecessor in interest, if the predecessor has it or can - get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the rights - granted or affirmed under this License. For example, you may not impose a - license fee, royalty, or other charge for exercise of rights granted - under this License, and you may not initiate litigation (including a - cross-claim or counterclaim in a lawsuit) alleging that any patent claim - is infringed by making, using, selling, offering for sale, or importing - the Program or any portion of it. + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. 11. Patents. - A “contributor” is a copyright holder who authorizes use under this - License of the Program or a work on which the Program is based. The work - thus licensed is called the contributor's “contributor version”. + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". - A contributor's “essential patent claims” are all patent claims owned or - controlled by the contributor, whether already acquired or hereafter - acquired, that would be infringed by some manner, permitted by this - License, of making, using, or selling its contributor version, but do not - include claims that would be infringed only as a consequence of further - modification of the contributor version. For purposes of this definition, - “control” includes the right to grant patent sublicenses in a manner - consistent with the requirements of this License. + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. Each contributor grants you a non-exclusive, worldwide, royalty-free - patent license under the contributor's essential patent claims, to make, - use, sell, offer for sale, import and otherwise run, modify and propagate - the contents of its contributor version. - - In the following three paragraphs, a “patent license” is any express - agreement or commitment, however denominated, not to enforce a patent - (such as an express permission to practice a patent or covenant not to - sue for patent infringement). To “grant” such a patent license to a party - means to make such an agreement or commitment not to enforce a patent - against the party. - - If you convey a covered work, knowingly relying on a patent license, and - the Corresponding Source of the work is not available for anyone to copy, - free of charge and under the terms of this License, through a publicly - available network server or other readily accessible means, then you must - either (1) cause the Corresponding Source to be so available, or (2) - arrange to deprive yourself of the benefit of the patent license for this - particular work, or (3) arrange, in a manner consistent with the - requirements of this License, to extend the patent license to downstream - recipients. “Knowingly relying” means you have actual knowledge that, but - for the patent license, your conveying the covered work in a country, or - your recipient's use of the covered work in a country, would infringe - one or more identifiable patents in that country that you have reason - to believe are valid. +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or - arrangement, you convey, or propagate by procuring conveyance of, a - covered work, and grant a patent license to some of the parties receiving - the covered work authorizing them to use, propagate, modify or convey a - specific copy of the covered work, then the patent license you grant is - automatically extended to all recipients of the covered work and works - based on it. - - A patent license is “discriminatory” if it does not include within the - scope of its coverage, prohibits the exercise of, or is conditioned on - the non-exercise of one or more of the rights that are specifically - granted under this License. You may not convey a covered work if you are - a party to an arrangement with a third party that is in the business of - distributing software, under which you make payment to the third party - based on the extent of your activity of conveying the work, and under - which the third party grants, to any of the parties who would receive the - covered work from you, a discriminatory patent license (a) in connection - with copies of the covered work conveyed by you (or copies made from - those copies), or (b) primarily for and in connection with specific - products or compilations that contain the covered work, unless you - entered into that arrangement, or that patent license was granted, prior - to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting any - implied license or other defenses to infringement that may otherwise be - available to you under applicable patent law. +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or - otherwise) that contradict the conditions of this License, they do not - excuse you from the conditions of this License. If you cannot use, - propagate or convey a covered work so as to satisfy simultaneously your - obligations under this License and any other pertinent obligations, then - as a consequence you may not use, propagate or convey it at all. For - example, if you agree to terms that obligate you to collect a royalty for - further conveying from those to whom you convey the Program, the only way - you could satisfy both those terms and this License would be to refrain - entirely from conveying the Program. - - 13. Offering the Program as a Service. - - If you make the functionality of the Program or a modified version - available to third parties as a service, you must make the Service Source - Code available via network download to everyone at no charge, under the - terms of this License. Making the functionality of the Program or - modified version available to third parties as a service includes, - without limitation, enabling third parties to interact with the - functionality of the Program or modified version remotely through a - computer network, offering a service the value of which entirely or - primarily derives from the value of the Program or modified version, or - offering a service that accomplishes for users the primary purpose of the - Program or modified version. - - “Service Source Code” means the Corresponding Source for the Program or - the modified version, and the Corresponding Source for all programs that - you use to make the Program or modified version available as a service, - including, without limitation, management software, user interfaces, - application program interfaces, automation software, monitoring software, - backup software, storage software and hosting software, all such that a - user could run an instance of the service using the Service Source Code - you make available. +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. 14. Revised Versions of this License. - Kloudlite Labs Pvt Ltd. may publish revised and/or new versions of the Server Side - Public License from time to time. Such new versions will be similar in - spirit to the present version, but may differ in detail to address new - problems or concerns. - - Each version is given a distinguishing version number. If the Program - specifies that a certain numbered version of the Server Side Public - License “or any later version” applies to it, you have the option of - following the terms and conditions either of that numbered version or of - any later version published by Kloudlite Labs Pvt Ltd. If the Program does not - specify a version number of the Server Side Public License, you may - choose any version ever published by Kloudlite Labs Pvt Ltd. - - If the Program specifies that a proxy can decide which future versions of - the Server Side Public License can be used, that proxy's public statement - of acceptance of a version permanently authorizes you to choose that - version for the Program. - - Later license versions may give you additional or different permissions. - However, no additional obligations are imposed on any author or copyright - holder as a result of your choosing to follow a later version. + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY - APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT - HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY - OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, - THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM - IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF - ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + 16. Limitation of Liability. - + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING - WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS - THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING - ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF - THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO - LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU - OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER - PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE - POSSIBILITY OF SUCH DAMAGES. - +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + 17. Interpretation of Sections 15 and 16. - If the disclaimer of warranty and limitation of liability provided above - cannot be given local legal effect according to their terms, reviewing - courts shall apply local law that most closely approximates an absolute - waiver of all civil liability in connection with the Program, unless a - warranty or assumption of liability accompanies a copy of the Program in - return for a fee. - - END OF TERMS AND CONDITIONS + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. From 0ea3863a32fbaede8d5b883ae52296dcfd52a42b Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Wed, 4 Sep 2024 11:18:01 +0530 Subject: [PATCH 40/89] feat: [WIP] environments on kloudlite edge clusters --- .tools/nvim/__http__/console/apps.graphql.yml | 5 +- .../__http__/console/environments.graphql.yml | 9 +- apps/console/Taskfile.yml | 1 + .../internal/app/adapters/account-svc.go | 41 ++ apps/console/internal/app/app.go | 19 +- apps/console/internal/app/grpc-server.go | 4 +- .../internal/app/process-resource-updates.go | 9 + apps/console/internal/domain/api.go | 6 + apps/console/internal/domain/domain.go | 110 +++- .../domain/kloudlite-edge-cluster/domain.go | 9 + .../entities/kloudlite-edge-cluster.go | 14 + .../internal/entities/resource-mapping.go | 2 + apps/console/internal/env/env.go | 14 +- apps/console/internal/framework/framework.go | 9 + .../internal/app/adapter-accounts-svc.go | 3 +- .../internal/domain/global-vpn-devices.go | 32 +- .../field-constants/generated_constants.go | 184 +++--- apps/message-office/Taskfile.yml | 9 + apps/message-office/errors/errors.go | 12 + apps/message-office/internal/app/app.go | 12 +- .../internal/app/internal-grpc-server.go | 80 ++- apps/message-office/internal/domain/api.go | 12 +- apps/message-office/internal/domain/domain.go | 131 ++--- .../internal/domain/entities.go | 24 - .../internal/domain/platform-edge/domain.go | 15 + .../internal/domain/platform-edge/repo.go | 120 ++++ .../domain/platform-edge/repo_test.go | 191 +++++++ .../internal/entities/allocation.go | 80 +++ .../internal/entities/field-constants/gen.go | 3 + .../field-constants/generated_constants.go | 29 + .../entities/platform-edge-cluster.go | 34 ++ .../internal/framework/framework.go | 12 +- .../protobufs/cluster-token.proto | 26 + .../cluster-token/cluster-token.pb.go | 368 ++++++++++++ .../cluster-token/cluster-token_grpc.pb.go | 146 +++++ .../protobufs/platform-edge.proto | 36 ++ .../platform-edge/platform-edge.pb.go | 522 ++++++++++++++++++ .../platform-edge/platform-edge_grpc.pb.go | 183 ++++++ apps/message-office/types/errors.go | 1 + apps/tenant-agent/main.go | 7 - mocks/pkg/k8s/client.go | 4 +- mocks/pkg/repos/dbrepo.go | 15 +- pkg/logging/slog-logger.go | 2 + pkg/repos/db-repo-mongo.go | 40 ++ pkg/repos/db-repo.go | 9 + pkg/repos/mongo.go | 1 + 46 files changed, 2338 insertions(+), 257 deletions(-) create mode 100644 apps/console/internal/app/adapters/account-svc.go create mode 100644 apps/console/internal/domain/kloudlite-edge-cluster/domain.go create mode 100644 apps/console/internal/entities/kloudlite-edge-cluster.go create mode 100644 apps/message-office/errors/errors.go create mode 100644 apps/message-office/internal/domain/platform-edge/domain.go create mode 100644 apps/message-office/internal/domain/platform-edge/repo.go create mode 100644 apps/message-office/internal/domain/platform-edge/repo_test.go create mode 100644 apps/message-office/internal/entities/allocation.go create mode 100644 apps/message-office/internal/entities/field-constants/gen.go create mode 100644 apps/message-office/internal/entities/field-constants/generated_constants.go create mode 100644 apps/message-office/internal/entities/platform-edge-cluster.go create mode 100644 apps/message-office/protobufs/cluster-token.proto create mode 100644 apps/message-office/protobufs/cluster-token/cluster-token.pb.go create mode 100644 apps/message-office/protobufs/cluster-token/cluster-token_grpc.pb.go create mode 100644 apps/message-office/protobufs/platform-edge.proto create mode 100644 apps/message-office/protobufs/platform-edge/platform-edge.pb.go create mode 100644 apps/message-office/protobufs/platform-edge/platform-edge_grpc.pb.go create mode 100644 apps/message-office/types/errors.go diff --git a/.tools/nvim/__http__/console/apps.graphql.yml b/.tools/nvim/__http__/console/apps.graphql.yml index c94e2da84..79296ef1e 100644 --- a/.tools/nvim/__http__/console/apps.graphql.yml +++ b/.tools/nvim/__http__/console/apps.graphql.yml @@ -1,6 +1,7 @@ --- global: name: sample-app + envName: "test-env" --- label: List Apps @@ -117,9 +118,7 @@ variables: name: '{{.name}}' spec: services: - - type: tcp - port: 80 - targetPort: 80 + - port: 80 containers: - name: main image: kong/httpbin diff --git a/.tools/nvim/__http__/console/environments.graphql.yml b/.tools/nvim/__http__/console/environments.graphql.yml index f59b734f7..de567dc8f 100644 --- a/.tools/nvim/__http__/console/environments.graphql.yml +++ b/.tools/nvim/__http__/console/environments.graphql.yml @@ -76,7 +76,7 @@ query: |+ #graphql variables: env: displayName: Display Name of a sample environment - clusterName: "{{.gcpClusterName}}" + clusterName: "__kloudlite_enabled_cluster" metadata: name: "{{.envName}}" # spec: @@ -121,12 +121,11 @@ variables: label: "delete environment" query: |+ - mutation Core_deleteEnvironment($projectName: String!, $envName: String!) { - core_deleteEnvironment(projectName: $projectName, envName: $envName) + mutation Core_deleteEnvironment($envName: String!) { + core_deleteEnvironment(envName: $envName) } variables: - projectName: "{{.projectName}}" - envName: "{{.clonedEnvName}}" + envName: "{{.envName}}" --- --- diff --git a/apps/console/Taskfile.yml b/apps/console/Taskfile.yml index 322f64544..c02a4b2e6 100644 --- a/apps/console/Taskfile.yml +++ b/apps/console/Taskfile.yml @@ -55,6 +55,7 @@ tasks: cmds: - go build -o bin/console ./main.go - ./bin/console --dev + # - go run . --dev gen:constants: cmds: diff --git a/apps/console/internal/app/adapters/account-svc.go b/apps/console/internal/app/adapters/account-svc.go new file mode 100644 index 000000000..d3d257738 --- /dev/null +++ b/apps/console/internal/app/adapters/account-svc.go @@ -0,0 +1,41 @@ +package adapters + +import ( + "context" + "time" + + "github.com/kloudlite/operator/pkg/errors" + + "github.com/kloudlite/api/apps/console/internal/domain" + "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/accounts" +) + +type accountsSvc struct { + accountsRPC accounts.AccountsClient +} + +// GetAccount implements domain.AccountsSvc. +func (as *accountsSvc) GetAccountRegion(ctx context.Context, userId string, accountName string) (string, error) { + nctx, cf := context.WithTimeout(ctx, 2*time.Second) + defer cf() + out, err := as.accountsRPC.GetAccount(nctx, &accounts.GetAccountIn{ + UserId: userId, + AccountName: accountName, + }) + if err != nil { + // if errors.Is(err, context.DeadlineExceeded) { + // return nil, domain.ErrGRPCCall{Err: err} + // } + return "", errors.NewE(err) + } + + return out.GetKloudliteGatewayRegion(), nil +} + +func NewAccountsSvc(accountsClient accounts.AccountsClient) domain.AccountsSvc { + return &accountsSvc{ + accountsRPC: accountsClient, + } +} + +var _ domain.AccountsSvc = (*accountsSvc)(nil) diff --git a/apps/console/internal/app/app.go b/apps/console/internal/app/app.go index bea14a365..ebe01870d 100644 --- a/apps/console/internal/app/app.go +++ b/apps/console/internal/app/app.go @@ -4,6 +4,7 @@ import ( "context" "log/slog" + "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/accounts" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/console" "github.com/kloudlite/api/pkg/k8s" @@ -13,11 +14,13 @@ import ( "github.com/gofiber/fiber/v2" "go.uber.org/fx" + "github.com/kloudlite/api/apps/console/internal/app/adapters" "github.com/kloudlite/api/apps/console/internal/app/graph" "github.com/kloudlite/api/apps/console/internal/app/graph/generated" "github.com/kloudlite/api/apps/console/internal/domain" "github.com/kloudlite/api/apps/console/internal/entities" "github.com/kloudlite/api/apps/console/internal/env" + platform_edge "github.com/kloudlite/api/apps/message-office/protobufs/platform-edge" "github.com/kloudlite/api/common" "github.com/kloudlite/api/constants" "github.com/kloudlite/api/grpc-interfaces/infra" @@ -34,8 +37,10 @@ import ( ) type ( - IAMGrpcClient grpc.Client - InfraClient grpc.Client + IAMGrpcClient grpc.Client + InfraClient grpc.Client + MessageOfficeInternalClient grpc.Client + AccountsClient grpc.Client ) type ( @@ -81,6 +86,16 @@ var Module = fx.Module("app", }, ), + fx.Provide(func(conn MessageOfficeInternalClient) platform_edge.PlatformEdgeClient { + return platform_edge.NewPlatformEdgeClient(conn) + }), + + fx.Provide(func(conn AccountsClient) accounts.AccountsClient { + return accounts.NewAccountsClient(conn) + }), + + fx.Provide(adapters.NewAccountsSvc), + fx.Invoke( func(server httpServer.Server, d domain.Domain, sessionRepo kv.Repo[*common.AuthSession], ev *env.Env) { gqlConfig := generated.Config{Resolvers: &graph.Resolver{Domain: d, EnvVars: ev}} diff --git a/apps/console/internal/app/grpc-server.go b/apps/console/internal/app/grpc-server.go index 4e956cd76..13e5d16fb 100644 --- a/apps/console/internal/app/grpc-server.go +++ b/apps/console/internal/app/grpc-server.go @@ -24,12 +24,12 @@ func (g *grpcServer) ArchiveResourcesForCluster(ctx context.Context, in *console AccountName: in.AccountName, } - archiveStatus, err := g.d.ArchiveEnvironmentsForCluster(consoleCtx, in.ClusterName) + _, err := g.d.ArchiveEnvironmentsForCluster(consoleCtx, in.ClusterName) if err != nil { return &console.ArchiveResourcesForClusterOut{Archived: false}, err } - archiveStatus, err = g.d.ArchiveClusterManagedServicesForCluster(consoleCtx, in.ClusterName) + archiveStatus, err := g.d.ArchiveClusterManagedServicesForCluster(consoleCtx, in.ClusterName) if err != nil { return &console.ArchiveResourcesForClusterOut{Archived: false}, err } diff --git a/apps/console/internal/app/process-resource-updates.go b/apps/console/internal/app/process-resource-updates.go index 73469bebf..340636a97 100644 --- a/apps/console/internal/app/process-resource-updates.go +++ b/apps/console/internal/app/process-resource-updates.go @@ -12,6 +12,7 @@ import ( "github.com/kloudlite/api/apps/console/internal/domain" "github.com/kloudlite/api/apps/console/internal/entities" msgOfficeT "github.com/kloudlite/api/apps/message-office/types" + "github.com/kloudlite/api/constants" "github.com/kloudlite/api/pkg/errors" fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/messaging" @@ -141,6 +142,7 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo switch gvkStr { case environmentGVK.String(): { + dctx.AccountName = rwu.Object.GetLabels()[constants.AccountNameKey] var ws entities.Environment if err := fn.JsonConversion(rwu.Object, &ws); err != nil { return errors.NewE(err) @@ -153,11 +155,18 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo } case appsGVK.String(): { + if ru.AccountName == "nxt-multi-tenancy" { + } + + dctx.AccountName = rwu.Object.GetLabels()[constants.AccountNameKey] + var app entities.App if err := fn.JsonConversion(rwu.Object, &app); err != nil { return errors.NewE(err) } + // rctx := domain.ResourceContext{ConsoleContext: dctx, EnvironmentName: rwu.Object.GetLabels()[constants.EnvNameKey]} + rctx, err := getResourceContext(dctx, entities.ResourceTypeApp, ru.ClusterName, obj) if err != nil { return errors.NewE(err) diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index 52b574555..fea90a50c 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -136,7 +136,13 @@ type UpdateAndDeleteOpts struct { ClusterName string } +type AccountsSvc interface { + GetAccountRegion(ctx context.Context, userId string, accountName string) (string, error) +} + type Domain interface { + AccountsSvc + CheckNameAvailability(ctx context.Context, accountName string, environmentName *string, msvcName *string, resType entities.ResourceType, name string) (*CheckNameAvailabilityOutput, error) // INFO: project have been disabled diff --git a/apps/console/internal/domain/domain.go b/apps/console/internal/domain/domain.go index ddf0fc44c..42a139535 100644 --- a/apps/console/internal/domain/domain.go +++ b/apps/console/internal/domain/domain.go @@ -10,6 +10,7 @@ import ( "github.com/kloudlite/api/pkg/logging" + mo_errors "github.com/kloudlite/api/apps/message-office/errors" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/common" @@ -20,6 +21,7 @@ import ( "github.com/kloudlite/api/constants" + platform_edge "github.com/kloudlite/api/apps/message-office/protobufs/platform-edge" t "github.com/kloudlite/api/apps/tenant-agent/types" "go.uber.org/fx" "sigs.k8s.io/controller-runtime/pkg/client" @@ -43,8 +45,10 @@ type domain struct { producer MessageDispatcher - iamClient iam.IAMClient - infraClient infra.InfraClient + iamClient iam.IAMClient + infraClient infra.InfraClient + platformEdgeClient platform_edge.PlatformEdgeClient + AccountsSvc environmentRepo repos.DbRepo[*entities.Environment] @@ -99,6 +103,7 @@ func addTrackingId(obj client.Object, id repos.ID) { type K8sContext interface { context.Context + GetUserId() repos.ID GetAccountName() string } @@ -142,9 +147,12 @@ func (d *domain) applyK8sResourceOnCluster(ctx K8sContext, clusterName string, o return errors.NewE(err) } -// func (d *domain) applyK8sResource(ctx K8sContext, clusterName string, obj client.Object, recordVersion int) error {|} - func (d *domain) applyK8sResource(ctx K8sContext, envName string, obj client.Object, recordVersion int) error { + var dispatchAddr struct { + AccountName string + ClusterName string + } + clusterName, err := d.getClusterAttachedToEnvironment(ctx, envName) if err != nil { return errors.NewE(err) @@ -155,10 +163,55 @@ func (d *domain) applyK8sResource(ctx K8sContext, envName string, obj client.Obj return nil } + switch *clusterName { + case "__kloudlite_enabled_cluster": + { + // dispatchAddr.AccountName = "kloudlite-edge-platform" + // dispatchAddr.ClusterName = "kl-edge-1" + + allocatedEdge, err := d.platformEdgeClient.GetAllocatedPlatformEdgeCluster(ctx, &platform_edge.GetAllocatedPlatformEdgeClusterIn{AccountName: ctx.GetAccountName()}) + if err != nil { + if !errors.Is(err, mo_errors.ErrEdgeClusterNotAllocated) { + return errors.NewEf(err, "failed to get allocated edge cluster") + } + + // INFO: not allocated, allocating a new one + accountRegion, err := d.GetAccountRegion(ctx, string(ctx.GetUserId()), ctx.GetAccountName()) + if err != nil { + return errors.NewEf(err, "failed to get account region") + } + + allocatedEdge, err = d.platformEdgeClient.AllocatePlatformEdgeCluster(ctx, &platform_edge.AllocatePlatformEdgeClusterIn{ + Region: accountRegion, + AccountName: ctx.GetAccountName(), + }) + if err != nil { + return errors.NewEf(err, "failed to allocate platform edge cluster") + } + } + + dispatchAddr.AccountName = allocatedEdge.OwnedByAccount + dispatchAddr.ClusterName = allocatedEdge.ClusterName + } + default: + { + dispatchAddr.AccountName = ctx.GetAccountName() + dispatchAddr.ClusterName = *clusterName + } + } + if obj.GetObjectKind().GroupVersionKind().Empty() { return errors.Newf("object GVK is not set, can not apply") } + labels := obj.GetLabels() + if labels == nil { + labels = make(map[string]string, 2) + } + labels[constants.AccountNameKey] = ctx.GetAccountName() + labels[constants.EnvNameKey] = envName + obj.SetLabels(labels) + ann := obj.GetAnnotations() if ann == nil { ann = make(map[string]string, 1) @@ -170,9 +223,10 @@ func (d *domain) applyK8sResource(ctx K8sContext, envName string, obj client.Obj if err != nil { return errors.NewE(err) } + b, err := json.Marshal(t.AgentMessage{ - AccountName: ctx.GetAccountName(), - ClusterName: *clusterName, + AccountName: dispatchAddr.AccountName, + ClusterName: dispatchAddr.ClusterName, Action: t.ActionApply, Object: m, }) @@ -180,7 +234,7 @@ func (d *domain) applyK8sResource(ctx K8sContext, envName string, obj client.Obj return errors.NewE(err) } - subject := common.SendToAgentSubjectName(ctx.GetAccountName(), *clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) + subject := common.SendToAgentSubjectName(dispatchAddr.AccountName, dispatchAddr.ClusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) err = d.producer.Produce(ctx, msgTypes.ProduceMsg{ Subject: subject, @@ -311,6 +365,28 @@ func (d *domain) deleteK8sResource(ctx K8sContext, environmentName string, obj c return ErrNoClusterAttached } + var dispatchAddr struct { + AccountName string + ClusterName string + } + + switch *clusterName { + case "__kloudlite_enabled_cluster": + { + // dispatchAddr.AccountName = "kloudlite-edge-platform" + // dispatchAddr.ClusterName = "kl-edge-1" + + dispatchAddr.AccountName = "nxt-multi-tenancy" + dispatchAddr.ClusterName = "sample" + } + default: + { + + dispatchAddr.AccountName = ctx.GetAccountName() + dispatchAddr.ClusterName = *clusterName + } + } + if obj.GetObjectKind().GroupVersionKind().Empty() { return errors.Newf("object GVK is not set, can not apply") } @@ -320,8 +396,8 @@ func (d *domain) deleteK8sResource(ctx K8sContext, environmentName string, obj c return errors.NewE(err) } b, err := json.Marshal(t.AgentMessage{ - AccountName: ctx.GetAccountName(), - ClusterName: *clusterName, + AccountName: dispatchAddr.AccountName, + ClusterName: dispatchAddr.ClusterName, Action: t.ActionDelete, Object: m, }) @@ -329,7 +405,7 @@ func (d *domain) deleteK8sResource(ctx K8sContext, environmentName string, obj c return errors.NewE(err) } - subject := common.SendToAgentSubjectName(ctx.GetAccountName(), *clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) + subject := common.SendToAgentSubjectName(dispatchAddr.AccountName, dispatchAddr.ClusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) err = d.producer.Produce(ctx, msgTypes.ProduceMsg{ Subject: subject, @@ -555,6 +631,8 @@ var Module = fx.Module("domain", iamClient iam.IAMClient, infraClient infra.InfraClient, + platformEdgeClient platform_edge.PlatformEdgeClient, + accountsSvc AccountsSvc, environmentRepo repos.DbRepo[*entities.Environment], registryImageRepo repos.DbRepo[*entities.RegistryImage], @@ -583,9 +661,12 @@ var Module = fx.Module("domain", producer: producer, - iamClient: iamClient, - infraClient: infraClient, - logger: logger, + iamClient: iamClient, + infraClient: infraClient, + platformEdgeClient: platformEdgeClient, + AccountsSvc: accountsSvc, + + logger: logger, environmentRepo: environmentRepo, appRepo: appRepo, @@ -606,5 +687,4 @@ var Module = fx.Module("domain", resourceEventPublisher: resourceEventPublisher, consoleCacheStore: consoleCacheStore, } - }), -) + })) diff --git a/apps/console/internal/domain/kloudlite-edge-cluster/domain.go b/apps/console/internal/domain/kloudlite-edge-cluster/domain.go new file mode 100644 index 000000000..86791723e --- /dev/null +++ b/apps/console/internal/domain/kloudlite-edge-cluster/domain.go @@ -0,0 +1,9 @@ +package kloudlite_edge_cluster + +import "context" + +type PickEdgeClusterArgs struct{} + +func PickEdgeCluster(ctx context.Context, args *PickEdgeClusterArgs) (any, error) { + return nil, nil +} diff --git a/apps/console/internal/entities/kloudlite-edge-cluster.go b/apps/console/internal/entities/kloudlite-edge-cluster.go new file mode 100644 index 000000000..83b0e21d2 --- /dev/null +++ b/apps/console/internal/entities/kloudlite-edge-cluster.go @@ -0,0 +1,14 @@ +package entities + +import "github.com/kloudlite/api/pkg/repos" + +type KLoudliteEdgeCluster struct { + repos.BaseEntity `json:",inline"` + Region string `json:"region"` + Name string `json:"name"` + + NumAccounts int `json:"num_accounts"` + MaxNumAccounts int `json:"max_num_accounts"` + + Comments string `json:"comments"` +} diff --git a/apps/console/internal/entities/resource-mapping.go b/apps/console/internal/entities/resource-mapping.go index 987ef6eca..855cdab36 100644 --- a/apps/console/internal/entities/resource-mapping.go +++ b/apps/console/internal/entities/resource-mapping.go @@ -28,6 +28,8 @@ const ( ResourceHeirarchyEnvironment ResourceHeirarchy = "environment" ) +// ResourceMapping represents a relationship +// between a resource (i.e. Environment, App, Router etc.) with it's {account, cluster and environment} type ResourceMapping struct { repos.BaseEntity `bson:",inline"` diff --git a/apps/console/internal/env/env.go b/apps/console/internal/env/env.go index 4d7b08fa1..7e6582252 100644 --- a/apps/console/internal/env/env.go +++ b/apps/console/internal/env/env.go @@ -11,9 +11,8 @@ type Env struct { DNSAddr string `env:"DNS_ADDR" required:"true"` KloudliteDNSSuffix string `env:"KLOUDLITE_DNS_SUFFIX" required:"true"` - - ConsoleDBUri string `env:"MONGO_URI" required:"true"` - ConsoleDBName string `env:"MONGO_DB_NAME" required:"true"` + ConsoleDBUri string `env:"MONGO_URI" required:"true"` + ConsoleDBName string `env:"MONGO_DB_NAME" required:"true"` AccountCookieName string `env:"ACCOUNT_COOKIE_NAME" required:"true"` ClusterCookieName string `env:"CLUSTER_COOKIE_NAME" required:"true"` @@ -24,14 +23,17 @@ type Env struct { 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"` + IAMGrpcAddr string `env:"IAM_GRPC_ADDR" required:"true"` + InfraGrpcAddr string `env:"INFRA_GRPC_ADDR" required:"true"` + MessageOfficeInternalGRPCAddr string `env:"MESSAGE_OFFICE_INTERNAL_GRPC_ADDR" required:"true"` + AccountGRPCAddr string `env:"ACCOUNT_GRPC_ADDR" required:"true"` PromHttpAddr string `env:"PROM_HTTP_ADDR" required:"true"` SessionKVBucket string `env:"SESSION_KV_BUCKET" required:"true"` ConsoleCacheKVBucket string `env:"CONSOLE_CACHE_KV_BUCKET" required:"true"` IsDev bool - KubernetesApiProxy string `env:"KUBERNETES_API_PROXY"` + + KubernetesApiProxy string `env:"KUBERNETES_API_PROXY" default:"localhost:8080"` DeviceNamespace string `env:"DEVICE_NAMESPACE" required:"true"` } diff --git a/apps/console/internal/framework/framework.go b/apps/console/internal/framework/framework.go index 29c707a23..03cda93a8 100644 --- a/apps/console/internal/framework/framework.go +++ b/apps/console/internal/framework/framework.go @@ -68,6 +68,7 @@ var Module = fx.Module("framework", return k8s.NewClient(restCfg, nil) }), + // grpc clients fx.Provide(func(ev *env.Env) (app.IAMGrpcClient, error) { return grpc.NewGrpcClient(ev.IAMGrpcAddr) }), @@ -76,6 +77,14 @@ var Module = fx.Module("framework", return grpc.NewGrpcClient(ev.InfraGrpcAddr) }), + fx.Provide(func(ev *env.Env) (app.AccountsClient, error) { + return grpc.NewGrpcClient(ev.AccountGRPCAddr) + }), + + fx.Provide(func(ev *env.Env) (app.MessageOfficeInternalClient, error) { + return grpc.NewGrpcClient(ev.MessageOfficeInternalGRPCAddr) + }), + fx.Invoke(func(lf fx.Lifecycle, c1 app.IAMGrpcClient, c2 app.InfraClient) { lf.Append(fx.Hook{ OnStop: func(context.Context) error { diff --git a/apps/infra/internal/app/adapter-accounts-svc.go b/apps/infra/internal/app/adapter-accounts-svc.go index 3f6d4e66b..d171c1172 100644 --- a/apps/infra/internal/app/adapter-accounts-svc.go +++ b/apps/infra/internal/app/adapter-accounts-svc.go @@ -3,9 +3,10 @@ package app import ( "context" "errors" - errors2 "github.com/kloudlite/operator/pkg/errors" "time" + errors2 "github.com/kloudlite/operator/pkg/errors" + "github.com/kloudlite/api/apps/infra/internal/domain" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/accounts" ) diff --git a/apps/infra/internal/domain/global-vpn-devices.go b/apps/infra/internal/domain/global-vpn-devices.go index 1cf65e0f4..a9e34a8a1 100644 --- a/apps/infra/internal/domain/global-vpn-devices.go +++ b/apps/infra/internal/domain/global-vpn-devices.go @@ -331,9 +331,26 @@ func (d *domain) buildGlobalVPNDeviceWgBaseParams(ctx InfraContext, gvpnConns [] return nil, deviceHosts, err } - pubPeers = append(gvpnConnPeers, pubPeers...) + publicPeers := make([]wgutils.PublicPeer, 0, len(pubPeers)+len(gvpnConnPeers)) + + for _, peer := range gvpnConnPeers { + deviceHosts[peer.DNSHostname] = peer.IP + if peer.DNSHostname == fmt.Sprintf("%s.device.local", gvpnDevice.Name) { + continue + } + if peer.PublicEndpoint == nil { + privPeers = append(privPeers, peer) + continue + } + + publicPeers = append(publicPeers, wgutils.PublicPeer{ + DisplayName: fmt.Sprintf("Global VPN Gateway (%s)", peer.Comments), + PublicKey: peer.PublicKey, + AllowedIPs: peer.AllowedIPs, + Endpoint: *peer.PublicEndpoint, + }) + } - publicPeers := make([]wgutils.PublicPeer, 0, len(pubPeers)) for _, peer := range pubPeers { deviceHosts[peer.DNSHostname] = peer.IP if peer.DNSHostname == fmt.Sprintf("%s.device.local", gvpnDevice.Name) { @@ -343,8 +360,10 @@ func (d *domain) buildGlobalVPNDeviceWgBaseParams(ctx InfraContext, gvpnConns [] privPeers = append(privPeers, peer) continue } + publicPeers = append(publicPeers, wgutils.PublicPeer{ - DisplayName: peer.DNSHostname, + // DisplayName: peer.DNSHostname, + DisplayName: fmt.Sprintf("Global VPN Device [%s] (%s)", peer.Comments, peer.DNSHostname), PublicKey: peer.PublicKey, AllowedIPs: peer.AllowedIPs, Endpoint: *peer.PublicEndpoint, @@ -358,9 +377,10 @@ func (d *domain) buildGlobalVPNDeviceWgBaseParams(ctx InfraContext, gvpnConns [] continue } privatePeers = append(privatePeers, wgutils.PrivatePeer{ - DisplayName: peer.DNSHostname, - PublicKey: peer.PublicKey, - AllowedIPs: peer.AllowedIPs, + DisplayName: fmt.Sprintf("Global VPN Device [%s] (%s)", peer.Comments, peer.DNSHostname), + // DisplayName: peer.DNSHostname, + PublicKey: peer.PublicKey, + AllowedIPs: peer.AllowedIPs, }) } diff --git a/apps/infra/internal/entities/field-constants/generated_constants.go b/apps/infra/internal/entities/field-constants/generated_constants.go index ef1ba1463..a4986510c 100644 --- a/apps/infra/internal/entities/field-constants/generated_constants.go +++ b/apps/infra/internal/entities/field-constants/generated_constants.go @@ -564,6 +564,7 @@ const ( PersistentVolumeSpecStorageosSecretRefUid = "spec.storageos.secretRef.uid" PersistentVolumeSpecStorageosVolumeName = "spec.storageos.volumeName" PersistentVolumeSpecStorageosVolumeNamespace = "spec.storageos.volumeNamespace" + PersistentVolumeSpecVolumeAttributesClassName = "spec.volumeAttributesClassName" PersistentVolumeSpecVolumeMode = "spec.volumeMode" PersistentVolumeSpecVsphereVolume = "spec.vsphereVolume" PersistentVolumeSpecVsphereVolumeFsType = "spec.vsphereVolume.fsType" @@ -574,27 +575,27 @@ const ( // constant vars generated for struct PersistentVolumeClaim const ( - PersistentVolumeClaimSpec = "spec" - PersistentVolumeClaimSpecAccessModes = "spec.accessModes" - PersistentVolumeClaimSpecDataSource = "spec.dataSource" - PersistentVolumeClaimSpecDataSourceApiGroup = "spec.dataSource.apiGroup" - PersistentVolumeClaimSpecDataSourceKind = "spec.dataSource.kind" - PersistentVolumeClaimSpecDataSourceName = "spec.dataSource.name" - PersistentVolumeClaimSpecDataSourceRef = "spec.dataSourceRef" - PersistentVolumeClaimSpecDataSourceRefApiGroup = "spec.dataSourceRef.apiGroup" - PersistentVolumeClaimSpecDataSourceRefKind = "spec.dataSourceRef.kind" - PersistentVolumeClaimSpecDataSourceRefName = "spec.dataSourceRef.name" - PersistentVolumeClaimSpecDataSourceRefNamespace = "spec.dataSourceRef.namespace" - PersistentVolumeClaimSpecResources = "spec.resources" - PersistentVolumeClaimSpecResourcesClaims = "spec.resources.claims" - PersistentVolumeClaimSpecResourcesLimits = "spec.resources.limits" - PersistentVolumeClaimSpecResourcesRequests = "spec.resources.requests" - PersistentVolumeClaimSpecSelector = "spec.selector" - PersistentVolumeClaimSpecSelectorMatchExpressions = "spec.selector.matchExpressions" - PersistentVolumeClaimSpecSelectorMatchLabels = "spec.selector.matchLabels" - PersistentVolumeClaimSpecStorageClassName = "spec.storageClassName" - PersistentVolumeClaimSpecVolumeMode = "spec.volumeMode" - PersistentVolumeClaimSpecVolumeName = "spec.volumeName" + PersistentVolumeClaimSpec = "spec" + PersistentVolumeClaimSpecAccessModes = "spec.accessModes" + PersistentVolumeClaimSpecDataSource = "spec.dataSource" + PersistentVolumeClaimSpecDataSourceApiGroup = "spec.dataSource.apiGroup" + PersistentVolumeClaimSpecDataSourceKind = "spec.dataSource.kind" + PersistentVolumeClaimSpecDataSourceName = "spec.dataSource.name" + PersistentVolumeClaimSpecDataSourceRef = "spec.dataSourceRef" + PersistentVolumeClaimSpecDataSourceRefApiGroup = "spec.dataSourceRef.apiGroup" + PersistentVolumeClaimSpecDataSourceRefKind = "spec.dataSourceRef.kind" + PersistentVolumeClaimSpecDataSourceRefName = "spec.dataSourceRef.name" + PersistentVolumeClaimSpecDataSourceRefNamespace = "spec.dataSourceRef.namespace" + PersistentVolumeClaimSpecResources = "spec.resources" + PersistentVolumeClaimSpecResourcesLimits = "spec.resources.limits" + PersistentVolumeClaimSpecResourcesRequests = "spec.resources.requests" + PersistentVolumeClaimSpecSelector = "spec.selector" + PersistentVolumeClaimSpecSelectorMatchExpressions = "spec.selector.matchExpressions" + PersistentVolumeClaimSpecSelectorMatchLabels = "spec.selector.matchLabels" + PersistentVolumeClaimSpecStorageClassName = "spec.storageClassName" + PersistentVolumeClaimSpecVolumeAttributesClassName = "spec.volumeAttributesClassName" + PersistentVolumeClaimSpecVolumeMode = "spec.volumeMode" + PersistentVolumeClaimSpecVolumeName = "spec.volumeName" ) // constant vars generated for struct VolumeAttachment @@ -776,6 +777,7 @@ const ( VolumeAttachmentSpecSourceInlineVolumeSpecStorageosSecretRefUid = "spec.source.inlineVolumeSpec.storageos.secretRef.uid" VolumeAttachmentSpecSourceInlineVolumeSpecStorageosVolumeName = "spec.source.inlineVolumeSpec.storageos.volumeName" VolumeAttachmentSpecSourceInlineVolumeSpecStorageosVolumeNamespace = "spec.source.inlineVolumeSpec.storageos.volumeNamespace" + VolumeAttachmentSpecSourceInlineVolumeSpecVolumeAttributesClassName = "spec.source.inlineVolumeSpec.volumeAttributesClassName" VolumeAttachmentSpecSourceInlineVolumeSpecVolumeMode = "spec.source.inlineVolumeSpec.volumeMode" VolumeAttachmentSpecSourceInlineVolumeSpecVsphereVolume = "spec.source.inlineVolumeSpec.vsphereVolume" VolumeAttachmentSpecSourceInlineVolumeSpecVsphereVolumeFsType = "spec.source.inlineVolumeSpec.vsphereVolume.fsType" @@ -798,72 +800,76 @@ const ( // constant vars generated for struct const ( - AccountName = "accountName" - ApiVersion = "apiVersion" - ClusterName = "clusterName" - CreatedBy = "createdBy" - CreatedByUserEmail = "createdBy.userEmail" - CreatedByUserId = "createdBy.userId" - CreatedByUserName = "createdBy.userName" - CreationTime = "creationTime" - DisplayName = "displayName" - Id = "id" - Kind = "kind" - LastUpdatedBy = "lastUpdatedBy" - LastUpdatedByUserEmail = "lastUpdatedBy.userEmail" - LastUpdatedByUserId = "lastUpdatedBy.userId" - LastUpdatedByUserName = "lastUpdatedBy.userName" - MarkedForDeletion = "markedForDeletion" - Metadata = "metadata" - MetadataAnnotations = "metadata.annotations" - MetadataCreationTimestamp = "metadata.creationTimestamp" - MetadataDeletionGracePeriodSeconds = "metadata.deletionGracePeriodSeconds" - MetadataDeletionTimestamp = "metadata.deletionTimestamp" - MetadataFinalizers = "metadata.finalizers" - MetadataGenerateName = "metadata.generateName" - MetadataGeneration = "metadata.generation" - MetadataLabels = "metadata.labels" - MetadataManagedFields = "metadata.managedFields" - MetadataName = "metadata.name" - MetadataNamespace = "metadata.namespace" - MetadataOwnerReferences = "metadata.ownerReferences" - MetadataResourceVersion = "metadata.resourceVersion" - MetadataSelfLink = "metadata.selfLink" - MetadataUid = "metadata.uid" - RecordVersion = "recordVersion" - Status = "status" - StatusAccessModes = "status.accessModes" - StatusAllocatedResourceStatuses = "status.allocatedResourceStatuses" - StatusAllocatedResources = "status.allocatedResources" - StatusAttachError = "status.attachError" - StatusAttachErrorMessage = "status.attachError.message" - StatusAttachErrorTime = "status.attachError.time" - StatusAttached = "status.attached" - StatusAttachmentMetadata = "status.attachmentMetadata" - StatusCapacity = "status.capacity" - StatusCheckList = "status.checkList" - StatusChecks = "status.checks" - StatusConditions = "status.conditions" - StatusDetachError = "status.detachError" - StatusDetachErrorMessage = "status.detachError.message" - StatusDetachErrorTime = "status.detachError.time" - StatusIsReady = "status.isReady" - StatusLastPhaseTransitionTime = "status.lastPhaseTransitionTime" - StatusLastReadyGeneration = "status.lastReadyGeneration" - StatusLastReconcileTime = "status.lastReconcileTime" - StatusMessage = "status.message" - StatusMessageItems = "status.message.items" - StatusPhase = "status.phase" - StatusReason = "status.reason" - StatusReleaseNotes = "status.releaseNotes" - StatusReleaseStatus = "status.releaseStatus" - StatusResources = "status.resources" - SyncStatus = "syncStatus" - SyncStatusAction = "syncStatus.action" - SyncStatusError = "syncStatus.error" - SyncStatusLastSyncedAt = "syncStatus.lastSyncedAt" - SyncStatusRecordVersion = "syncStatus.recordVersion" - SyncStatusState = "syncStatus.state" - SyncStatusSyncScheduledAt = "syncStatus.syncScheduledAt" - UpdateTime = "updateTime" + AccountName = "accountName" + ApiVersion = "apiVersion" + ClusterName = "clusterName" + CreatedBy = "createdBy" + CreatedByUserEmail = "createdBy.userEmail" + CreatedByUserId = "createdBy.userId" + CreatedByUserName = "createdBy.userName" + CreationTime = "creationTime" + DisplayName = "displayName" + Id = "id" + Kind = "kind" + LastUpdatedBy = "lastUpdatedBy" + LastUpdatedByUserEmail = "lastUpdatedBy.userEmail" + LastUpdatedByUserId = "lastUpdatedBy.userId" + LastUpdatedByUserName = "lastUpdatedBy.userName" + MarkedForDeletion = "markedForDeletion" + Metadata = "metadata" + MetadataAnnotations = "metadata.annotations" + MetadataCreationTimestamp = "metadata.creationTimestamp" + MetadataDeletionGracePeriodSeconds = "metadata.deletionGracePeriodSeconds" + MetadataDeletionTimestamp = "metadata.deletionTimestamp" + MetadataFinalizers = "metadata.finalizers" + MetadataGenerateName = "metadata.generateName" + MetadataGeneration = "metadata.generation" + MetadataLabels = "metadata.labels" + MetadataManagedFields = "metadata.managedFields" + MetadataName = "metadata.name" + MetadataNamespace = "metadata.namespace" + MetadataOwnerReferences = "metadata.ownerReferences" + MetadataResourceVersion = "metadata.resourceVersion" + MetadataSelfLink = "metadata.selfLink" + MetadataUid = "metadata.uid" + RecordVersion = "recordVersion" + Status = "status" + StatusAccessModes = "status.accessModes" + StatusAllocatedResourceStatuses = "status.allocatedResourceStatuses" + StatusAllocatedResources = "status.allocatedResources" + StatusAttachError = "status.attachError" + StatusAttachErrorMessage = "status.attachError.message" + StatusAttachErrorTime = "status.attachError.time" + StatusAttached = "status.attached" + StatusAttachmentMetadata = "status.attachmentMetadata" + StatusCapacity = "status.capacity" + StatusCheckList = "status.checkList" + StatusChecks = "status.checks" + StatusConditions = "status.conditions" + StatusCurrentVolumeAttributesClassName = "status.currentVolumeAttributesClassName" + StatusDetachError = "status.detachError" + StatusDetachErrorMessage = "status.detachError.message" + StatusDetachErrorTime = "status.detachError.time" + StatusIsReady = "status.isReady" + StatusLastPhaseTransitionTime = "status.lastPhaseTransitionTime" + StatusLastReadyGeneration = "status.lastReadyGeneration" + StatusLastReconcileTime = "status.lastReconcileTime" + StatusMessage = "status.message" + StatusMessageItems = "status.message.items" + StatusModifyVolumeStatus = "status.modifyVolumeStatus" + StatusModifyVolumeStatusStatus = "status.modifyVolumeStatus.status" + StatusModifyVolumeStatusTargetVolumeAttributesClassName = "status.modifyVolumeStatus.targetVolumeAttributesClassName" + StatusPhase = "status.phase" + StatusReason = "status.reason" + StatusReleaseNotes = "status.releaseNotes" + StatusReleaseStatus = "status.releaseStatus" + StatusResources = "status.resources" + SyncStatus = "syncStatus" + SyncStatusAction = "syncStatus.action" + SyncStatusError = "syncStatus.error" + SyncStatusLastSyncedAt = "syncStatus.lastSyncedAt" + SyncStatusRecordVersion = "syncStatus.recordVersion" + SyncStatusState = "syncStatus.state" + SyncStatusSyncScheduledAt = "syncStatus.syncScheduledAt" + UpdateTime = "updateTime" ) diff --git a/apps/message-office/Taskfile.yml b/apps/message-office/Taskfile.yml index 1ec38087d..79b4419f1 100644 --- a/apps/message-office/Taskfile.yml +++ b/apps/message-office/Taskfile.yml @@ -33,6 +33,15 @@ tasks: out: "{{.binary}}-{{.GOARCH}}" GOARCH: "{{.GOARCH}}" + gen:constants: + cmds: + - go generate ./internal/entities/field-constants/gen.go + + grpc:build: + dir: ./protobufs/ + cmds: + - protoc --go_out=. --go-grpc_out=. --go_opt=paths=import --go-grpc_opt=paths=import ./*.proto + container:build-and-push: requires: vars: diff --git a/apps/message-office/errors/errors.go b/apps/message-office/errors/errors.go new file mode 100644 index 000000000..8130f3cbd --- /dev/null +++ b/apps/message-office/errors/errors.go @@ -0,0 +1,12 @@ +package errors + +import "errors" + +// github.com/kloudlite/api/apps/message-office/internal/domain/platform-edge/repo.go +var ErrEdgeClusterNotAllocated = errors.New("edge cluster not allocated") + +// github.com/kloudlite/api/apps/message-office/internal/domain/platform-edge/repo.go +var ( + ErrNoClusterAvailable = errors.New("no cluster available") + ErrNoClustersInRegion = errors.New("no clusters found in region") +) diff --git a/apps/message-office/internal/app/app.go b/apps/message-office/internal/app/app.go index e81c88f18..553e910a5 100644 --- a/apps/message-office/internal/app/app.go +++ b/apps/message-office/internal/app/app.go @@ -8,9 +8,9 @@ import ( "github.com/kloudlite/api/apps/message-office/internal/app/graph/generated" proto_rpc "github.com/kloudlite/api/apps/message-office/internal/app/proto-rpc" "github.com/kloudlite/api/apps/message-office/internal/domain" + "github.com/kloudlite/api/apps/message-office/internal/entities" "github.com/kloudlite/api/apps/message-office/internal/env" "github.com/kloudlite/api/grpc-interfaces/infra" - message_office_internal "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/message-office-internal" "github.com/kloudlite/api/pkg/grpc" httpServer "github.com/kloudlite/api/pkg/http-server" "github.com/kloudlite/api/pkg/logging" @@ -27,12 +27,12 @@ type ( type ( ExternalGrpcServer grpc.Server - InternalGrpcServer grpc.Server ) var Module = fx.Module("app", repos.NewFxMongoRepo[*domain.MessageOfficeToken]("mo_tokens", "mot", domain.MOTokenIndexes), - repos.NewFxMongoRepo[*domain.AccessToken]("acc_tokens", "acct", domain.AccessTokenIndexes), + repos.NewFxMongoRepo[*entities.PlatformEdgeCluster]("platform_edge_clusters", "pec", entities.PlatformEdgeClusterIndexes), + repos.NewFxMongoRepo[*entities.ClusterAllocation]("cluster_allocations", "ca", entities.ClusterAllocationIndexes), fx.Provide(func(jsc *nats.JetstreamClient, logger logging.Logger) UpdatesProducer { return msg_nats.NewJetstreamProducer(jsc) @@ -72,11 +72,9 @@ var Module = fx.Module("app", } }), + // internal grpc server fx.Provide(newInternalMsgServer), - - fx.Invoke(func(server InternalGrpcServer, internalMsgServer message_office_internal.MessageOfficeInternalServer) { - message_office_internal.RegisterMessageOfficeInternalServer(server, internalMsgServer) - }), + fx.Invoke(RegisterInternalMsgServer), fx.Invoke( func(server ExternalGrpcServer, messageServer messages.MessageDispatchServiceServer) { diff --git a/apps/message-office/internal/app/internal-grpc-server.go b/apps/message-office/internal/app/internal-grpc-server.go index 66b9d7d5c..42c5da560 100644 --- a/apps/message-office/internal/app/internal-grpc-server.go +++ b/apps/message-office/internal/app/internal-grpc-server.go @@ -4,35 +4,91 @@ import ( "context" "github.com/kloudlite/api/apps/message-office/internal/domain" - "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/message-office-internal" + cluster_token "github.com/kloudlite/api/apps/message-office/protobufs/cluster-token" + platform_edge "github.com/kloudlite/api/apps/message-office/protobufs/platform-edge" "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/grpc" ) -type internalMsgServer struct { +type ( + InternalGrpcServer grpc.Server +) + +type internalServer struct { d domain.Domain - message_office_internal.UnimplementedMessageOfficeInternalServer + // message_office_internal.UnimplementedMessageOfficeInternalServer + cluster_token.UnimplementedClusterTokenServer + platform_edge.UnimplementedPlatformEdgeServer } -func (s *internalMsgServer) GenerateClusterToken(ctx context.Context, in *message_office_internal.GenerateClusterTokenIn) (*message_office_internal.GenerateClusterTokenOut, error) { +// GenerateClusterToken implements cluster_token.ClusterTokenServer. +func (s *internalServer) GenerateClusterToken(ctx context.Context, in *cluster_token.GenerateClusterTokenIn) (*cluster_token.GenerateClusterTokenOut, error) { token, err := s.d.GenClusterToken(ctx, in.AccountName, in.ClusterName) if err != nil { return nil, errors.NewE(err) } - return &message_office_internal.GenerateClusterTokenOut{ - ClusterToken: token, - }, nil + + return &cluster_token.GenerateClusterTokenOut{ClusterToken: token}, nil } -func (s *internalMsgServer) GetClusterToken(ctx context.Context, in *message_office_internal.GetClusterTokenIn) (*message_office_internal.GetClusterTokenOut, error) { +// GetClusterToken implements cluster_token.ClusterTokenServer. +func (s *internalServer) GetClusterToken(ctx context.Context, in *cluster_token.GetClusterTokenIn) (*cluster_token.GetClusterTokenOut, error) { token, err := s.d.GetClusterToken(ctx, in.AccountName, in.ClusterName) if err != nil { return nil, errors.NewE(err) } - return &message_office_internal.GetClusterTokenOut{ - ClusterToken: token, + return &cluster_token.GetClusterTokenOut{ClusterToken: token}, nil +} + +// AllocatePlatformEdgeCluster implements platform_edge.PlatformEdgeServer. +func (s *internalServer) AllocatePlatformEdgeCluster(ctx context.Context, in *platform_edge.AllocatePlatformEdgeClusterIn) (*platform_edge.AllocatePlatformEdgeClusterOut, error) { + pec, err := s.d.AllocatePlatformEdgeCluster(ctx, in.Region, in.AccountName) + if err != nil { + return nil, errors.NewE(err) + } + + return &platform_edge.AllocatePlatformEdgeClusterOut{ClusterName: pec.Name}, nil +} + +// GetAllocatedPlatformEdgeCluster implements platform_edge.PlatformEdgeServer. +func (s *internalServer) GetAllocatedPlatformEdgeCluster(ctx context.Context, in *platform_edge.GetAllocatedPlatformEdgeClusterIn) (*platform_edge.AllocatePlatformEdgeClusterOut, error) { + allocated, err := s.d.GetAllocatedPlatformEdgeCluster(ctx, in.AccountName) + if err != nil { + return nil, errors.NewE(err) + } + + return &platform_edge.AllocatePlatformEdgeClusterOut{ + ClusterName: allocated.Cluster.Name, + OwnedByAccount: allocated.Cluster.OwnedByAccount, }, nil } -func newInternalMsgServer(d domain.Domain) message_office_internal.MessageOfficeInternalServer { - return &internalMsgServer{d: d} +// ListPlatformEdgeClusters implements platform_edge.PlatformEdgeServer. +func (s *internalServer) ListPlatformEdgeClusters(ctx context.Context, in *platform_edge.ListPlatformEdgeClustersIn) (*platform_edge.ListPlatformEdgeClustersOut, error) { + pec, err := s.d.ListPlatformEdgeClusters(ctx, &in.Region) + if err != nil { + return nil, errors.NewE(err) + } + + out := &platform_edge.ListPlatformEdgeClustersOut{ + PlatformEdgeClusters: make([]*platform_edge.PlatformEdgeCluster, 0, len(pec)), + } + + for _, pec := range pec { + out.PlatformEdgeClusters = append(out.PlatformEdgeClusters, &platform_edge.PlatformEdgeCluster{ + Region: pec.Region, + ClusterName: pec.Name, + }) + } + return out, nil +} + +func newInternalMsgServer(d domain.Domain) (cluster_token.ClusterTokenServer, platform_edge.PlatformEdgeServer) { + server := &internalServer{d: d} + return server, server +} + +func RegisterInternalMsgServer(server InternalGrpcServer, cts cluster_token.ClusterTokenServer, pes platform_edge.PlatformEdgeServer) { + cluster_token.RegisterClusterTokenServer(server, cts) + platform_edge.RegisterPlatformEdgeServer(server, pes) } diff --git a/apps/message-office/internal/domain/api.go b/apps/message-office/internal/domain/api.go index 493f90cb5..82cbedabe 100644 --- a/apps/message-office/internal/domain/api.go +++ b/apps/message-office/internal/domain/api.go @@ -1,11 +1,17 @@ package domain -import "context" +import ( + "context" + + platform_edge "github.com/kloudlite/api/apps/message-office/internal/domain/platform-edge" +) type Domain interface { GenClusterToken(ctx context.Context, accountName string, clusterName string) (string, error) FindClusterToken(ctx context.Context, clusterToken string) (*MessageOfficeToken, error) GetClusterToken(ctx context.Context, accountName string, clusterName string) (string, error) - GenAccessToken(ctx context.Context, clusterToken string) (*AccessToken, error) - ValidateAccessToken(ctx context.Context, accessToken, accountName, clusterName string) error + // GenAccessToken(ctx context.Context, clusterToken string) (*AccessToken, error) + // ValidateAccessToken(ctx context.Context, accessToken, accountName, clusterName string) error + + platform_edge.Domain } diff --git a/apps/message-office/internal/domain/domain.go b/apps/message-office/internal/domain/domain.go index 83a4e0421..abc9544f4 100644 --- a/apps/message-office/internal/domain/domain.go +++ b/apps/message-office/internal/domain/domain.go @@ -2,40 +2,46 @@ package domain import ( "context" + "log/slog" "github.com/kloudlite/api/pkg/errors" "go.uber.org/fx" + platform_edge "github.com/kloudlite/api/apps/message-office/internal/domain/platform-edge" "github.com/kloudlite/api/apps/message-office/internal/env" fn "github.com/kloudlite/api/pkg/functions" - "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/api/pkg/repos" ) -type domain struct { - moRepo repos.DbRepo[*MessageOfficeToken] - env *env.Env - accessTokenRepo repos.DbRepo[*AccessToken] - logger logging.Logger +type PlatformEdgeDomain struct { + *platform_edge.Repo } -func (d *domain) ValidateAccessToken(ctx context.Context, accessToken string, accountName string, clusterName string) error { - r, err := d.accessTokenRepo.FindOne(ctx, repos.Filter{ - "accessToken": accessToken, - "accountName": accountName, - "clusterName": clusterName, - }) - if err != nil { - return errors.NewE(err) - } - - if r == nil { - return errors.Newf("invalid access token") - } +type domain struct { + moRepo repos.DbRepo[*MessageOfficeToken] + env *env.Env + logger *slog.Logger - return nil + PlatformEdgeDomain } +// func (d *domain) ValidateAccessToken(ctx context.Context, accessToken string, accountName string, clusterName string) error { +// r, err := d.accessTokenRepo.FindOne(ctx, repos.Filter{ +// "accessToken": accessToken, +// "accountName": accountName, +// "clusterName": clusterName, +// }) +// if err != nil { +// return errors.NewE(err) +// } +// +// if r == nil { +// return errors.Newf("invalid access token") +// } +// +// return nil +// } + func (d *domain) getClusterToken(ctx context.Context, accountName string, clusterName string) (string, error) { if accountName == "" || clusterName == "" { return "", errors.Newf("accountName and/or clusterName cannot be empty") @@ -84,55 +90,56 @@ func (d *domain) GenClusterToken(ctx context.Context, accountName, clusterName s return record.Token, nil } -func (d *domain) GenAccessToken(ctx context.Context, clusterToken string) (*AccessToken, error) { - mot, err := d.moRepo.FindOne(ctx, repos.Filter{"token": clusterToken}) - if err != nil { - return nil, errors.NewE(err) - } - - if mot == nil { - return nil, errors.Newf("no such cluster token found") - } - - if mot.Granted != nil && *mot.Granted { - d.logger.Infof("a valid access-token has already been issued for this cluster token, granting a new one, and removing the old one") - } - - record, err := d.accessTokenRepo.Upsert(ctx, repos.Filter{ - "accountName": mot.AccountName, - "clusterName": mot.ClusterName, - }, &AccessToken{ - AccountName: mot.AccountName, - ClusterName: mot.ClusterName, - AccessToken: fn.CleanerNanoidOrDie(40), - }) - if err != nil { - return nil, errors.NewE(err) - } - - if record == nil { - return nil, errors.Newf("failed to upsert into accessToken collection") - } - - mot.Granted = fn.New(true) - if _, err := d.moRepo.UpdateById(ctx, mot.Id, mot); err != nil { - return nil, errors.NewE(err) - } - - return record, nil -} +// func (d *domain) GenAccessToken(ctx context.Context, clusterToken string) (*AccessToken, error) { +// mot, err := d.moRepo.FindOne(ctx, repos.Filter{"token": clusterToken}) +// if err != nil { +// return nil, errors.NewE(err) +// } +// +// if mot == nil { +// return nil, errors.Newf("no such cluster token found") +// } +// +// if mot.Granted != nil && *mot.Granted { +// d.logger.Infof("a valid access-token has already been issued for this cluster token, granting a new one, and removing the old one") +// } +// +// record, err := d.accessTokenRepo.Upsert(ctx, repos.Filter{ +// "accountName": mot.AccountName, +// "clusterName": mot.ClusterName, +// }, &AccessToken{ +// AccountName: mot.AccountName, +// ClusterName: mot.ClusterName, +// AccessToken: fn.CleanerNanoidOrDie(40), +// }) +// if err != nil { +// return nil, errors.NewE(err) +// } +// +// if record == nil { +// return nil, errors.Newf("failed to upsert into accessToken collection") +// } +// +// mot.Granted = fn.New(true) +// if _, err := d.moRepo.UpdateById(ctx, mot.Id, mot); err != nil { +// return nil, errors.NewE(err) +// } +// +// return record, nil +// } var Module = fx.Module( "domain", fx.Provide(func( moRepo repos.DbRepo[*MessageOfficeToken], - accessTokenRepo repos.DbRepo[*AccessToken], - logger logging.Logger, + // accessTokenRepo repos.DbRepo[*AccessToken], + logger *slog.Logger, ) Domain { return &domain{ - moRepo: moRepo, - accessTokenRepo: accessTokenRepo, - logger: logger, + moRepo: moRepo, + // accessTokenRepo: accessTokenRepo, + logger: logger, + PlatformEdgeDomain: PlatformEdgeDomain{Repo: &platform_edge.Repo{}}, } }), ) diff --git a/apps/message-office/internal/domain/entities.go b/apps/message-office/internal/domain/entities.go index 8215ebb79..d233544d9 100644 --- a/apps/message-office/internal/domain/entities.go +++ b/apps/message-office/internal/domain/entities.go @@ -26,27 +26,3 @@ var MOTokenIndexes = []repos.IndexField{ Unique: true, }, } - -type AccessToken struct { - repos.BaseEntity `json:",inline"` - AccountName string `json:"accountName"` - ClusterName string `json:"clusterName"` - AccessToken string `json:"accessToken"` -} - -var AccessTokenIndexes = []repos.IndexField{ - { - Field: []repos.IndexKey{ - {Key: "id", Value: repos.IndexAsc}, - }, - Unique: true, - }, - { - Field: []repos.IndexKey{ - {Key: "accountName", Value: repos.IndexAsc}, - {Key: "clusterName", Value: repos.IndexAsc}, - {Key: "accessToken", Value: repos.IndexAsc}, - }, - Unique: true, - }, -} diff --git a/apps/message-office/internal/domain/platform-edge/domain.go b/apps/message-office/internal/domain/platform-edge/domain.go new file mode 100644 index 000000000..64d39d975 --- /dev/null +++ b/apps/message-office/internal/domain/platform-edge/domain.go @@ -0,0 +1,15 @@ +package platform_edge + +import ( + "context" + + "github.com/kloudlite/api/apps/message-office/internal/entities" +) + +type Domain interface { + AllocatePlatformEdgeCluster(ctx context.Context, region string, account string) (*entities.PlatformEdgeCluster, error) + GetAllocatedPlatformEdgeCluster(ctx context.Context, account string) (*entities.ClusterAllocation, error) + ListPlatformEdgeClusters(ctx context.Context, region *string) ([]*entities.PlatformEdgeCluster, error) +} + +var _ Domain = (*Repo)(nil) diff --git a/apps/message-office/internal/domain/platform-edge/repo.go b/apps/message-office/internal/domain/platform-edge/repo.go new file mode 100644 index 000000000..8321c754f --- /dev/null +++ b/apps/message-office/internal/domain/platform-edge/repo.go @@ -0,0 +1,120 @@ +package platform_edge + +import ( + "context" + + mo_errors "github.com/kloudlite/api/apps/message-office/errors" + "github.com/kloudlite/api/pkg/errors" + + "github.com/kloudlite/api/apps/message-office/internal/entities" + fc "github.com/kloudlite/api/apps/message-office/internal/entities/field-constants" + "github.com/kloudlite/api/pkg/repos" +) + +type Repo struct { + edge_clusters repos.DbRepo[*entities.PlatformEdgeCluster] + allocated_clusters repos.DbRepo[*entities.ClusterAllocation] +} + +func (r *Repo) ListPlatformEdgeClusters(ctx context.Context, region *string) ([]*entities.PlatformEdgeCluster, error) { + q := repos.Query{} + if region != nil { + q.Filter = repos.Filter{ + fc.PlatformEdgeClusterRegion: region, + } + } + return r.edge_clusters.Find(ctx, q) +} + +func (r *Repo) AllocatePlatformEdgeCluster(ctx context.Context, region string, account string) (*entities.PlatformEdgeCluster, error) { + m, err := r.allocated_clusters.GroupByAndCount(ctx, repos.Filter{fc.ClusterAllocationClusterRegion: region}, fc.ClusterAllocationClusterName, repos.GroupByAndCountOptions{ + Limit: 1, + Sort: repos.SortDirectionAsc, + }) + if err != nil { + return nil, err + } + + if len(m) > 1 { + return nil, errors.New("more than one cluster available") + } + + var clusterName string + + switch len(m) { + case 0: + { + x, err := r.edge_clusters.FindOne(ctx, repos.Filter{fc.PlatformEdgeClusterRegion: region}) + if err != nil { + return nil, err + } + if x == nil { + return nil, mo_errors.ErrNoClustersInRegion + } + + clusterName = x.Name + + if _, err := r.allocated_clusters.Create(ctx, &entities.ClusterAllocation{ + To: account, + Cluster: entities.ClusterAllocationCluster{ + Name: clusterName, + Region: region, + OwnedByAccount: x.OwnedByAccount, + }, + }); err != nil { + return nil, err + } + } + case 1: + { + for k := range m { + clusterName = k + break + } + } + } + + pec, err := r.edge_clusters.FindOne(ctx, repos.Filter{ + fc.PlatformEdgeClusterName: clusterName, + fc.PlatformEdgeClusterRegion: region, + }) + if err != nil { + return nil, err + } + + if pec == nil { + return nil, mo_errors.ErrNoClustersInRegion + } + + return pec, nil +} + +func (r *Repo) GetPlatformEdgeCluster(ctx context.Context, clusterName string) (*entities.PlatformEdgeCluster, error) { + pec, err := r.edge_clusters.FindOne(ctx, repos.Filter{ + fc.PlatformEdgeClusterName: clusterName, + }) + if err != nil { + return nil, err + } + + if pec == nil { + return nil, errors.New("cluster not found") + } + + return pec, nil +} + +func (r *Repo) GetAllocatedPlatformEdgeCluster(ctx context.Context, account string) (*entities.ClusterAllocation, error) { + rec, err := r.allocated_clusters.FindOne(ctx, repos.Filter{ + fc.ClusterAllocationTo: account, + }) + if err != nil { + return nil, err + } + + if rec == nil { + return nil, mo_errors.ErrEdgeClusterNotAllocated + } + + return rec, nil +} diff --git a/apps/message-office/internal/domain/platform-edge/repo_test.go b/apps/message-office/internal/domain/platform-edge/repo_test.go new file mode 100644 index 000000000..d9820f493 --- /dev/null +++ b/apps/message-office/internal/domain/platform-edge/repo_test.go @@ -0,0 +1,191 @@ +package platform_edge + +import ( + "context" + "reflect" + "testing" + + "github.com/kloudlite/api/apps/message-office/internal/entities" + fc "github.com/kloudlite/api/apps/message-office/internal/entities/field-constants" + mock_repos "github.com/kloudlite/api/mocks/pkg/repos" + + // fn "github.com/kloudlite/api/pkg/functions" + mo_errors "github.com/kloudlite/api/apps/message-office/errors" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/repos" +) + +func TestRepo_AllocatePlatformEdgeCluster(t *testing.T) { + type fields struct { + edge_clusters func(t *testing.T) repos.DbRepo[*entities.PlatformEdgeCluster] + allocated_clusters func(t *testing.T) repos.DbRepo[*entities.ClusterAllocation] + } + type args struct { + ctx context.Context + region string + account string + } + tests := []struct { + name string + fields fields + args args + want *entities.PlatformEdgeCluster + wantErr error + }{ + { + name: "[region] not found", + fields: fields{ + edge_clusters: func(t *testing.T) repos.DbRepo[*entities.PlatformEdgeCluster] { + repo := mock_repos.NewDbRepo[*entities.PlatformEdgeCluster]() + + repo.MockFindOne = func(ctx context.Context, filter repos.Filter) (*entities.PlatformEdgeCluster, error) { + return nil, nil + } + + return repo + }, + allocated_clusters: func(t *testing.T) repos.DbRepo[*entities.ClusterAllocation] { + repo := mock_repos.NewDbRepo[*entities.ClusterAllocation]() + repo.MockGroupByAndCount = func(ctx context.Context, filter repos.Filter, groupBy string, opts repos.GroupByAndCountOptions) (map[string]int64, error) { + return nil, nil + } + return repo + }, + }, + args: args{ + ctx: context.Background(), + region: "REGION", + account: "sample-account", + }, + want: nil, + wantErr: mo_errors.ErrNoClustersInRegion, + }, + + { + name: "[region] found, but no allocation till now", + fields: fields{ + edge_clusters: func(t *testing.T) repos.DbRepo[*entities.PlatformEdgeCluster] { + repo := mock_repos.NewDbRepo[*entities.PlatformEdgeCluster]() + + repo.MockFindOne = func(ctx context.Context, filter repos.Filter) (*entities.PlatformEdgeCluster, error) { + return &entities.PlatformEdgeCluster{ + BaseEntity: repos.BaseEntity{Id: "1"}, + Name: "sample-cluster", + Region: "REGION", + CloudProvider: "sample-cloud-provider", + }, nil + } + + return repo + }, + allocated_clusters: func(t *testing.T) repos.DbRepo[*entities.ClusterAllocation] { + repo := mock_repos.NewDbRepo[*entities.ClusterAllocation]() + + repo.MockGroupByAndCount = func(ctx context.Context, filter repos.Filter, groupBy string, opts repos.GroupByAndCountOptions) (map[string]int64, error) { + return nil, nil + } + + repo.MockCreate = func(ctx context.Context, data *entities.ClusterAllocation) (*entities.ClusterAllocation, error) { + if data.Cluster.Name != "sample-cluster" { + t.Errorf("Repo.AllocatePlatformEdgeCluster() called with wrong cluster name") + } + return data, nil + } + + return repo + }, + }, + args: args{ + ctx: context.Background(), + region: "REGION", + account: "sample-account", + }, + want: &entities.PlatformEdgeCluster{ + BaseEntity: repos.BaseEntity{Id: "1"}, + Name: "sample-cluster", + Region: "REGION", + CloudProvider: "sample-cloud-provider", + }, + wantErr: mo_errors.ErrNoClustersInRegion, + }, + + { + name: "[allocations] found", + fields: fields{ + edge_clusters: func(t *testing.T) repos.DbRepo[*entities.PlatformEdgeCluster] { + repo := mock_repos.NewDbRepo[*entities.PlatformEdgeCluster]() + + repo.MockFindOne = func(ctx context.Context, filter repos.Filter) (*entities.PlatformEdgeCluster, error) { + if filter[fc.PlatformEdgeClusterName] != "sample-cluster" { + t.Errorf("edge_clusters.FindOne() called with wrong cluster name") + t.FailNow() + } + + if filter[fc.PlatformEdgeClusterRegion] != "REGION" { + t.Errorf("edge_clusters.FindOne() called with wrong region") + t.FailNow() + } + + return &entities.PlatformEdgeCluster{ + BaseEntity: repos.BaseEntity{Id: "1"}, + Name: "sample-cluster", + Region: "REGION", + CloudProvider: "sample-cloud-provider", + }, nil + } + + return repo + }, + allocated_clusters: func(t *testing.T) repos.DbRepo[*entities.ClusterAllocation] { + repo := mock_repos.NewDbRepo[*entities.ClusterAllocation]() + + repo.MockGroupByAndCount = func(ctx context.Context, filter repos.Filter, groupBy string, opts repos.GroupByAndCountOptions) (map[string]int64, error) { + return map[string]int64{"sample-cluster": 1}, nil + } + + repo.MockCreate = func(ctx context.Context, data *entities.ClusterAllocation) (*entities.ClusterAllocation, error) { + if data.Cluster.Name != "sample-cluster" { + t.Errorf("allocated_clusters.AllocatePlatformEdgeCluster() called with wrong cluster name") + } + + if data.Cluster.Region != "REGION" { + t.Errorf("allocated_clusters.AllocatePlatformEdgeCluster() called with wrong region") + } + + return data, nil + } + + return repo + }, + }, + args: args{ + ctx: context.Background(), + region: "REGION", + account: "sample-account", + }, + want: &entities.PlatformEdgeCluster{ + BaseEntity: repos.BaseEntity{Id: "1"}, + Name: "sample-cluster", + Region: "REGION", + CloudProvider: "sample-cloud-provider", + }, + wantErr: mo_errors.ErrNoClustersInRegion, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + r := &Repo{ + edge_clusters: tt.fields.edge_clusters(t), + allocated_clusters: tt.fields.allocated_clusters(t), + } + got, err := r.AllocatePlatformEdgeCluster(tt.args.ctx, tt.args.region, tt.args.account) + if (err != nil) && !errors.Is(err, tt.wantErr) { + t.Errorf("Repo.AllocatePlatformEdgeCluster()\n\terror = %v,\n\twantErr = %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("Repo.AllocatePlatformEdgeCluster()\n\tgot = %#v,\n\twant %#v", got, tt.want) + } + }) + } +} diff --git a/apps/message-office/internal/entities/allocation.go b/apps/message-office/internal/entities/allocation.go new file mode 100644 index 000000000..64c2e9a49 --- /dev/null +++ b/apps/message-office/internal/entities/allocation.go @@ -0,0 +1,80 @@ +package entities + +import ( + fc "github.com/kloudlite/api/apps/message-office/internal/entities/field-constants" + "github.com/kloudlite/api/pkg/repos" +) + +type ClusterAllocationCluster struct { + Name string `json:"name"` + Region string `json:"region"` + OwnedByAccount string `json:"owned_by_account"` +} + +type ClusterAllocation struct { + repos.BaseEntity `json:",inline"` + To string `json:"to"` + Cluster ClusterAllocationCluster `json:"cluster"` +} + +var ClusterAllocationIndexes = []repos.IndexField{ + { + Field: []repos.IndexKey{ + {Key: fc.Id, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + {Key: fc.ClusterAllocationTo, Value: repos.IndexAsc}, + {Key: fc.ClusterAllocationClusterName, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + {Key: fc.ClusterAllocationClusterRegion, Value: repos.IndexAsc}, + }, + }, +} + +/* +```javascript +records = [] +for (let i = 1000; i < 10000; i++) { + records.push({ + id: i, + to: `A-${i}`, + cluster_name: `cluster-${Math.ceil(Math.random() * 10)}` + }); +} +db.cluster_allocations.insertMany(records); + +// [ +// { id: "1", to: "A", cluster_name: "cluster-1" }, +// { id: "2", to: "B", cluster_name: "cluster-1" }, +// { id: "3", to: "C", cluster_name: "cluster-2" }, +// { id: "4", to: "D", cluster_name: "cluster-2" }, +// { id: "5", to: "E", cluster_name: "cluster-3" }, +// { id: "6", to: "F", cluster_name: "cluster-3" }, +// { id: "7", to: "G", cluster_name: "cluster-4" }, +// ] +// ); + +db.cluster_allocations.aggregate([ + { + $group: { + _id: "$cluster_name", // Replace with the field you want to group by + count: { $sum: 1 } // Count the number of occurrences + } + }, + { + $sort: { count: 1 } // Sort by count in descending order + }, + { + $limit: 1 // Limit the results to the top 10 + } +]) + +``` +*/ diff --git a/apps/message-office/internal/entities/field-constants/gen.go b/apps/message-office/internal/entities/field-constants/gen.go new file mode 100644 index 000000000..acf290950 --- /dev/null +++ b/apps/message-office/internal/entities/field-constants/gen.go @@ -0,0 +1,3 @@ +package field_constants + +//go:generate go run github.com/kloudlite/api/cmd/struct-json-path --pkg github.com/kloudlite/api/apps/message-office/internal/entities --common-path "metadata" --common-path "apiVersion" --common-path "kind" --common-path "status" --common-path "syncStatus" --common-path "lastUpdatedBy" --common-path "createdBy" --common-path "displayName" --common-path "creationTime" --common-path "updateTime" --common-path "id" --common-path "recordVersion" --common-path "accountName" --common-path "projectName" --common-path "environmentName" --common-path "clusterName" --common-path "markedForDeletion" --out-file ./generated_constants.go --banner "package field_constants" --ignore-nesting "time.Time" --ignore-nesting "k8s.io/apimachinery/pkg/apis/meta/v1.Time" diff --git a/apps/message-office/internal/entities/field-constants/generated_constants.go b/apps/message-office/internal/entities/field-constants/generated_constants.go new file mode 100644 index 000000000..8749ba63c --- /dev/null +++ b/apps/message-office/internal/entities/field-constants/generated_constants.go @@ -0,0 +1,29 @@ +// DO NOT EDIT. generated by "github.com/kloudlite/api/cmd/struct-json-path" + +package field_constants + +// constant vars generated for struct ClusterAllocation +const ( + ClusterAllocationCluster = "cluster" + ClusterAllocationClusterName = "cluster.name" + ClusterAllocationClusterOwnedByAccount = "cluster.owned_by_account" + ClusterAllocationClusterRegion = "cluster.region" + ClusterAllocationTo = "to" +) + +// constant vars generated for struct PlatformEdgeCluster +const ( + PlatformEdgeClusterCloudProvider = "cloud_provider" + PlatformEdgeClusterName = "name" + PlatformEdgeClusterOwnedByAccount = "owned_by_account" + PlatformEdgeClusterRegion = "region" +) + +// constant vars generated for struct +const ( + CreationTime = "creationTime" + Id = "id" + MarkedForDeletion = "markedForDeletion" + RecordVersion = "recordVersion" + UpdateTime = "updateTime" +) diff --git a/apps/message-office/internal/entities/platform-edge-cluster.go b/apps/message-office/internal/entities/platform-edge-cluster.go new file mode 100644 index 000000000..b1f77408a --- /dev/null +++ b/apps/message-office/internal/entities/platform-edge-cluster.go @@ -0,0 +1,34 @@ +package entities + +import ( + fc "github.com/kloudlite/api/apps/message-office/internal/entities/field-constants" + "github.com/kloudlite/api/pkg/repos" +) + +type PlatformEdgeCluster struct { + repos.BaseEntity `json:",inline"` + OwnedByAccount string `json:"owned_by_account"` + Name string `json:"name"` + Region string `json:"region"` + CloudProvider string `json:"cloud_provider"` +} + +var PlatformEdgeClusterIndexes = []repos.IndexField{ + { + Field: []repos.IndexKey{ + {Key: fc.Id, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + {Key: fc.PlatformEdgeClusterName, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + {Key: fc.PlatformEdgeClusterOwnedByAccount, Value: repos.IndexAsc}, + }, + }, +} diff --git a/apps/message-office/internal/framework/framework.go b/apps/message-office/internal/framework/framework.go index 74faecb5d..9806e6d6a 100644 --- a/apps/message-office/internal/framework/framework.go +++ b/apps/message-office/internal/framework/framework.go @@ -54,10 +54,8 @@ var Module = fx.Module("framework", app.Module, - fx.Provide(func(logr logging.Logger) (app.InternalGrpcServer, error) { - return grpc.NewGrpcServer(grpc.ServerOpts{ - Logger: logr.WithName("internal-grpc-server"), - }) + fx.Provide(func(logger *slog.Logger) (app.InternalGrpcServer, error) { + return grpc.NewGrpcServer(grpc.ServerOpts{Slogger: logger.With(slog.String("component", "internal-grpc"))}) }), fx.Invoke(func(lf fx.Lifecycle, logr logging.Logger, server app.InternalGrpcServer, ev *env.Env) { @@ -81,10 +79,8 @@ var Module = fx.Module("framework", return grpc.NewGrpcClient(ev.InfraGRPCAddr) }), - fx.Provide(func(logr logging.Logger) (app.ExternalGrpcServer, error) { - return grpc.NewGrpcServer(grpc.ServerOpts{ - Logger: logr.WithName("external-grpc-server"), - }) + fx.Provide(func(logger *slog.Logger) (app.ExternalGrpcServer, error) { + return grpc.NewGrpcServer(grpc.ServerOpts{Slogger: logger.With(slog.String("component", "external-grpc"))}) }), fx.Invoke(func(lf fx.Lifecycle, logr logging.Logger, server app.ExternalGrpcServer, ev *env.Env) { diff --git a/apps/message-office/protobufs/cluster-token.proto b/apps/message-office/protobufs/cluster-token.proto new file mode 100644 index 000000000..eb984ca69 --- /dev/null +++ b/apps/message-office/protobufs/cluster-token.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +option go_package = "./cluster-token"; + +service ClusterToken { + rpc GenerateClusterToken(GenerateClusterTokenIn) returns (GenerateClusterTokenOut); + rpc GetClusterToken(GetClusterTokenIn) returns (GetClusterTokenOut); +} + +message GenerateClusterTokenIn { + string accountName = 1; + string clusterName = 2; +} + +message GenerateClusterTokenOut { + string clusterToken = 1; +} + +message GetClusterTokenIn { + string accountName = 1; + string clusterName = 2; +} + +message GetClusterTokenOut { + string clusterToken = 1; +} diff --git a/apps/message-office/protobufs/cluster-token/cluster-token.pb.go b/apps/message-office/protobufs/cluster-token/cluster-token.pb.go new file mode 100644 index 000000000..953a5daad --- /dev/null +++ b/apps/message-office/protobufs/cluster-token/cluster-token.pb.go @@ -0,0 +1,368 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.24.4 +// source: cluster-token.proto + +package cluster_token + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GenerateClusterTokenIn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountName string `protobuf:"bytes,1,opt,name=accountName,proto3" json:"accountName,omitempty"` + ClusterName string `protobuf:"bytes,2,opt,name=clusterName,proto3" json:"clusterName,omitempty"` +} + +func (x *GenerateClusterTokenIn) Reset() { + *x = GenerateClusterTokenIn{} + if protoimpl.UnsafeEnabled { + mi := &file_cluster_token_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenerateClusterTokenIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateClusterTokenIn) ProtoMessage() {} + +func (x *GenerateClusterTokenIn) ProtoReflect() protoreflect.Message { + mi := &file_cluster_token_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenerateClusterTokenIn.ProtoReflect.Descriptor instead. +func (*GenerateClusterTokenIn) Descriptor() ([]byte, []int) { + return file_cluster_token_proto_rawDescGZIP(), []int{0} +} + +func (x *GenerateClusterTokenIn) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *GenerateClusterTokenIn) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +type GenerateClusterTokenOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterToken string `protobuf:"bytes,1,opt,name=clusterToken,proto3" json:"clusterToken,omitempty"` +} + +func (x *GenerateClusterTokenOut) Reset() { + *x = GenerateClusterTokenOut{} + if protoimpl.UnsafeEnabled { + mi := &file_cluster_token_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenerateClusterTokenOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateClusterTokenOut) ProtoMessage() {} + +func (x *GenerateClusterTokenOut) ProtoReflect() protoreflect.Message { + mi := &file_cluster_token_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenerateClusterTokenOut.ProtoReflect.Descriptor instead. +func (*GenerateClusterTokenOut) Descriptor() ([]byte, []int) { + return file_cluster_token_proto_rawDescGZIP(), []int{1} +} + +func (x *GenerateClusterTokenOut) GetClusterToken() string { + if x != nil { + return x.ClusterToken + } + return "" +} + +type GetClusterTokenIn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountName string `protobuf:"bytes,1,opt,name=accountName,proto3" json:"accountName,omitempty"` + ClusterName string `protobuf:"bytes,2,opt,name=clusterName,proto3" json:"clusterName,omitempty"` +} + +func (x *GetClusterTokenIn) Reset() { + *x = GetClusterTokenIn{} + if protoimpl.UnsafeEnabled { + mi := &file_cluster_token_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterTokenIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterTokenIn) ProtoMessage() {} + +func (x *GetClusterTokenIn) ProtoReflect() protoreflect.Message { + mi := &file_cluster_token_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterTokenIn.ProtoReflect.Descriptor instead. +func (*GetClusterTokenIn) Descriptor() ([]byte, []int) { + return file_cluster_token_proto_rawDescGZIP(), []int{2} +} + +func (x *GetClusterTokenIn) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *GetClusterTokenIn) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +type GetClusterTokenOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterToken string `protobuf:"bytes,1,opt,name=clusterToken,proto3" json:"clusterToken,omitempty"` +} + +func (x *GetClusterTokenOut) Reset() { + *x = GetClusterTokenOut{} + if protoimpl.UnsafeEnabled { + mi := &file_cluster_token_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterTokenOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterTokenOut) ProtoMessage() {} + +func (x *GetClusterTokenOut) ProtoReflect() protoreflect.Message { + mi := &file_cluster_token_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterTokenOut.ProtoReflect.Descriptor instead. +func (*GetClusterTokenOut) Descriptor() ([]byte, []int) { + return file_cluster_token_proto_rawDescGZIP(), []int{3} +} + +func (x *GetClusterTokenOut) GetClusterToken() string { + if x != nil { + return x.ClusterToken + } + return "" +} + +var File_cluster_token_proto protoreflect.FileDescriptor + +var file_cluster_token_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x16, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x6e, 0x12, + 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x3d, 0x0a, 0x17, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4f, 0x75, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0x57, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x12, 0x47, + 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4f, 0x75, + 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x95, 0x01, 0x0a, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x49, 0x0a, 0x14, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17, + 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x6e, 0x1a, 0x18, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4f, 0x75, + 0x74, 0x12, 0x3a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x6e, 0x1a, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4f, 0x75, 0x74, 0x42, 0x11, 0x5a, + 0x0f, 0x2e, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cluster_token_proto_rawDescOnce sync.Once + file_cluster_token_proto_rawDescData = file_cluster_token_proto_rawDesc +) + +func file_cluster_token_proto_rawDescGZIP() []byte { + file_cluster_token_proto_rawDescOnce.Do(func() { + file_cluster_token_proto_rawDescData = protoimpl.X.CompressGZIP(file_cluster_token_proto_rawDescData) + }) + return file_cluster_token_proto_rawDescData +} + +var file_cluster_token_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cluster_token_proto_goTypes = []interface{}{ + (*GenerateClusterTokenIn)(nil), // 0: GenerateClusterTokenIn + (*GenerateClusterTokenOut)(nil), // 1: GenerateClusterTokenOut + (*GetClusterTokenIn)(nil), // 2: GetClusterTokenIn + (*GetClusterTokenOut)(nil), // 3: GetClusterTokenOut +} +var file_cluster_token_proto_depIdxs = []int32{ + 0, // 0: ClusterToken.GenerateClusterToken:input_type -> GenerateClusterTokenIn + 2, // 1: ClusterToken.GetClusterToken:input_type -> GetClusterTokenIn + 1, // 2: ClusterToken.GenerateClusterToken:output_type -> GenerateClusterTokenOut + 3, // 3: ClusterToken.GetClusterToken:output_type -> GetClusterTokenOut + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_cluster_token_proto_init() } +func file_cluster_token_proto_init() { + if File_cluster_token_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cluster_token_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenerateClusterTokenIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cluster_token_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenerateClusterTokenOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cluster_token_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClusterTokenIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cluster_token_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClusterTokenOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cluster_token_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cluster_token_proto_goTypes, + DependencyIndexes: file_cluster_token_proto_depIdxs, + MessageInfos: file_cluster_token_proto_msgTypes, + }.Build() + File_cluster_token_proto = out.File + file_cluster_token_proto_rawDesc = nil + file_cluster_token_proto_goTypes = nil + file_cluster_token_proto_depIdxs = nil +} diff --git a/apps/message-office/protobufs/cluster-token/cluster-token_grpc.pb.go b/apps/message-office/protobufs/cluster-token/cluster-token_grpc.pb.go new file mode 100644 index 000000000..e51f7370e --- /dev/null +++ b/apps/message-office/protobufs/cluster-token/cluster-token_grpc.pb.go @@ -0,0 +1,146 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.24.4 +// source: cluster-token.proto + +package cluster_token + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ClusterToken_GenerateClusterToken_FullMethodName = "/ClusterToken/GenerateClusterToken" + ClusterToken_GetClusterToken_FullMethodName = "/ClusterToken/GetClusterToken" +) + +// ClusterTokenClient is the client API for ClusterToken service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ClusterTokenClient interface { + GenerateClusterToken(ctx context.Context, in *GenerateClusterTokenIn, opts ...grpc.CallOption) (*GenerateClusterTokenOut, error) + GetClusterToken(ctx context.Context, in *GetClusterTokenIn, opts ...grpc.CallOption) (*GetClusterTokenOut, error) +} + +type clusterTokenClient struct { + cc grpc.ClientConnInterface +} + +func NewClusterTokenClient(cc grpc.ClientConnInterface) ClusterTokenClient { + return &clusterTokenClient{cc} +} + +func (c *clusterTokenClient) GenerateClusterToken(ctx context.Context, in *GenerateClusterTokenIn, opts ...grpc.CallOption) (*GenerateClusterTokenOut, error) { + out := new(GenerateClusterTokenOut) + err := c.cc.Invoke(ctx, ClusterToken_GenerateClusterToken_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterTokenClient) GetClusterToken(ctx context.Context, in *GetClusterTokenIn, opts ...grpc.CallOption) (*GetClusterTokenOut, error) { + out := new(GetClusterTokenOut) + err := c.cc.Invoke(ctx, ClusterToken_GetClusterToken_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ClusterTokenServer is the server API for ClusterToken service. +// All implementations must embed UnimplementedClusterTokenServer +// for forward compatibility +type ClusterTokenServer interface { + GenerateClusterToken(context.Context, *GenerateClusterTokenIn) (*GenerateClusterTokenOut, error) + GetClusterToken(context.Context, *GetClusterTokenIn) (*GetClusterTokenOut, error) + mustEmbedUnimplementedClusterTokenServer() +} + +// UnimplementedClusterTokenServer must be embedded to have forward compatible implementations. +type UnimplementedClusterTokenServer struct { +} + +func (UnimplementedClusterTokenServer) GenerateClusterToken(context.Context, *GenerateClusterTokenIn) (*GenerateClusterTokenOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method GenerateClusterToken not implemented") +} +func (UnimplementedClusterTokenServer) GetClusterToken(context.Context, *GetClusterTokenIn) (*GetClusterTokenOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetClusterToken not implemented") +} +func (UnimplementedClusterTokenServer) mustEmbedUnimplementedClusterTokenServer() {} + +// UnsafeClusterTokenServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ClusterTokenServer will +// result in compilation errors. +type UnsafeClusterTokenServer interface { + mustEmbedUnimplementedClusterTokenServer() +} + +func RegisterClusterTokenServer(s grpc.ServiceRegistrar, srv ClusterTokenServer) { + s.RegisterService(&ClusterToken_ServiceDesc, srv) +} + +func _ClusterToken_GenerateClusterToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenerateClusterTokenIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterTokenServer).GenerateClusterToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterToken_GenerateClusterToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterTokenServer).GenerateClusterToken(ctx, req.(*GenerateClusterTokenIn)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterToken_GetClusterToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterTokenIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterTokenServer).GetClusterToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterToken_GetClusterToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterTokenServer).GetClusterToken(ctx, req.(*GetClusterTokenIn)) + } + return interceptor(ctx, in, info, handler) +} + +// ClusterToken_ServiceDesc is the grpc.ServiceDesc for ClusterToken service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ClusterToken_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "ClusterToken", + HandlerType: (*ClusterTokenServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GenerateClusterToken", + Handler: _ClusterToken_GenerateClusterToken_Handler, + }, + { + MethodName: "GetClusterToken", + Handler: _ClusterToken_GetClusterToken_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cluster-token.proto", +} diff --git a/apps/message-office/protobufs/platform-edge.proto b/apps/message-office/protobufs/platform-edge.proto new file mode 100644 index 000000000..6688634d4 --- /dev/null +++ b/apps/message-office/protobufs/platform-edge.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +option go_package = "./platform-edge"; + +service PlatformEdge { + rpc ListPlatformEdgeClusters(ListPlatformEdgeClustersIn) returns (ListPlatformEdgeClustersOut); + rpc AllocatePlatformEdgeCluster(AllocatePlatformEdgeClusterIn) returns (AllocatePlatformEdgeClusterOut); + rpc GetAllocatedPlatformEdgeCluster(GetAllocatedPlatformEdgeClusterIn) returns (AllocatePlatformEdgeClusterOut); +} + +message ListPlatformEdgeClustersIn { + string region = 1; +} + +message PlatformEdgeCluster { + string region = 1; + string cluster_name = 2; +} + +message ListPlatformEdgeClustersOut { + repeated PlatformEdgeCluster platform_edge_clusters = 1; +} + +message AllocatePlatformEdgeClusterIn { + string region = 1; + string account_name = 2; +} + +message AllocatePlatformEdgeClusterOut { + string cluster_name = 1; + string owned_by_account = 2; +} + +message GetAllocatedPlatformEdgeClusterIn { + string account_name = 1; +} diff --git a/apps/message-office/protobufs/platform-edge/platform-edge.pb.go b/apps/message-office/protobufs/platform-edge/platform-edge.pb.go new file mode 100644 index 000000000..9ea255aa9 --- /dev/null +++ b/apps/message-office/protobufs/platform-edge/platform-edge.pb.go @@ -0,0 +1,522 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.24.4 +// source: platform-edge.proto + +package platform_edge + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ListPlatformEdgeClustersIn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` +} + +func (x *ListPlatformEdgeClustersIn) Reset() { + *x = ListPlatformEdgeClustersIn{} + if protoimpl.UnsafeEnabled { + mi := &file_platform_edge_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPlatformEdgeClustersIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPlatformEdgeClustersIn) ProtoMessage() {} + +func (x *ListPlatformEdgeClustersIn) ProtoReflect() protoreflect.Message { + mi := &file_platform_edge_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPlatformEdgeClustersIn.ProtoReflect.Descriptor instead. +func (*ListPlatformEdgeClustersIn) Descriptor() ([]byte, []int) { + return file_platform_edge_proto_rawDescGZIP(), []int{0} +} + +func (x *ListPlatformEdgeClustersIn) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +type PlatformEdgeCluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` + ClusterName string `protobuf:"bytes,2,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` +} + +func (x *PlatformEdgeCluster) Reset() { + *x = PlatformEdgeCluster{} + if protoimpl.UnsafeEnabled { + mi := &file_platform_edge_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlatformEdgeCluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlatformEdgeCluster) ProtoMessage() {} + +func (x *PlatformEdgeCluster) ProtoReflect() protoreflect.Message { + mi := &file_platform_edge_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlatformEdgeCluster.ProtoReflect.Descriptor instead. +func (*PlatformEdgeCluster) Descriptor() ([]byte, []int) { + return file_platform_edge_proto_rawDescGZIP(), []int{1} +} + +func (x *PlatformEdgeCluster) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *PlatformEdgeCluster) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +type ListPlatformEdgeClustersOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PlatformEdgeClusters []*PlatformEdgeCluster `protobuf:"bytes,1,rep,name=platform_edge_clusters,json=platformEdgeClusters,proto3" json:"platform_edge_clusters,omitempty"` +} + +func (x *ListPlatformEdgeClustersOut) Reset() { + *x = ListPlatformEdgeClustersOut{} + if protoimpl.UnsafeEnabled { + mi := &file_platform_edge_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPlatformEdgeClustersOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPlatformEdgeClustersOut) ProtoMessage() {} + +func (x *ListPlatformEdgeClustersOut) ProtoReflect() protoreflect.Message { + mi := &file_platform_edge_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPlatformEdgeClustersOut.ProtoReflect.Descriptor instead. +func (*ListPlatformEdgeClustersOut) Descriptor() ([]byte, []int) { + return file_platform_edge_proto_rawDescGZIP(), []int{2} +} + +func (x *ListPlatformEdgeClustersOut) GetPlatformEdgeClusters() []*PlatformEdgeCluster { + if x != nil { + return x.PlatformEdgeClusters + } + return nil +} + +type AllocatePlatformEdgeClusterIn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` +} + +func (x *AllocatePlatformEdgeClusterIn) Reset() { + *x = AllocatePlatformEdgeClusterIn{} + if protoimpl.UnsafeEnabled { + mi := &file_platform_edge_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocatePlatformEdgeClusterIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocatePlatformEdgeClusterIn) ProtoMessage() {} + +func (x *AllocatePlatformEdgeClusterIn) ProtoReflect() protoreflect.Message { + mi := &file_platform_edge_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocatePlatformEdgeClusterIn.ProtoReflect.Descriptor instead. +func (*AllocatePlatformEdgeClusterIn) Descriptor() ([]byte, []int) { + return file_platform_edge_proto_rawDescGZIP(), []int{3} +} + +func (x *AllocatePlatformEdgeClusterIn) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *AllocatePlatformEdgeClusterIn) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +type AllocatePlatformEdgeClusterOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` + OwnedByAccount string `protobuf:"bytes,2,opt,name=owned_by_account,json=ownedByAccount,proto3" json:"owned_by_account,omitempty"` +} + +func (x *AllocatePlatformEdgeClusterOut) Reset() { + *x = AllocatePlatformEdgeClusterOut{} + if protoimpl.UnsafeEnabled { + mi := &file_platform_edge_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocatePlatformEdgeClusterOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocatePlatformEdgeClusterOut) ProtoMessage() {} + +func (x *AllocatePlatformEdgeClusterOut) ProtoReflect() protoreflect.Message { + mi := &file_platform_edge_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocatePlatformEdgeClusterOut.ProtoReflect.Descriptor instead. +func (*AllocatePlatformEdgeClusterOut) Descriptor() ([]byte, []int) { + return file_platform_edge_proto_rawDescGZIP(), []int{4} +} + +func (x *AllocatePlatformEdgeClusterOut) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +func (x *AllocatePlatformEdgeClusterOut) GetOwnedByAccount() string { + if x != nil { + return x.OwnedByAccount + } + return "" +} + +type GetAllocatedPlatformEdgeClusterIn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountName string `protobuf:"bytes,1,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` +} + +func (x *GetAllocatedPlatformEdgeClusterIn) Reset() { + *x = GetAllocatedPlatformEdgeClusterIn{} + if protoimpl.UnsafeEnabled { + mi := &file_platform_edge_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAllocatedPlatformEdgeClusterIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllocatedPlatformEdgeClusterIn) ProtoMessage() {} + +func (x *GetAllocatedPlatformEdgeClusterIn) ProtoReflect() protoreflect.Message { + mi := &file_platform_edge_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAllocatedPlatformEdgeClusterIn.ProtoReflect.Descriptor instead. +func (*GetAllocatedPlatformEdgeClusterIn) Descriptor() ([]byte, []int) { + return file_platform_edge_proto_rawDescGZIP(), []int{5} +} + +func (x *GetAllocatedPlatformEdgeClusterIn) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +var File_platform_edge_proto protoreflect.FileDescriptor + +var file_platform_edge_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x65, 0x64, 0x67, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x13, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x69, 0x0a, + 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x4f, 0x75, 0x74, 0x12, 0x4a, 0x0a, 0x16, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x14, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x22, 0x5a, 0x0a, 0x1d, 0x41, 0x6c, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6d, 0x0a, 0x1e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6f, 0x77, 0x6e, + 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x46, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0xad, 0x02, 0x0a, 0x0c, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x12, 0x55, 0x0a, 0x18, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x73, 0x49, 0x6e, 0x1a, 0x1c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x4f, 0x75, 0x74, 0x12, 0x5e, 0x0a, 0x1b, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x6e, 0x1a, 0x1f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4f, 0x75, 0x74, 0x12, 0x66, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x1f, 0x2e, 0x41, 0x6c, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x42, 0x11, 0x5a, 0x0f, 0x2e, + 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x65, 0x64, 0x67, 0x65, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_platform_edge_proto_rawDescOnce sync.Once + file_platform_edge_proto_rawDescData = file_platform_edge_proto_rawDesc +) + +func file_platform_edge_proto_rawDescGZIP() []byte { + file_platform_edge_proto_rawDescOnce.Do(func() { + file_platform_edge_proto_rawDescData = protoimpl.X.CompressGZIP(file_platform_edge_proto_rawDescData) + }) + return file_platform_edge_proto_rawDescData +} + +var file_platform_edge_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_platform_edge_proto_goTypes = []interface{}{ + (*ListPlatformEdgeClustersIn)(nil), // 0: ListPlatformEdgeClustersIn + (*PlatformEdgeCluster)(nil), // 1: PlatformEdgeCluster + (*ListPlatformEdgeClustersOut)(nil), // 2: ListPlatformEdgeClustersOut + (*AllocatePlatformEdgeClusterIn)(nil), // 3: AllocatePlatformEdgeClusterIn + (*AllocatePlatformEdgeClusterOut)(nil), // 4: AllocatePlatformEdgeClusterOut + (*GetAllocatedPlatformEdgeClusterIn)(nil), // 5: GetAllocatedPlatformEdgeClusterIn +} +var file_platform_edge_proto_depIdxs = []int32{ + 1, // 0: ListPlatformEdgeClustersOut.platform_edge_clusters:type_name -> PlatformEdgeCluster + 0, // 1: PlatformEdge.ListPlatformEdgeClusters:input_type -> ListPlatformEdgeClustersIn + 3, // 2: PlatformEdge.AllocatePlatformEdgeCluster:input_type -> AllocatePlatformEdgeClusterIn + 5, // 3: PlatformEdge.GetAllocatedPlatformEdgeCluster:input_type -> GetAllocatedPlatformEdgeClusterIn + 2, // 4: PlatformEdge.ListPlatformEdgeClusters:output_type -> ListPlatformEdgeClustersOut + 4, // 5: PlatformEdge.AllocatePlatformEdgeCluster:output_type -> AllocatePlatformEdgeClusterOut + 4, // 6: PlatformEdge.GetAllocatedPlatformEdgeCluster:output_type -> AllocatePlatformEdgeClusterOut + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_platform_edge_proto_init() } +func file_platform_edge_proto_init() { + if File_platform_edge_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_platform_edge_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPlatformEdgeClustersIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_platform_edge_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlatformEdgeCluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_platform_edge_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPlatformEdgeClustersOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_platform_edge_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocatePlatformEdgeClusterIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_platform_edge_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocatePlatformEdgeClusterOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_platform_edge_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAllocatedPlatformEdgeClusterIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_platform_edge_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_platform_edge_proto_goTypes, + DependencyIndexes: file_platform_edge_proto_depIdxs, + MessageInfos: file_platform_edge_proto_msgTypes, + }.Build() + File_platform_edge_proto = out.File + file_platform_edge_proto_rawDesc = nil + file_platform_edge_proto_goTypes = nil + file_platform_edge_proto_depIdxs = nil +} diff --git a/apps/message-office/protobufs/platform-edge/platform-edge_grpc.pb.go b/apps/message-office/protobufs/platform-edge/platform-edge_grpc.pb.go new file mode 100644 index 000000000..086a6e1bd --- /dev/null +++ b/apps/message-office/protobufs/platform-edge/platform-edge_grpc.pb.go @@ -0,0 +1,183 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.24.4 +// source: platform-edge.proto + +package platform_edge + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + PlatformEdge_ListPlatformEdgeClusters_FullMethodName = "/PlatformEdge/ListPlatformEdgeClusters" + PlatformEdge_AllocatePlatformEdgeCluster_FullMethodName = "/PlatformEdge/AllocatePlatformEdgeCluster" + PlatformEdge_GetAllocatedPlatformEdgeCluster_FullMethodName = "/PlatformEdge/GetAllocatedPlatformEdgeCluster" +) + +// PlatformEdgeClient is the client API for PlatformEdge service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PlatformEdgeClient interface { + ListPlatformEdgeClusters(ctx context.Context, in *ListPlatformEdgeClustersIn, opts ...grpc.CallOption) (*ListPlatformEdgeClustersOut, error) + AllocatePlatformEdgeCluster(ctx context.Context, in *AllocatePlatformEdgeClusterIn, opts ...grpc.CallOption) (*AllocatePlatformEdgeClusterOut, error) + GetAllocatedPlatformEdgeCluster(ctx context.Context, in *GetAllocatedPlatformEdgeClusterIn, opts ...grpc.CallOption) (*AllocatePlatformEdgeClusterOut, error) +} + +type platformEdgeClient struct { + cc grpc.ClientConnInterface +} + +func NewPlatformEdgeClient(cc grpc.ClientConnInterface) PlatformEdgeClient { + return &platformEdgeClient{cc} +} + +func (c *platformEdgeClient) ListPlatformEdgeClusters(ctx context.Context, in *ListPlatformEdgeClustersIn, opts ...grpc.CallOption) (*ListPlatformEdgeClustersOut, error) { + out := new(ListPlatformEdgeClustersOut) + err := c.cc.Invoke(ctx, PlatformEdge_ListPlatformEdgeClusters_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *platformEdgeClient) AllocatePlatformEdgeCluster(ctx context.Context, in *AllocatePlatformEdgeClusterIn, opts ...grpc.CallOption) (*AllocatePlatformEdgeClusterOut, error) { + out := new(AllocatePlatformEdgeClusterOut) + err := c.cc.Invoke(ctx, PlatformEdge_AllocatePlatformEdgeCluster_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *platformEdgeClient) GetAllocatedPlatformEdgeCluster(ctx context.Context, in *GetAllocatedPlatformEdgeClusterIn, opts ...grpc.CallOption) (*AllocatePlatformEdgeClusterOut, error) { + out := new(AllocatePlatformEdgeClusterOut) + err := c.cc.Invoke(ctx, PlatformEdge_GetAllocatedPlatformEdgeCluster_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PlatformEdgeServer is the server API for PlatformEdge service. +// All implementations must embed UnimplementedPlatformEdgeServer +// for forward compatibility +type PlatformEdgeServer interface { + ListPlatformEdgeClusters(context.Context, *ListPlatformEdgeClustersIn) (*ListPlatformEdgeClustersOut, error) + AllocatePlatformEdgeCluster(context.Context, *AllocatePlatformEdgeClusterIn) (*AllocatePlatformEdgeClusterOut, error) + GetAllocatedPlatformEdgeCluster(context.Context, *GetAllocatedPlatformEdgeClusterIn) (*AllocatePlatformEdgeClusterOut, error) + mustEmbedUnimplementedPlatformEdgeServer() +} + +// UnimplementedPlatformEdgeServer must be embedded to have forward compatible implementations. +type UnimplementedPlatformEdgeServer struct { +} + +func (UnimplementedPlatformEdgeServer) ListPlatformEdgeClusters(context.Context, *ListPlatformEdgeClustersIn) (*ListPlatformEdgeClustersOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPlatformEdgeClusters not implemented") +} +func (UnimplementedPlatformEdgeServer) AllocatePlatformEdgeCluster(context.Context, *AllocatePlatformEdgeClusterIn) (*AllocatePlatformEdgeClusterOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllocatePlatformEdgeCluster not implemented") +} +func (UnimplementedPlatformEdgeServer) GetAllocatedPlatformEdgeCluster(context.Context, *GetAllocatedPlatformEdgeClusterIn) (*AllocatePlatformEdgeClusterOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAllocatedPlatformEdgeCluster not implemented") +} +func (UnimplementedPlatformEdgeServer) mustEmbedUnimplementedPlatformEdgeServer() {} + +// UnsafePlatformEdgeServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PlatformEdgeServer will +// result in compilation errors. +type UnsafePlatformEdgeServer interface { + mustEmbedUnimplementedPlatformEdgeServer() +} + +func RegisterPlatformEdgeServer(s grpc.ServiceRegistrar, srv PlatformEdgeServer) { + s.RegisterService(&PlatformEdge_ServiceDesc, srv) +} + +func _PlatformEdge_ListPlatformEdgeClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPlatformEdgeClustersIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PlatformEdgeServer).ListPlatformEdgeClusters(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PlatformEdge_ListPlatformEdgeClusters_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PlatformEdgeServer).ListPlatformEdgeClusters(ctx, req.(*ListPlatformEdgeClustersIn)) + } + return interceptor(ctx, in, info, handler) +} + +func _PlatformEdge_AllocatePlatformEdgeCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AllocatePlatformEdgeClusterIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PlatformEdgeServer).AllocatePlatformEdgeCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PlatformEdge_AllocatePlatformEdgeCluster_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PlatformEdgeServer).AllocatePlatformEdgeCluster(ctx, req.(*AllocatePlatformEdgeClusterIn)) + } + return interceptor(ctx, in, info, handler) +} + +func _PlatformEdge_GetAllocatedPlatformEdgeCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllocatedPlatformEdgeClusterIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PlatformEdgeServer).GetAllocatedPlatformEdgeCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PlatformEdge_GetAllocatedPlatformEdgeCluster_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PlatformEdgeServer).GetAllocatedPlatformEdgeCluster(ctx, req.(*GetAllocatedPlatformEdgeClusterIn)) + } + return interceptor(ctx, in, info, handler) +} + +// PlatformEdge_ServiceDesc is the grpc.ServiceDesc for PlatformEdge service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PlatformEdge_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "PlatformEdge", + HandlerType: (*PlatformEdgeServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListPlatformEdgeClusters", + Handler: _PlatformEdge_ListPlatformEdgeClusters_Handler, + }, + { + MethodName: "AllocatePlatformEdgeCluster", + Handler: _PlatformEdge_AllocatePlatformEdgeCluster_Handler, + }, + { + MethodName: "GetAllocatedPlatformEdgeCluster", + Handler: _PlatformEdge_GetAllocatedPlatformEdgeCluster_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "platform-edge.proto", +} diff --git a/apps/message-office/types/errors.go b/apps/message-office/types/errors.go new file mode 100644 index 000000000..ab1254f4c --- /dev/null +++ b/apps/message-office/types/errors.go @@ -0,0 +1 @@ +package types diff --git a/apps/tenant-agent/main.go b/apps/tenant-agent/main.go index 724159f61..0df7629d5 100644 --- a/apps/tenant-agent/main.go +++ b/apps/tenant-agent/main.go @@ -106,13 +106,6 @@ func (g *grpcHandler) handleMessage(gctx context.Context, msg t.AgentMessage) er switch msg.Action { case t.ActionApply: { - ann := obj.GetAnnotations() - if ann == nil { - ann = make(map[string]string, 2) - } - - obj.SetAnnotations(ann) - b, err := yaml.Marshal(msg.Object) if err != nil { return g.handleErrorOnApply(ctx, err, msg) diff --git a/mocks/pkg/k8s/client.go b/mocks/pkg/k8s/client.go index 434db7138..c8c204ca2 100644 --- a/mocks/pkg/k8s/client.go +++ b/mocks/pkg/k8s/client.go @@ -21,7 +21,7 @@ type Client struct { MockDeleteYAML func(ctx context.Context, yamls ...[]byte) error MockGet func(ctx context.Context, nn types.NamespacedName, obj client.Object) error MockList func(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error - MockListSecrets func(ctx context.Context, namespace string, secretType corev1.SecretType) ([]v1.Secret, error) + MockListSecrets func(ctx context.Context, namespace string, secretType corev1.SecretType) ([]corev1.Secret, error) MockReadLogs func(ctx context.Context, namespace string, name string, writer io.WriteCloser, opts *k8s.ReadLogsOptions) error MockUpdate func(ctx context.Context, obj client.Object) error MockValidateObject func(ctx context.Context, obj client.Object) error @@ -82,7 +82,7 @@ func (cMock *Client) List(ctx context.Context, list client.ObjectList, opts ...c panic("Client: method 'List' not implemented, yet") } -func (cMock *Client) ListSecrets(ctx context.Context, namespace string, secretType corev1.SecretType) ([]v1.Secret, error) { +func (cMock *Client) ListSecrets(ctx context.Context, namespace string, secretType corev1.SecretType) ([]corev1.Secret, error) { if cMock.MockListSecrets != nil { cMock.registerCall("ListSecrets", ctx, namespace, secretType) return cMock.MockListSecrets(ctx, namespace, secretType) diff --git a/mocks/pkg/repos/dbrepo.go b/mocks/pkg/repos/dbrepo.go index 46d0247cc..b94162032 100644 --- a/mocks/pkg/repos/dbrepo.go +++ b/mocks/pkg/repos/dbrepo.go @@ -23,8 +23,9 @@ type DbRepo[T repos.Entity] struct { MockFindById func(ctx context.Context, id repos.ID) (T, error) MockFindOne func(ctx context.Context, filter repos.Filter) (T, error) MockFindPaginated func(ctx context.Context, filter repos.Filter, pagination repos.CursorPagination) (*repos.PaginatedRecord[T], error) + MockGroupByAndCount func(ctx context.Context, filter repos.Filter, groupBy string, opts repos.GroupByAndCountOptions) (map[string]int64, error) MockIndexFields func(ctx context.Context, indices []repos.IndexField) error - MockMergeMatchFilters func(filter repos.Filter, matchFilters map[string]repos.MatchFilter) repos.Filter + MockMergeMatchFilters func(filter repos.Filter, matchFilters ...map[string]repos.MatchFilter) repos.Filter MockNewId func() repos.ID MockPatch func(ctx context.Context, filter repos.Filter, patch repos.Document, opts ...repos.UpdateOpts) (T, error) MockPatchById func(ctx context.Context, id repos.ID, patch repos.Document, opts ...repos.UpdateOpts) (T, error) @@ -139,6 +140,14 @@ func (dMock *DbRepo[T]) FindPaginated(ctx context.Context, filter repos.Filter, panic("DbRepo[T]: method 'FindPaginated' not implemented, yet") } +func (dMock *DbRepo[T]) GroupByAndCount(ctx context.Context, filter repos.Filter, groupBy string, opts repos.GroupByAndCountOptions) (map[string]int64, error) { + if dMock.MockGroupByAndCount != nil { + dMock.registerCall("GroupByAndCount", ctx, filter, groupBy, opts) + return dMock.MockGroupByAndCount(ctx, filter, groupBy, opts) + } + panic("DbRepo[T]: method 'GroupByAndCount' not implemented, yet") +} + func (dMock *DbRepo[T]) IndexFields(ctx context.Context, indices []repos.IndexField) error { if dMock.MockIndexFields != nil { dMock.registerCall("IndexFields", ctx, indices) @@ -147,10 +156,10 @@ func (dMock *DbRepo[T]) IndexFields(ctx context.Context, indices []repos.IndexFi panic("DbRepo[T]: method 'IndexFields' not implemented, yet") } -func (dMock *DbRepo[T]) MergeMatchFilters(filter repos.Filter, matchFilters map[string]repos.MatchFilter) repos.Filter { +func (dMock *DbRepo[T]) MergeMatchFilters(filter repos.Filter, matchFilters ...map[string]repos.MatchFilter) repos.Filter { if dMock.MockMergeMatchFilters != nil { dMock.registerCall("MergeMatchFilters", filter, matchFilters) - return dMock.MockMergeMatchFilters(filter, matchFilters) + return dMock.MockMergeMatchFilters(filter, matchFilters...) } panic("DbRepo[T]: method 'MergeMatchFilters' not implemented, yet") } diff --git a/pkg/logging/slog-logger.go b/pkg/logging/slog-logger.go index 2b220328a..f2a5a9309 100644 --- a/pkg/logging/slog-logger.go +++ b/pkg/logging/slog-logger.go @@ -43,6 +43,8 @@ func NewSlogLogger(opts SlogOptions) *slog.Logger { }) styles := log.DefaultStyles() + // styles.Caller = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Dark: "#5b717f", Light: "#36cbfa"}).Faint(true) + styles.Caller = lipgloss.NewStyle().Foreground(lipgloss.Color("#878a8a")) styles.Levels[log.DebugLevel] = styles.Levels[log.DebugLevel].Foreground(lipgloss.Color("#5b717f")) styles.Levels[log.InfoLevel] = styles.Levels[log.InfoLevel].Foreground(lipgloss.Color("#36cbfa")) diff --git a/pkg/repos/db-repo-mongo.go b/pkg/repos/db-repo-mongo.go index e5b2082a1..d9165fc1b 100644 --- a/pkg/repos/db-repo-mongo.go +++ b/pkg/repos/db-repo-mongo.go @@ -696,6 +696,46 @@ func (repo *dbRepo[T]) MergeMatchFilters(filter Filter, matchFilters ...map[stri return filter } +type GroupByAndCountOptions struct { + Limit int64 + Sort SortDirection +} + +func (repo *dbRepo[T]) GroupByAndCount(ctx context.Context, filter Filter, groupBy string, opts GroupByAndCountOptions) (map[string]int64, error) { + agg := make([]bson.M, 0, 4) + if filter != nil { + agg = append(agg, bson.M{"$match": filter}) + } + + agg = append(agg, + bson.M{ + "$group": bson.M{ + "_id": "$" + groupBy, + "count": bson.M{"$sum": 1}, + }, + }, + bson.M{"$sort": bson.M{"count": opts.Sort.Int()}}, + bson.M{"$limit": opts.Limit}, + ) + + records, err := repo.db.Collection(repo.collectionName).Aggregate(ctx, agg) + if err != nil { + return nil, errors.NewE(err) + } + + var data []bson.M + if err := records.Decode(&data); err != nil { + return nil, errors.NewE(err) + } + + result := make(map[string]int64, len(data)) + for _, v := range data { + result[v["_id"].(string)] = v["count"].(int64) + } + + return result, nil +} + type MongoRepoOptions struct { IndexFields []string } diff --git a/pkg/repos/db-repo.go b/pkg/repos/db-repo.go index 2a45911ee..3b4dd045c 100644 --- a/pkg/repos/db-repo.go +++ b/pkg/repos/db-repo.go @@ -114,6 +114,8 @@ type DbRepo[T Entity] interface { // Delete(ctx context.Context, query Query) ([]ID, error) DeleteOne(ctx context.Context, filter Filter) error + GroupByAndCount(ctx context.Context, filter Filter, groupBy string, opts GroupByAndCountOptions) (map[string]int64, error) + ErrAlreadyExists(err error) bool MergeMatchFilters(filter Filter, matchFilters ...map[string]MatchFilter) Filter } @@ -172,6 +174,13 @@ const ( SortDirectionDesc SortDirection = "DESC" ) +func (s SortDirection) Int() int64 { + if s == SortDirectionAsc { + return 1 + } + return -1 +} + var DefaultCursorPagination = CursorPagination{ First: functions.New(int64(10)), After: nil, diff --git a/pkg/repos/mongo.go b/pkg/repos/mongo.go index 74ebbc9b4..44df61bf2 100644 --- a/pkg/repos/mongo.go +++ b/pkg/repos/mongo.go @@ -17,6 +17,7 @@ func NewMongoDatabase(ctx context.Context, uri string, dbName string) (db *mongo if err != nil { return nil, errors.NewEf(err, "could not connect to mongodb servers") } + return client.Database(dbName), nil } From 144ab0538a14be822c7ce4d755f16a8f5f20ba0d Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 5 Sep 2024 14:49:29 +0530 Subject: [PATCH 41/89] feat(grpc): adds support for custom grpc errors parsing --- pkg/grpc/Taskfile.yml | 6 ++ pkg/grpc/errors.go | 33 ++++++++ pkg/grpc/errors.proto | 8 ++ pkg/grpc/errors/errors.pb.go | 151 +++++++++++++++++++++++++++++++++++ 4 files changed, 198 insertions(+) create mode 100644 pkg/grpc/Taskfile.yml create mode 100644 pkg/grpc/errors.go create mode 100644 pkg/grpc/errors.proto create mode 100644 pkg/grpc/errors/errors.pb.go diff --git a/pkg/grpc/Taskfile.yml b/pkg/grpc/Taskfile.yml new file mode 100644 index 000000000..3f6ec790d --- /dev/null +++ b/pkg/grpc/Taskfile.yml @@ -0,0 +1,6 @@ +version: 3 + +tasks: + build: + cmds: + - protoc --go_out=. --go-grpc_out=. --go_opt=paths=import --go-grpc_opt=paths=import ./*.proto diff --git a/pkg/grpc/errors.go b/pkg/grpc/errors.go new file mode 100644 index 000000000..c9ce66182 --- /dev/null +++ b/pkg/grpc/errors.go @@ -0,0 +1,33 @@ +package grpc + +import ( + "strings" + + "github.com/kloudlite/api/pkg/grpc/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func Err(err error, comments ...string) error { + s := status.New(codes.Unknown, err.Error()) + s2, e := s.WithDetails(&errors.Error{ + Message: err.Error(), + Comments: strings.Join(comments, "\n"), + }) + if e != nil { + panic(e) + } + return s2.Err() +} + +func ParseErr(err error) *errors.Error { + s := status.Convert(err) + for _, detail := range s.Details() { + e, ok := detail.(*errors.Error) + if !ok { + continue + } + return e + } + return nil +} diff --git a/pkg/grpc/errors.proto b/pkg/grpc/errors.proto new file mode 100644 index 000000000..a0401c302 --- /dev/null +++ b/pkg/grpc/errors.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +option go_package = "./errors"; + +message Error { + string message = 1; + string comments = 2; +} diff --git a/pkg/grpc/errors/errors.pb.go b/pkg/grpc/errors/errors.pb.go new file mode 100644 index 000000000..01ecb406b --- /dev/null +++ b/pkg/grpc/errors/errors.pb.go @@ -0,0 +1,151 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.24.4 +// source: errors.proto + +package errors + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Comments string `protobuf:"bytes,2,opt,name=comments,proto3" json:"comments,omitempty"` +} + +func (x *Error) Reset() { + *x = Error{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Error) ProtoMessage() {} + +func (x *Error) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Error.ProtoReflect.Descriptor instead. +func (*Error) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{0} +} + +func (x *Error) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *Error) GetComments() string { + if x != nil { + return x.Comments + } + return "" +} + +var File_errors_proto protoreflect.FileDescriptor + +var file_errors_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, + 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x0a, 0x5a, + 0x08, 0x2e, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_errors_proto_rawDescOnce sync.Once + file_errors_proto_rawDescData = file_errors_proto_rawDesc +) + +func file_errors_proto_rawDescGZIP() []byte { + file_errors_proto_rawDescOnce.Do(func() { + file_errors_proto_rawDescData = protoimpl.X.CompressGZIP(file_errors_proto_rawDescData) + }) + return file_errors_proto_rawDescData +} + +var file_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_errors_proto_goTypes = []interface{}{ + (*Error)(nil), // 0: Error +} +var file_errors_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_errors_proto_init() } +func file_errors_proto_init() { + if File_errors_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_errors_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Error); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_errors_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_errors_proto_goTypes, + DependencyIndexes: file_errors_proto_depIdxs, + MessageInfos: file_errors_proto_msgTypes, + }.Build() + File_errors_proto = out.File + file_errors_proto_rawDesc = nil + file_errors_proto_goTypes = nil + file_errors_proto_depIdxs = nil +} From 1e0a79f279e1595386600ad379aeb96d9644547e Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 5 Sep 2024 14:52:38 +0530 Subject: [PATCH 42/89] fix(mongo): fixes mongodb groupByAndCount result parsing --- common/banner.go | 40 ++++++++++++++++++++++++++++++++++---- pkg/repos/db-repo-mongo.go | 10 +++++++++- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/common/banner.go b/common/banner.go index 713606929..b747e5a0d 100644 --- a/common/banner.go +++ b/common/banner.go @@ -1,6 +1,9 @@ package common -import "fmt" +import ( + "fmt" + "time" +) var BuiltAt string @@ -9,17 +12,17 @@ const KloudliteReadyBanner = ` ##### ######## ######## - ######## ##### + ######## ##### ######## *######### ██╗ ██╗██╗ ██████╗ ██╗ ██╗██████╗ ██╗ ██╗████████╗███████╗ ######## ############### ██║ ██╔╝██║ ██╔═══██╗██║ ██║██╔══██╗██║ ██║╚══██╔══╝██╔════╝ ######## *################### █████╔╝ ██║ ██║ ██║██║ ██║██║ ██║██║ ██║ ██║ █████╗ #######/ ######################## ██╔═██╗ ██║ ██║ ██║██║ ██║██║ ██║██║ ██║ ██║ ██╔══╝ #######( ################### ██║ ██╗███████╗╚██████╔╝╚██████╔╝██████╔╝███████╗██║ ██║ ███████╗ (#######. ##############* ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚══════╝ - ######## #(####### + ######## #(####### BuiltAt: %s (#######. ####* __ ___ __ ######## |__) |__ /\ | \ \ / - /######(. | \ |___ /~~\ |__/ | BuiltAt: %s + /######(. | \ |___ /~~\ |__/ | ##### , @@ -53,3 +56,32 @@ const KloudliteBanner = ` func PrintKloudliteBanner() { fmt.Printf(KloudliteBanner, BuiltAt) } + +func PrintReadyBanner2(readyIn time.Duration) { + fmt.Printf(` + , + ##### + ######## + ######## + ######## ##### + ######## *######### ██╗ ██╗██╗ ██████╗ ██╗ ██╗██████╗ ██╗ ██╗████████╗███████╗ + ######## ############### ██║ ██╔╝██║ ██╔═══██╗██║ ██║██╔══██╗██║ ██║╚══██╔══╝██╔════╝ + ######## *################### █████╔╝ ██║ ██║ ██║██║ ██║██║ ██║██║ ██║ ██║ █████╗ + #######/ ######################## ██╔═██╗ ██║ ██║ ██║██║ ██║██║ ██║██║ ██║ ██║ ██╔══╝ + #######( ################### ██║ ██╗███████╗╚██████╔╝╚██████╔╝██████╔╝███████╗██║ ██║ ███████╗ + (#######. ##############* ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚══════╝ + ######## #(####### + (#######. ####* + ######## 🚀 running in %.2fs + /######(. + ##### + , + +`, readyIn.Seconds()) +} + +func PrintBuildInfo() { + fmt.Printf(` +📦 built at %s + `, BuiltAt) +} diff --git a/pkg/repos/db-repo-mongo.go b/pkg/repos/db-repo-mongo.go index d9165fc1b..0735473a3 100644 --- a/pkg/repos/db-repo-mongo.go +++ b/pkg/repos/db-repo-mongo.go @@ -724,12 +724,20 @@ func (repo *dbRepo[T]) GroupByAndCount(ctx context.Context, filter Filter, group } var data []bson.M - if err := records.Decode(&data); err != nil { + if err := records.All(ctx, &data); err != nil { return nil, errors.NewE(err) } + // var data bson.D + // if err := records.Decode(&data); err != nil { + // return nil, errors.NewE(err) + // } + result := make(map[string]int64, len(data)) for _, v := range data { + // m := v.Value.(map[string]any) + // result[m["_id"].(string)] = m["count"].(int64) + // v.Value.(map[string]interface{})["_id"] = v.Key result[v["_id"].(string)] = v["count"].(int64) } From 51b111d6858cbe2b331e36e198353bbcad5d0dbe Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 5 Sep 2024 17:53:06 +0530 Subject: [PATCH 43/89] feat(message-office): adds platform edge clusters support --- .../internal/app/internal-grpc-server.go | 10 +++++-- .../internal/app/vector-proxy-server.go | 6 ++++- apps/message-office/internal/domain/domain.go | 13 +++++++--- .../internal/domain/platform-edge/repo.go | 18 ++++++------- apps/message-office/main.go | 26 +++++++------------ 5 files changed, 41 insertions(+), 32 deletions(-) diff --git a/apps/message-office/internal/app/internal-grpc-server.go b/apps/message-office/internal/app/internal-grpc-server.go index 42c5da560..59eeb4ded 100644 --- a/apps/message-office/internal/app/internal-grpc-server.go +++ b/apps/message-office/internal/app/internal-grpc-server.go @@ -3,6 +3,7 @@ package app import ( "context" + mo_errors "github.com/kloudlite/api/apps/message-office/errors" "github.com/kloudlite/api/apps/message-office/internal/domain" cluster_token "github.com/kloudlite/api/apps/message-office/protobufs/cluster-token" platform_edge "github.com/kloudlite/api/apps/message-office/protobufs/platform-edge" @@ -16,7 +17,6 @@ type ( type internalServer struct { d domain.Domain - // message_office_internal.UnimplementedMessageOfficeInternalServer cluster_token.UnimplementedClusterTokenServer platform_edge.UnimplementedPlatformEdgeServer } @@ -47,13 +47,19 @@ func (s *internalServer) AllocatePlatformEdgeCluster(ctx context.Context, in *pl return nil, errors.NewE(err) } - return &platform_edge.AllocatePlatformEdgeClusterOut{ClusterName: pec.Name}, nil + return &platform_edge.AllocatePlatformEdgeClusterOut{ + ClusterName: pec.Name, + OwnedByAccount: pec.OwnedByAccount, + }, nil } // GetAllocatedPlatformEdgeCluster implements platform_edge.PlatformEdgeServer. func (s *internalServer) GetAllocatedPlatformEdgeCluster(ctx context.Context, in *platform_edge.GetAllocatedPlatformEdgeClusterIn) (*platform_edge.AllocatePlatformEdgeClusterOut, error) { allocated, err := s.d.GetAllocatedPlatformEdgeCluster(ctx, in.AccountName) if err != nil { + if errors.Is(err, mo_errors.ErrEdgeClusterNotAllocated) { + return nil, grpc.Err(mo_errors.ErrEdgeClusterNotAllocated) + } return nil, errors.NewE(err) } diff --git a/apps/message-office/internal/app/vector-proxy-server.go b/apps/message-office/internal/app/vector-proxy-server.go index a2f93a408..0a3b8acc5 100644 --- a/apps/message-office/internal/app/vector-proxy-server.go +++ b/apps/message-office/internal/app/vector-proxy-server.go @@ -4,6 +4,7 @@ import ( "context" "log/slog" "sync" + "time" "github.com/kloudlite/api/pkg/errors" @@ -36,7 +37,10 @@ func (v *vectorProxyServer) PushEvents(ctx context.Context, msg *proto_rpc.PushE logger.Debug("RECEIVED push-events message") - per, err := v.realVectorClient.PushEvents(ctx, msg) + nctx, cf := context.WithTimeout(ctx, 3*time.Second) + defer cf() + + per, err := v.realVectorClient.PushEvents(nctx, msg) if err != nil { logger.Error("FAILED to dispatch push-events message, got", "err", err) return nil, errors.NewE(err) diff --git a/apps/message-office/internal/domain/domain.go b/apps/message-office/internal/domain/domain.go index abc9544f4..4099220ed 100644 --- a/apps/message-office/internal/domain/domain.go +++ b/apps/message-office/internal/domain/domain.go @@ -8,6 +8,7 @@ import ( "go.uber.org/fx" platform_edge "github.com/kloudlite/api/apps/message-office/internal/domain/platform-edge" + "github.com/kloudlite/api/apps/message-office/internal/entities" "github.com/kloudlite/api/apps/message-office/internal/env" fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/repos" @@ -131,15 +132,21 @@ func (d *domain) GenClusterToken(ctx context.Context, accountName, clusterName s var Module = fx.Module( "domain", fx.Provide(func( + ev *env.Env, moRepo repos.DbRepo[*MessageOfficeToken], + edgeClustersRepo repos.DbRepo[*entities.PlatformEdgeCluster], + allocatedClustersRepo repos.DbRepo[*entities.ClusterAllocation], // accessTokenRepo repos.DbRepo[*AccessToken], logger *slog.Logger, ) Domain { return &domain{ moRepo: moRepo, - // accessTokenRepo: accessTokenRepo, - logger: logger, - PlatformEdgeDomain: PlatformEdgeDomain{Repo: &platform_edge.Repo{}}, + env: ev, + logger: logger, + PlatformEdgeDomain: PlatformEdgeDomain{Repo: &platform_edge.Repo{ + EdgeClusters: edgeClustersRepo, + AllocatedClusters: allocatedClustersRepo, + }}, } }), ) diff --git a/apps/message-office/internal/domain/platform-edge/repo.go b/apps/message-office/internal/domain/platform-edge/repo.go index 8321c754f..1e4f9992b 100644 --- a/apps/message-office/internal/domain/platform-edge/repo.go +++ b/apps/message-office/internal/domain/platform-edge/repo.go @@ -12,8 +12,8 @@ import ( ) type Repo struct { - edge_clusters repos.DbRepo[*entities.PlatformEdgeCluster] - allocated_clusters repos.DbRepo[*entities.ClusterAllocation] + EdgeClusters repos.DbRepo[*entities.PlatformEdgeCluster] + AllocatedClusters repos.DbRepo[*entities.ClusterAllocation] } func (r *Repo) ListPlatformEdgeClusters(ctx context.Context, region *string) ([]*entities.PlatformEdgeCluster, error) { @@ -23,11 +23,11 @@ func (r *Repo) ListPlatformEdgeClusters(ctx context.Context, region *string) ([] fc.PlatformEdgeClusterRegion: region, } } - return r.edge_clusters.Find(ctx, q) + return r.EdgeClusters.Find(ctx, q) } func (r *Repo) AllocatePlatformEdgeCluster(ctx context.Context, region string, account string) (*entities.PlatformEdgeCluster, error) { - m, err := r.allocated_clusters.GroupByAndCount(ctx, repos.Filter{fc.ClusterAllocationClusterRegion: region}, fc.ClusterAllocationClusterName, repos.GroupByAndCountOptions{ + m, err := r.AllocatedClusters.GroupByAndCount(ctx, repos.Filter{fc.ClusterAllocationClusterRegion: region}, fc.ClusterAllocationClusterName, repos.GroupByAndCountOptions{ Limit: 1, Sort: repos.SortDirectionAsc, }) @@ -44,7 +44,7 @@ func (r *Repo) AllocatePlatformEdgeCluster(ctx context.Context, region string, a switch len(m) { case 0: { - x, err := r.edge_clusters.FindOne(ctx, repos.Filter{fc.PlatformEdgeClusterRegion: region}) + x, err := r.EdgeClusters.FindOne(ctx, repos.Filter{fc.PlatformEdgeClusterRegion: region}) if err != nil { return nil, err } @@ -54,7 +54,7 @@ func (r *Repo) AllocatePlatformEdgeCluster(ctx context.Context, region string, a clusterName = x.Name - if _, err := r.allocated_clusters.Create(ctx, &entities.ClusterAllocation{ + if _, err := r.AllocatedClusters.Create(ctx, &entities.ClusterAllocation{ To: account, Cluster: entities.ClusterAllocationCluster{ Name: clusterName, @@ -74,7 +74,7 @@ func (r *Repo) AllocatePlatformEdgeCluster(ctx context.Context, region string, a } } - pec, err := r.edge_clusters.FindOne(ctx, repos.Filter{ + pec, err := r.EdgeClusters.FindOne(ctx, repos.Filter{ fc.PlatformEdgeClusterName: clusterName, fc.PlatformEdgeClusterRegion: region, }) @@ -90,7 +90,7 @@ func (r *Repo) AllocatePlatformEdgeCluster(ctx context.Context, region string, a } func (r *Repo) GetPlatformEdgeCluster(ctx context.Context, clusterName string) (*entities.PlatformEdgeCluster, error) { - pec, err := r.edge_clusters.FindOne(ctx, repos.Filter{ + pec, err := r.EdgeClusters.FindOne(ctx, repos.Filter{ fc.PlatformEdgeClusterName: clusterName, }) if err != nil { @@ -105,7 +105,7 @@ func (r *Repo) GetPlatformEdgeCluster(ctx context.Context, clusterName string) ( } func (r *Repo) GetAllocatedPlatformEdgeCluster(ctx context.Context, account string) (*entities.ClusterAllocation, error) { - rec, err := r.allocated_clusters.FindOne(ctx, repos.Filter{ + rec, err := r.AllocatedClusters.FindOne(ctx, repos.Filter{ fc.ClusterAllocationTo: account, }) if err != nil { diff --git a/apps/message-office/main.go b/apps/message-office/main.go index cbc4614d9..db13cba37 100644 --- a/apps/message-office/main.go +++ b/apps/message-office/main.go @@ -3,7 +3,6 @@ package main import ( "context" "flag" - "log/slog" "os" "time" @@ -26,10 +25,10 @@ func main() { flag.Parse() - logger, err := logging.New(&logging.Options{Name: "message-office", ShowDebugLog: isDev, HideCallerTrace: false}) - if err != nil { - panic(err) - } + start := time.Now() + common.PrintBuildInfo() + + logger := logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug, SetAsDefaultLogger: true}) app := fx.New( fx.NopLogger, @@ -39,18 +38,12 @@ func main() { }), fx.Provide( - func() logging.Logger { - return logger + func() (logging.Logger, error) { + return logging.New(&logging.Options{Name: "message-office", ShowDebugLog: isDev, HideCallerTrace: false}) }, ), - fx.Provide(func() *slog.Logger { - return logging.NewSlogLogger(logging.SlogOptions{ - ShowCaller: true, - ShowDebugLogs: debug, - SetAsDefaultLogger: true, - }) - }), + fx.Supply(logger), fx.Provide(func() (*rest.Config, error) { if isDev { @@ -73,11 +66,10 @@ func main() { defer cancelFn() if err := app.Start(ctx); err != nil { - logger.Errorf(err, "message office startup errors") - logger.Infof("EXITING as errors encountered during startup") + logger.Error("failed to start message-office, got", "err", err) os.Exit(1) } - common.PrintReadyBanner() + common.PrintReadyBanner2(time.Since(start)) <-app.Done() } From 0f0ae41159de37e8c799a4a4e2666f2f3ce0d8ba Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 5 Sep 2024 17:57:12 +0530 Subject: [PATCH 44/89] feat(console): adds kloudlite edge clusters support for environments --- apps/console/Taskfile.yml | 33 ++++++++---- apps/console/internal/domain/domain.go | 54 +++++++++++++++---- .../field-constants/generated_constants.go | 15 ++++++ apps/console/main.go | 29 +++++----- 4 files changed, 98 insertions(+), 33 deletions(-) diff --git a/apps/console/Taskfile.yml b/apps/console/Taskfile.yml index c02a4b2e6..f78a75406 100644 --- a/apps/console/Taskfile.yml +++ b/apps/console/Taskfile.yml @@ -47,21 +47,15 @@ tasks: popd - rm -rf ./internal/app/_struct-to-graphql - run: - dotenv: - - .secrets/env - env: - CGO_ENABLED: 0 - cmds: - - go build -o bin/console ./main.go - - ./bin/console --dev - # - go run . --dev - gen:constants: cmds: - go generate ./internal/entities/field-constants/gen.go build: + vars: + platform_GOARCH: + sh: go env GOARCH + GOARCH: "{{ .GOARCH | default .platform_GOARCH }}" cmds: - task: gen:constants - task: go:build @@ -69,6 +63,25 @@ tasks: out: "{{.binary}}-{{.GOARCH}}" GOARCH: "{{.GOARCH}}" + run: + dotenv: + - .secrets/env + vars: + binary: '{{.binary | default "false"}}' + env: + CGO_ENABLED: 0 + silent: false + cmds: + - |+ + if [ "{{.binary}}" = "true" ]; then + task build + ./bin/console-$(go env GOARCH) --debug + else + echo "running go run" + go run ./main.go --dev + fi + + container:build-and-push: requires: vars: diff --git a/apps/console/internal/domain/domain.go b/apps/console/internal/domain/domain.go index 42a139535..d2a088a74 100644 --- a/apps/console/internal/domain/domain.go +++ b/apps/console/internal/domain/domain.go @@ -6,6 +6,7 @@ import ( "fmt" "strconv" + "github.com/kloudlite/api/pkg/grpc" "github.com/kloudlite/api/pkg/kv" "github.com/kloudlite/api/pkg/logging" @@ -171,7 +172,12 @@ func (d *domain) applyK8sResource(ctx K8sContext, envName string, obj client.Obj allocatedEdge, err := d.platformEdgeClient.GetAllocatedPlatformEdgeCluster(ctx, &platform_edge.GetAllocatedPlatformEdgeClusterIn{AccountName: ctx.GetAccountName()}) if err != nil { - if !errors.Is(err, mo_errors.ErrEdgeClusterNotAllocated) { + gErr := grpc.ParseErr(err) + if gErr == nil { + return errors.NewEf(err, "failed to get allocated edge cluster") + } + + if gErr.GetMessage() != mo_errors.ErrEdgeClusterNotAllocated.Error() { return errors.NewEf(err, "failed to get allocated edge cluster") } @@ -289,6 +295,11 @@ func applyK8sResource(ctx K8sContext, args ApplyK8sResourceArgs) error { } func (d *domain) restartK8sResource(ctx K8sContext, projectName string, namespace string, labels map[string]string) error { + var dispatchAddr struct { + AccountName string + ClusterName string + } + clusterName, err := d.getClusterAttachedToEnvironment(ctx, projectName) if err != nil { return errors.NewE(err) @@ -298,6 +309,25 @@ func (d *domain) restartK8sResource(ctx K8sContext, projectName string, namespac return nil } + switch *clusterName { + case "__kloudlite_enabled_cluster": + { + allocatedEdge, err := d.platformEdgeClient.GetAllocatedPlatformEdgeCluster(ctx, &platform_edge.GetAllocatedPlatformEdgeClusterIn{AccountName: ctx.GetAccountName()}) + if err != nil { + return errors.NewEf(err, "failed to get allocated edge cluster") + } + + dispatchAddr.AccountName = allocatedEdge.OwnedByAccount + dispatchAddr.ClusterName = allocatedEdge.ClusterName + } + default: + { + + dispatchAddr.AccountName = ctx.GetAccountName() + dispatchAddr.ClusterName = *clusterName + } + } + obj := unstructured.Unstructured{ Object: map[string]any{ "metadata": map[string]any{ @@ -317,7 +347,7 @@ func (d *domain) restartK8sResource(ctx K8sContext, projectName string, namespac return errors.NewE(err) } - subject := common.SendToAgentSubjectName(ctx.GetAccountName(), *clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) + subject := common.SendToAgentSubjectName(dispatchAddr.AccountName, dispatchAddr.ClusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) err = d.producer.Produce(ctx, msgTypes.ProduceMsg{ Subject: subject, @@ -355,6 +385,11 @@ func (d *domain) deleteK8sResourceOfCluster(ctx K8sContext, clusterName string, } func (d *domain) deleteK8sResource(ctx K8sContext, environmentName string, obj client.Object) error { + var dispatchAddr struct { + AccountName string + ClusterName string + } + clusterName, err := d.getClusterAttachedToEnvironment(ctx, environmentName) if err != nil { return ErrNoClusterAttached @@ -365,19 +400,16 @@ func (d *domain) deleteK8sResource(ctx K8sContext, environmentName string, obj c return ErrNoClusterAttached } - var dispatchAddr struct { - AccountName string - ClusterName string - } - switch *clusterName { case "__kloudlite_enabled_cluster": { - // dispatchAddr.AccountName = "kloudlite-edge-platform" - // dispatchAddr.ClusterName = "kl-edge-1" + allocatedEdge, err := d.platformEdgeClient.GetAllocatedPlatformEdgeCluster(ctx, &platform_edge.GetAllocatedPlatformEdgeClusterIn{AccountName: ctx.GetAccountName()}) + if err != nil { + return errors.NewEf(err, "failed to get allocated edge cluster") + } - dispatchAddr.AccountName = "nxt-multi-tenancy" - dispatchAddr.ClusterName = "sample" + dispatchAddr.AccountName = allocatedEdge.OwnedByAccount + dispatchAddr.ClusterName = allocatedEdge.ClusterName } default: { diff --git a/apps/console/internal/entities/field-constants/generated_constants.go b/apps/console/internal/entities/field-constants/generated_constants.go index 5cec8a8d9..b31327d13 100644 --- a/apps/console/internal/entities/field-constants/generated_constants.go +++ b/apps/console/internal/entities/field-constants/generated_constants.go @@ -149,6 +149,15 @@ const ( ImportedManagedResourceSecretRefNamespace = "secretRef.namespace" ) +// constant vars generated for struct KLoudliteEdgeCluster +const ( + KLoudliteEdgeClusterComments = "comments" + KLoudliteEdgeClusterMaxNumAccounts = "max_num_accounts" + KLoudliteEdgeClusterName = "name" + KLoudliteEdgeClusterNumAccounts = "num_accounts" + KLoudliteEdgeClusterRegion = "region" +) + // constant vars generated for struct ManagedResource const ( ManagedResourceEnabled = "enabled" @@ -207,6 +216,12 @@ const ( RegistryImageMeta = "meta" ) +// constant vars generated for struct RegistryImageURL +const ( + RegistryImageURLScriptUrl = "scriptUrl" + RegistryImageURLUrl = "url" +) + // constant vars generated for struct ResourceMapping const ( ResourceMappingBaseEntity = "BaseEntity" diff --git a/apps/console/main.go b/apps/console/main.go index d9af441ee..66a5fdb6b 100644 --- a/apps/console/main.go +++ b/apps/console/main.go @@ -25,22 +25,28 @@ func main() { var debug bool flag.BoolVar(&debug, "debug", false, "--debug") + flag.Parse() - logger, err := logging.New(&logging.Options{Name: "console", ShowDebugLog: debug}) - if err != nil { - panic(err) + if isDev { + debug = true } + common.PrintBuildInfo() + + logger := logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug, SetAsDefaultLogger: true}) + + start := time.Now() + app := fx.New( + fx.StartTimeout(5*time.Second), fx.NopLogger, - - fx.Provide(func() logging.Logger { - return logger + fx.Provide(func() (logging.Logger, error) { + return logging.New(&logging.Options{Name: "console", ShowDebugLog: debug}) }), fx.Provide(func() *slog.Logger { - return logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug, SetAsDefaultLogger: true}) + return logger }), fx.Provide(func() (*env.Env, error) { @@ -65,18 +71,17 @@ func main() { ctx, cancelFunc := func() (context.Context, context.CancelFunc) { if isDev { - return context.WithTimeout(context.TODO(), 20*time.Second) + return context.WithTimeout(context.TODO(), 5*time.Second) } - return context.WithTimeout(context.TODO(), 5*time.Second) + return context.WithTimeout(context.TODO(), 10*time.Second) }() defer cancelFunc() if err := app.Start(ctx); err != nil { - logger.Errorf(err, "console startup errors") - logger.Infof("EXITING as errors encountered during startup") + logger.Error("while starting console, got", "err", err) os.Exit(1) } - common.PrintReadyBanner() + common.PrintReadyBanner2(time.Since(start)) <-app.Done() } From ff8b916bd3f8649ea8e1ec600e6f72d862313b73 Mon Sep 17 00:00:00 2001 From: DepsHub Date: Tue, 23 Jul 2024 12:20:52 +0000 Subject: [PATCH 45/89] Update @apollo/server from ^4.10.2 to 4.10.5 Updated: - @apollo/server from ^4.10.2 to 4.10.5 For issues or feature requests: --- apps/gateway/package-lock.json | 3136 ++++++++++++++++++++++++++++++++ apps/gateway/package.json | 2 +- 2 files changed, 3137 insertions(+), 1 deletion(-) create mode 100644 apps/gateway/package-lock.json diff --git a/apps/gateway/package-lock.json b/apps/gateway/package-lock.json new file mode 100644 index 000000000..ddc542234 --- /dev/null +++ b/apps/gateway/package-lock.json @@ -0,0 +1,3136 @@ +{ + "name": "gateway", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "gateway", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@apollo/gateway": "^2.7.2", + "@apollo/server": "4.10.5", + "cookie": "^0.6.0", + "express": "^4.19.2", + "graphql": "^16.8.1", + "js-yaml": "^4.1.0" + } + }, + "node_modules/@apollo/cache-control-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@apollo/cache-control-types/-/cache-control-types-1.0.3.tgz", + "integrity": "sha512-F17/vCp7QVwom9eG7ToauIKdAxpSoadsJnqIfyryLFSkLSOEqu+eC5Z3N8OXcUVStuOMcNHlyraRsA6rRICu4g==", + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/composition": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@apollo/composition/-/composition-2.8.3.tgz", + "integrity": "sha512-CpMraUfP9+LB6egE4HAVvShw/toxzb1KTYn175M7WE+lPnq3gclNh6bLUotPEOHQeW9EPttpC8tndMscfpil5A==", + "dependencies": { + "@apollo/federation-internals": "2.8.3", + "@apollo/query-graphs": "2.8.3" + }, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "graphql": "^16.5.0" + } + }, + "node_modules/@apollo/federation-internals": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@apollo/federation-internals/-/federation-internals-2.8.3.tgz", + "integrity": "sha512-5GOeQ1I5C7uCU6ob/TbRGqWg2m+9qo8/8qlGhfaMUqN3ukSCmgkKUDdfg1M6sB3lDmIoL5tAoSkmJegKSaDR5A==", + "dependencies": { + "@types/uuid": "^9.0.0", + "chalk": "^4.1.0", + "js-levenshtein": "^1.1.6", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "graphql": "^16.5.0" + } + }, + "node_modules/@apollo/gateway": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@apollo/gateway/-/gateway-2.8.3.tgz", + "integrity": "sha512-pJ99vpF7flKqtwLyFgV0SJF09zlLqlW8YYm34I/1FrFh0Zqc5+Y3VV3Y5nAc9ddiodftGItnUbx4txuVM/KMjA==", + "dependencies": { + "@apollo/composition": "2.8.3", + "@apollo/federation-internals": "2.8.3", + "@apollo/query-planner": "2.8.3", + "@apollo/server-gateway-interface": "^1.1.0", + "@apollo/usage-reporting-protobuf": "^4.1.0", + "@apollo/utils.createhash": "^2.0.0", + "@apollo/utils.fetcher": "^2.0.0", + "@apollo/utils.isnodelike": "^2.0.0", + "@apollo/utils.keyvaluecache": "^2.1.0", + "@apollo/utils.logger": "^2.0.0", + "@josephg/resolvable": "^1.0.1", + "@opentelemetry/api": "^1.0.1", + "@types/node-fetch": "^2.6.2", + "async-retry": "^1.3.3", + "loglevel": "^1.6.1", + "make-fetch-happen": "^11.0.0", + "node-abort-controller": "^3.0.1", + "node-fetch": "^2.6.7" + }, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "graphql": "^16.5.0" + } + }, + "node_modules/@apollo/protobufjs": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@apollo/protobufjs/-/protobufjs-1.2.7.tgz", + "integrity": "sha512-Lahx5zntHPZia35myYDBRuF58tlwPskwHc5CWBZC/4bMKB6siTBWwtMrkqXcsNwQiFSzSx5hKdRPUmemrEp3Gg==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.0", + "long": "^4.0.0" + }, + "bin": { + "apollo-pbjs": "bin/pbjs", + "apollo-pbts": "bin/pbts" + } + }, + "node_modules/@apollo/query-graphs": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@apollo/query-graphs/-/query-graphs-2.8.3.tgz", + "integrity": "sha512-AB1Lr8LUr9iXGQIb70EhiSsu+G6AIW9EXkl+YGTCihn/zbsCcGx/UKr/HUsfAOyg2twenjToLcvqX5eRuM8Xag==", + "dependencies": { + "@apollo/federation-internals": "2.8.3", + "deep-equal": "^2.0.5", + "ts-graphviz": "^1.5.4", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "graphql": "^16.5.0" + } + }, + "node_modules/@apollo/query-planner": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@apollo/query-planner/-/query-planner-2.8.3.tgz", + "integrity": "sha512-dwkschpjwoGziUjYfKwTVHAMuPoRt1Xr2suLEfHK0oSZ0AoDz3RQIBY6Dy8T61hPFB7p/3YvJja7q8jDDDP/og==", + "dependencies": { + "@apollo/federation-internals": "2.8.3", + "@apollo/query-graphs": "2.8.3", + "@apollo/utils.keyvaluecache": "^2.1.0", + "chalk": "^4.1.0", + "deep-equal": "^2.0.5", + "pretty-format": "^29.0.0" + }, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "graphql": "^16.5.0" + } + }, + "node_modules/@apollo/server": { + "version": "4.10.5", + "resolved": "https://registry.npmjs.org/@apollo/server/-/server-4.10.5.tgz", + "integrity": "sha512-I+Oi1CnphXExSAAsZbclgRDN4k4CEMxyKRzYg3bir5N8OmydEhzXDlIGAOETP/TKblxR7HPXGvwn2cJKzbl46w==", + "dependencies": { + "@apollo/cache-control-types": "^1.0.3", + "@apollo/server-gateway-interface": "^1.1.1", + "@apollo/usage-reporting-protobuf": "^4.1.1", + "@apollo/utils.createhash": "^2.0.0", + "@apollo/utils.fetcher": "^2.0.0", + "@apollo/utils.isnodelike": "^2.0.0", + "@apollo/utils.keyvaluecache": "^2.1.0", + "@apollo/utils.logger": "^2.0.0", + "@apollo/utils.usagereporting": "^2.1.0", + "@apollo/utils.withrequired": "^2.0.0", + "@graphql-tools/schema": "^9.0.0", + "@types/express": "^4.17.13", + "@types/express-serve-static-core": "^4.17.30", + "@types/node-fetch": "^2.6.1", + "async-retry": "^1.2.1", + "cors": "^2.8.5", + "express": "^4.17.1", + "loglevel": "^1.6.8", + "lru-cache": "^7.10.1", + "negotiator": "^0.6.3", + "node-abort-controller": "^3.1.1", + "node-fetch": "^2.6.7", + "uuid": "^9.0.0", + "whatwg-mimetype": "^3.0.0" + }, + "engines": { + "node": ">=14.16.0" + }, + "peerDependencies": { + "graphql": "^16.6.0" + } + }, + "node_modules/@apollo/server-gateway-interface": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@apollo/server-gateway-interface/-/server-gateway-interface-1.1.1.tgz", + "integrity": "sha512-pGwCl/po6+rxRmDMFgozKQo2pbsSwE91TpsDBAOgf74CRDPXHHtM88wbwjab0wMMZh95QfR45GGyDIdhY24bkQ==", + "dependencies": { + "@apollo/usage-reporting-protobuf": "^4.1.1", + "@apollo/utils.fetcher": "^2.0.0", + "@apollo/utils.keyvaluecache": "^2.1.0", + "@apollo/utils.logger": "^2.0.0" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/usage-reporting-protobuf": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@apollo/usage-reporting-protobuf/-/usage-reporting-protobuf-4.1.1.tgz", + "integrity": "sha512-u40dIUePHaSKVshcedO7Wp+mPiZsaU6xjv9J+VyxpoU/zL6Jle+9zWeG98tr/+SZ0nZ4OXhrbb8SNr0rAPpIDA==", + "dependencies": { + "@apollo/protobufjs": "1.2.7" + } + }, + "node_modules/@apollo/utils.createhash": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.createhash/-/utils.createhash-2.0.1.tgz", + "integrity": "sha512-fQO4/ZOP8LcXWvMNhKiee+2KuKyqIcfHrICA+M4lj/h/Lh1H10ICcUtk6N/chnEo5HXu0yejg64wshdaiFitJg==", + "dependencies": { + "@apollo/utils.isnodelike": "^2.0.1", + "sha.js": "^2.4.11" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@apollo/utils.dropunuseddefinitions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.dropunuseddefinitions/-/utils.dropunuseddefinitions-2.0.1.tgz", + "integrity": "sha512-EsPIBqsSt2BwDsv8Wu76LK5R1KtsVkNoO4b0M5aK0hx+dGg9xJXuqlr7Fo34Dl+y83jmzn+UvEW+t1/GP2melA==", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.fetcher": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.fetcher/-/utils.fetcher-2.0.1.tgz", + "integrity": "sha512-jvvon885hEyWXd4H6zpWeN3tl88QcWnHp5gWF5OPF34uhvoR+DFqcNxs9vrRaBBSY3qda3Qe0bdud7tz2zGx1A==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@apollo/utils.isnodelike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.isnodelike/-/utils.isnodelike-2.0.1.tgz", + "integrity": "sha512-w41XyepR+jBEuVpoRM715N2ZD0xMD413UiJx8w5xnAZD2ZkSJnMJBoIzauK83kJpSgNuR6ywbV29jG9NmxjK0Q==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@apollo/utils.keyvaluecache": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.keyvaluecache/-/utils.keyvaluecache-2.1.1.tgz", + "integrity": "sha512-qVo5PvUUMD8oB9oYvq4ViCjYAMWnZ5zZwEjNF37L2m1u528x5mueMlU+Cr1UinupCgdB78g+egA1G98rbJ03Vw==", + "dependencies": { + "@apollo/utils.logger": "^2.0.1", + "lru-cache": "^7.14.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@apollo/utils.logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.logger/-/utils.logger-2.0.1.tgz", + "integrity": "sha512-YuplwLHaHf1oviidB7MxnCXAdHp3IqYV8n0momZ3JfLniae92eYqMIx+j5qJFX6WKJPs6q7bczmV4lXIsTu5Pg==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@apollo/utils.printwithreducedwhitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.printwithreducedwhitespace/-/utils.printwithreducedwhitespace-2.0.1.tgz", + "integrity": "sha512-9M4LUXV/fQBh8vZWlLvb/HyyhjJ77/I5ZKu+NBWV/BmYGyRmoEP9EVAy7LCVoY3t8BDcyCAGfxJaLFCSuQkPUg==", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.removealiases": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.removealiases/-/utils.removealiases-2.0.1.tgz", + "integrity": "sha512-0joRc2HBO4u594Op1nev+mUF6yRnxoUH64xw8x3bX7n8QBDYdeYgY4tF0vJReTy+zdn2xv6fMsquATSgC722FA==", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.sortast": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.sortast/-/utils.sortast-2.0.1.tgz", + "integrity": "sha512-eciIavsWpJ09za1pn37wpsCGrQNXUhM0TktnZmHwO+Zy9O4fu/WdB4+5BvVhFiZYOXvfjzJUcc+hsIV8RUOtMw==", + "dependencies": { + "lodash.sortby": "^4.7.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.stripsensitiveliterals": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.stripsensitiveliterals/-/utils.stripsensitiveliterals-2.0.1.tgz", + "integrity": "sha512-QJs7HtzXS/JIPMKWimFnUMK7VjkGQTzqD9bKD1h3iuPAqLsxd0mUNVbkYOPTsDhUKgcvUOfOqOJWYohAKMvcSA==", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.usagereporting": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.usagereporting/-/utils.usagereporting-2.1.0.tgz", + "integrity": "sha512-LPSlBrn+S17oBy5eWkrRSGb98sWmnEzo3DPTZgp8IQc8sJe0prDgDuppGq4NeQlpoqEHz0hQeYHAOA0Z3aQsxQ==", + "dependencies": { + "@apollo/usage-reporting-protobuf": "^4.1.0", + "@apollo/utils.dropunuseddefinitions": "^2.0.1", + "@apollo/utils.printwithreducedwhitespace": "^2.0.1", + "@apollo/utils.removealiases": "2.0.1", + "@apollo/utils.sortast": "^2.0.1", + "@apollo/utils.stripsensitiveliterals": "^2.0.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.withrequired": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.withrequired/-/utils.withrequired-2.0.1.tgz", + "integrity": "sha512-YBDiuAX9i1lLc6GeTy1m7DGLFn/gMnvXqlalOIMjM7DeOgIacEjjfwPqb0M1CQ2v11HhR15d1NmxJoRCfrNqcA==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@graphql-tools/merge": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.4.2.tgz", + "integrity": "sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==", + "dependencies": { + "@graphql-tools/utils": "^9.2.1", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/schema": { + "version": "9.0.19", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.19.tgz", + "integrity": "sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==", + "dependencies": { + "@graphql-tools/merge": "^8.4.1", + "@graphql-tools/utils": "^9.2.1", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/utils": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", + "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "dependencies": { + "@graphql-typed-document-node/core": "^3.1.1", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-typed-document-node/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@josephg/resolvable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@josephg/resolvable/-/resolvable-1.0.1.tgz", + "integrity": "sha512-CtzORUwWTTOTqfVtHaKRJ0I1kNQd1bpn3sUh8I3nJDVY+5/M/Oe1DnEWzPQvqq/xPIIkzzzIP7mfCoAjFRvDhg==" + }, + "node_modules/@npmcli/fs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@opentelemetry/api": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", + "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.5", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz", + "integrity": "sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" + }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" + }, + "node_modules/@types/node": { + "version": "20.14.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", + "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", + "dependencies": { + "@types/node": "*", + "form-data": "^4.0.0" + } + }, + "node_modules/@types/qs": { + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agent-base/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/agent-base/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/async-retry": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz", + "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==", + "dependencies": { + "retry": "0.13.1" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacache": { + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/cacache/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/deep-equal": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", + "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.5", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.2", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.6.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphql": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" + }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==" + }, + "node_modules/loglevel": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", + "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==", + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, + "node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/make-fetch-happen": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-fetch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-fetch/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/promise-retry/node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + }, + "node_modules/ssri": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/ssri/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-graphviz": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/ts-graphviz/-/ts-graphviz-1.8.2.tgz", + "integrity": "sha512-5YhbFoHmjxa7pgQLkB07MtGnGJ/yhvjmc9uhsnDBEICME6gkPf83SBwLDQqGDoCa3XzUMWLk1AU2Wn1u1naDtA==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ts-graphviz" + } + }, + "node_modules/tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/value-or-promise": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", + "integrity": "sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==", + "engines": { + "node": ">=12" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/apps/gateway/package.json b/apps/gateway/package.json index a63daff4d..e7dec7a98 100644 --- a/apps/gateway/package.json +++ b/apps/gateway/package.json @@ -13,7 +13,7 @@ "license": "ISC", "dependencies": { "@apollo/gateway": "^2.7.2", - "@apollo/server": "^4.10.2", + "@apollo/server": "4.10.5", "cookie": "^0.6.0", "express": "^4.19.2", "graphql": "^16.8.1", From bb4bcd8eaeef28761d8064bd4419036633dcd870 Mon Sep 17 00:00:00 2001 From: Karthik Thirumalasetti Date: Sun, 8 Sep 2024 10:43:25 +0530 Subject: [PATCH 46/89] Update index.js Signed-off-by: Karthik Thirumalasetti --- apps/gateway/src/index.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/gateway/src/index.js b/apps/gateway/src/index.js index 96ec46614..273dfe6c3 100644 --- a/apps/gateway/src/index.js +++ b/apps/gateway/src/index.js @@ -26,10 +26,6 @@ class CustomDataSource extends RemoteGraphQLDataSource { return request; } - // eslint-disable-next-line class-methods-use-this - shouldBatchRequest({ request }) { - return request.http?.headers?.get('x-hasura-admin-secret') !== undefined; - } } didReceiveResponse({ response, context }) { const x = response.http.headers.get('set-cookie'); From 7e90c2f3a47c43ad9026ebfe99dfdbb8327f72ce Mon Sep 17 00:00:00 2001 From: Mohit Kumar <48203820+nxtcoder36@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:59:16 +0530 Subject: [PATCH 47/89] script url will be provided along with curl (#366) * script url will be provided along with curl * script url is hosted in webhook --- .../console/registry-image.graphql.yml | 6 +- .../internal/app/graph/generated/generated.go | 56 +++---------------- .../internal/app/graph/schema.graphqls | 2 +- .../internal/app/graph/schema.resolvers.go | 4 +- apps/console/internal/domain/api.go | 2 +- .../console/internal/domain/registry-image.go | 14 +---- .../field-constants/generated_constants.go | 6 ++ apps/webhook/internal/app/image-hook.go | 20 ++++++- apps/webhook/internal/env/env.go | 1 + apps/webhook/kl-image-script.sh | 17 ++++++ 10 files changed, 61 insertions(+), 67 deletions(-) create mode 100755 apps/webhook/kl-image-script.sh diff --git a/.tools/nvim/__http__/console/registry-image.graphql.yml b/.tools/nvim/__http__/console/registry-image.graphql.yml index 398a966dd..f1822e63c 100644 --- a/.tools/nvim/__http__/console/registry-image.graphql.yml +++ b/.tools/nvim/__http__/console/registry-image.graphql.yml @@ -1,6 +1,6 @@ --- global: - image: "test-image:t1.0.0" + image: "imageName1:imageTag1" --- label: List Registry Images @@ -56,8 +56,8 @@ variables: label: Get Registry Image URL query: |+ - query Core_getRegistryImageURL($image: String!, $meta: Map!) { - core_getRegistryImageURL(image: $image, meta: $meta) { + query Core_getRegistryImageURL { + core_getRegistryImageURL { url scriptUrl } diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 792f6e81d..d6d3fcf9e 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -799,7 +799,7 @@ type ComplexityRoot struct { 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 + CoreGetRegistryImageURL func(childComplexity int) 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 @@ -1100,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{}) (*model.RegistryImageURL, error) + CoreGetRegistryImageURL(ctx context.Context) (*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) @@ -4691,12 +4691,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in 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 + return e.complexity.Query.CoreGetRegistryImageURL(childComplexity), true case "Query.core_getRouter": if e.complexity.Query.CoreGetRouter == nil { @@ -5882,7 +5877,7 @@ type Query { core_getImagePullSecret(name: String!): ImagePullSecret @isLoggedInAndVerified @hasAccount core_resyncImagePullSecret(name: String!): Boolean! @isLoggedInAndVerified @hasAccount - core_getRegistryImageURL(image: String!, meta: Map!): RegistryImageURL! @isLoggedInAndVerified @hasAccount + core_getRegistryImageURL: RegistryImageURL! @isLoggedInAndVerified @hasAccount core_getRegistryImage(image: String!,): RegistryImage @isLoggedInAndVerified @hasAccount core_listRegistryImages(pq: CursorPaginationIn): RegistryImagePaginatedRecords @isLoggedInAndVerified @hasAccount @@ -8629,30 +8624,6 @@ 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{}{} @@ -32591,7 +32562,7 @@ func (ec *executionContext) _Query_core_getRegistryImageURL(ctx context.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().CoreGetRegistryImageURL(rctx, fc.Args["image"].(string), fc.Args["meta"].(map[string]interface{})) + return ec.resolvers.Query().CoreGetRegistryImageURL(rctx) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { @@ -32633,7 +32604,7 @@ func (ec *executionContext) _Query_core_getRegistryImageURL(ctx context.Context, 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) { +func (ec *executionContext) fieldContext_Query_core_getRegistryImageURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -32649,17 +32620,6 @@ func (ec *executionContext) fieldContext_Query_core_getRegistryImageURL(ctx cont return nil, fmt.Errorf("no field named %q was found under type RegistryImageURL", 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_getRegistryImageURL_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } @@ -54773,12 +54733,12 @@ func (ec *executionContext) marshalNManagedResourceKeyValueRef2ᚖgithubᚗcom return ec._ManagedResourceKeyValueRef(ctx, sel, v) } -func (ec *executionContext) unmarshalNMap2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { +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) marshalNMap2map(ctx context.Context, sel ast.SelectionSet, v map[string]interface{}) graphql.Marshaler { +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") diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index 2cc5fa3b0..a22396f28 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!): RegistryImageURL! @isLoggedInAndVerified @hasAccount + core_getRegistryImageURL: 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 1e3c9e648..f19a2e098 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -526,12 +526,12 @@ 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{}) (*model.RegistryImageURL, error) { +func (r *queryResolver) CoreGetRegistryImageURL(ctx context.Context) (*model.RegistryImageURL, error) { cc, err := toConsoleContext(ctx) if err != nil { return nil, errors.NewE(err) } - imageURL, err := r.Domain.GetRegistryImageURL(cc, image, meta) + imageURL, err := r.Domain.GetRegistryImageURL(cc) if err != nil { return nil, errors.NewE(err) } diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index 52b574555..422cc6057 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) (*entities.RegistryImageURL, error) + GetRegistryImageURL(ctx ConsoleContext) (*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 ffdd4fef2..9e1304b19 100644 --- a/apps/console/internal/domain/registry-image.go +++ b/apps/console/internal/domain/registry-image.go @@ -4,7 +4,6 @@ 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" @@ -46,19 +45,12 @@ func getImageNameTag(image string) (string, string) { return parts[0], "latest" } -func (d *domain) GetRegistryImageURL(ctx ConsoleContext, image string, meta map[string]any) (*entities.RegistryImageURL, error) { +func (d *domain) GetRegistryImageURL(ctx ConsoleContext) (*entities.RegistryImageURL, error) { encodedToken := encodeAccessToken(ctx.AccountName, d.envVars.WebhookTokenHashingSecret) - imageName, imageTag := getImageNameTag(image) - - metaJSON, err := json.Marshal(meta) - if err != nil { - return nil, err - } - 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: "", + URL: fmt.Sprintf(`curl -X POST "%s" -H "Authorization: %s" -H "Content-Type: application/json" -d '{"image": "imageName:imageTag", "meta": {"repository": "github", "registry": "docker", "author":"kloudlite"}}'`, d.envVars.WebhookURL, encodedToken), + ScriptURL: fmt.Sprintf(`curl "%s" | authorization=%s image=imageName:imageTag meta="repository=github,registry=docker,author=kloudlite" sh`, d.envVars.WebhookURL, encodedToken), }, nil } diff --git a/apps/console/internal/entities/field-constants/generated_constants.go b/apps/console/internal/entities/field-constants/generated_constants.go index 5cec8a8d9..e6aa1acf7 100644 --- a/apps/console/internal/entities/field-constants/generated_constants.go +++ b/apps/console/internal/entities/field-constants/generated_constants.go @@ -207,6 +207,12 @@ const ( RegistryImageMeta = "meta" ) +// constant vars generated for struct RegistryImageURL +const ( + RegistryImageURLScriptUrl = "scriptUrl" + RegistryImageURLUrl = "url" +) + // constant vars generated for struct ResourceMapping const ( ResourceMappingBaseEntity = "BaseEntity" diff --git a/apps/webhook/internal/app/image-hook.go b/apps/webhook/internal/app/image-hook.go index d03e07631..e22406e73 100644 --- a/apps/webhook/internal/app/image-hook.go +++ b/apps/webhook/internal/app/image-hook.go @@ -15,7 +15,9 @@ import ( types2 "github.com/kloudlite/api/pkg/messaging/types" "github.com/pkg/errors" "go.uber.org/fx" + "io" "net/http" + "os" "strings" "time" ) @@ -67,7 +69,7 @@ func LoadImageHook() fx.Option { app := server.Raw() - app.Post("/image", func(ctx *fiber.Ctx) error { + app.Post("/image-metadata", func(ctx *fiber.Ctx) error { logger := logr.WithName("image-hook") headers := ctx.GetReqHeaders() @@ -138,6 +140,22 @@ func LoadImageHook() fx.Option { ).Infof("queued webhook") return ctx.Status(http.StatusAccepted).JSON(map[string]string{"status": "ok"}) }) + + app.Get("/image-metadata", func(c *fiber.Ctx) error { + f, err := os.Open("kl-image-script.sh") + if err != nil { + return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("Error opening script: %s", err.Error())) + } + defer f.Close() + all, err := io.ReadAll(f) + if err != nil { + return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("Error reading script: %s", err.Error())) + } + script := string(all) + script = strings.ReplaceAll(script, "$WEBHOOK_URL", envVars.WebhookURL) + return c.SendString(script) + }) + return nil }) } diff --git a/apps/webhook/internal/env/env.go b/apps/webhook/internal/env/env.go index 772b771be..53569c800 100644 --- a/apps/webhook/internal/env/env.go +++ b/apps/webhook/internal/env/env.go @@ -12,6 +12,7 @@ type Env struct { CommsService string `env:"COMMS_SERVICE" required:"true"` DiscordWebhookUrl string `env:"DISCORD_WEBHOOK_URL" required:"false"` + WebhookURL string `env:"WEBHOOK_URL" required:"true"` WebhookTokenHashingSecret string `env:"WEBHOOK_TOKEN_HASHING_SECRET" required:"true"` } diff --git a/apps/webhook/kl-image-script.sh b/apps/webhook/kl-image-script.sh new file mode 100755 index 000000000..bec6a7fc5 --- /dev/null +++ b/apps/webhook/kl-image-script.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +meta=$(echo "$meta" | tr -d ' ') + +json_data='{"image": "'"$image"'", "meta": {' + +IFS=',' read -r -a array <<< "$meta" +for element in "${array[@]}" +do + key=$(echo "$element" | cut -d '=' -f 1) + value=$(echo "$element" | cut -d '=' -f 2) + json_data+='"'"$key"'":"'"$value"'",' +done + +json_data=${json_data%,}'}}' + +curl -X POST $WEBHOOK_URL -H "Authorization: $authorization" -H "Content-Type: application/json" -d "$json_data" From fffd46bdbc59071f59d7a9b85c9ec50e03b63147 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Fri, 13 Sep 2024 17:21:53 +0530 Subject: [PATCH 48/89] chore: `log/slog` logging for grpc and http servers --- pkg/grpc/logger.go | 22 ++++++++++++++++++++++ pkg/grpc/server.go | 14 +++----------- pkg/http-server/http-server.go | 15 +++++++++------ pkg/http-server/logger.go | 4 ++-- 4 files changed, 36 insertions(+), 19 deletions(-) create mode 100644 pkg/grpc/logger.go diff --git a/pkg/grpc/logger.go b/pkg/grpc/logger.go new file mode 100644 index 000000000..7eee2faa4 --- /dev/null +++ b/pkg/grpc/logger.go @@ -0,0 +1,22 @@ +package grpc + +import ( + "fmt" + "log/slog" + "time" +) + +type logger struct { + *slog.Logger + comment string + t time.Time +} + +func NewRequestLogger(logr *slog.Logger, comment string) *logger { + logr.Debug("➡️ " + comment) + return &logger{Logger: logr, comment: comment, t: time.Now()} +} + +func (l *logger) End() { + l.Info("↩️ "+l.comment, "took", fmt.Sprintf("%.2fs", time.Since(l.t).Seconds())) +} diff --git a/pkg/grpc/server.go b/pkg/grpc/server.go index f8918e7e5..97c190914 100644 --- a/pkg/grpc/server.go +++ b/pkg/grpc/server.go @@ -33,11 +33,7 @@ func (g *grpcServer) Listen(addr string) error { if err != nil { return errors.NewEf(err, "could not listen to net/tcp server") } - if g.slogger != nil { - g.slogger.Info("grpc server listening", "at", addr) - } else { - g.logger.Infof("listening on %s", addr) - } + g.slogger.Info("grpc server listening", "at", addr) return g.Serve(listen) } @@ -46,12 +42,8 @@ func (g *grpcServer) Stop() { } func NewGrpcServer(opts ServerOpts) (Server, error) { - if opts.Logger == nil { - lgr, err := logging.New(&logging.Options{Name: "grpc-server", Dev: false}) - if err != nil { - return nil, errors.NewE(err) - } - opts.Logger = lgr + if opts.Slogger == nil { + opts.Slogger = slog.Default() } server := grpc.NewServer( diff --git a/pkg/http-server/http-server.go b/pkg/http-server/http-server.go index 5db89e9ed..b8715c882 100644 --- a/pkg/http-server/http-server.go +++ b/pkg/http-server/http-server.go @@ -3,6 +3,7 @@ package httpServer import ( "context" "fmt" + "log/slog" "net/http" "strings" "time" @@ -32,7 +33,7 @@ type Server interface { } type server struct { - Logger logging.Logger + logger *slog.Logger *fiber.App isDev bool } @@ -62,14 +63,16 @@ func (s *server) Listen(addr string) error { case status := <-errChannel: return errors.Newf("could not start server because %v", status.Error()) case <-ctx.Done(): - s.Logger.Infof("Http Server started @ (addr: %q)", addr) + s.logger.Info("HTTP server listening", "at", addr) } return nil } type ServerArgs struct { - IsDev bool + IsDev bool + // Logger is deprecated, now use Slogger Logger logging.Logger + Slogger *slog.Logger CorsAllowOrigins *string IAMGrpcAddr string `env:"IAM_GRPC_ADDR" required:"true"` } @@ -115,11 +118,11 @@ func NewServer(args ServerArgs) Server { ) } - if args.Logger == nil { - args.Logger = logging.EmptyLogger + if args.Slogger == nil { + args.Slogger = slog.Default() } - return &server{App: app, Logger: args.Logger, isDev: args.IsDev} + return &server{App: app, logger: args.Slogger, isDev: args.IsDev} } func (s *server) SetupGraphqlServer(es graphql.ExecutableSchema, middlewares ...fiber.Handler) { diff --git a/pkg/http-server/logger.go b/pkg/http-server/logger.go index e4cd31ec9..10732f4d3 100644 --- a/pkg/http-server/logger.go +++ b/pkg/http-server/logger.go @@ -27,9 +27,9 @@ func NewLoggingMiddleware(logger logging.Logger) HttpMiddleware { lrw := NewLoggingResponseWriter(w) timestart := time.Now() - logger.Infof("👉 %s %s?%s", r.Method, r.URL.Path, r.URL.Query().Encode()) + logger.Infof("➡️ %s %s?%s", r.Method, r.URL.Path, r.URL.Query().Encode()) defer func() { - logger.Infof("👈 %d %s %s?%s took %.2fs", lrw.statusCode, r.Method, r.URL.Path, r.URL.Query().Encode(), time.Since(timestart).Seconds()) + logger.Infof("↩️ %d %s %s?%s took %.2fs", lrw.statusCode, r.Method, r.URL.Path, r.URL.Query().Encode(), time.Since(timestart).Seconds()) }() next(w, r) From 4b21e99c500ad34a55c1ca27fbcc084bf97b9104 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Fri, 13 Sep 2024 17:25:00 +0530 Subject: [PATCH 49/89] chore(apps/webhook): startup message updates --- apps/webhook/main.go | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/apps/webhook/main.go b/apps/webhook/main.go index d18e0842b..514962c67 100644 --- a/apps/webhook/main.go +++ b/apps/webhook/main.go @@ -1,11 +1,15 @@ package main import ( + "context" "flag" "log/slog" + "os" + "time" "github.com/kloudlite/api/apps/webhook/internal/env" "github.com/kloudlite/api/apps/webhook/internal/framework" + "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/config" fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/logging" @@ -17,7 +21,13 @@ func main() { flag.BoolVar(&isDev, "dev", false, "--dev") flag.Parse() - fx.New( + start := time.Now() + common.PrintBuildInfo() + + logger := logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: isDev, SetAsDefaultLogger: true}) + + app := fx.New( + fx.NopLogger, fx.Provide( func() (logging.Logger, error) { return logging.New(&logging.Options{Name: "webhooks", Dev: isDev}) @@ -35,5 +45,21 @@ func main() { fn.FxErrorHandler(), config.EnvFx[env.Env](), framework.Module, - ).Run() + ) + + ctx, cancel := func() (context.Context, context.CancelFunc) { + if isDev { + return context.WithTimeout(context.TODO(), 5*time.Second) + } + return context.WithTimeout(context.Background(), 2*time.Second) + }() + defer cancel() + + if err := app.Start(ctx); err != nil { + logger.Error("failed to start webhooks-api, got", slog.String("err", err.Error())) + os.Exit(1) + } + + common.PrintReadyBanner2(time.Since(start)) + <-app.Done() } From c1534e4b2451a0db472069f76d59f0b058b13b4d Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Sat, 14 Sep 2024 02:26:23 +0530 Subject: [PATCH 50/89] feat(message-office): platform edge clusters support, and grpc protobufs cleanup --- apps/message-office/Taskfile.yml | 2 +- .../internal/app/grpc-server.go | 3 +- .../internal/app/internal-grpc-server.go | 2 + .../internal/domain/platform-edge/repo.go | 3 +- .../domain/platform-edge/repo_test.go | 4 +- .../internal/entities/allocation.go | 48 +---------- .../field-constants/generated_constants.go | 16 +++- .../entities/platform-edge-cluster.go | 11 +-- .../protobufs/platform-edge.proto | 2 + .../platform-edge/platform-edge.pb.go | 83 ++++++++++++------- 10 files changed, 85 insertions(+), 89 deletions(-) diff --git a/apps/message-office/Taskfile.yml b/apps/message-office/Taskfile.yml index 79b4419f1..f74a81e18 100644 --- a/apps/message-office/Taskfile.yml +++ b/apps/message-office/Taskfile.yml @@ -37,7 +37,7 @@ tasks: cmds: - go generate ./internal/entities/field-constants/gen.go - grpc:build: + protobufs: dir: ./protobufs/ cmds: - protoc --go_out=. --go-grpc_out=. --go_opt=paths=import --go-grpc_opt=paths=import ./*.proto diff --git a/apps/message-office/internal/app/grpc-server.go b/apps/message-office/internal/app/grpc-server.go index b4925e6a3..6975ebd09 100644 --- a/apps/message-office/internal/app/grpc-server.go +++ b/apps/message-office/internal/app/grpc-server.go @@ -319,7 +319,7 @@ func processError(ctx context.Context, args ProcessErrorArgs) (err error) { // GetAccessToken implements messages.MessageDispatchServiceServer func (g *grpcServer) GetAccessToken(ctx context.Context, msg *messages.GetAccessTokenIn) (*messages.GetAccessTokenOut, error) { - g.logger.Debug("request received for cluster-token exchange") + g.logger.Debug("request received for cluster-token exchange", "cluster-token", msg.ClusterToken) ct, err := g.domain.FindClusterToken(ctx, msg.ClusterToken) if err != nil { @@ -363,6 +363,7 @@ func (g *grpcServer) SendActions(request *messages.Empty, server messages.Messag logger.Info("READY to transmit messages to agent") + // FIXME: online/offline status should be stored somewhere else other than the resource itself if _, err := g.infraClient.MarkClusterOnlineAt(server.Context(), &infra.MarkClusterOnlineAtIn{ AccountName: accountName, ClusterName: clusterName, diff --git a/apps/message-office/internal/app/internal-grpc-server.go b/apps/message-office/internal/app/internal-grpc-server.go index 59eeb4ded..4e4427c6d 100644 --- a/apps/message-office/internal/app/internal-grpc-server.go +++ b/apps/message-office/internal/app/internal-grpc-server.go @@ -50,6 +50,7 @@ func (s *internalServer) AllocatePlatformEdgeCluster(ctx context.Context, in *pl return &platform_edge.AllocatePlatformEdgeClusterOut{ ClusterName: pec.Name, OwnedByAccount: pec.OwnedByAccount, + PublicDnsHost: pec.PublicDNSHostname, }, nil } @@ -66,6 +67,7 @@ func (s *internalServer) GetAllocatedPlatformEdgeCluster(ctx context.Context, in return &platform_edge.AllocatePlatformEdgeClusterOut{ ClusterName: allocated.Cluster.Name, OwnedByAccount: allocated.Cluster.OwnedByAccount, + PublicDnsHost: allocated.Cluster.PublicDNSHost, }, nil } diff --git a/apps/message-office/internal/domain/platform-edge/repo.go b/apps/message-office/internal/domain/platform-edge/repo.go index 1e4f9992b..00dcda406 100644 --- a/apps/message-office/internal/domain/platform-edge/repo.go +++ b/apps/message-office/internal/domain/platform-edge/repo.go @@ -56,10 +56,11 @@ func (r *Repo) AllocatePlatformEdgeCluster(ctx context.Context, region string, a if _, err := r.AllocatedClusters.Create(ctx, &entities.ClusterAllocation{ To: account, - Cluster: entities.ClusterAllocationCluster{ + Cluster: entities.ClusterAllocationClusterRef{ Name: clusterName, Region: region, OwnedByAccount: x.OwnedByAccount, + PublicDNSHost: x.PublicDNSHostname, }, }); err != nil { return nil, err diff --git a/apps/message-office/internal/domain/platform-edge/repo_test.go b/apps/message-office/internal/domain/platform-edge/repo_test.go index d9820f493..a4c4ef4f7 100644 --- a/apps/message-office/internal/domain/platform-edge/repo_test.go +++ b/apps/message-office/internal/domain/platform-edge/repo_test.go @@ -175,8 +175,8 @@ func TestRepo_AllocatePlatformEdgeCluster(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { r := &Repo{ - edge_clusters: tt.fields.edge_clusters(t), - allocated_clusters: tt.fields.allocated_clusters(t), + EdgeClusters: tt.fields.edge_clusters(t), + AllocatedClusters: tt.fields.allocated_clusters(t), } got, err := r.AllocatePlatformEdgeCluster(tt.args.ctx, tt.args.region, tt.args.account) if (err != nil) && !errors.Is(err, tt.wantErr) { diff --git a/apps/message-office/internal/entities/allocation.go b/apps/message-office/internal/entities/allocation.go index 64c2e9a49..8618abae4 100644 --- a/apps/message-office/internal/entities/allocation.go +++ b/apps/message-office/internal/entities/allocation.go @@ -5,16 +5,17 @@ import ( "github.com/kloudlite/api/pkg/repos" ) -type ClusterAllocationCluster struct { +type ClusterAllocationClusterRef struct { Name string `json:"name"` Region string `json:"region"` OwnedByAccount string `json:"owned_by_account"` + PublicDNSHost string `json:"public_dns_host"` } type ClusterAllocation struct { repos.BaseEntity `json:",inline"` - To string `json:"to"` - Cluster ClusterAllocationCluster `json:"cluster"` + To string `json:"to"` + Cluster ClusterAllocationClusterRef `json:"cluster"` } var ClusterAllocationIndexes = []repos.IndexField{ @@ -37,44 +38,3 @@ var ClusterAllocationIndexes = []repos.IndexField{ }, }, } - -/* -```javascript -records = [] -for (let i = 1000; i < 10000; i++) { - records.push({ - id: i, - to: `A-${i}`, - cluster_name: `cluster-${Math.ceil(Math.random() * 10)}` - }); -} -db.cluster_allocations.insertMany(records); - -// [ -// { id: "1", to: "A", cluster_name: "cluster-1" }, -// { id: "2", to: "B", cluster_name: "cluster-1" }, -// { id: "3", to: "C", cluster_name: "cluster-2" }, -// { id: "4", to: "D", cluster_name: "cluster-2" }, -// { id: "5", to: "E", cluster_name: "cluster-3" }, -// { id: "6", to: "F", cluster_name: "cluster-3" }, -// { id: "7", to: "G", cluster_name: "cluster-4" }, -// ] -// ); - -db.cluster_allocations.aggregate([ - { - $group: { - _id: "$cluster_name", // Replace with the field you want to group by - count: { $sum: 1 } // Count the number of occurrences - } - }, - { - $sort: { count: 1 } // Sort by count in descending order - }, - { - $limit: 1 // Limit the results to the top 10 - } -]) - -``` -*/ diff --git a/apps/message-office/internal/entities/field-constants/generated_constants.go b/apps/message-office/internal/entities/field-constants/generated_constants.go index 8749ba63c..08bab37e5 100644 --- a/apps/message-office/internal/entities/field-constants/generated_constants.go +++ b/apps/message-office/internal/entities/field-constants/generated_constants.go @@ -11,12 +11,20 @@ const ( ClusterAllocationTo = "to" ) +// constant vars generated for struct ClusterAllocationClusterRef +const ( + ClusterAllocationClusterRefName = "name" + ClusterAllocationClusterRefOwnedByAccount = "owned_by_account" + ClusterAllocationClusterRefRegion = "region" +) + // constant vars generated for struct PlatformEdgeCluster const ( - PlatformEdgeClusterCloudProvider = "cloud_provider" - PlatformEdgeClusterName = "name" - PlatformEdgeClusterOwnedByAccount = "owned_by_account" - PlatformEdgeClusterRegion = "region" + PlatformEdgeClusterCloudProvider = "cloud_provider" + PlatformEdgeClusterName = "name" + PlatformEdgeClusterOwnedByAccount = "owned_by_account" + PlatformEdgeClusterPublicDnsHostname = "public_dns_hostname" + PlatformEdgeClusterRegion = "region" ) // constant vars generated for struct diff --git a/apps/message-office/internal/entities/platform-edge-cluster.go b/apps/message-office/internal/entities/platform-edge-cluster.go index b1f77408a..071de023a 100644 --- a/apps/message-office/internal/entities/platform-edge-cluster.go +++ b/apps/message-office/internal/entities/platform-edge-cluster.go @@ -6,11 +6,12 @@ import ( ) type PlatformEdgeCluster struct { - repos.BaseEntity `json:",inline"` - OwnedByAccount string `json:"owned_by_account"` - Name string `json:"name"` - Region string `json:"region"` - CloudProvider string `json:"cloud_provider"` + repos.BaseEntity `json:",inline"` + OwnedByAccount string `json:"owned_by_account"` + Name string `json:"name"` + Region string `json:"region"` + CloudProvider string `json:"cloud_provider"` + PublicDNSHostname string `json:"public_dns_hostname"` } var PlatformEdgeClusterIndexes = []repos.IndexField{ diff --git a/apps/message-office/protobufs/platform-edge.proto b/apps/message-office/protobufs/platform-edge.proto index 6688634d4..5831fd6ec 100644 --- a/apps/message-office/protobufs/platform-edge.proto +++ b/apps/message-office/protobufs/platform-edge.proto @@ -29,8 +29,10 @@ message AllocatePlatformEdgeClusterIn { message AllocatePlatformEdgeClusterOut { string cluster_name = 1; string owned_by_account = 2; + string public_dns_host = 3; } message GetAllocatedPlatformEdgeClusterIn { string account_name = 1; + string cluster_name = 2; } diff --git a/apps/message-office/protobufs/platform-edge/platform-edge.pb.go b/apps/message-office/protobufs/platform-edge/platform-edge.pb.go index 9ea255aa9..257c18f65 100644 --- a/apps/message-office/protobufs/platform-edge/platform-edge.pb.go +++ b/apps/message-office/protobufs/platform-edge/platform-edge.pb.go @@ -231,6 +231,7 @@ type AllocatePlatformEdgeClusterOut struct { ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` OwnedByAccount string `protobuf:"bytes,2,opt,name=owned_by_account,json=ownedByAccount,proto3" json:"owned_by_account,omitempty"` + PublicDnsHost string `protobuf:"bytes,3,opt,name=public_dns_host,json=publicDnsHost,proto3" json:"public_dns_host,omitempty"` } func (x *AllocatePlatformEdgeClusterOut) Reset() { @@ -279,12 +280,20 @@ func (x *AllocatePlatformEdgeClusterOut) GetOwnedByAccount() string { return "" } +func (x *AllocatePlatformEdgeClusterOut) GetPublicDnsHost() string { + if x != nil { + return x.PublicDnsHost + } + return "" +} + type GetAllocatedPlatformEdgeClusterIn struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AccountName string `protobuf:"bytes,1,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + ClusterName string `protobuf:"bytes,2,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` } func (x *GetAllocatedPlatformEdgeClusterIn) Reset() { @@ -326,6 +335,13 @@ func (x *GetAllocatedPlatformEdgeClusterIn) GetAccountName() string { return "" } +func (x *GetAllocatedPlatformEdgeClusterIn) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + var File_platform_edge_proto protoreflect.FileDescriptor var file_platform_edge_proto_rawDesc = []byte{ @@ -351,39 +367,44 @@ var file_platform_edge_proto_rawDesc = []byte{ 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6d, 0x0a, 0x1e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x1e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6f, 0x77, + 0x6e, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x42, 0x79, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x64, + 0x6e, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x44, 0x6e, 0x73, 0x48, 0x6f, 0x73, 0x74, 0x22, 0x69, 0x0a, 0x21, + 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, + 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0xad, 0x02, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x12, 0x55, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6f, 0x77, 0x6e, - 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x46, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0xad, 0x02, 0x0a, 0x0c, - 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x12, 0x55, 0x0a, 0x18, - 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x73, 0x49, 0x6e, 0x1a, 0x1c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x4f, 0x75, 0x74, 0x12, 0x5e, 0x0a, 0x1b, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x50, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x49, + 0x6e, 0x1a, 0x1c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x4f, 0x75, 0x74, 0x12, + 0x5e, 0x0a, 0x1b, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1e, + 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x1f, + 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, + 0x66, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x6e, 0x1a, 0x1f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4f, 0x75, 0x74, 0x12, 0x66, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, - 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x1f, 0x2e, 0x41, 0x6c, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, - 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x42, 0x11, 0x5a, 0x0f, 0x2e, - 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x65, 0x64, 0x67, 0x65, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x12, 0x22, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x1f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x65, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( From 524cac83c2f2bc09562d26f87e50743ed6e565d3 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Sat, 14 Sep 2024 02:29:53 +0530 Subject: [PATCH 51/89] feat(console): supoprts environment creation on kloudlite clusters --- apps/console/Taskfile.yml | 4 +- .../internal/app/adapters/account-svc.go | 3 - .../adapters/infra-service/infra-service.go | 39 ++ .../adapters/resource-dispatch/dispatch.go | 1 + apps/console/internal/app/app.go | 8 +- apps/console/internal/app/gqlgen.yml | 7 + .../internal/app/graph/generated/generated.go | 463 +++++++++++++++++- .../internal/app/graph/model/models_gen.go | 5 + .../internal/app/graph/schema.graphqls | 12 + .../internal/app/graph/schema.resolvers.go | 32 +- .../internal/app/process-resource-updates.go | 18 +- apps/console/internal/domain/api.go | 6 + apps/console/internal/domain/domain.go | 40 +- .../internal/domain/environments/domain.go | 42 ++ .../internal/domain/environments/errors.go | 1 + .../internal/domain/environments/repo.go | 211 ++++++++ .../internal/domain/environments/repo_test.go | 1 + .../domain/kloudlite-edge-cluster/domain.go | 9 - .../internal/domain/ports/iam-service.go | 20 + .../internal/domain/ports/infra-service.go | 20 + .../domain/ports/resource-dispatch.go | 15 + .../internal/domain/types/event-publisher.go | 18 + apps/console/internal/domain/types/types.go | 43 ++ apps/console/internal/entities/environment.go | 2 +- apps/console/main.go | 19 +- 25 files changed, 981 insertions(+), 58 deletions(-) create mode 100644 apps/console/internal/app/adapters/infra-service/infra-service.go create mode 100644 apps/console/internal/app/adapters/resource-dispatch/dispatch.go create mode 100644 apps/console/internal/domain/environments/domain.go create mode 100644 apps/console/internal/domain/environments/errors.go create mode 100644 apps/console/internal/domain/environments/repo.go create mode 100644 apps/console/internal/domain/environments/repo_test.go delete mode 100644 apps/console/internal/domain/kloudlite-edge-cluster/domain.go create mode 100644 apps/console/internal/domain/ports/iam-service.go create mode 100644 apps/console/internal/domain/ports/infra-service.go create mode 100644 apps/console/internal/domain/ports/resource-dispatch.go create mode 100644 apps/console/internal/domain/types/event-publisher.go create mode 100644 apps/console/internal/domain/types/types.go diff --git a/apps/console/Taskfile.yml b/apps/console/Taskfile.yml index f78a75406..ad69b2b8b 100644 --- a/apps/console/Taskfile.yml +++ b/apps/console/Taskfile.yml @@ -70,18 +70,16 @@ tasks: binary: '{{.binary | default "false"}}' env: CGO_ENABLED: 0 - silent: false + silent: true cmds: - |+ if [ "{{.binary}}" = "true" ]; then task build ./bin/console-$(go env GOARCH) --debug else - echo "running go run" go run ./main.go --dev fi - container:build-and-push: requires: vars: diff --git a/apps/console/internal/app/adapters/account-svc.go b/apps/console/internal/app/adapters/account-svc.go index d3d257738..40f016061 100644 --- a/apps/console/internal/app/adapters/account-svc.go +++ b/apps/console/internal/app/adapters/account-svc.go @@ -23,9 +23,6 @@ func (as *accountsSvc) GetAccountRegion(ctx context.Context, userId string, acco AccountName: accountName, }) if err != nil { - // if errors.Is(err, context.DeadlineExceeded) { - // return nil, domain.ErrGRPCCall{Err: err} - // } return "", errors.NewE(err) } diff --git a/apps/console/internal/app/adapters/infra-service/infra-service.go b/apps/console/internal/app/adapters/infra-service/infra-service.go new file mode 100644 index 000000000..b11212b81 --- /dev/null +++ b/apps/console/internal/app/adapters/infra-service/infra-service.go @@ -0,0 +1,39 @@ +package infra_service + +import ( + "context" + + "github.com/kloudlite/api/apps/console/internal/domain/ports" + "github.com/kloudlite/api/apps/infra/protobufs/infra" +) + +type InfraService struct { + infraClient infra.InfraClient +} + +// EnsureGlobalVPNConnection implements ports.InfraService. +func (s *InfraService) EnsureGlobalVPNConnection(ctx context.Context, args ports.EnsureGlobalVPNConnectionIn) error { + _, err := s.infraClient.EnsureGlobalVPNConnection(ctx, &infra.EnsureGlobalVPNConnectionIn{ + UserId: args.UserId, + UserName: args.UserName, + UserEmail: args.UserEmail, + AccountName: args.AccountName, + ClusterName: args.ClusterName, + GlobalVPNName: args.GlobalVPNName, + DispatchAddr_AccountName: args.DispatchAddrAccountName, + DispatchAddr_ClusterName: args.DispatchAddrClusterName, + }) + if err != nil { + return err + } + + return nil +} + +var _ ports.InfraService = (*InfraService)(nil) + +func NewInfraService(infraClient infra.InfraClient) ports.InfraService { + return &InfraService{ + infraClient: infraClient, + } +} diff --git a/apps/console/internal/app/adapters/resource-dispatch/dispatch.go b/apps/console/internal/app/adapters/resource-dispatch/dispatch.go new file mode 100644 index 000000000..fe44476b6 --- /dev/null +++ b/apps/console/internal/app/adapters/resource-dispatch/dispatch.go @@ -0,0 +1 @@ +package resource_dispatch diff --git a/apps/console/internal/app/app.go b/apps/console/internal/app/app.go index ebe01870d..e710bf5ec 100644 --- a/apps/console/internal/app/app.go +++ b/apps/console/internal/app/app.go @@ -15,15 +15,17 @@ import ( "go.uber.org/fx" "github.com/kloudlite/api/apps/console/internal/app/adapters" + infra_service "github.com/kloudlite/api/apps/console/internal/app/adapters/infra-service" "github.com/kloudlite/api/apps/console/internal/app/graph" "github.com/kloudlite/api/apps/console/internal/app/graph/generated" "github.com/kloudlite/api/apps/console/internal/domain" + "github.com/kloudlite/api/apps/console/internal/domain/ports" "github.com/kloudlite/api/apps/console/internal/entities" "github.com/kloudlite/api/apps/console/internal/env" + "github.com/kloudlite/api/apps/infra/protobufs/infra" platform_edge "github.com/kloudlite/api/apps/message-office/protobufs/platform-edge" "github.com/kloudlite/api/common" "github.com/kloudlite/api/constants" - "github.com/kloudlite/api/grpc-interfaces/infra" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" "github.com/kloudlite/api/pkg/grpc" httpServer "github.com/kloudlite/api/pkg/http-server" @@ -96,6 +98,10 @@ var Module = fx.Module("app", fx.Provide(adapters.NewAccountsSvc), + fx.Provide(func(cli infra.InfraClient) ports.InfraService { + return infra_service.NewInfraService(cli) + }), + fx.Invoke( func(server httpServer.Server, d domain.Domain, sessionRepo kv.Repo[*common.AuthSession], ev *env.Env) { gqlConfig := generated.Config{Resolvers: &graph.Resolver{Domain: d, EnvVars: ev}} diff --git a/apps/console/internal/app/gqlgen.yml b/apps/console/internal/app/gqlgen.yml index cec924e7b..2834111e8 100644 --- a/apps/console/internal/app/gqlgen.yml +++ b/apps/console/internal/app/gqlgen.yml @@ -78,6 +78,9 @@ models: Environment: &environment-model model: github.com/kloudlite/api/apps/console/internal/entities.Environment + fields: + onlineStatus: + resolver: true EnvironmentIn: *environment-model RegistryImage: ®istry-image-model @@ -117,6 +120,8 @@ models: resolver: true serviceHost: resolver: true + onlineStatus: + resolver: true model: github.com/kloudlite/api/apps/console/internal/entities.App AppIn: *app-model @@ -152,6 +157,8 @@ models: fields: managedResource: resolver: true + onlineStatus: + resolver: true ClusterManagedService: &custer-managed-service-model model: github.com/kloudlite/api/apps/console/internal/entities.ClusterManagedService diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 792f6e81d..a69dec4ed 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -104,6 +104,7 @@ type ComplexityRoot struct { LastUpdatedBy func(childComplexity int) int MarkedForDeletion func(childComplexity int) int ObjectMeta func(childComplexity int) int + OnlineStatus func(childComplexity int) int RecordVersion func(childComplexity int) int ServiceHost func(childComplexity int) int Spec func(childComplexity int) int @@ -231,6 +232,7 @@ type ComplexityRoot struct { LastUpdatedBy func(childComplexity int) int MarkedForDeletion func(childComplexity int) int ObjectMeta func(childComplexity int) int + OnlineStatus func(childComplexity int) int RecordVersion func(childComplexity int) int Spec func(childComplexity int) int Status func(childComplexity int) int @@ -615,6 +617,7 @@ type ComplexityRoot struct { ManagedResourceRef func(childComplexity int) int MarkedForDeletion func(childComplexity int) int Name func(childComplexity int) int + OnlineStatus func(childComplexity int) int RecordVersion func(childComplexity int) int SecretRef func(childComplexity int) int SyncStatus func(childComplexity int) int @@ -775,6 +778,11 @@ type ComplexityRoot struct { InfraUpdateClusterManagedService func(childComplexity int, service entities.ClusterManagedService) int } + OnlineStatus struct { + LastOnlineAt func(childComplexity int) int + WillBeOfflineAt func(childComplexity int) int + } + PageInfo struct { EndCursor func(childComplexity int) int HasNextPage func(childComplexity int) int @@ -967,6 +975,7 @@ type AppResolver interface { UpdateTime(ctx context.Context, obj *entities.App) (string, error) Build(ctx context.Context, obj *entities.App) (*model.Build, error) ServiceHost(ctx context.Context, obj *entities.App) (*string, error) + OnlineStatus(ctx context.Context, obj *entities.App) (*model.OnlineStatus, error) } type ClusterManagedServiceResolver interface { CreationTime(ctx context.Context, obj *entities.ClusterManagedService) (string, error) @@ -992,6 +1001,7 @@ type EnvironmentResolver interface { Spec(ctx context.Context, obj *entities.Environment) (*model.GithubComKloudliteOperatorApisCrdsV1EnvironmentSpec, error) UpdateTime(ctx context.Context, obj *entities.Environment) (string, error) + OnlineStatus(ctx context.Context, obj *entities.Environment) (*model.OnlineStatus, error) } type ExternalAppResolver interface { CreationTime(ctx context.Context, obj *entities.ExternalApp) (string, error) @@ -1034,6 +1044,7 @@ type ImportedManagedResourceResolver interface { UpdateTime(ctx context.Context, obj *entities.ImportedManagedResource) (string, error) ManagedResource(ctx context.Context, obj *entities.ImportedManagedResource) (*entities.ManagedResource, error) + OnlineStatus(ctx context.Context, obj *entities.ImportedManagedResource) (*model.OnlineStatus, error) } type K8s__io___api___core___v1__SecretResolver interface { Data(ctx context.Context, obj *v11.Secret) (map[string]interface{}, error) @@ -1329,6 +1340,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.App.ObjectMeta(childComplexity), true + case "App.onlineStatus": + if e.complexity.App.OnlineStatus == nil { + break + } + + return e.complexity.App.OnlineStatus(childComplexity), true + case "App.recordVersion": if e.complexity.App.RecordVersion == nil { break @@ -1908,6 +1926,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Environment.ObjectMeta(childComplexity), true + case "Environment.onlineStatus": + if e.complexity.Environment.OnlineStatus == nil { + break + } + + return e.complexity.Environment.OnlineStatus(childComplexity), true + case "Environment.recordVersion": if e.complexity.Environment.RecordVersion == nil { break @@ -3546,6 +3571,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.ImportedManagedResource.Name(childComplexity), true + case "ImportedManagedResource.onlineStatus": + if e.complexity.ImportedManagedResource.OnlineStatus == nil { + break + } + + return e.complexity.ImportedManagedResource.OnlineStatus(childComplexity), true + case "ImportedManagedResource.recordVersion": if e.complexity.ImportedManagedResource.RecordVersion == nil { break @@ -4512,6 +4544,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.InfraUpdateClusterManagedService(childComplexity, args["service"].(entities.ClusterManagedService)), true + case "OnlineStatus.lastOnlineAt": + if e.complexity.OnlineStatus.LastOnlineAt == nil { + break + } + + return e.complexity.OnlineStatus.LastOnlineAt(childComplexity), true + + case "OnlineStatus.willBeOfflineAt": + if e.complexity.OnlineStatus.WillBeOfflineAt == nil { + break + } + + return e.complexity.OnlineStatus.WillBeOfflineAt(childComplexity), true + case "PageInfo.endCursor": if e.complexity.PageInfo.EndCursor == nil { break @@ -5974,14 +6020,26 @@ type Build @key(fields: "id") { id: ID! @isLoggedInAndVerified @hasAccount } +type OnlineStatus { + lastOnlineAt: Date! + willBeOfflineAt: Date! +} + +extend type Environment { + onlineStatus: OnlineStatus +} + extend type App { build: Build serviceHost: String + onlineStatus: OnlineStatus } extend type ImportedManagedResource { managedResource: ManagedResource + onlineStatus: OnlineStatus } + `, BuiltIn: false}, {Name: "../struct-to-graphql/app.graphqls", Input: `type App @shareable { accountName: String! @@ -10247,6 +10305,53 @@ func (ec *executionContext) fieldContext_App_serviceHost(_ context.Context, fiel return fc, nil } +func (ec *executionContext) _App_onlineStatus(ctx context.Context, field graphql.CollectedField, obj *entities.App) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_App_onlineStatus(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.App().OnlineStatus(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.OnlineStatus) + fc.Result = res + return ec.marshalOOnlineStatus2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐOnlineStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_App_onlineStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "App", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "lastOnlineAt": + return ec.fieldContext_OnlineStatus_lastOnlineAt(ctx, field) + case "willBeOfflineAt": + return ec.fieldContext_OnlineStatus_willBeOfflineAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OnlineStatus", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _AppEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.AppEdge) (ret graphql.Marshaler) { fc, err := ec.fieldContext_AppEdge_cursor(ctx, field) if err != nil { @@ -10370,6 +10475,8 @@ func (ec *executionContext) fieldContext_AppEdge_node(_ context.Context, field g return ec.fieldContext_App_build(ctx, field) case "serviceHost": return ec.fieldContext_App_serviceHost(ctx, field) + case "onlineStatus": + return ec.fieldContext_App_onlineStatus(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type App", field.Name) }, @@ -14114,6 +14221,53 @@ func (ec *executionContext) fieldContext_Environment_updateTime(_ context.Contex return fc, nil } +func (ec *executionContext) _Environment_onlineStatus(ctx context.Context, field graphql.CollectedField, obj *entities.Environment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Environment_onlineStatus(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.Environment().OnlineStatus(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.OnlineStatus) + fc.Result = res + return ec.marshalOOnlineStatus2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐOnlineStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Environment_onlineStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Environment", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "lastOnlineAt": + return ec.fieldContext_OnlineStatus_lastOnlineAt(ctx, field) + case "willBeOfflineAt": + return ec.fieldContext_OnlineStatus_willBeOfflineAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OnlineStatus", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _EnvironmentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.EnvironmentEdge) (ret graphql.Marshaler) { fc, err := ec.fieldContext_EnvironmentEdge_cursor(ctx, field) if err != nil { @@ -14231,6 +14385,8 @@ func (ec *executionContext) fieldContext_EnvironmentEdge_node(_ context.Context, return ec.fieldContext_Environment_syncStatus(ctx, field) case "updateTime": return ec.fieldContext_Environment_updateTime(ctx, field) + case "onlineStatus": + return ec.fieldContext_Environment_onlineStatus(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Environment", field.Name) }, @@ -24742,6 +24898,53 @@ func (ec *executionContext) fieldContext_ImportedManagedResource_managedResource return fc, nil } +func (ec *executionContext) _ImportedManagedResource_onlineStatus(ctx context.Context, field graphql.CollectedField, obj *entities.ImportedManagedResource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ImportedManagedResource_onlineStatus(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.ImportedManagedResource().OnlineStatus(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.OnlineStatus) + fc.Result = res + return ec.marshalOOnlineStatus2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐOnlineStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_ImportedManagedResource_onlineStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ImportedManagedResource", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "lastOnlineAt": + return ec.fieldContext_OnlineStatus_lastOnlineAt(ctx, field) + case "willBeOfflineAt": + return ec.fieldContext_OnlineStatus_willBeOfflineAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OnlineStatus", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _ImportedManagedResourceEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.ImportedManagedResourceEdge) (ret graphql.Marshaler) { fc, err := ec.fieldContext_ImportedManagedResourceEdge_cursor(ctx, field) if err != nil { @@ -24855,6 +25058,8 @@ func (ec *executionContext) fieldContext_ImportedManagedResourceEdge_node(_ cont return ec.fieldContext_ImportedManagedResource_updateTime(ctx, field) case "managedResource": return ec.fieldContext_ImportedManagedResource_managedResource(ctx, field) + case "onlineStatus": + return ec.fieldContext_ImportedManagedResource_onlineStatus(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type ImportedManagedResource", field.Name) }, @@ -28213,6 +28418,8 @@ func (ec *executionContext) fieldContext_Mutation_core_createEnvironment(ctx con return ec.fieldContext_Environment_syncStatus(ctx, field) case "updateTime": return ec.fieldContext_Environment_updateTime(ctx, field) + case "onlineStatus": + return ec.fieldContext_Environment_onlineStatus(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Environment", field.Name) }, @@ -28327,6 +28534,8 @@ func (ec *executionContext) fieldContext_Mutation_core_updateEnvironment(ctx con return ec.fieldContext_Environment_syncStatus(ctx, field) case "updateTime": return ec.fieldContext_Environment_updateTime(ctx, field) + case "onlineStatus": + return ec.fieldContext_Environment_onlineStatus(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Environment", field.Name) }, @@ -28522,6 +28731,8 @@ func (ec *executionContext) fieldContext_Mutation_core_cloneEnvironment(ctx cont return ec.fieldContext_Environment_syncStatus(ctx, field) case "updateTime": return ec.fieldContext_Environment_updateTime(ctx, field) + case "onlineStatus": + return ec.fieldContext_Environment_onlineStatus(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Environment", field.Name) }, @@ -29032,6 +29243,8 @@ func (ec *executionContext) fieldContext_Mutation_core_createApp(ctx context.Con return ec.fieldContext_App_build(ctx, field) case "serviceHost": return ec.fieldContext_App_serviceHost(ctx, field) + case "onlineStatus": + return ec.fieldContext_App_onlineStatus(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type App", field.Name) }, @@ -29152,6 +29365,8 @@ func (ec *executionContext) fieldContext_Mutation_core_updateApp(ctx context.Con return ec.fieldContext_App_build(ctx, field) case "serviceHost": return ec.fieldContext_App_serviceHost(ctx, field) + case "onlineStatus": + return ec.fieldContext_App_onlineStatus(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type App", field.Name) }, @@ -31582,6 +31797,8 @@ func (ec *executionContext) fieldContext_Mutation_core_importManagedResource(ctx return ec.fieldContext_ImportedManagedResource_updateTime(ctx, field) case "managedResource": return ec.fieldContext_ImportedManagedResource_managedResource(ctx, field) + case "onlineStatus": + return ec.fieldContext_ImportedManagedResource_onlineStatus(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type ImportedManagedResource", field.Name) }, @@ -31681,6 +31898,94 @@ func (ec *executionContext) fieldContext_Mutation_core_deleteImportedManagedReso return fc, nil } +func (ec *executionContext) _OnlineStatus_lastOnlineAt(ctx context.Context, field graphql.CollectedField, obj *model.OnlineStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OnlineStatus_lastOnlineAt(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.LastOnlineAt, 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_OnlineStatus_lastOnlineAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "OnlineStatus", + 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) _OnlineStatus_willBeOfflineAt(ctx context.Context, field graphql.CollectedField, obj *model.OnlineStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OnlineStatus_willBeOfflineAt(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.WillBeOfflineAt, 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_OnlineStatus_willBeOfflineAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "OnlineStatus", + 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) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { fc, err := ec.fieldContext_PageInfo_endCursor(ctx, field) if err != nil { @@ -32196,6 +32501,8 @@ func (ec *executionContext) fieldContext_Query_core_getEnvironment(ctx context.C return ec.fieldContext_Environment_syncStatus(ctx, field) case "updateTime": return ec.fieldContext_Environment_updateTime(ctx, field) + case "onlineStatus": + return ec.fieldContext_Environment_onlineStatus(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Environment", field.Name) }, @@ -33035,6 +33342,8 @@ func (ec *executionContext) fieldContext_Query_core_getApp(ctx context.Context, return ec.fieldContext_App_build(ctx, field) case "serviceHost": return ec.fieldContext_App_serviceHost(ctx, field) + case "onlineStatus": + return ec.fieldContext_App_onlineStatus(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type App", field.Name) }, @@ -45354,6 +45663,39 @@ func (ec *executionContext) _App(ctx context.Context, sel ast.SelectionSet, obj continue } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "onlineStatus": + 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._App_onlineStatus(ctx, field, obj) + 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)) @@ -46520,6 +46862,39 @@ func (ec *executionContext) _Environment(ctx context.Context, sel ast.SelectionS continue } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "onlineStatus": + 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._Environment_onlineStatus(ctx, field, obj) + 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)) @@ -49639,6 +50014,39 @@ func (ec *executionContext) _ImportedManagedResource(ctx context.Context, sel as continue } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "onlineStatus": + 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._ImportedManagedResource_onlineStatus(ctx, field, obj) + 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)) @@ -50938,6 +51346,50 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) return out } +var onlineStatusImplementors = []string{"OnlineStatus"} + +func (ec *executionContext) _OnlineStatus(ctx context.Context, sel ast.SelectionSet, obj *model.OnlineStatus) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, onlineStatusImplementors) + + 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("OnlineStatus") + case "lastOnlineAt": + out.Values[i] = ec._OnlineStatus_lastOnlineAt(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "willBeOfflineAt": + out.Values[i] = ec._OnlineStatus_willBeOfflineAt(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 pageInfoImplementors = []string{"PageInfo"} func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *model.PageInfo) graphql.Marshaler { @@ -54773,12 +55225,12 @@ func (ec *executionContext) marshalNManagedResourceKeyValueRef2ᚖgithubᚗcom return ec._ManagedResourceKeyValueRef(ctx, sel, v) } -func (ec *executionContext) unmarshalNMap2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { +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) marshalNMap2map(ctx context.Context, sel ast.SelectionSet, v map[string]interface{}) graphql.Marshaler { +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") @@ -57305,6 +57757,13 @@ func (ec *executionContext) unmarshalOMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpk return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) marshalOOnlineStatus2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐOnlineStatus(ctx context.Context, sel ast.SelectionSet, v *model.OnlineStatus) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._OnlineStatus(ctx, sel, v) +} + 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 diff --git a/apps/console/internal/app/graph/model/models_gen.go b/apps/console/internal/app/graph/model/models_gen.go index 12482df01..cfd28412a 100644 --- a/apps/console/internal/app/graph/model/models_gen.go +++ b/apps/console/internal/app/graph/model/models_gen.go @@ -739,6 +739,11 @@ type ManagedResourcePaginatedRecords struct { type Mutation struct { } +type OnlineStatus struct { + LastOnlineAt string `json:"lastOnlineAt"` + WillBeOfflineAt string `json:"willBeOfflineAt"` +} + type PageInfo struct { EndCursor *string `json:"endCursor,omitempty"` HasNextPage *bool `json:"hasNextPage,omitempty"` diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index 2cc5fa3b0..2c5ad8eed 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -208,11 +208,23 @@ type Build @key(fields: "id") { id: ID! @isLoggedInAndVerified @hasAccount } +type OnlineStatus { + lastOnlineAt: Date! + willBeOfflineAt: Date! +} + +extend type Environment { + onlineStatus: OnlineStatus +} + extend type App { build: Build serviceHost: String + onlineStatus: OnlineStatus } extend type ImportedManagedResource { managedResource: ManagedResource + onlineStatus: OnlineStatus } + diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index 1e3c9e648..ef4cf7bb6 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -7,6 +7,8 @@ package graph import ( "context" "fmt" + "time" + "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/apps/console/internal/app/graph/generated" @@ -35,6 +37,22 @@ func (r *appResolver) ServiceHost(ctx context.Context, obj *entities.App) (*stri return fn.New(fmt.Sprintf("%s.%s.%s.%s", obj.Name, obj.EnvironmentName, obj.AccountName, r.EnvVars.KloudliteDNSSuffix)), nil } +// OnlineStatus is the resolver for the onlineStatus field. +func (r *appResolver) OnlineStatus(ctx context.Context, obj *entities.App) (*model.OnlineStatus, error) { + return &model.OnlineStatus{ + LastOnlineAt: time.Now().Format(time.RFC3339), + WillBeOfflineAt: time.Now().Add(2 * time.Minute).Format(time.RFC3339), + }, nil +} + +// OnlineStatus is the resolver for the onlineStatus field. +func (r *environmentResolver) OnlineStatus(ctx context.Context, obj *entities.Environment) (*model.OnlineStatus, error) { + return &model.OnlineStatus{ + LastOnlineAt: time.Now().Format(time.RFC3339), + WillBeOfflineAt: time.Now().Add(2 * time.Minute).Format(time.RFC3339), + }, nil +} + // ManagedResource is the resolver for the ManagedResource field. func (r *importedManagedResourceResolver) ManagedResource(ctx context.Context, obj *entities.ImportedManagedResource) (*entities.ManagedResource, error) { cc, err := toConsoleContext(ctx) @@ -44,6 +62,14 @@ func (r *importedManagedResourceResolver) ManagedResource(ctx context.Context, o return r.Domain.GetManagedResourceByID(cc, obj.ManagedResourceRef.ID) } +// OnlineStatus is the resolver for the onlineStatus field. +func (r *importedManagedResourceResolver) OnlineStatus(ctx context.Context, obj *entities.ImportedManagedResource) (*model.OnlineStatus, error) { + return &model.OnlineStatus{ + LastOnlineAt: time.Now().Format(time.RFC3339), + WillBeOfflineAt: time.Now().Add(2 * time.Minute).Format(time.RFC3339), + }, nil +} + // CoreCreateEnvironment is the resolver for the core_createEnvironment field. func (r *mutationResolver) CoreCreateEnvironment(ctx context.Context, env entities.Environment) (*entities.Environment, error) { cc, err := toConsoleContext(ctx) @@ -1034,5 +1060,7 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type mutationResolver struct{ *Resolver } -type queryResolver struct{ *Resolver } +type ( + mutationResolver struct{ *Resolver } + queryResolver struct{ *Resolver } +) diff --git a/apps/console/internal/app/process-resource-updates.go b/apps/console/internal/app/process-resource-updates.go index 340636a97..9a123a4c1 100644 --- a/apps/console/internal/app/process-resource-updates.go +++ b/apps/console/internal/app/process-resource-updates.go @@ -52,6 +52,9 @@ var ( func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, logger *slog.Logger) { getResourceContext := func(ctx domain.ConsoleContext, rt entities.ResourceType, clusterName string, obj *unstructured.Unstructured) (domain.ResourceContext, error) { + if v, ok := obj.GetLabels()[constants.EnvNameKey]; ok { + return domain.ResourceContext{ConsoleContext: ctx, EnvironmentName: v}, nil + } mapping, err := d.GetEnvironmentResourceMapping(ctx, rt, clusterName, obj.GetNamespace(), obj.GetName()) if err != nil { return domain.ResourceContext{}, err @@ -119,7 +122,12 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo mlogger.Info("PROCESSED message", "took", fmt.Sprintf("%dms", time.Since(start).Milliseconds())) }() - dctx := domain.NewConsoleContext(context.TODO(), "sys-user:console-resource-updater", ru.AccountName) + accountName := ru.AccountName + if v, ok := rwu.Object.GetLabels()[constants.AccountNameKey]; ok && len(v) > 0 { + accountName = v + } + + dctx := domain.NewConsoleContext(context.TODO(), "sys-user:console-resource-updater", accountName) resStatus, err := func() (types.ResourceStatus, error) { v, ok := obj.Object[types.ResourceStatusKey] @@ -142,7 +150,6 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo switch gvkStr { case environmentGVK.String(): { - dctx.AccountName = rwu.Object.GetLabels()[constants.AccountNameKey] var ws entities.Environment if err := fn.JsonConversion(rwu.Object, &ws); err != nil { return errors.NewE(err) @@ -155,18 +162,11 @@ func ProcessResourceUpdates(consumer ResourceUpdateConsumer, d domain.Domain, lo } case appsGVK.String(): { - if ru.AccountName == "nxt-multi-tenancy" { - } - - dctx.AccountName = rwu.Object.GetLabels()[constants.AccountNameKey] - var app entities.App if err := fn.JsonConversion(rwu.Object, &app); err != nil { return errors.NewE(err) } - // rctx := domain.ResourceContext{ConsoleContext: dctx, EnvironmentName: rwu.Object.GetLabels()[constants.EnvNameKey]} - rctx, err := getResourceContext(dctx, entities.ResourceTypeApp, ru.ClusterName, obj) if err != nil { return errors.NewE(err) diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index fea90a50c..84e161826 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -140,6 +140,12 @@ type AccountsSvc interface { GetAccountRegion(ctx context.Context, userId string, accountName string) (string, error) } +type ResourceDispatcher interface { + ApplyResource() + DeleteResource() + RestartResource() +} + type Domain interface { AccountsSvc diff --git a/apps/console/internal/domain/domain.go b/apps/console/internal/domain/domain.go index d2a088a74..74a4e95a2 100644 --- a/apps/console/internal/domain/domain.go +++ b/apps/console/internal/domain/domain.go @@ -27,10 +27,10 @@ import ( "go.uber.org/fx" "sigs.k8s.io/controller-runtime/pkg/client" + "github.com/kloudlite/api/apps/console/internal/domain/ports" "github.com/kloudlite/api/apps/console/internal/entities" "github.com/kloudlite/api/apps/console/internal/env" iamT "github.com/kloudlite/api/apps/iam/types" - "github.com/kloudlite/api/grpc-interfaces/infra" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/k8s" @@ -47,7 +47,7 @@ type domain struct { producer MessageDispatcher iamClient iam.IAMClient - infraClient infra.InfraClient + infraSvc ports.InfraService platformEdgeClient platform_edge.PlatformEdgeClient AccountsSvc @@ -105,6 +105,8 @@ func addTrackingId(obj client.Object, id repos.ID) { type K8sContext interface { context.Context GetUserId() repos.ID + GetUserEmail() string + GetUserName() string GetAccountName() string } @@ -131,9 +133,9 @@ func (d *domain) applyK8sResourceOnCluster(ctx K8sContext, clusterName string, o } b, err := json.Marshal(t.AgentMessage{ AccountName: ctx.GetAccountName(), - ClusterName: clusterName, - Action: t.ActionApply, - Object: m, + // ClusterName: clusterName, + Action: t.ActionApply, + Object: m, }) if err != nil { return errors.NewE(err) @@ -167,9 +169,6 @@ func (d *domain) applyK8sResource(ctx K8sContext, envName string, obj client.Obj switch *clusterName { case "__kloudlite_enabled_cluster": { - // dispatchAddr.AccountName = "kloudlite-edge-platform" - // dispatchAddr.ClusterName = "kl-edge-1" - allocatedEdge, err := d.platformEdgeClient.GetAllocatedPlatformEdgeCluster(ctx, &platform_edge.GetAllocatedPlatformEdgeClusterIn{AccountName: ctx.GetAccountName()}) if err != nil { gErr := grpc.ParseErr(err) @@ -194,6 +193,20 @@ func (d *domain) applyK8sResource(ctx K8sContext, envName string, obj client.Obj if err != nil { return errors.NewEf(err, "failed to allocate platform edge cluster") } + + if err := d.infraSvc.EnsureGlobalVPNConnection(ctx, ports.EnsureGlobalVPNConnectionIn{ + UserId: string(ctx.GetUserId()), + UserEmail: ctx.GetUserEmail(), + UserName: ctx.GetUserName(), + AccountName: ctx.GetAccountName(), + ClusterName: allocatedEdge.ClusterName, + GlobalVPNName: "default", + + DispatchAddrAccountName: allocatedEdge.OwnedByAccount, + DispatchAddrClusterName: allocatedEdge.ClusterName, + }); err != nil { + return errors.NewEf(err, "failed to ensure global vpn connection") + } } dispatchAddr.AccountName = allocatedEdge.OwnedByAccount @@ -231,8 +244,7 @@ func (d *domain) applyK8sResource(ctx K8sContext, envName string, obj client.Obj } b, err := json.Marshal(t.AgentMessage{ - AccountName: dispatchAddr.AccountName, - ClusterName: dispatchAddr.ClusterName, + AccountName: ctx.GetAccountName(), Action: t.ActionApply, Object: m, }) @@ -280,7 +292,6 @@ func applyK8sResource(ctx K8sContext, args ApplyK8sResourceArgs) error { } b, err := json.Marshal(t.AgentMessage{ AccountName: ctx.GetAccountName(), - ClusterName: args.ClusterName, Action: t.ActionApply, Object: m, }) @@ -339,7 +350,6 @@ func (d *domain) restartK8sResource(ctx K8sContext, projectName string, namespac b, err := json.Marshal(t.AgentMessage{ AccountName: ctx.GetAccountName(), - ClusterName: *clusterName, Action: t.ActionRestart, Object: obj.Object, }) @@ -367,7 +377,6 @@ func (d *domain) deleteK8sResourceOfCluster(ctx K8sContext, clusterName string, } b, err := json.Marshal(t.AgentMessage{ AccountName: ctx.GetAccountName(), - ClusterName: clusterName, Action: t.ActionDelete, Object: m, }) @@ -429,7 +438,6 @@ func (d *domain) deleteK8sResource(ctx K8sContext, environmentName string, obj c } b, err := json.Marshal(t.AgentMessage{ AccountName: dispatchAddr.AccountName, - ClusterName: dispatchAddr.ClusterName, Action: t.ActionDelete, Object: m, }) @@ -662,7 +670,7 @@ var Module = fx.Module("domain", producer MessageDispatcher, iamClient iam.IAMClient, - infraClient infra.InfraClient, + infraSvc ports.InfraService, platformEdgeClient platform_edge.PlatformEdgeClient, accountsSvc AccountsSvc, @@ -694,7 +702,7 @@ var Module = fx.Module("domain", producer: producer, iamClient: iamClient, - infraClient: infraClient, + infraSvc: infraSvc, platformEdgeClient: platformEdgeClient, AccountsSvc: accountsSvc, diff --git a/apps/console/internal/domain/environments/domain.go b/apps/console/internal/domain/environments/domain.go new file mode 100644 index 000000000..7d3a8b9b7 --- /dev/null +++ b/apps/console/internal/domain/environments/domain.go @@ -0,0 +1,42 @@ +package environments + +import ( + "time" + + "github.com/kloudlite/api/apps/console/internal/domain/types" + "github.com/kloudlite/api/apps/console/internal/entities" + "github.com/kloudlite/api/pkg/repos" + crdsv1 "github.com/kloudlite/operator/apis/crds/v1" + + watcher_types "github.com/kloudlite/operator/operators/resource-watcher/types" +) + +type CloneEnvironmentArgs struct { + SourceEnvName string + DestinationEnvName string + DisplayName string + EnvRoutingMode crdsv1.EnvironmentRoutingMode + ClusterName string +} + +type UpdateAndDeleteOpts struct { + MessageTimestamp time.Time + ClusterName string +} + +type Domain interface { + ListEnvironments(ctx types.ConsoleContext, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.Environment], error) + GetEnvironment(ctx types.ConsoleContext, name string) (*entities.Environment, error) + + CreateEnvironment(ctx types.ConsoleContext, env entities.Environment) (*entities.Environment, error) + CloneEnvironment(ctx types.ConsoleContext, args CloneEnvironmentArgs) (*entities.Environment, error) + UpdateEnvironment(ctx types.ConsoleContext, env entities.Environment) (*entities.Environment, error) + DeleteEnvironment(ctx types.ConsoleContext, name string) error + ArchiveEnvironmentsForCluster(ctx types.ConsoleContext, clusterName string) (bool, error) +} + +type Sync interface { + OnEnvironmentApplyError(ctx types.ConsoleContext, errMsg, namespace, name string, opts UpdateAndDeleteOpts) error + OnEnvironmentDeleteMessage(ctx types.ConsoleContext, env entities.Environment) error + OnEnvironmentUpdateMessage(ctx types.ConsoleContext, env entities.Environment, status watcher_types.ResourceStatus, opts UpdateAndDeleteOpts) error +} diff --git a/apps/console/internal/domain/environments/errors.go b/apps/console/internal/domain/environments/errors.go new file mode 100644 index 000000000..d4fcbc9f9 --- /dev/null +++ b/apps/console/internal/domain/environments/errors.go @@ -0,0 +1 @@ +package environments diff --git a/apps/console/internal/domain/environments/repo.go b/apps/console/internal/domain/environments/repo.go new file mode 100644 index 000000000..e6a836be2 --- /dev/null +++ b/apps/console/internal/domain/environments/repo.go @@ -0,0 +1,211 @@ +package environments + +// import ( +// "fmt" +// "log/slog" +// "strings" +// +// "github.com/kloudlite/api/apps/console/internal/domain/ports" +// "github.com/kloudlite/api/apps/console/internal/domain/types" +// "github.com/kloudlite/api/apps/console/internal/entities" +// "github.com/kloudlite/api/common" +// "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" +// "github.com/kloudlite/api/pkg/errors" +// "github.com/kloudlite/api/pkg/k8s" +// "github.com/kloudlite/api/pkg/repos" +// +// iamT "github.com/kloudlite/api/apps/iam/types" +// t "github.com/kloudlite/api/pkg/types" +// crdsv1 "github.com/kloudlite/operator/apis/crds/v1" +// ) +// +// type Repo struct { +// logger *slog.Logger +// +// k8sClient k8s.Client +// environmentRepo repos.DbRepo[*entities.Environment] +// +// resourceEventPublisher types.ResourceEventPublisher +// +// iamSvc ports.IAMService +// } +// +// func getEnvironmentTargetNamespace(envName string) string { +// return fmt.Sprintf("env-%s", envName) +// } +// +// // ArchiveEnvironmentsForCluster implements Domain. +// func (r *Repo) ArchiveEnvironmentsForCluster(ctx types.ConsoleContext, clusterName string) (bool, error) { +// panic("unimplemented") +// } +// +// // CloneEnvironment implements Domain. +// func (r *Repo) CloneEnvironment(ctx types.ConsoleContext, args CloneEnvironmentArgs) (*entities.Environment, error) { +// panic("unimplemented") +// } +// +// // CreateEnvironment implements Domain. +// func (r *Repo) CreateEnvironment(ctx types.ConsoleContext, env entities.Environment) (*entities.Environment, error) { +// if strings.TrimSpace(env.ClusterName) == "" { +// return nil, errors.New("clustername must be set while creating environments") +// } +// +// env.EnsureGVK() +// if err := r.k8sClient.ValidateObject(ctx, &env.Environment); err != nil { +// return nil, errors.NewE(err) +// } +// +// env.IncrementRecordVersion() +// +// if env.Spec.TargetNamespace == "" { +// env.Spec.TargetNamespace = getEnvironmentTargetNamespace(env.Name) +// } +// +// if env.Spec.Routing == nil { +// env.Spec.Routing = &crdsv1.EnvironmentRouting{ +// Mode: crdsv1.EnvironmentRoutingModePrivate, +// } +// } +// +// env.CreatedBy = common.CreatedOrUpdatedBy{ +// UserId: ctx.UserId, +// UserName: ctx.UserName, +// UserEmail: ctx.UserEmail, +// } +// env.LastUpdatedBy = env.CreatedBy +// +// env.AccountName = ctx.AccountName +// env.SyncStatus = t.GenSyncStatus(t.SyncActionApply, env.RecordVersion) +// +// nenv, err := r.environmentRepo.Create(ctx, &env) +// if err != nil { +// if r.environmentRepo.ErrAlreadyExists(err) { +// // TODO: better insights into error, when it is being caused by duplicated indexes +// return nil, errors.NewE(err) +// } +// return nil, errors.NewE(err) +// } +// +// // FIXME: this should be setup when actually dispatching resource +// // if _, err := d.upsertEnvironmentResourceMapping(ResourceContext{ConsoleContext: ctx, EnvironmentName: env.Name}, &env); err != nil { +// // return nil, errors.NewE(err) +// // } +// +// r.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeEnvironment, nenv.Name, types.PublishAdd) +// +// if _, err := r.iamSvc.AddMembership(ctx, &iam.AddMembershipIn{ +// UserId: string(ctx.UserId), +// ResourceType: string(iamT.ResourceEnvironment), +// ResourceRef: iamT.NewResourceRef(ctx.AccountName, iamT.ResourceEnvironment, nenv.Name), +// Role: string(iamT.RoleResourceOwner), +// }); err != nil { +// r.logger.Error("while adding membership, got", "err", err) +// } +// +// if err := d.applyEnvironmentTargetNamespace(ctx, nenv); err != nil { +// return nil, errors.NewE(err) +// } +// +// if err := d.applyK8sResource(ctx, nenv.Name, &nenv.Environment, nenv.RecordVersion); err != nil { +// return nil, errors.NewE(err) +// } +// +// if err := d.syncImagePullSecretsToEnvironment(ctx, nenv.Name); err != nil { +// return nil, errors.NewE(err) +// } +// +// return nenv, nil +// } +// +// // func (d *domain) CreateEnvironment(ctx ConsoleContext, env entities.Environment) (*entities.Environment, error) { +// // if strings.TrimSpace(env.ClusterName) == "" { +// // return nil, fmt.Errorf("clustername must be set while creating environments") +// // } +// // +// // env.EnsureGVK() +// // if err := d.k8sClient.ValidateObject(ctx, &env.Environment); err != nil { +// // return nil, errors.NewE(err) +// // } +// // +// // env.IncrementRecordVersion() +// // +// // if env.Spec.TargetNamespace == "" { +// // env.Spec.TargetNamespace = d.getEnvironmentTargetNamespace(env.Name) +// // } +// // +// // if env.Spec.Routing == nil { +// // env.Spec.Routing = &crdsv1.EnvironmentRouting{ +// // Mode: crdsv1.EnvironmentRoutingModePrivate, +// // } +// // } +// // +// // env.CreatedBy = common.CreatedOrUpdatedBy{ +// // UserId: ctx.UserId, +// // UserName: ctx.UserName, +// // UserEmail: ctx.UserEmail, +// // } +// // env.LastUpdatedBy = env.CreatedBy +// // +// // env.AccountName = ctx.AccountName +// // env.SyncStatus = t.GenSyncStatus(t.SyncActionApply, env.RecordVersion) +// // +// // nenv, err := d.environmentRepo.Create(ctx, &env) +// // if err != nil { +// // if d.environmentRepo.ErrAlreadyExists(err) { +// // // TODO: better insights into error, when it is being caused by duplicated indexes +// // return nil, errors.NewE(err) +// // } +// // return nil, errors.NewE(err) +// // } +// // +// // if _, err := d.upsertEnvironmentResourceMapping(ResourceContext{ConsoleContext: ctx, EnvironmentName: env.Name}, &env); err != nil { +// // return nil, errors.NewE(err) +// // } +// // +// // d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeEnvironment, nenv.Name, PublishAdd) +// // +// // if _, err := d.iamClient.AddMembership(ctx, &iam.AddMembershipIn{ +// // UserId: string(ctx.UserId), +// // ResourceType: string(iamT.ResourceEnvironment), +// // ResourceRef: iamT.NewResourceRef(ctx.AccountName, iamT.ResourceEnvironment, nenv.Name), +// // Role: string(iamT.RoleResourceOwner), +// // }); err != nil { +// // d.logger.Errorf(err, "error while adding membership") +// // } +// // +// // if err := d.applyEnvironmentTargetNamespace(ctx, nenv); err != nil { +// // return nil, errors.NewE(err) +// // } +// // +// // if err := d.applyK8sResource(ctx, nenv.Name, &nenv.Environment, nenv.RecordVersion); err != nil { +// // return nil, errors.NewE(err) +// // } +// // +// // if err := d.syncImagePullSecretsToEnvironment(ctx, nenv.Name); err != nil { +// // return nil, errors.NewE(err) +// // } +// // +// // return nenv, nil +// // } +// +// // DeleteEnvironment implements Domain. +// func (r *Repo) DeleteEnvironment(ctx types.ConsoleContext, name string) error { +// panic("unimplemented") +// } +// +// // GetEnvironment implements Domain. +// func (r *Repo) GetEnvironment(ctx types.ConsoleContext, name string) (*entities.Environment, error) { +// panic("unimplemented") +// } +// +// // ListEnvironments implements Domain. +// func (r *Repo) ListEnvironments(ctx types.ConsoleContext, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.Environment], error) { +// panic("unimplemented") +// } +// +// // UpdateEnvironment implements Domain. +// func (r *Repo) UpdateEnvironment(ctx types.ConsoleContext, env entities.Environment) (*entities.Environment, error) { +// panic("unimplemented") +// } +// +// var _ Domain = (*Repo)(nil) diff --git a/apps/console/internal/domain/environments/repo_test.go b/apps/console/internal/domain/environments/repo_test.go new file mode 100644 index 000000000..d4fcbc9f9 --- /dev/null +++ b/apps/console/internal/domain/environments/repo_test.go @@ -0,0 +1 @@ +package environments diff --git a/apps/console/internal/domain/kloudlite-edge-cluster/domain.go b/apps/console/internal/domain/kloudlite-edge-cluster/domain.go deleted file mode 100644 index 86791723e..000000000 --- a/apps/console/internal/domain/kloudlite-edge-cluster/domain.go +++ /dev/null @@ -1,9 +0,0 @@ -package kloudlite_edge_cluster - -import "context" - -type PickEdgeClusterArgs struct{} - -func PickEdgeCluster(ctx context.Context, args *PickEdgeClusterArgs) (any, error) { - return nil, nil -} diff --git a/apps/console/internal/domain/ports/iam-service.go b/apps/console/internal/domain/ports/iam-service.go new file mode 100644 index 000000000..bb1340219 --- /dev/null +++ b/apps/console/internal/domain/ports/iam-service.go @@ -0,0 +1,20 @@ +package ports + +import ( + "context" + + "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" +) + +type IAMService interface { + AddMembership(ctx context.Context, in *iam.AddMembershipIn) (*iam.AddMembershipOut, error) + // Can(ctx context.Context, in *CanIn, opts ...grpc.CallOption) (*CanOut, error) + // ListMembershipsForResource(ctx context.Context, in *MembershipsForResourceIn, opts ...grpc.CallOption) (*ListMembershipsOut, error) + // ListMembershipsForUser(ctx context.Context, in *MembershipsForUserIn, opts ...grpc.CallOption) (*ListMembershipsOut, error) + // GetMembership(ctx context.Context, in *GetMembershipIn, opts ...grpc.CallOption) (*GetMembershipOut, error) + // // Mutation + // AddMembership(ctx context.Context, in *AddMembershipIn, opts ...grpc.CallOption) (*AddMembershipOut, error) + // UpdateMembership(ctx context.Context, in *UpdateMembershipIn, opts ...grpc.CallOption) (*UpdateMembershipOut, error) + // RemoveMembership(ctx context.Context, in *RemoveMembershipIn, opts ...grpc.CallOption) (*RemoveMembershipOut, error) + // RemoveResource(ctx context.Context, in *RemoveResourceIn, opts ...grpc.CallOption) (*RemoveResourceOut, error) +} diff --git a/apps/console/internal/domain/ports/infra-service.go b/apps/console/internal/domain/ports/infra-service.go new file mode 100644 index 000000000..c3ea80100 --- /dev/null +++ b/apps/console/internal/domain/ports/infra-service.go @@ -0,0 +1,20 @@ +package ports + +import "context" + +type InfraService interface { + EnsureGlobalVPNConnection(ctx context.Context, args EnsureGlobalVPNConnectionIn) error +} + +type EnsureGlobalVPNConnectionIn struct { + UserId string + UserEmail string + UserName string + + AccountName string + ClusterName string + GlobalVPNName string + + DispatchAddrAccountName string + DispatchAddrClusterName string +} diff --git a/apps/console/internal/domain/ports/resource-dispatch.go b/apps/console/internal/domain/ports/resource-dispatch.go new file mode 100644 index 000000000..4d5829d8c --- /dev/null +++ b/apps/console/internal/domain/ports/resource-dispatch.go @@ -0,0 +1,15 @@ +package ports + +// import ( +// "sigs.k8s.io/controller-runtime/pkg/client" +// ) +// +// type ResourceDispatcher interface { +// ApplyResource(ctx InfraContext, clusterName string, obj client.Object, recordVersion int) error +// DeleteResource(ctx InfraContext, clusterName string, obj client.Object) error +// RestartResource(ctx InfraContext, clusterName string, obj client.Object) error +// } +// +// type ResourceUpdatesReceiver interface { +// OnResourceUpdate(ctx InfraContext, clusterName string, obj client.Object, recordVersion int) error +// } diff --git a/apps/console/internal/domain/types/event-publisher.go b/apps/console/internal/domain/types/event-publisher.go new file mode 100644 index 000000000..508b61730 --- /dev/null +++ b/apps/console/internal/domain/types/event-publisher.go @@ -0,0 +1,18 @@ +package types + +import "github.com/kloudlite/api/apps/console/internal/entities" + +type PublishMsg string + +const ( + PublishAdd PublishMsg = "added" + PublishDelete PublishMsg = "deleted" + PublishUpdate PublishMsg = "updated" +) + +type ResourceEventPublisher interface { + PublishConsoleEvent(ctx ConsoleContext, resourceType entities.ResourceType, name string, update PublishMsg) + PublishEnvironmentResourceEvent(ctx ConsoleContext, envName string, resourceType entities.ResourceType, name string, update PublishMsg) + PublishResourceEvent(ctx ResourceContext, resourceType entities.ResourceType, name string, update PublishMsg) + PublishClusterManagedServiceEvent(ctx ConsoleContext, msvcName string, resourceType entities.ResourceType, name string, update PublishMsg) +} diff --git a/apps/console/internal/domain/types/types.go b/apps/console/internal/domain/types/types.go new file mode 100644 index 000000000..23bf37d34 --- /dev/null +++ b/apps/console/internal/domain/types/types.go @@ -0,0 +1,43 @@ +package types + +import ( + "context" + + "github.com/kloudlite/api/pkg/repos" +) + +type ConsoleContext struct { + context.Context + AccountName string + + UserId repos.ID + UserEmail string + UserName string +} + +func (c ConsoleContext) GetUserId() repos.ID { + return c.UserId +} + +func (c ConsoleContext) GetUserEmail() string { + return c.UserEmail +} + +func (c ConsoleContext) GetUserName() string { + return c.UserName +} + +func (c ConsoleContext) GetAccountName() string { + return c.AccountName +} + +type ResourceContext struct { + ConsoleContext + EnvironmentName string +} + +type ManagedResourceContext struct { + ConsoleContext + ManagedServiceName *string + EnvironmentName *string +} diff --git a/apps/console/internal/entities/environment.go b/apps/console/internal/entities/environment.go index d558970b4..291c7ad8b 100644 --- a/apps/console/internal/entities/environment.go +++ b/apps/console/internal/entities/environment.go @@ -22,7 +22,7 @@ type Environment struct { common.ResourceMetadata `json:",inline"` - SyncStatus t.SyncStatus `json:"syncStatus" graphql:"noinput"` + SyncStatus t.SyncStatus `json:"syncStatus" graphql:"noinput"` } func (e *Environment) GetDisplayName() string { diff --git a/apps/console/main.go b/apps/console/main.go index 66a5fdb6b..10fbee98d 100644 --- a/apps/console/main.go +++ b/apps/console/main.go @@ -3,7 +3,6 @@ package main import ( "context" "flag" - "log/slog" "os" "time" @@ -20,6 +19,9 @@ import ( ) func main() { + start := time.Now() + common.PrintBuildInfo() + var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") @@ -32,22 +34,15 @@ func main() { debug = true } - common.PrintBuildInfo() - logger := logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug, SetAsDefaultLogger: true}) - start := time.Now() - app := fx.New( - fx.StartTimeout(5*time.Second), fx.NopLogger, fx.Provide(func() (logging.Logger, error) { return logging.New(&logging.Options{Name: "console", ShowDebugLog: debug}) }), - fx.Provide(func() *slog.Logger { - return logger - }), + fx.Supply(logger), fx.Provide(func() (*env.Env, error) { if e, err := env.LoadEnv(); err != nil { @@ -59,7 +54,7 @@ func main() { }), fx.Provide(func(e *env.Env) (*rest.Config, error) { - if e.KubernetesApiProxy != "" { + if isDev && e.KubernetesApiProxy != "" { return &rest.Config{ Host: e.KubernetesApiProxy, }, nil @@ -71,9 +66,9 @@ func main() { ctx, cancelFunc := func() (context.Context, context.CancelFunc) { if isDev { - return context.WithTimeout(context.TODO(), 5*time.Second) + return context.WithTimeout(context.TODO(), 10*time.Second) } - return context.WithTimeout(context.TODO(), 10*time.Second) + return context.WithTimeout(context.TODO(), 5*time.Second) }() defer cancelFunc() From f3628f0a2e5450b8330edcff96ea188a2bf4484f Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Sat, 14 Sep 2024 02:30:49 +0530 Subject: [PATCH 52/89] feat(infra): adds support for gateway creation on kloudlite edge clusters --- apps/infra/Taskfile.yml | 6 + .../internal/app/adapter-resource-apply.go | 25 +- .../app/adapters/message-office-svc.go | 84 ++ apps/infra/internal/app/app.go | 19 +- apps/infra/internal/app/grpc-server.go | 36 +- .../internal/app/process-error-on-apply.go | 4 +- .../internal/app/process-resource-updates.go | 12 +- apps/infra/internal/domain/api.go | 3 +- apps/infra/internal/domain/byok-clusters.go | 2 +- apps/infra/internal/domain/clusters.go | 215 +++- apps/infra/internal/domain/domain.go | 59 +- .../domain/global-vpn-cluster-connection.go | 66 +- .../internal/domain/global-vpn-devices.go | 2 +- apps/infra/internal/domain/global-vpn.go | 2 +- apps/infra/internal/domain/helm-release.go | 12 +- apps/infra/internal/domain/nodepool.go | 14 +- apps/infra/internal/domain/ports.go | 6 +- .../domain/ports/message-office-svc.go | 38 + apps/infra/internal/domain/pv.go | 2 +- apps/infra/internal/domain/templates/types.go | 16 +- .../field-constants/generated_constants.go | 63 +- .../entities/global-vpn-connection.go | 24 +- apps/infra/internal/entities/helm-release.go | 2 + apps/infra/internal/entities/nodepool.go | 2 + apps/infra/internal/framework/framework.go | 3 +- apps/infra/main.go | 27 +- apps/infra/protobufs/infra.proto | 87 ++ apps/infra/protobufs/infra/infra.pb.go | 1060 +++++++++++++++++ apps/infra/protobufs/infra/infra_grpc.pb.go | 294 +++++ 29 files changed, 2025 insertions(+), 160 deletions(-) create mode 100644 apps/infra/internal/app/adapters/message-office-svc.go create mode 100644 apps/infra/internal/domain/ports/message-office-svc.go create mode 100644 apps/infra/protobufs/infra.proto create mode 100644 apps/infra/protobufs/infra/infra.pb.go create mode 100644 apps/infra/protobufs/infra/infra_grpc.pb.go diff --git a/apps/infra/Taskfile.yml b/apps/infra/Taskfile.yml index f06c4d83f..c16798cd5 100644 --- a/apps/infra/Taskfile.yml +++ b/apps/infra/Taskfile.yml @@ -15,6 +15,11 @@ tasks: - go run github.com/99designs/gqlgen generate - gofmt -w -d -r '"errors" -> "github.com/kloudlite/api/pkg/errors"' graph/*.resolvers.go + protobufs: + dir: ./protobufs/ + cmds: + - protoc --go_out=. --go-grpc_out=. --go_opt=paths=import --go-grpc_opt=paths=import ./*.proto + k8s-schema: cmds: - mkdir -p "./internal/app/_struct-to-graphql" @@ -56,6 +61,7 @@ tasks: build: cmds: + - task: protobufs - task: gen:constants - task: go:build vars: diff --git a/apps/infra/internal/app/adapter-resource-apply.go b/apps/infra/internal/app/adapter-resource-apply.go index 228cb632a..9e6660eef 100644 --- a/apps/infra/internal/app/adapter-resource-apply.go +++ b/apps/infra/internal/app/adapter-resource-apply.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/kloudlite/api/apps/infra/internal/domain" + "github.com/kloudlite/api/apps/infra/internal/entities" t "github.com/kloudlite/api/apps/tenant-agent/types" "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/errors" @@ -27,7 +28,7 @@ func NewResourceDispatcher(producer SendTargetClusterMessagesProducer) domain.Re } } -func (a *resourceDispatcherImpl) ApplyToTargetCluster(ctx domain.InfraContext, clusterName string, obj client.Object, recordVersion int) error { +func (a *resourceDispatcherImpl) ApplyToTargetCluster(ctx domain.InfraContext, dispatchAddr *entities.DispatchAddr, obj client.Object, recordVersion int) error { ann := obj.GetAnnotations() if ann == nil { ann = make(map[string]string, 1) @@ -40,9 +41,15 @@ func (a *resourceDispatcherImpl) ApplyToTargetCluster(ctx domain.InfraContext, c return errors.NewE(err) } + lb := obj.GetLabels() + if lb == nil { + lb = make(map[string]string, 1) + } + lb[constants.AccountNameKey] = ctx.AccountName + obj.SetLabels(lb) + b, err := json.Marshal(t.AgentMessage{ AccountName: ctx.AccountName, - ClusterName: clusterName, Action: t.ActionApply, Object: m, }) @@ -51,22 +58,28 @@ func (a *resourceDispatcherImpl) ApplyToTargetCluster(ctx domain.InfraContext, c } err = a.producer.Produce(ctx, msgTypes.ProduceMsg{ - Subject: common.SendToAgentSubjectName(ctx.AccountName, clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()), + Subject: common.SendToAgentSubjectName(dispatchAddr.AccountName, dispatchAddr.ClusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()), Payload: b, }) return errors.NewE(err) } -func (d *resourceDispatcherImpl) DeleteFromTargetCluster(ctx domain.InfraContext, clusterName string, obj client.Object) error { +func (d *resourceDispatcherImpl) DeleteFromTargetCluster(ctx domain.InfraContext, dispatchAddr *entities.DispatchAddr, obj client.Object) error { m, err := fn.K8sObjToMap(obj) if err != nil { return errors.NewE(err) } + lb := obj.GetLabels() + if lb == nil { + lb = make(map[string]string, 1) + } + lb[constants.AccountNameKey] = ctx.AccountName + obj.SetLabels(lb) + b, err := json.Marshal(t.AgentMessage{ AccountName: ctx.AccountName, - ClusterName: clusterName, Action: t.ActionDelete, Object: m, }) @@ -75,7 +88,7 @@ func (d *resourceDispatcherImpl) DeleteFromTargetCluster(ctx domain.InfraContext } err = d.producer.Produce(ctx, msgTypes.ProduceMsg{ - Subject: common.SendToAgentSubjectName(ctx.AccountName, clusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()), + Subject: common.SendToAgentSubjectName(dispatchAddr.AccountName, dispatchAddr.ClusterName, obj.GetObjectKind().GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()), Payload: b, }) diff --git a/apps/infra/internal/app/adapters/message-office-svc.go b/apps/infra/internal/app/adapters/message-office-svc.go new file mode 100644 index 000000000..357c0306f --- /dev/null +++ b/apps/infra/internal/app/adapters/message-office-svc.go @@ -0,0 +1,84 @@ +package adapters + +import ( + "context" + + "github.com/kloudlite/api/apps/infra/internal/domain/ports" + cluster_token "github.com/kloudlite/api/apps/message-office/protobufs/cluster-token" + platform_edge "github.com/kloudlite/api/apps/message-office/protobufs/platform-edge" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/grpc" + "go.uber.org/fx" +) + +type MesasageOfficeGRPCClient grpc.Client + +type MessageOfficeService struct { + clusterTokenClient cluster_token.ClusterTokenClient + platformEdgeClient platform_edge.PlatformEdgeClient +} + +// GenerateClusterToken implements ports.MessageOfficeService. +func (m *MessageOfficeService) GenerateClusterToken(ctx context.Context, in *ports.GenerateClusterTokenIn) (*ports.GenerateClusterTokenOut, error) { + tout, err := m.clusterTokenClient.GenerateClusterToken(ctx, &cluster_token.GenerateClusterTokenIn{ + AccountName: in.AccountName, + ClusterName: in.ClusterName, + }) + if err != nil { + return nil, errors.NewE(err) + } + + return &ports.GenerateClusterTokenOut{ClusterToken: tout.ClusterToken}, nil +} + +// GetAllocatedPlatformEdgeCluster implements ports.MessageOfficeService. +func (m *MessageOfficeService) GetAllocatedPlatformEdgeCluster(ctx context.Context, args *ports.GetAllocatedPlatformEdgeClusterIn) (*ports.GetAllocatedPlatformEdgeClusterOut, error) { + out, err := m.platformEdgeClient.GetAllocatedPlatformEdgeCluster(ctx, &platform_edge.GetAllocatedPlatformEdgeClusterIn{ + AccountName: args.AccountName, + ClusterName: args.ClusterName, + }) + if err != nil { + return nil, err + } + + return &ports.GetAllocatedPlatformEdgeClusterOut{ + PublicDNSHost: out.GetPublicDnsHost(), + }, nil +} + +// GetClusterToken implements ports.MessageOfficeService. +func (m *MessageOfficeService) GetClusterToken(ctx context.Context, in *ports.GetClusterTokenIn) (*ports.GetClusterTokenOut, error) { + tout, err := m.clusterTokenClient.GetClusterToken(ctx, &cluster_token.GetClusterTokenIn{ + AccountName: in.AccountName, + ClusterName: in.ClusterName, + }) + if err != nil { + return nil, errors.NewE(err) + } + + return &ports.GetClusterTokenOut{ClusterToken: tout.ClusterToken}, nil +} + +var _ ports.MessageOfficeService = (*MessageOfficeService)(nil) + +func NewMessageOfficeService(client MesasageOfficeGRPCClient) ports.MessageOfficeService { + return &MessageOfficeService{ + clusterTokenClient: cluster_token.NewClusterTokenClient(client), + platformEdgeClient: platform_edge.NewPlatformEdgeClient(client), + } +} + +func FxNewMessageOfficeService() fx.Option { + return fx.Module("message_office_service", + fx.Provide(func(client MesasageOfficeGRPCClient) ports.MessageOfficeService { + return NewMessageOfficeService(client) + }), + fx.Invoke(func(lf fx.Lifecycle, client MesasageOfficeGRPCClient) { + lf.Append(fx.Hook{ + OnStop: func(ctx context.Context) error { + return client.Close() + }, + }) + }), + ) +} diff --git a/apps/infra/internal/app/app.go b/apps/infra/internal/app/app.go index b9a405537..039210b57 100644 --- a/apps/infra/internal/app/app.go +++ b/apps/infra/internal/app/app.go @@ -11,16 +11,16 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/gofiber/fiber/v2" + "github.com/kloudlite/api/apps/infra/internal/app/adapters" "github.com/kloudlite/api/apps/infra/internal/app/graph" "github.com/kloudlite/api/apps/infra/internal/app/graph/generated" "github.com/kloudlite/api/apps/infra/internal/domain" "github.com/kloudlite/api/apps/infra/internal/env" + "github.com/kloudlite/api/apps/infra/protobufs/infra" "github.com/kloudlite/api/common" "github.com/kloudlite/api/constants" - "github.com/kloudlite/api/grpc-interfaces/infra" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/accounts" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" - message_office_internal "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/message-office-internal" "github.com/kloudlite/api/pkg/grpc" httpServer "github.com/kloudlite/api/pkg/http-server" "github.com/kloudlite/api/pkg/k8s" @@ -35,10 +35,9 @@ import ( type AuthCacheClient kv.Client type ( - IAMGrpcClient grpc.Client - AccountGrpcClient grpc.Client - MessageOfficeInternalGrpcClient grpc.Client - ConsoleGrpcClient grpc.Client + IAMGrpcClient grpc.Client + AccountGrpcClient grpc.Client + ConsoleGrpcClient grpc.Client ) type ( @@ -82,9 +81,7 @@ var Module = fx.Module( return NewAccountsSvc(ac), nil }), - fx.Provide(func(client MessageOfficeInternalGrpcClient) message_office_internal.MessageOfficeInternalClient { - return message_office_internal.NewMessageOfficeInternalClient(client) - }), + adapters.FxNewMessageOfficeService(), fx.Provide( func(conn ConsoleGrpcClient) console.ConsoleClient { @@ -114,8 +111,8 @@ var Module = fx.Module( domain.Module, - fx.Provide(func(d domain.Domain, kcli k8s.Client) infra.InfraServer { - return newGrpcServer(d, kcli) + fx.Provide(func(d domain.Domain, kcli k8s.Client, logger *slog.Logger) infra.InfraServer { + return newGrpcServer(d, kcli, logger) }), fx.Invoke(func(gserver InfraGrpcServer, srv infra.InfraServer) { diff --git a/apps/infra/internal/app/grpc-server.go b/apps/infra/internal/app/grpc-server.go index ef9dca763..73395dc88 100644 --- a/apps/infra/internal/app/grpc-server.go +++ b/apps/infra/internal/app/grpc-server.go @@ -2,11 +2,14 @@ package app import ( "context" + "log/slog" "github.com/kloudlite/api/apps/infra/internal/domain" - "github.com/kloudlite/api/grpc-interfaces/infra" + "github.com/kloudlite/api/apps/infra/internal/entities" + "github.com/kloudlite/api/apps/infra/protobufs/infra" "github.com/kloudlite/api/pkg/errors" fn "github.com/kloudlite/api/pkg/functions" + "github.com/kloudlite/api/pkg/grpc" "github.com/kloudlite/api/pkg/k8s" "github.com/kloudlite/api/pkg/repos" corev1 "k8s.io/api/core/v1" @@ -15,7 +18,29 @@ import ( type grpcServer struct { d domain.Domain infra.UnimplementedInfraServer - kcli k8s.Client + kcli k8s.Client + logger *slog.Logger +} + +// EnsureGlobalVPNConnection implements infra.InfraServer. +func (g *grpcServer) EnsureGlobalVPNConnection(ctx context.Context, in *infra.EnsureGlobalVPNConnectionIn) (*infra.EnsureGlobalVPNConnectionOut, error) { + l := grpc.NewRequestLogger(g.logger, "EnsureGlobalVPNConnection") + defer l.End() + _, err := g.d.EnsureGlobalVPNConnection(domain.InfraContext{ + Context: ctx, + UserId: repos.ID(in.UserId), + UserEmail: in.UserEmail, + UserName: in.UserName, + AccountName: in.AccountName, + }, in.ClusterName, in.GlobalVPNName, &entities.DispatchAddr{ + AccountName: in.DispatchAddr_AccountName, + ClusterName: in.DispatchAddr_ClusterName, + }) + if err != nil { + return nil, errors.NewE(err) + } + + return &infra.EnsureGlobalVPNConnectionOut{}, nil } // GetClusterKubeconfig implements infra.InfraServer. @@ -138,9 +163,10 @@ func (g *grpcServer) MarkClusterOnlineAt(ctx context.Context, in *infra.MarkClus return &infra.MarkClusterOnlineAtOut{}, nil } -func newGrpcServer(d domain.Domain, kcli k8s.Client) infra.InfraServer { +func newGrpcServer(d domain.Domain, kcli k8s.Client, logger *slog.Logger) infra.InfraServer { return &grpcServer{ - d: d, - kcli: kcli, + d: d, + kcli: kcli, + logger: logger, } } diff --git a/apps/infra/internal/app/process-error-on-apply.go b/apps/infra/internal/app/process-error-on-apply.go index 43d85a050..51a55e8c1 100644 --- a/apps/infra/internal/app/process-error-on-apply.go +++ b/apps/infra/internal/app/process-error-on-apply.go @@ -53,7 +53,7 @@ func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, logger *slog.Logger, d d "GVK", gvkStr, "NN", fmt.Sprintf("%s/%s", obj.GetNamespace(), obj.GetName()), "account", errObj.AccountName, - "cluster", errObj.ClusterName, + "cluster", em.ClusterName, ) if len(strings.TrimSpace(errObj.AccountName)) == 0 { @@ -61,7 +61,7 @@ func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, logger *slog.Logger, d d return nil } - if len(strings.TrimSpace(errObj.ClusterName)) == 0 { + if len(strings.TrimSpace(em.ClusterName)) == 0 { mlogger.Warn("message does not contain 'clusterName', so won't be able to find a resource uniquely, thus ignoring ...") return nil } diff --git a/apps/infra/internal/app/process-resource-updates.go b/apps/infra/internal/app/process-resource-updates.go index 351d40abd..01631df1d 100644 --- a/apps/infra/internal/app/process-resource-updates.go +++ b/apps/infra/internal/app/process-resource-updates.go @@ -9,6 +9,7 @@ import ( "sync" "time" + "github.com/kloudlite/api/constants" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/apps/infra/internal/domain" @@ -88,8 +89,6 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do return nil } - dctx := domain.InfraContext{Context: context.TODO(), UserId: "sys-user-process-infra-updates", AccountName: ru.AccountName} - obj := su.Object gvkStr := obj.GetObjectKind().GroupVersionKind().String() @@ -110,6 +109,13 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do return nil } + dctx := domain.InfraContext{Context: context.TODO(), UserId: "sys-user-process-infra-updates", AccountName: ru.AccountName} + + if strings.HasPrefix(ru.AccountName, "kl-") { + // FIXME: this is a kloudlite account, so we should handle it differently, as it is definitely not a tenant account + dctx.AccountName = obj.GetLabels()[constants.AccountNameKey] + } + mlogger.Debug("validated message") defer func() { mlogger.Info("PROCESSED message", "took", fmt.Sprintf("%dms", time.Since(start).Milliseconds())) @@ -162,7 +168,7 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do if resStatus == types.ResourceStatusDeleted { return d.OnGlobalVPNConnectionDeleteMessage(dctx, ru.ClusterName, gvpn) } - return d.OnGlobalVPNConnectionUpdateMessage(dctx, ru.ClusterName, gvpn, resStatus, domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp}) + return d.OnGlobalVPNConnectionUpdateMessage(dctx, entities.DispatchAddr{AccountName: ru.AccountName, ClusterName: ru.ClusterName}, gvpn, resStatus, domain.UpdateAndDeleteOpts{MessageTimestamp: msg.Timestamp}) } case nodepoolGVK.String(): diff --git a/apps/infra/internal/domain/api.go b/apps/infra/internal/domain/api.go index 9279f1828..4dc22ba41 100644 --- a/apps/infra/internal/domain/api.go +++ b/apps/infra/internal/domain/api.go @@ -122,9 +122,10 @@ type Domain interface { OnNodepoolApplyError(ctx InfraContext, clusterName string, name string, errMsg string, opts UpdateAndDeleteOpts) error // ListGlobalVPNs(ctx InfraContext, clusterName string) (*entities.GlobalVPNConnection, error) + EnsureGlobalVPNConnection(ctx InfraContext, clusterName string, groupName string, dispatchAddr *entities.DispatchAddr) (*entities.GlobalVPNConnection, error) OnGlobalVPNConnectionDeleteMessage(ctx InfraContext, clusterName string, clusterConn entities.GlobalVPNConnection) error - OnGlobalVPNConnectionUpdateMessage(ctx InfraContext, clusterName string, clusterConn entities.GlobalVPNConnection, status types.ResourceStatus, opts UpdateAndDeleteOpts) error + OnGlobalVPNConnectionUpdateMessage(ctx InfraContext, dispatchAddr entities.DispatchAddr, clusterConn entities.GlobalVPNConnection, status types.ResourceStatus, opts UpdateAndDeleteOpts) error OnGlobalVPNConnectionApplyError(ctx InfraContext, clusterName string, name string, errMsg string, opts UpdateAndDeleteOpts) error ListNodes(ctx InfraContext, clusterName string, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.Node], error) diff --git a/apps/infra/internal/domain/byok-clusters.go b/apps/infra/internal/domain/byok-clusters.go index 32383757e..83575b958 100644 --- a/apps/infra/internal/domain/byok-clusters.go +++ b/apps/infra/internal/domain/byok-clusters.go @@ -82,7 +82,7 @@ func (d *domain) CreateBYOKCluster(ctx InfraContext, cluster entities.BYOKCluste cluster.MessageQueueTopicName = common.SendToAgentSubjectPrefix(ctx.AccountName, cluster.Name) - gvpnConn, err := d.ensureGlobalVPNConnection(ctx, cluster.Name, cluster.GlobalVPN) + gvpnConn, err := d.ensureGlobalVPNConnection(ctx, cluster.Name, cluster.GlobalVPN, nil) if err != nil { return nil, errors.NewE(err) } diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 18527d2cb..30d42f9b2 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -9,12 +9,12 @@ import ( "time" iamT "github.com/kloudlite/api/apps/iam/types" + "github.com/kloudlite/api/apps/infra/internal/domain/ports" "github.com/kloudlite/api/apps/infra/internal/domain/templates" fc "github.com/kloudlite/api/apps/infra/internal/entities/field-constants" "github.com/kloudlite/api/common" "github.com/kloudlite/api/common/fields" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/console" - message_office_internal "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/message-office-internal" ct "github.com/kloudlite/operator/apis/common-types" "github.com/kloudlite/operator/operators/resource-watcher/types" "github.com/kloudlite/operator/pkg/kubectl" @@ -55,7 +55,7 @@ const ( ) func (d *domain) generateClusterToken(ctx InfraContext, clusterName string) (string, error) { - tout, err := d.messageOfficeInternalClient.GenerateClusterToken(ctx, &message_office_internal.GenerateClusterTokenIn{ + tout, err := d.moSvc.GenerateClusterToken(ctx, &ports.GenerateClusterTokenIn{ AccountName: ctx.AccountName, ClusterName: clusterName, }) @@ -343,7 +343,7 @@ func (d *domain) CreateCluster(ctx InfraContext, cluster entities.Cluster) (*ent cluster.SyncStatus = t.GenSyncStatus(t.SyncActionApply, 0) // FIXME: removing public DNS host for now - gvpnConn, err := d.ensureGlobalVPNConnection(ctx, cluster.Name, *cluster.GlobalVPN) + gvpnConn, err := d.ensureGlobalVPNConnection(ctx, cluster.Name, *cluster.GlobalVPN, nil) if err != nil { return nil, errors.NewE(err) } @@ -378,7 +378,191 @@ func (d *domain) CreateCluster(ctx InfraContext, cluster entities.Cluster) (*ent func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) error { t := time.Now() defer func() { - d.logger.Infof("syncKloudliteGatewayDevice took %.2fs", time.Since(t).Seconds()) + d.logger.Info("syncKloudliteGatewayDevice", "took", fmt.Sprintf("%.2fs", time.Since(t).Seconds())) + }() + // 1. parse deployment template + b, err := templates.Read(templates.GlobalVPNKloudliteDeviceTemplate) + if err != nil { + return errors.NewE(err) + } + + svcTemplate, err := templates.Read(templates.GatewayServiceTemplate) + if err != nil { + return errors.NewE(err) + } + + accNs := fmt.Sprintf("kl-%s", ctx.AccountName) + + // accNs, err := d.getAccNamespace(ctx) + // if err != nil { + // return errors.NewE(err) + // } + + gv, err := d.findGlobalVPN(ctx, gvpnName) + if err != nil { + return err + } + + if gv.KloudliteGatewayDevice.Name == "" { + return nil + } + + gvpnConns, err := d.listGlobalVPNConnections(ctx, gvpnName) + if err != nil { + return err + } + + klDevice, err := d.findGlobalVPNDevice(ctx, gvpnName, gv.KloudliteGatewayDevice.Name) + if err != nil { + return err + } + + clDevice, err := d.findGlobalVPNDevice(ctx, gvpnName, gv.KloudliteClusterLocalDevice.Name) + if err != nil { + return err + } + + wgParams, deviceHosts, err := d.buildGlobalVPNDeviceWgBaseParams(ctx, gvpnConns, klDevice) + if err != nil { + return err + } + + publicPeers := make([]wgutils.PublicPeer, 0, len(wgParams.PublicPeers)) + for _, p := range wgParams.PublicPeers { + if p.PublicKey != clDevice.PublicKey { + publicPeers = append(publicPeers, p) + } + } + + deviceSvcHosts := make([]string, 0, len(deviceHosts)) + for k, v := range deviceHosts { + deviceSvcHosts = append(deviceSvcHosts, fmt.Sprintf("%s=%s", k, v)) + } + + wgParams.PublicPeers = publicPeers + wgParams.DNS = klDevice.IPAddr + wgParams.ListenPort = 31820 + + dnsServerArgs := make([]string, 0, len(gvpnConns)) + for _, gvpnConn := range gvpnConns { + if gvpnConn.Spec.GlobalIP != "" { + dnsServerArgs = append(dnsServerArgs, fmt.Sprintf("%s=%s:53", gvpnConn.Spec.DNSSuffix, gvpnConn.Spec.GlobalIP)) + } + } + + resourceName := fmt.Sprintf("kloudlite-device-%s", gv.Name) + resourceNamespace := accNs + selector := map[string]string{ + "app": resourceName, + } + + // wgEndpoint := d.env.KloudliteGlobalVPNDeviceHost + + gao, err := d.accountsSvc.GetAccount(ctx, string(ctx.UserId), ctx.AccountName) + if err != nil { + return errors.NewE(err) + } + + gwRegion, ok := d.env.AvailableKloudliteRegions[gao.KloudliteGatewayRegion] + if !ok { + return errors.Newf("invalid gateway region %q", gao.KloudliteGatewayRegion) + } + + wgEndpoint := gwRegion.PublicDNSHost + + c, err := k8s.RestConfigFromKubeConfig([]byte(gwRegion.Kubeconfig)) + if err != nil { + return errors.NewE(err) + } + + yc, err := kubectl.NewYAMLClient(c, kubectl.YAMLClientOpts{}) + if err != nil { + return errors.NewE(err) + } + + service := &corev1.Service{} + + wgSvcName := fmt.Sprintf("%s-wg", resourceName) + + svcBytes, err := templates.ParseBytes(svcTemplate, templates.GatewayServiceTemplateVars{ + Name: wgSvcName, + Namespace: resourceNamespace, + WireguardPort: wgParams.ListenPort, + Selector: selector, + }) + if err != nil { + return errors.NewE(err) + } + + ctx2, cf := func() (context.Context, context.CancelFunc) { + if d.env.IsDev { + return context.WithCancel(ctx) + } + return context.WithTimeout(ctx, 5*time.Second) + }() + defer cf() + + for { + if ctx2.Err() != nil { + return ctx2.Err() + } + service, err = yc.Client().CoreV1().Services(resourceNamespace).Get(ctx, wgSvcName, metav1.GetOptions{}) + if err != nil { + if !apiErrors.IsNotFound(err) { + return err + } + if _, err := yc.ApplyYAML(ctx, svcBytes); err != nil { + return errors.NewE(err) + } + continue + } + + if service.Spec.Ports[0].NodePort != 0 { + wgEndpoint = fmt.Sprintf("%s:%d", wgEndpoint, service.Spec.Ports[0].NodePort) + break + } + } + + if _, err := d.gvpnDevicesRepo.PatchById(ctx, klDevice.Id, repos.Document{ + fc.GlobalVPNDevicePublicEndpoint: wgEndpoint, + }); err != nil { + return err + } + + wgConfig, err := wgutils.GenerateWireguardConfig(*wgParams) + if err != nil { + return err + } + + deploymentBytes, err := templates.ParseBytes(b, templates.GVPNKloudliteDeviceTemplateVars{ + Name: resourceName, + Namespace: accNs, + WgConfig: wgConfig, + EnableKubeReverseProxy: false, + KubeReverseProxyImage: d.env.GlobalVPNKubeReverseProxyImage, + AuthzToken: d.env.GlobalVPNKubeReverseProxyAuthzToken, + GatewayDNSServers: strings.Join(dnsServerArgs, ","), + GatewayServiceHosts: strings.Join(deviceSvcHosts, ","), + WireguardPort: wgParams.ListenPort, + + KloudliteAccount: gv.AccountName, + }) + if err != nil { + return err + } + + d.logger.Info("applying yaml", "yaml", string(deploymentBytes)) + if _, err := yc.ApplyYAML(ctx, deploymentBytes); err != nil { + return errors.NewE(err) + } + + return nil +} + +func (d *domain) syncKloudliteGatewayDevice2(ctx InfraContext, gvpnName string) error { + t := time.Now() + defer func() { + d.logger.Info("syncKloudliteGatewayDevice2", "took", time.Since(t).Seconds()) }() // 1. parse deployment template b, err := templates.Read(templates.GlobalVPNKloudliteDeviceTemplate) @@ -454,8 +638,6 @@ func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) e "app": resourceName, } - // wgEndpoint := d.env.KloudliteGlobalVPNDeviceHost - gao, err := d.accountsSvc.GetAccount(ctx, string(ctx.UserId), ctx.AccountName) if err != nil { return errors.NewE(err) @@ -574,10 +756,12 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string return errors.NewE(err) } - accNs, err := d.getAccNamespace(ctx) - if err != nil { - return errors.NewE(err) - } + accNs := fmt.Sprintf("kl-%s", ctx.AccountName) + + // accNs, err := d.getAccNamespace(ctx) + // if err != nil { + // return errors.NewE(err) + // } gv, err := d.findGlobalVPN(ctx, gvpnName) if err != nil { @@ -639,7 +823,12 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string } service := &corev1.Service{} - ctx2, cf := context.WithTimeout(ctx, 5*time.Second) + ctx2, cf := func() (context.Context, context.CancelFunc) { + if d.env.IsDev { + return context.WithCancel(ctx) + } + return context.WithTimeout(ctx, 5*time.Second) + }() defer cf() wgEndpoint := d.env.KloudliteGlobalVPNDeviceHost @@ -792,7 +981,7 @@ func (d *domain) applyHelmKloudliteAgent(ctx InfraContext, clusterToken string, return errors.NewE(err) } - if err := d.resDispatcher.ApplyToTargetCluster(ctx, cluster.Name, &uhr.HelmChart, uhr.RecordVersion); err != nil { + if err := d.resDispatcher.ApplyToTargetCluster(ctx, &entities.DispatchAddr{AccountName: ctx.AccountName, ClusterName: cluster.Name}, &uhr.HelmChart, uhr.RecordVersion); err != nil { return errors.NewE(err) } @@ -800,7 +989,7 @@ func (d *domain) applyHelmKloudliteAgent(ctx InfraContext, clusterToken string, } func (d *domain) UpgradeHelmKloudliteAgent(ctx InfraContext, clusterName string) error { - out, err := d.messageOfficeInternalClient.GetClusterToken(ctx, &message_office_internal.GetClusterTokenIn{ + out, err := d.moSvc.GetClusterToken(ctx, &ports.GetClusterTokenIn{ AccountName: ctx.AccountName, ClusterName: clusterName, }) diff --git a/apps/infra/internal/domain/domain.go b/apps/infra/internal/domain/domain.go index 7129e3a82..ee6393fc6 100644 --- a/apps/infra/internal/domain/domain.go +++ b/apps/infra/internal/domain/domain.go @@ -3,6 +3,7 @@ package domain import ( "fmt" "io" + "log/slog" "os" "strconv" @@ -13,14 +14,14 @@ import ( "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/pkg/k8s" + "github.com/kloudlite/api/apps/infra/internal/domain/ports" "github.com/kloudlite/api/apps/infra/internal/entities" "github.com/kloudlite/api/apps/infra/internal/env" constant "github.com/kloudlite/api/constants" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" - message_office_internal "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/message-office-internal" + fn "github.com/kloudlite/api/pkg/functions" - "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/api/pkg/repos" "github.com/kloudlite/operator/pkg/constants" "go.uber.org/fx" @@ -30,7 +31,7 @@ import ( ) type domain struct { - logger logging.Logger + logger *slog.Logger env *env.Env clusterRepo repos.DbRepo[*entities.Cluster] @@ -56,24 +57,24 @@ type domain struct { pvRepo repos.DbRepo[*entities.PersistentVolume] volumeAttachmentRepo repos.DbRepo[*entities.VolumeAttachment] - iamClient iam.IAMClient - consoleClient console.ConsoleClient - accountsSvc AccountsSvc - messageOfficeInternalClient message_office_internal.MessageOfficeInternalClient - resDispatcher ResourceDispatcher - k8sClient k8s.Client - resourceEventPublisher ResourceEventPublisher + iamClient iam.IAMClient + consoleClient console.ConsoleClient + accountsSvc AccountsSvc + moSvc ports.MessageOfficeService + resDispatcher ResourceDispatcher + k8sClient k8s.Client + resourceEventPublisher ResourceEventPublisher msvcTemplates []*entities.MsvcTemplate msvcTemplatesMap map[string]map[string]*entities.MsvcTemplateEntry } -func (d *domain) resyncToTargetCluster(ctx InfraContext, action types.SyncAction, clusterName string, obj client.Object, recordVersion int) error { +func (d *domain) resyncToTargetCluster(ctx InfraContext, action types.SyncAction, dispatchAddr *entities.DispatchAddr, obj client.Object, recordVersion int) error { switch action { case types.SyncActionApply: - return d.resDispatcher.ApplyToTargetCluster(ctx, clusterName, obj, recordVersion) + return d.resDispatcher.ApplyToTargetCluster(ctx, dispatchAddr, obj, recordVersion) case types.SyncActionDelete: - return d.resDispatcher.DeleteFromTargetCluster(ctx, clusterName, obj) + return d.resDispatcher.DeleteFromTargetCluster(ctx, dispatchAddr, obj) } return errors.Newf("unknonw action: %q", action) } @@ -87,7 +88,7 @@ func addTrackingId(obj client.Object, id repos.ID) { labels := obj.GetLabels() if labels == nil { - labels = make(map[string]string, 1) + labels = make(map[string]string, 2) } labels[constant.ObservabilityTrackingKey] = string(id) obj.SetLabels(labels) @@ -198,8 +199,8 @@ var Module = fx.Module("domain", iamClient iam.IAMClient, consoleClient console.ConsoleClient, accountsSvc AccountsSvc, - msgOfficeInternalClient message_office_internal.MessageOfficeInternalClient, - logger logging.Logger, + moSvc ports.MessageOfficeService, + logger *slog.Logger, resourceEventPublisher ResourceEventPublisher, ) (Domain, error) { open, err := os.Open(env.MsvcTemplateFilePath) @@ -246,19 +247,19 @@ var Module = fx.Module("domain", gvpnRepo: gvpnRepo, gvpnDevicesRepo: gvpnDevicesRepo, - byokClusterRepo: byokClusterRepo, - nodeRepo: nodeRepo, - nodePoolRepo: nodePoolRepo, - secretRepo: secretRepo, - domainEntryRepo: domainNameRepo, - resDispatcher: resourceDispatcher, - k8sClient: k8sClient, - iamClient: iamClient, - consoleClient: consoleClient, - accountsSvc: accountsSvc, - messageOfficeInternalClient: msgOfficeInternalClient, - resourceEventPublisher: resourceEventPublisher, - helmReleaseRepo: helmReleaseRepo, + byokClusterRepo: byokClusterRepo, + nodeRepo: nodeRepo, + nodePoolRepo: nodePoolRepo, + secretRepo: secretRepo, + domainEntryRepo: domainNameRepo, + resDispatcher: resourceDispatcher, + k8sClient: k8sClient, + iamClient: iamClient, + consoleClient: consoleClient, + accountsSvc: accountsSvc, + moSvc: moSvc, + resourceEventPublisher: resourceEventPublisher, + helmReleaseRepo: helmReleaseRepo, pvcRepo: pvcRepo, volumeAttachmentRepo: volumeAttachmentRepo, diff --git a/apps/infra/internal/domain/global-vpn-cluster-connection.go b/apps/infra/internal/domain/global-vpn-cluster-connection.go index 3c43d6105..6b3a4935c 100644 --- a/apps/infra/internal/domain/global-vpn-cluster-connection.go +++ b/apps/infra/internal/domain/global-vpn-cluster-connection.go @@ -66,7 +66,7 @@ func (d *domain) getGlobalVPNConnectionPeers(args getGlobalVPNConnectionPeersArg if c.Visibility.Mode != entities.ClusterVisibilityModePrivate { if c.Spec.LoadBalancer == nil { - d.logger.Infof("loadbalancer not available for gvpn %s", c.Name) + d.logger.Info("loadbalancer not available", "gvpn", c.Name) continue } @@ -228,6 +228,7 @@ func (d *domain) claimNextClusterCIDR(ctx InfraContext, clusterName string, gvpn // FIXME: handle gracefully continue } + if _, err := d.gvpnRepo.PatchById(ctx, gvpn.Id, repos.Document{"$inc": map[string]any{fc.GlobalVPNNumAllocatedClusterCIDRs: 1}}); err != nil { continue } @@ -255,7 +256,7 @@ func (d *domain) claimNextClusterCIDR(ctx InfraContext, clusterName string, gvpn ClusterSvcCIDR: cidr, ClaimedByCluster: clusterName, }); err != nil { - d.logger.Warnf("cluster svc CIDR %s, already claimed, trying another", cidr) + d.logger.Warn("cluster svc CIDR, already claimed, trying another", "CIDR", cidr) if cidrFilter == nil { cidrFilter = &repos.MatchFilter{} } @@ -281,9 +282,12 @@ func (d *domain) createGlobalVPNConnection(ctx InfraContext, gvpnConn entities.G return nil, err } - // if gvpnConn.Spec.WgInterface == nil { - // gvpnConn.Spec.WgInterface = &gvpn.WgInterface - // } + if gvpnConn.DispatchAddr == nil { + gvpnConn.DispatchAddr = &entities.DispatchAddr{ + AccountName: ctx.AccountName, + ClusterName: gvpnConn.ClusterName, + } + } gvpnConn.SyncStatus = t.GenSyncStatus(t.SyncActionApply, 0) @@ -385,7 +389,11 @@ func (d *domain) deleteGlobalVPNConnection(ctx InfraContext, clusterName string, return nil } -func (d *domain) ensureGlobalVPNConnection(ctx InfraContext, clusterName string, groupName string) (*entities.GlobalVPNConnection, error) { +func (d *domain) EnsureGlobalVPNConnection(ctx InfraContext, clusterName string, groupName string, dispatchAddr *entities.DispatchAddr) (*entities.GlobalVPNConnection, error) { + return d.ensureGlobalVPNConnection(ctx, clusterName, groupName, dispatchAddr) +} + +func (d *domain) ensureGlobalVPNConnection(ctx InfraContext, clusterName string, groupName string, dispatchAddr *entities.DispatchAddr) (*entities.GlobalVPNConnection, error) { gvpnConn, err := d.gvpnConnRepo.FindOne(ctx, repos.Filter{ fields.AccountName: ctx.AccountName, fields.ClusterName: clusterName, @@ -402,7 +410,11 @@ func (d *domain) ensureGlobalVPNConnection(ctx InfraContext, clusterName string, return gvpnConn, nil } - gvpnGateway := networkingv1.Gateway{ObjectMeta: metav1.ObjectMeta{Name: groupName}} + gvpnGateway := networkingv1.Gateway{ObjectMeta: metav1.ObjectMeta{ + Name: groupName, + // Name: fmt.Sprintf("%s-%s", ctx.AccountName, groupName), + // Name: fmt.Sprintf("%s-%s", ctx.AccountName, groupName), + }} gvpnGateway.EnsureGVK() return d.createGlobalVPNConnection(ctx, entities.GlobalVPNConnection{ @@ -411,12 +423,13 @@ func (d *domain) ensureGlobalVPNConnection(ctx InfraContext, clusterName string, ResourceMetadata: common.ResourceMetadata{DisplayName: groupName, CreatedBy: common.CreatedOrUpdatedByKloudlite, LastUpdatedBy: common.CreatedOrUpdatedByKloudlite}, AccountName: ctx.AccountName, ClusterName: clusterName, + DispatchAddr: dispatchAddr, ParsedWgParams: nil, }) } func (d *domain) applyGlobalVPNConnection(ctx InfraContext, gvpn *entities.GlobalVPNConnection) error { - return d.resDispatcher.ApplyToTargetCluster(ctx, gvpn.ClusterName, &gvpn.Gateway, gvpn.RecordVersion) + return d.resDispatcher.ApplyToTargetCluster(ctx, gvpn.DispatchAddr, &gvpn.Gateway, gvpn.RecordVersion) } func (d *domain) findGlobalVPNConnection(ctx InfraContext, clusterName string, groupName string) (*entities.GlobalVPNConnection, error) { @@ -462,25 +475,34 @@ func (d *domain) OnGlobalVPNConnectionDeleteMessage(ctx InfraContext, clusterNam return err } -func (d *domain) OnGlobalVPNConnectionUpdateMessage(ctx InfraContext, clusterName string, gvpn entities.GlobalVPNConnection, status types.ResourceStatus, opts UpdateAndDeleteOpts) error { - xconn, err := d.findGlobalVPNConnection(ctx, clusterName, gvpn.Name) +func (d *domain) OnGlobalVPNConnectionUpdateMessage(ctx InfraContext, dispatchAddr entities.DispatchAddr, gvpn entities.GlobalVPNConnection, status types.ResourceStatus, opts UpdateAndDeleteOpts) error { + // FIXME: need a way to find global vpn connection, receiving it from other clusters + + xconn, err := d.gvpnConnRepo.FindOne(ctx, repos.Filter{ + fields.AccountName: ctx.AccountName, + fc.GlobalVPNConnectionDispatchAddrAccountName: dispatchAddr.AccountName, + fc.GlobalVPNConnectionDispatchAddrClusterName: dispatchAddr.ClusterName, + }) if err != nil { return errors.NewE(err) } + if xconn == nil { + return errors.ErrNotFound{Message: "global vpn connection not found"} + } // INFO: BYOK cluster does not have any status update message - if d.isBYOKCluster(ctx, xconn.ClusterName) { - if _, err := d.byokClusterRepo.PatchOne(ctx, entities.UniqueBYOKClusterFilter(ctx.AccountName, clusterName), repos.Document{ - fc.SyncStatusState: t.SyncStateUpdatedAtAgent, - fc.SyncStatusLastSyncedAt: opts.MessageTimestamp, - fc.SyncStatusError: nil, - }); err != nil { - return errors.NewE(err) - } - } + // if d.isBYOKCluster(ctx, xconn.ClusterName) { + // if _, err := d.byokClusterRepo.PatchOne(ctx, entities.UniqueBYOKClusterFilter(ctx.AccountName, clusterName), repos.Document{ + // fc.SyncStatusState: t.SyncStateUpdatedAtAgent, + // fc.SyncStatusLastSyncedAt: opts.MessageTimestamp, + // fc.SyncStatusError: nil, + // }); err != nil { + // return errors.NewE(err) + // } + // } if _, err := d.matchRecordVersion(gvpn.Annotations, xconn.RecordVersion); err != nil { - return d.resyncToTargetCluster(ctx, xconn.SyncStatus.Action, clusterName, &xconn.Gateway, xconn.RecordVersion) + return d.resyncToTargetCluster(ctx, xconn.SyncStatus.Action, xconn.DispatchAddr, &xconn.Gateway, xconn.RecordVersion) } recordVersion, err := d.matchRecordVersion(gvpn.Annotations, xconn.RecordVersion) @@ -494,7 +516,7 @@ func (d *domain) OnGlobalVPNConnectionUpdateMessage(ctx InfraContext, clusterNam if gvpn.ParsedWgParams != nil { patchDoc[fc.GlobalVPNConnectionParsedWgParams] = gvpn.ParsedWgParams - patchDoc[fc.GlobalVPNConnectionSpecAdminNamespace] = gvpn.Spec.AdminNamespace + patchDoc[fc.GlobalVPNConnectionSpecTargetNamespace] = gvpn.Spec.TargetNamespace patchDoc[fc.GlobalVPNConnectionSpecLoadBalancer] = gvpn.Spec.LoadBalancer patchDoc[fc.GlobalVPNConnectionSpecWireguardKeysRef] = gvpn.Spec.WireguardKeysRef } @@ -516,7 +538,7 @@ func (d *domain) OnGlobalVPNConnectionUpdateMessage(ctx InfraContext, clusterNam return errors.NewE(err) } - d.resourceEventPublisher.PublishResourceEvent(ctx, clusterName, ResourceTypeClusterConnection, ugvpn.Name, PublishUpdate) + d.resourceEventPublisher.PublishResourceEvent(ctx, dispatchAddr.ClusterName, ResourceTypeClusterConnection, ugvpn.Name, PublishUpdate) return nil } diff --git a/apps/infra/internal/domain/global-vpn-devices.go b/apps/infra/internal/domain/global-vpn-devices.go index a9e34a8a1..003ae7463 100644 --- a/apps/infra/internal/domain/global-vpn-devices.go +++ b/apps/infra/internal/domain/global-vpn-devices.go @@ -87,7 +87,7 @@ func (d *domain) claimNextFreeDeviceIP(ctx InfraContext, deviceName string, gvpn ipAddrFilter.MatchType = repos.MatchTypeNotInArray ipAddrFilter.NotInArray = append(ipAddrFilter.NotInArray, ipAddr) - d.logger.Warnf("ip addr already claimed (err: %s), retrying again", err.Error()) + d.logger.Warn("ip addr already claimed, will retry again, got", "err", err) <-time.After(50 * time.Millisecond) continue } diff --git a/apps/infra/internal/domain/global-vpn.go b/apps/infra/internal/domain/global-vpn.go index d5b9e0b8b..4918f4cf9 100644 --- a/apps/infra/internal/domain/global-vpn.go +++ b/apps/infra/internal/domain/global-vpn.go @@ -203,7 +203,7 @@ func (d *domain) findGlobalVPN(ctx InfraContext, gvpnName string) (*entities.Glo } if cg == nil { - return nil, ErrClusterNotFound + return nil, errors.ErrNotFound{Message: fmt.Sprintf("no global vpn with name=%s", gvpnName)} } return cg, nil } diff --git a/apps/infra/internal/domain/helm-release.go b/apps/infra/internal/domain/helm-release.go index a47ddbfee..28cfea334 100644 --- a/apps/infra/internal/domain/helm-release.go +++ b/apps/infra/internal/domain/helm-release.go @@ -79,7 +79,7 @@ func (d *domain) GetHelmRelease(ctx InfraContext, clusterName string, hrName str func (d *domain) applyHelmRelease(ctx InfraContext, hr *entities.HelmRelease) error { addTrackingId(&hr.HelmChart, hr.Id) - return d.resDispatcher.ApplyToTargetCluster(ctx, hr.ClusterName, &hr.HelmChart, hr.RecordVersion) + return d.resDispatcher.ApplyToTargetCluster(ctx, hr.DispatchAddr, &hr.HelmChart, hr.RecordVersion) } func (d *domain) CreateHelmRelease(ctx InfraContext, clusterName string, hr entities.HelmRelease) (*entities.HelmRelease, error) { @@ -91,6 +91,10 @@ func (d *domain) CreateHelmRelease(ctx InfraContext, clusterName string, hr enti return nil, errors.NewE(err) } + if hr.DispatchAddr == nil { + hr.DispatchAddr = &entities.DispatchAddr{AccountName: ctx.AccountName, ClusterName: clusterName} + } + hr.IncrementRecordVersion() hr.CreatedBy = common.CreatedOrUpdatedBy{ UserId: ctx.UserId, @@ -127,7 +131,7 @@ func (d *domain) CreateHelmRelease(ctx InfraContext, clusterName string, hr enti d.resourceEventPublisher.PublishResourceEvent(ctx, nhr.ClusterName, ResourceTypeHelmRelease, nhr.Name, PublishAdd) - if err = d.resDispatcher.ApplyToTargetCluster(ctx, clusterName, &corev1.Namespace{ + if err = d.resDispatcher.ApplyToTargetCluster(ctx, hr.DispatchAddr, &corev1.Namespace{ TypeMeta: metav1.TypeMeta{ Kind: "Namespace", APIVersion: "v1", @@ -206,7 +210,7 @@ func (d *domain) DeleteHelmRelease(ctx InfraContext, clusterName string, name st d.resourceEventPublisher.PublishResourceEvent(ctx, uphr.ClusterName, ResourceTypeHelmRelease, uphr.Name, PublishUpdate) - return d.resDispatcher.DeleteFromTargetCluster(ctx, clusterName, &uphr.HelmChart) + return d.resDispatcher.DeleteFromTargetCluster(ctx, uphr.DispatchAddr, &uphr.HelmChart) } func (d *domain) OnHelmReleaseApplyError(ctx InfraContext, clusterName string, name string, errMsg string, opts UpdateAndDeleteOpts) error { @@ -255,7 +259,7 @@ func (d *domain) OnHelmReleaseUpdateMessage(ctx InfraContext, clusterName string recordVersion, err := d.matchRecordVersion(hr.Annotations, xhr.RecordVersion) if err != nil { - return d.resyncToTargetCluster(ctx, xhr.SyncStatus.Action, clusterName, xhr, xhr.RecordVersion) + return d.resyncToTargetCluster(ctx, xhr.SyncStatus.Action, xhr.DispatchAddr, xhr, xhr.RecordVersion) } uphr, err := d.helmReleaseRepo.PatchById( diff --git a/apps/infra/internal/domain/nodepool.go b/apps/infra/internal/domain/nodepool.go index dc5020690..3f5671532 100644 --- a/apps/infra/internal/domain/nodepool.go +++ b/apps/infra/internal/domain/nodepool.go @@ -20,7 +20,7 @@ import ( func (d *domain) applyNodePool(ctx InfraContext, np *entities.NodePool) error { addTrackingId(&np.NodePool, np.Id) - return d.resDispatcher.ApplyToTargetCluster(ctx, np.ClusterName, &np.NodePool, np.RecordVersion) + return d.resDispatcher.ApplyToTargetCluster(ctx, np.DispatchAddr, &np.NodePool, np.RecordVersion) } func (d *domain) CreateNodePool(ctx InfraContext, clusterName string, nodepool entities.NodePool) (*entities.NodePool, error) { @@ -28,6 +28,10 @@ func (d *domain) CreateNodePool(ctx InfraContext, clusterName string, nodepool e return nil, errors.NewE(err) } + if nodepool.DispatchAddr == nil { + nodepool.DispatchAddr = &entities.DispatchAddr{AccountName: ctx.AccountName, ClusterName: clusterName} + } + nodepool.IncrementRecordVersion() nodepool.CreatedBy = common.CreatedOrUpdatedBy{ UserId: ctx.UserId, @@ -98,7 +102,7 @@ func (d *domain) CreateNodePool(ctx InfraContext, clusterName string, nodepool e // INFO: because kube-system is omnipresent on k8s k8sSecret.Namespace = "kube-system" - if err := d.resDispatcher.ApplyToTargetCluster(ctx, clusterName, k8sSecret, nodepool.RecordVersion); err != nil { + if err := d.resDispatcher.ApplyToTargetCluster(ctx, nodepool.DispatchAddr, k8sSecret, nodepool.RecordVersion); err != nil { return nil, errors.NewE(err) } @@ -222,7 +226,7 @@ func (d *domain) DeleteNodePool(ctx InfraContext, clusterName string, poolName s } d.resourceEventPublisher.PublishResourceEvent(ctx, clusterName, ResourceTypeNodePool, unp.Name, PublishUpdate) - return d.resDispatcher.DeleteFromTargetCluster(ctx, clusterName, &unp.NodePool) + return d.resDispatcher.DeleteFromTargetCluster(ctx, unp.DispatchAddr, &unp.NodePool) } func (d *domain) GetNodePool(ctx InfraContext, clusterName string, poolName string) (*entities.NodePool, error) { @@ -276,7 +280,7 @@ func (d *domain) ResyncNodePool(ctx InfraContext, clusterName string, poolName s return errors.NewE(err) } - return d.resyncToTargetCluster(ctx, np.SyncStatus.Action, clusterName, &np.NodePool, np.RecordVersion) + return d.resyncToTargetCluster(ctx, np.SyncStatus.Action, np.DispatchAddr, &np.NodePool, np.RecordVersion) } // on message events @@ -308,7 +312,7 @@ func (d *domain) OnNodePoolUpdateMessage(ctx InfraContext, clusterName string, n } if _, err := d.matchRecordVersion(nodePool.Annotations, xnp.RecordVersion); err != nil { - return d.resyncToTargetCluster(ctx, xnp.SyncStatus.Action, clusterName, &xnp.NodePool, xnp.RecordVersion) + return d.resyncToTargetCluster(ctx, xnp.SyncStatus.Action, xnp.DispatchAddr, &xnp.NodePool, xnp.RecordVersion) } recordVersion, err := d.matchRecordVersion(nodePool.Annotations, xnp.RecordVersion) diff --git a/apps/infra/internal/domain/ports.go b/apps/infra/internal/domain/ports.go index bde574f7e..ffd166620 100644 --- a/apps/infra/internal/domain/ports.go +++ b/apps/infra/internal/domain/ports.go @@ -2,6 +2,8 @@ package domain import ( "context" + + "github.com/kloudlite/api/apps/infra/internal/entities" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/accounts" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -11,8 +13,8 @@ type AccountsSvc interface { } type ResourceDispatcher interface { - ApplyToTargetCluster(ctx InfraContext, clusterName string, obj client.Object, recordVersion int) error - DeleteFromTargetCluster(ctx InfraContext, clusterName string, obj client.Object) error + ApplyToTargetCluster(ctx InfraContext, dispatchAddr *entities.DispatchAddr, obj client.Object, recordVersion int) error + DeleteFromTargetCluster(ctx InfraContext, dispatchAddr *entities.DispatchAddr, obj client.Object) error } type PublishMsg string diff --git a/apps/infra/internal/domain/ports/message-office-svc.go b/apps/infra/internal/domain/ports/message-office-svc.go new file mode 100644 index 000000000..71a137e33 --- /dev/null +++ b/apps/infra/internal/domain/ports/message-office-svc.go @@ -0,0 +1,38 @@ +package ports + +import "context" + +type MessageOfficeService interface { + GetAllocatedPlatformEdgeCluster(ctx context.Context, args *GetAllocatedPlatformEdgeClusterIn) (*GetAllocatedPlatformEdgeClusterOut, error) + + GetClusterToken(ctx context.Context, args *GetClusterTokenIn) (*GetClusterTokenOut, error) + + GenerateClusterToken(ctx context.Context, args *GenerateClusterTokenIn) (*GenerateClusterTokenOut, error) +} + +type GetAllocatedPlatformEdgeClusterIn struct { + AccountName string + ClusterName string +} + +type GetAllocatedPlatformEdgeClusterOut struct { + PublicDNSHost string +} + +type GetClusterTokenIn struct { + AccountName string + ClusterName string +} + +type GetClusterTokenOut struct { + ClusterToken string +} + +type GenerateClusterTokenIn struct { + AccountName string + ClusterName string +} + +type GenerateClusterTokenOut struct{ + ClusterToken string +} diff --git a/apps/infra/internal/domain/pv.go b/apps/infra/internal/domain/pv.go index b01e438bf..145115afc 100644 --- a/apps/infra/internal/domain/pv.go +++ b/apps/infra/internal/domain/pv.go @@ -57,7 +57,7 @@ func (d *domain) DeletePV(ctx InfraContext, clusterName string, pvName string) e } d.resourceEventPublisher.PublishResourceEvent(ctx, clusterName, ResourceTypeNodePool, upv.Name, PublishUpdate) - return d.resDispatcher.DeleteFromTargetCluster(ctx, clusterName, &upv.PersistentVolume) + return d.resDispatcher.DeleteFromTargetCluster(ctx, &entities.DispatchAddr{AccountName: ctx.AccountName, ClusterName: clusterName}, &upv.PersistentVolume) } // OnPVDeleteMessage implements Domain. diff --git a/apps/infra/internal/domain/templates/types.go b/apps/infra/internal/domain/templates/types.go index 0bb89f946..49dc16fa5 100644 --- a/apps/infra/internal/domain/templates/types.go +++ b/apps/infra/internal/domain/templates/types.go @@ -6,19 +6,19 @@ type GVPNKloudliteDeviceTemplateVars struct { WgConfig string WireguardPort uint16 - KloudliteAccount string + KloudliteAccount string - EnableKubeReverseProxy bool - KubeReverseProxyImage string - AuthzToken string + EnableKubeReverseProxy bool + KubeReverseProxyImage string + AuthzToken string GatewayDNSServers string GatewayServiceHosts string } type GatewayServiceTemplateVars struct { - Name string - Namespace string - WireguardPort uint16 - Selector map[string]string + Name string + Namespace string + WireguardPort uint16 + Selector map[string]string } diff --git a/apps/infra/internal/entities/field-constants/generated_constants.go b/apps/infra/internal/entities/field-constants/generated_constants.go index a4986510c..eccdabad3 100644 --- a/apps/infra/internal/entities/field-constants/generated_constants.go +++ b/apps/infra/internal/entities/field-constants/generated_constants.go @@ -157,6 +157,9 @@ const ( ClusterVisbilityPublicEndpoint = "publicEndpoint" ) +// constant vars generated for struct DispatchAddr +const () + // constant vars generated for struct DomainEntry const ( DomainEntryDomainName = "domainName" @@ -204,32 +207,34 @@ const ( // constant vars generated for struct GlobalVPNConnection const ( - GlobalVPNConnectionClusterSvcCIDR = "clusterSvcCIDR" - GlobalVPNConnectionDeviceRef = "deviceRef" - GlobalVPNConnectionDeviceRefIpAddr = "deviceRef.ipAddr" - GlobalVPNConnectionDeviceRefName = "deviceRef.name" - GlobalVPNConnectionGlobalVPNName = "globalVPNName" - GlobalVPNConnectionParsedWgParams = "parsedWgParams" - GlobalVPNConnectionParsedWgParamsPrivateKey = "parsedWgParams.private_key" - GlobalVPNConnectionParsedWgParamsPublicKey = "parsedWgParams.public_key" - GlobalVPNConnectionSpec = "spec" - GlobalVPNConnectionSpecAdminNamespace = "spec.adminNamespace" - GlobalVPNConnectionSpecClusterCIDR = "spec.clusterCIDR" - GlobalVPNConnectionSpecDnsSuffix = "spec.dnsSuffix" - GlobalVPNConnectionSpecGlobalIP = "spec.globalIP" - GlobalVPNConnectionSpecLoadBalancer = "spec.loadBalancer" - GlobalVPNConnectionSpecLoadBalancerHosts = "spec.loadBalancer.hosts" - GlobalVPNConnectionSpecLoadBalancerPort = "spec.loadBalancer.port" - GlobalVPNConnectionSpecNodePort = "spec.nodePort" - GlobalVPNConnectionSpecPeers = "spec.peers" - GlobalVPNConnectionSpecServiceType = "spec.serviceType" - GlobalVPNConnectionSpecSvcCIDR = "spec.svcCIDR" - GlobalVPNConnectionSpecWireguardKeysRef = "spec.wireguardKeysRef" - GlobalVPNConnectionSpecWireguardKeysRefName = "spec.wireguardKeysRef.name" - GlobalVPNConnectionSpecWireguardKeysRefNamespace = "spec.wireguardKeysRef.namespace" - GlobalVPNConnectionVisibility = "visibility" - GlobalVPNConnectionVisibilityMode = "visibility.mode" - GlobalVPNConnectionVisibilityPublicEndpoint = "visibility.publicEndpoint" + GlobalVPNConnectionClusterSvcCIDR = "clusterSvcCIDR" + GlobalVPNConnectionDeviceRef = "deviceRef" + GlobalVPNConnectionDeviceRefIpAddr = "deviceRef.ipAddr" + GlobalVPNConnectionDeviceRefName = "deviceRef.name" + GlobalVPNConnectionDispatchAddr = "dispatchAddr" + GlobalVPNConnectionDispatchAddrAccountName = "dispatchAddr.accountName" + GlobalVPNConnectionDispatchAddrClusterName = "dispatchAddr.clusterName" + GlobalVPNConnectionGlobalVPNName = "globalVPNName" + GlobalVPNConnectionParsedWgParams = "parsedWgParams" + GlobalVPNConnectionParsedWgParamsPrivateKey = "parsedWgParams.private_key" + GlobalVPNConnectionParsedWgParamsPublicKey = "parsedWgParams.public_key" + GlobalVPNConnectionSpec = "spec" + GlobalVPNConnectionSpecClusterCIDR = "spec.clusterCIDR" + GlobalVPNConnectionSpecDnsSuffix = "spec.dnsSuffix" + GlobalVPNConnectionSpecGlobalIP = "spec.globalIP" + GlobalVPNConnectionSpecLoadBalancer = "spec.loadBalancer" + GlobalVPNConnectionSpecLoadBalancerHosts = "spec.loadBalancer.hosts" + GlobalVPNConnectionSpecLoadBalancerPort = "spec.loadBalancer.port" + GlobalVPNConnectionSpecNodePort = "spec.nodePort" + GlobalVPNConnectionSpecPeers = "spec.peers" + GlobalVPNConnectionSpecServiceType = "spec.serviceType" + GlobalVPNConnectionSpecSvcCIDR = "spec.svcCIDR" + GlobalVPNConnectionSpecTargetNamespace = "spec.targetNamespace" + GlobalVPNConnectionSpecWireguardKeysRef = "spec.wireguardKeysRef" + GlobalVPNConnectionSpecWireguardKeysRefName = "spec.wireguardKeysRef.name" + GlobalVPNConnectionVisibility = "visibility" + GlobalVPNConnectionVisibilityMode = "visibility.mode" + GlobalVPNConnectionVisibilityPublicEndpoint = "visibility.publicEndpoint" ) // constant vars generated for struct GlobalVPNDevice @@ -244,6 +249,9 @@ const ( // constant vars generated for struct HelmRelease const ( + HelmReleaseDispatchAddr = "dispatchAddr" + HelmReleaseDispatchAddrAccountName = "dispatchAddr.accountName" + HelmReleaseDispatchAddrClusterName = "dispatchAddr.clusterName" HelmReleaseSpec = "spec" HelmReleaseSpecChartName = "spec.chartName" HelmReleaseSpecChartRepoURL = "spec.chartRepoURL" @@ -324,6 +332,9 @@ const ( // constant vars generated for struct NodePool const ( + NodePoolDispatchAddr = "dispatchAddr" + NodePoolDispatchAddrAccountName = "dispatchAddr.accountName" + NodePoolDispatchAddrClusterName = "dispatchAddr.clusterName" NodePoolSpec = "spec" NodePoolSpecAllowSSH = "spec.allowSSH" NodePoolSpecAws = "spec.aws" diff --git a/apps/infra/internal/entities/global-vpn-connection.go b/apps/infra/internal/entities/global-vpn-connection.go index 6c9137ead..7da525c56 100644 --- a/apps/infra/internal/entities/global-vpn-connection.go +++ b/apps/infra/internal/entities/global-vpn-connection.go @@ -15,6 +15,11 @@ type GlobalVPNConnDeviceRef struct { IPAddr string `json:"ipAddr"` } +type DispatchAddr struct { + AccountName string `json:"accountName"` + ClusterName string `json:"clusterName"` +} + type WgParams struct { WgPrivateKey string `json:"wg_private_key"` WgPublicKey string `json:"wg_public_key"` @@ -48,6 +53,9 @@ type GlobalVPNConnection struct { // ClusterPublicEndpoint string `json:"clusterPublicEndpoint" graphql:"noinput"` DeviceRef GlobalVPNConnDeviceRef `json:"deviceRef" graphql:"noinput"` + // DispatchAddr is useful when globalvpn connection belongs to one account, but is deployed to another account + DispatchAddr *DispatchAddr `json:"dispatchAddr" graphql:"noinput"` + // ParsedWgParams *wgv1.WgParams `json:"parsedWgParams" graphql:"ignore"` ParsedWgParams *networkingv1.WireguardKeys `json:"parsedWgParams" graphql:"ignore"` SyncStatus t.SyncStatus `json:"syncStatus" graphql:"noinput"` @@ -70,9 +78,19 @@ var GlobalVPNConnectionIndices = []repos.IndexField{ }, { Field: []repos.IndexKey{ - {Key: "metadata.name", Value: repos.IndexAsc}, - {Key: "accountName", Value: repos.IndexAsc}, - {Key: "clusterName", Value: repos.IndexAsc}, + {Key: fc.MetadataName, Value: repos.IndexAsc}, + {Key: fc.AccountName, Value: repos.IndexAsc}, + {Key: fc.ClusterName, Value: repos.IndexAsc}, + }, + Unique: true, + }, + + { + Field: []repos.IndexKey{ + {Key: fc.GlobalVPNConnectionDispatchAddrAccountName, Value: repos.IndexAsc}, + {Key: fc.GlobalVPNConnectionDispatchAddrClusterName, Value: repos.IndexAsc}, + {Key: fc.MetadataName, Value: repos.IndexAsc}, + {Key: fc.AccountName, Value: repos.IndexAsc}, }, Unique: true, }, diff --git a/apps/infra/internal/entities/helm-release.go b/apps/infra/internal/entities/helm-release.go index 3ecf052bf..5cf314fa3 100644 --- a/apps/infra/internal/entities/helm-release.go +++ b/apps/infra/internal/entities/helm-release.go @@ -17,6 +17,8 @@ type HelmRelease struct { AccountName string `json:"accountName" graphql:"noinput"` ClusterName string `json:"clusterName" graphql:"noinput"` + DispatchAddr *DispatchAddr `json:"dispatchAddr" graphql:"noinput"` + SyncStatus t.SyncStatus `json:"syncStatus" graphql:"noinput"` } diff --git a/apps/infra/internal/entities/nodepool.go b/apps/infra/internal/entities/nodepool.go index aab9c8100..efc1760db 100644 --- a/apps/infra/internal/entities/nodepool.go +++ b/apps/infra/internal/entities/nodepool.go @@ -17,6 +17,8 @@ type NodePool struct { AccountName string `json:"accountName" graphql:"noinput"` ClusterName string `json:"clusterName" graphql:"noinput"` + DispatchAddr *DispatchAddr `json:"dispatchAddr" graphql:"noinput"` + SyncStatus t.SyncStatus `json:"syncStatus" graphql:"noinput"` } diff --git a/apps/infra/internal/framework/framework.go b/apps/infra/internal/framework/framework.go index 38ca29653..75c091eaa 100644 --- a/apps/infra/internal/framework/framework.go +++ b/apps/infra/internal/framework/framework.go @@ -6,6 +6,7 @@ import ( "log/slog" "github.com/kloudlite/api/apps/infra/internal/app" + "github.com/kloudlite/api/apps/infra/internal/app/adapters" "github.com/kloudlite/api/apps/infra/internal/env" "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/errors" @@ -68,7 +69,7 @@ var Module = fx.Module("framework", return grpc.NewGrpcClient(ev.AccountsGrpcAddr) }), - fx.Provide(func(ev *env.Env) (app.MessageOfficeInternalGrpcClient, error) { + fx.Provide(func(ev *env.Env) (adapters.MesasageOfficeGRPCClient, error) { return grpc.NewGrpcClient(ev.MessageOfficeInternalGrpcAddr) }), diff --git a/apps/infra/main.go b/apps/infra/main.go index 8f870c166..d91ef0bd0 100644 --- a/apps/infra/main.go +++ b/apps/infra/main.go @@ -3,7 +3,6 @@ package main import ( "context" "flag" - "log/slog" "os" "time" @@ -25,6 +24,9 @@ import ( ) func main() { + start := time.Now() + common.PrintBuildInfo() + var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") @@ -33,25 +35,20 @@ func main() { flag.Parse() - logger, err := logging.New(&logging.Options{Name: "infra", Dev: isDev}) - if err != nil { - panic(err) + if isDev { + debug = true } + logger := logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug, SetAsDefaultLogger: true}) + app := fx.New( fx.NopLogger, - fx.Provide(func() logging.Logger { - return logger + fx.Provide(func() (logging.Logger, error) { + return logging.New(&logging.Options{Name: "infra", Dev: isDev}) }), - fx.Provide(func() *slog.Logger { - return logging.NewSlogLogger(logging.SlogOptions{ - ShowCaller: true, - ShowDebugLogs: debug, - SetAsDefaultLogger: true, - }) - }), + fx.Supply(logger), fx.Provide(func() (*env.Env, error) { e, err := env.LoadEnv() @@ -93,10 +90,10 @@ func main() { defer cancel() if err := app.Start(ctx); err != nil { - logger.Errorf(err, "failed to start app") + logger.Error("failed to start infra api, got", "err", err) os.Exit(1) } - common.PrintReadyBanner() + common.PrintReadyBanner2(time.Since(start)) <-app.Done() } diff --git a/apps/infra/protobufs/infra.proto b/apps/infra/protobufs/infra.proto new file mode 100644 index 000000000..068d71d7d --- /dev/null +++ b/apps/infra/protobufs/infra.proto @@ -0,0 +1,87 @@ +syntax = "proto3"; + +import "google/protobuf/timestamp.proto"; + +option go_package = "./infra"; + +service Infra { + rpc GetCluster(GetClusterIn) returns (GetClusterOut); + rpc GetNodepool(GetNodepoolIn) returns (GetNodepoolOut); + rpc ClusterExists(ClusterExistsIn) returns (ClusterExistsOut); + rpc GetClusterKubeconfig(GetClusterIn) returns (GetClusterKubeconfigOut); + rpc MarkClusterOnlineAt(MarkClusterOnlineAtIn) returns (MarkClusterOnlineAtOut); + + rpc EnsureGlobalVPNConnection(EnsureGlobalVPNConnectionIn) returns (EnsureGlobalVPNConnectionOut); +} + +message GetClusterIn { + string userId = 1; + string userName = 2; + string userEmail = 3; + + string accountName = 4; + string clusterName = 5; +} + +message GetClusterOut { + string messageQueueTopic = 1; + string dnsHost = 2; + + string IACJobName = 3; + string IACJobNamespace = 4; +} + +message GetNodepoolIn { + string userId = 1; + string userName = 2; + string userEmail = 3; + + string accountName = 4; + string clusterName = 5; + string nodepoolName = 6; +} + +message GetNodepoolOut { + string IACJobName = 1; + string IACJobNamespace = 2; +} + +message ClusterExistsIn { + string userId = 1; + string userName = 2; + string userEmail = 3; + + string accountName = 4; + string clusterName = 5; +} + +message ClusterExistsOut { + bool exists = 1; +} + +message GetClusterKubeconfigOut { + bytes kubeconfig = 1; +} + +message MarkClusterOnlineAtIn { + string accountName = 1; + string clusterName = 2; + google.protobuf.Timestamp timestamp = 3; +} + +message MarkClusterOnlineAtOut {} + +message EnsureGlobalVPNConnectionIn { + string userId = 1; + string userName = 2; + string userEmail = 3; + + string accountName = 4; + string clusterName = 5; + string globalVPNName = 6; + + string dispatchAddr_AccountName = 7; + string dispatchAddr_ClusterName = 8; +} + +message EnsureGlobalVPNConnectionOut {} diff --git a/apps/infra/protobufs/infra/infra.pb.go b/apps/infra/protobufs/infra/infra.pb.go new file mode 100644 index 000000000..81dfa38bb --- /dev/null +++ b/apps/infra/protobufs/infra/infra.pb.go @@ -0,0 +1,1060 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.24.4 +// source: infra.proto + +package infra + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetClusterIn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` + UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` + UserEmail string `protobuf:"bytes,3,opt,name=userEmail,proto3" json:"userEmail,omitempty"` + AccountName string `protobuf:"bytes,4,opt,name=accountName,proto3" json:"accountName,omitempty"` + ClusterName string `protobuf:"bytes,5,opt,name=clusterName,proto3" json:"clusterName,omitempty"` +} + +func (x *GetClusterIn) Reset() { + *x = GetClusterIn{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterIn) ProtoMessage() {} + +func (x *GetClusterIn) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterIn.ProtoReflect.Descriptor instead. +func (*GetClusterIn) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{0} +} + +func (x *GetClusterIn) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *GetClusterIn) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *GetClusterIn) GetUserEmail() string { + if x != nil { + return x.UserEmail + } + return "" +} + +func (x *GetClusterIn) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *GetClusterIn) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +type GetClusterOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageQueueTopic string `protobuf:"bytes,1,opt,name=messageQueueTopic,proto3" json:"messageQueueTopic,omitempty"` + DnsHost string `protobuf:"bytes,2,opt,name=dnsHost,proto3" json:"dnsHost,omitempty"` + IACJobName string `protobuf:"bytes,3,opt,name=IACJobName,proto3" json:"IACJobName,omitempty"` + IACJobNamespace string `protobuf:"bytes,4,opt,name=IACJobNamespace,proto3" json:"IACJobNamespace,omitempty"` +} + +func (x *GetClusterOut) Reset() { + *x = GetClusterOut{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterOut) ProtoMessage() {} + +func (x *GetClusterOut) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterOut.ProtoReflect.Descriptor instead. +func (*GetClusterOut) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{1} +} + +func (x *GetClusterOut) GetMessageQueueTopic() string { + if x != nil { + return x.MessageQueueTopic + } + return "" +} + +func (x *GetClusterOut) GetDnsHost() string { + if x != nil { + return x.DnsHost + } + return "" +} + +func (x *GetClusterOut) GetIACJobName() string { + if x != nil { + return x.IACJobName + } + return "" +} + +func (x *GetClusterOut) GetIACJobNamespace() string { + if x != nil { + return x.IACJobNamespace + } + return "" +} + +type GetNodepoolIn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` + UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` + UserEmail string `protobuf:"bytes,3,opt,name=userEmail,proto3" json:"userEmail,omitempty"` + AccountName string `protobuf:"bytes,4,opt,name=accountName,proto3" json:"accountName,omitempty"` + ClusterName string `protobuf:"bytes,5,opt,name=clusterName,proto3" json:"clusterName,omitempty"` + NodepoolName string `protobuf:"bytes,6,opt,name=nodepoolName,proto3" json:"nodepoolName,omitempty"` +} + +func (x *GetNodepoolIn) Reset() { + *x = GetNodepoolIn{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNodepoolIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodepoolIn) ProtoMessage() {} + +func (x *GetNodepoolIn) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodepoolIn.ProtoReflect.Descriptor instead. +func (*GetNodepoolIn) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{2} +} + +func (x *GetNodepoolIn) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *GetNodepoolIn) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *GetNodepoolIn) GetUserEmail() string { + if x != nil { + return x.UserEmail + } + return "" +} + +func (x *GetNodepoolIn) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *GetNodepoolIn) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +func (x *GetNodepoolIn) GetNodepoolName() string { + if x != nil { + return x.NodepoolName + } + return "" +} + +type GetNodepoolOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IACJobName string `protobuf:"bytes,1,opt,name=IACJobName,proto3" json:"IACJobName,omitempty"` + IACJobNamespace string `protobuf:"bytes,2,opt,name=IACJobNamespace,proto3" json:"IACJobNamespace,omitempty"` +} + +func (x *GetNodepoolOut) Reset() { + *x = GetNodepoolOut{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNodepoolOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodepoolOut) ProtoMessage() {} + +func (x *GetNodepoolOut) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodepoolOut.ProtoReflect.Descriptor instead. +func (*GetNodepoolOut) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{3} +} + +func (x *GetNodepoolOut) GetIACJobName() string { + if x != nil { + return x.IACJobName + } + return "" +} + +func (x *GetNodepoolOut) GetIACJobNamespace() string { + if x != nil { + return x.IACJobNamespace + } + return "" +} + +type ClusterExistsIn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` + UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` + UserEmail string `protobuf:"bytes,3,opt,name=userEmail,proto3" json:"userEmail,omitempty"` + AccountName string `protobuf:"bytes,4,opt,name=accountName,proto3" json:"accountName,omitempty"` + ClusterName string `protobuf:"bytes,5,opt,name=clusterName,proto3" json:"clusterName,omitempty"` +} + +func (x *ClusterExistsIn) Reset() { + *x = ClusterExistsIn{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterExistsIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterExistsIn) ProtoMessage() {} + +func (x *ClusterExistsIn) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterExistsIn.ProtoReflect.Descriptor instead. +func (*ClusterExistsIn) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{4} +} + +func (x *ClusterExistsIn) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ClusterExistsIn) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *ClusterExistsIn) GetUserEmail() string { + if x != nil { + return x.UserEmail + } + return "" +} + +func (x *ClusterExistsIn) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *ClusterExistsIn) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +type ClusterExistsOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (x *ClusterExistsOut) Reset() { + *x = ClusterExistsOut{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterExistsOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterExistsOut) ProtoMessage() {} + +func (x *ClusterExistsOut) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterExistsOut.ProtoReflect.Descriptor instead. +func (*ClusterExistsOut) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{5} +} + +func (x *ClusterExistsOut) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + +type GetClusterKubeconfigOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kubeconfig []byte `protobuf:"bytes,1,opt,name=kubeconfig,proto3" json:"kubeconfig,omitempty"` +} + +func (x *GetClusterKubeconfigOut) Reset() { + *x = GetClusterKubeconfigOut{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterKubeconfigOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterKubeconfigOut) ProtoMessage() {} + +func (x *GetClusterKubeconfigOut) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterKubeconfigOut.ProtoReflect.Descriptor instead. +func (*GetClusterKubeconfigOut) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{6} +} + +func (x *GetClusterKubeconfigOut) GetKubeconfig() []byte { + if x != nil { + return x.Kubeconfig + } + return nil +} + +type MarkClusterOnlineAtIn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountName string `protobuf:"bytes,1,opt,name=accountName,proto3" json:"accountName,omitempty"` + ClusterName string `protobuf:"bytes,2,opt,name=clusterName,proto3" json:"clusterName,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *MarkClusterOnlineAtIn) Reset() { + *x = MarkClusterOnlineAtIn{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarkClusterOnlineAtIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarkClusterOnlineAtIn) ProtoMessage() {} + +func (x *MarkClusterOnlineAtIn) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarkClusterOnlineAtIn.ProtoReflect.Descriptor instead. +func (*MarkClusterOnlineAtIn) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{7} +} + +func (x *MarkClusterOnlineAtIn) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *MarkClusterOnlineAtIn) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +func (x *MarkClusterOnlineAtIn) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type MarkClusterOnlineAtOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MarkClusterOnlineAtOut) Reset() { + *x = MarkClusterOnlineAtOut{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarkClusterOnlineAtOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarkClusterOnlineAtOut) ProtoMessage() {} + +func (x *MarkClusterOnlineAtOut) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarkClusterOnlineAtOut.ProtoReflect.Descriptor instead. +func (*MarkClusterOnlineAtOut) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{8} +} + +type EnsureGlobalVPNConnectionIn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` + UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` + UserEmail string `protobuf:"bytes,3,opt,name=userEmail,proto3" json:"userEmail,omitempty"` + AccountName string `protobuf:"bytes,4,opt,name=accountName,proto3" json:"accountName,omitempty"` + ClusterName string `protobuf:"bytes,5,opt,name=clusterName,proto3" json:"clusterName,omitempty"` + GlobalVPNName string `protobuf:"bytes,6,opt,name=globalVPNName,proto3" json:"globalVPNName,omitempty"` + DispatchAddr_AccountName string `protobuf:"bytes,7,opt,name=dispatchAddr_AccountName,json=dispatchAddrAccountName,proto3" json:"dispatchAddr_AccountName,omitempty"` + DispatchAddr_ClusterName string `protobuf:"bytes,8,opt,name=dispatchAddr_ClusterName,json=dispatchAddrClusterName,proto3" json:"dispatchAddr_ClusterName,omitempty"` +} + +func (x *EnsureGlobalVPNConnectionIn) Reset() { + *x = EnsureGlobalVPNConnectionIn{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnsureGlobalVPNConnectionIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnsureGlobalVPNConnectionIn) ProtoMessage() {} + +func (x *EnsureGlobalVPNConnectionIn) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnsureGlobalVPNConnectionIn.ProtoReflect.Descriptor instead. +func (*EnsureGlobalVPNConnectionIn) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{9} +} + +func (x *EnsureGlobalVPNConnectionIn) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *EnsureGlobalVPNConnectionIn) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *EnsureGlobalVPNConnectionIn) GetUserEmail() string { + if x != nil { + return x.UserEmail + } + return "" +} + +func (x *EnsureGlobalVPNConnectionIn) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *EnsureGlobalVPNConnectionIn) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +func (x *EnsureGlobalVPNConnectionIn) GetGlobalVPNName() string { + if x != nil { + return x.GlobalVPNName + } + return "" +} + +func (x *EnsureGlobalVPNConnectionIn) GetDispatchAddr_AccountName() string { + if x != nil { + return x.DispatchAddr_AccountName + } + return "" +} + +func (x *EnsureGlobalVPNConnectionIn) GetDispatchAddr_ClusterName() string { + if x != nil { + return x.DispatchAddr_ClusterName + } + return "" +} + +type EnsureGlobalVPNConnectionOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EnsureGlobalVPNConnectionOut) Reset() { + *x = EnsureGlobalVPNConnectionOut{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnsureGlobalVPNConnectionOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnsureGlobalVPNConnectionOut) ProtoMessage() {} + +func (x *EnsureGlobalVPNConnectionOut) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnsureGlobalVPNConnectionOut.ProtoReflect.Descriptor instead. +func (*EnsureGlobalVPNConnectionOut) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{10} +} + +var File_infra_proto protoreflect.FileDescriptor + +var file_infra_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, + 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xa1, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, + 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6e, 0x73, 0x48, 0x6f, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6e, 0x73, 0x48, 0x6f, 0x73, 0x74, 0x12, + 0x1e, 0x0a, 0x0a, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x28, 0x0a, 0x0f, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, + 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x70, 0x6f, 0x6f, 0x6c, 0x4f, 0x75, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x41, 0x43, 0x4a, 0x6f, + 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x49, 0x41, 0x43, + 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x41, 0x43, 0x4a, 0x6f, + 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, + 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, + 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x10, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4f, 0x75, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x39, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, + 0x75, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x22, 0x95, 0x01, 0x0a, 0x15, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x49, 0x6e, 0x12, 0x20, 0x0a, 0x0b, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x61, + 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, + 0x74, 0x4f, 0x75, 0x74, 0x22, 0xcf, 0x02, 0x0a, 0x1b, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x47, + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, + 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x6c, + 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x39, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x64, 0x64, 0x72, + 0x5f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x17, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x64, 0x64, 0x72, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x18, 0x64, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x64, 0x64, 0x72, 0x5f, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x64, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1e, 0x0a, 0x1c, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, + 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x32, 0xfd, 0x02, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x72, 0x61, + 0x12, 0x2b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0d, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x0e, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x2e, 0x0a, + 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x0e, 0x2e, 0x47, + 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x47, + 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x4f, 0x75, 0x74, 0x12, 0x34, 0x0a, + 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x10, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x49, 0x6e, + 0x1a, 0x11, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, + 0x4f, 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0d, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x18, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x4f, 0x75, 0x74, 0x12, 0x46, 0x0a, 0x13, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x12, 0x16, 0x2e, 0x4d, 0x61, + 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, + 0x74, 0x49, 0x6e, 0x1a, 0x17, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x58, 0x0a, 0x19, + 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x45, 0x6e, 0x73, 0x75, + 0x72, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x1a, 0x1d, 0x2e, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, + 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x69, 0x6e, 0x66, 0x72, + 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_infra_proto_rawDescOnce sync.Once + file_infra_proto_rawDescData = file_infra_proto_rawDesc +) + +func file_infra_proto_rawDescGZIP() []byte { + file_infra_proto_rawDescOnce.Do(func() { + file_infra_proto_rawDescData = protoimpl.X.CompressGZIP(file_infra_proto_rawDescData) + }) + return file_infra_proto_rawDescData +} + +var file_infra_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_infra_proto_goTypes = []interface{}{ + (*GetClusterIn)(nil), // 0: GetClusterIn + (*GetClusterOut)(nil), // 1: GetClusterOut + (*GetNodepoolIn)(nil), // 2: GetNodepoolIn + (*GetNodepoolOut)(nil), // 3: GetNodepoolOut + (*ClusterExistsIn)(nil), // 4: ClusterExistsIn + (*ClusterExistsOut)(nil), // 5: ClusterExistsOut + (*GetClusterKubeconfigOut)(nil), // 6: GetClusterKubeconfigOut + (*MarkClusterOnlineAtIn)(nil), // 7: MarkClusterOnlineAtIn + (*MarkClusterOnlineAtOut)(nil), // 8: MarkClusterOnlineAtOut + (*EnsureGlobalVPNConnectionIn)(nil), // 9: EnsureGlobalVPNConnectionIn + (*EnsureGlobalVPNConnectionOut)(nil), // 10: EnsureGlobalVPNConnectionOut + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp +} +var file_infra_proto_depIdxs = []int32{ + 11, // 0: MarkClusterOnlineAtIn.timestamp:type_name -> google.protobuf.Timestamp + 0, // 1: Infra.GetCluster:input_type -> GetClusterIn + 2, // 2: Infra.GetNodepool:input_type -> GetNodepoolIn + 4, // 3: Infra.ClusterExists:input_type -> ClusterExistsIn + 0, // 4: Infra.GetClusterKubeconfig:input_type -> GetClusterIn + 7, // 5: Infra.MarkClusterOnlineAt:input_type -> MarkClusterOnlineAtIn + 9, // 6: Infra.EnsureGlobalVPNConnection:input_type -> EnsureGlobalVPNConnectionIn + 1, // 7: Infra.GetCluster:output_type -> GetClusterOut + 3, // 8: Infra.GetNodepool:output_type -> GetNodepoolOut + 5, // 9: Infra.ClusterExists:output_type -> ClusterExistsOut + 6, // 10: Infra.GetClusterKubeconfig:output_type -> GetClusterKubeconfigOut + 8, // 11: Infra.MarkClusterOnlineAt:output_type -> MarkClusterOnlineAtOut + 10, // 12: Infra.EnsureGlobalVPNConnection:output_type -> EnsureGlobalVPNConnectionOut + 7, // [7:13] is the sub-list for method output_type + 1, // [1:7] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_infra_proto_init() } +func file_infra_proto_init() { + if File_infra_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_infra_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClusterIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_infra_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClusterOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_infra_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNodepoolIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_infra_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNodepoolOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_infra_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterExistsIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_infra_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterExistsOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_infra_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClusterKubeconfigOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_infra_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarkClusterOnlineAtIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_infra_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarkClusterOnlineAtOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_infra_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnsureGlobalVPNConnectionIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_infra_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnsureGlobalVPNConnectionOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_infra_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_infra_proto_goTypes, + DependencyIndexes: file_infra_proto_depIdxs, + MessageInfos: file_infra_proto_msgTypes, + }.Build() + File_infra_proto = out.File + file_infra_proto_rawDesc = nil + file_infra_proto_goTypes = nil + file_infra_proto_depIdxs = nil +} diff --git a/apps/infra/protobufs/infra/infra_grpc.pb.go b/apps/infra/protobufs/infra/infra_grpc.pb.go new file mode 100644 index 000000000..1d2d625c6 --- /dev/null +++ b/apps/infra/protobufs/infra/infra_grpc.pb.go @@ -0,0 +1,294 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.24.4 +// source: infra.proto + +package infra + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Infra_GetCluster_FullMethodName = "/Infra/GetCluster" + Infra_GetNodepool_FullMethodName = "/Infra/GetNodepool" + Infra_ClusterExists_FullMethodName = "/Infra/ClusterExists" + Infra_GetClusterKubeconfig_FullMethodName = "/Infra/GetClusterKubeconfig" + Infra_MarkClusterOnlineAt_FullMethodName = "/Infra/MarkClusterOnlineAt" + Infra_EnsureGlobalVPNConnection_FullMethodName = "/Infra/EnsureGlobalVPNConnection" +) + +// InfraClient is the client API for Infra service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type InfraClient interface { + GetCluster(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterOut, error) + GetNodepool(ctx context.Context, in *GetNodepoolIn, opts ...grpc.CallOption) (*GetNodepoolOut, error) + ClusterExists(ctx context.Context, in *ClusterExistsIn, opts ...grpc.CallOption) (*ClusterExistsOut, error) + GetClusterKubeconfig(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterKubeconfigOut, error) + MarkClusterOnlineAt(ctx context.Context, in *MarkClusterOnlineAtIn, opts ...grpc.CallOption) (*MarkClusterOnlineAtOut, error) + EnsureGlobalVPNConnection(ctx context.Context, in *EnsureGlobalVPNConnectionIn, opts ...grpc.CallOption) (*EnsureGlobalVPNConnectionOut, error) +} + +type infraClient struct { + cc grpc.ClientConnInterface +} + +func NewInfraClient(cc grpc.ClientConnInterface) InfraClient { + return &infraClient{cc} +} + +func (c *infraClient) GetCluster(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterOut, error) { + out := new(GetClusterOut) + err := c.cc.Invoke(ctx, Infra_GetCluster_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infraClient) GetNodepool(ctx context.Context, in *GetNodepoolIn, opts ...grpc.CallOption) (*GetNodepoolOut, error) { + out := new(GetNodepoolOut) + err := c.cc.Invoke(ctx, Infra_GetNodepool_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infraClient) ClusterExists(ctx context.Context, in *ClusterExistsIn, opts ...grpc.CallOption) (*ClusterExistsOut, error) { + out := new(ClusterExistsOut) + err := c.cc.Invoke(ctx, Infra_ClusterExists_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infraClient) GetClusterKubeconfig(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterKubeconfigOut, error) { + out := new(GetClusterKubeconfigOut) + err := c.cc.Invoke(ctx, Infra_GetClusterKubeconfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infraClient) MarkClusterOnlineAt(ctx context.Context, in *MarkClusterOnlineAtIn, opts ...grpc.CallOption) (*MarkClusterOnlineAtOut, error) { + out := new(MarkClusterOnlineAtOut) + err := c.cc.Invoke(ctx, Infra_MarkClusterOnlineAt_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infraClient) EnsureGlobalVPNConnection(ctx context.Context, in *EnsureGlobalVPNConnectionIn, opts ...grpc.CallOption) (*EnsureGlobalVPNConnectionOut, error) { + out := new(EnsureGlobalVPNConnectionOut) + err := c.cc.Invoke(ctx, Infra_EnsureGlobalVPNConnection_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InfraServer is the server API for Infra service. +// All implementations must embed UnimplementedInfraServer +// for forward compatibility +type InfraServer interface { + GetCluster(context.Context, *GetClusterIn) (*GetClusterOut, error) + GetNodepool(context.Context, *GetNodepoolIn) (*GetNodepoolOut, error) + ClusterExists(context.Context, *ClusterExistsIn) (*ClusterExistsOut, error) + GetClusterKubeconfig(context.Context, *GetClusterIn) (*GetClusterKubeconfigOut, error) + MarkClusterOnlineAt(context.Context, *MarkClusterOnlineAtIn) (*MarkClusterOnlineAtOut, error) + EnsureGlobalVPNConnection(context.Context, *EnsureGlobalVPNConnectionIn) (*EnsureGlobalVPNConnectionOut, error) + mustEmbedUnimplementedInfraServer() +} + +// UnimplementedInfraServer must be embedded to have forward compatible implementations. +type UnimplementedInfraServer struct { +} + +func (UnimplementedInfraServer) GetCluster(context.Context, *GetClusterIn) (*GetClusterOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCluster not implemented") +} +func (UnimplementedInfraServer) GetNodepool(context.Context, *GetNodepoolIn) (*GetNodepoolOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodepool not implemented") +} +func (UnimplementedInfraServer) ClusterExists(context.Context, *ClusterExistsIn) (*ClusterExistsOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClusterExists not implemented") +} +func (UnimplementedInfraServer) GetClusterKubeconfig(context.Context, *GetClusterIn) (*GetClusterKubeconfigOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetClusterKubeconfig not implemented") +} +func (UnimplementedInfraServer) MarkClusterOnlineAt(context.Context, *MarkClusterOnlineAtIn) (*MarkClusterOnlineAtOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method MarkClusterOnlineAt not implemented") +} +func (UnimplementedInfraServer) EnsureGlobalVPNConnection(context.Context, *EnsureGlobalVPNConnectionIn) (*EnsureGlobalVPNConnectionOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method EnsureGlobalVPNConnection not implemented") +} +func (UnimplementedInfraServer) mustEmbedUnimplementedInfraServer() {} + +// UnsafeInfraServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InfraServer will +// result in compilation errors. +type UnsafeInfraServer interface { + mustEmbedUnimplementedInfraServer() +} + +func RegisterInfraServer(s grpc.ServiceRegistrar, srv InfraServer) { + s.RegisterService(&Infra_ServiceDesc, srv) +} + +func _Infra_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraServer).GetCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Infra_GetCluster_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraServer).GetCluster(ctx, req.(*GetClusterIn)) + } + return interceptor(ctx, in, info, handler) +} + +func _Infra_GetNodepool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodepoolIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraServer).GetNodepool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Infra_GetNodepool_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraServer).GetNodepool(ctx, req.(*GetNodepoolIn)) + } + return interceptor(ctx, in, info, handler) +} + +func _Infra_ClusterExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClusterExistsIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraServer).ClusterExists(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Infra_ClusterExists_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraServer).ClusterExists(ctx, req.(*ClusterExistsIn)) + } + return interceptor(ctx, in, info, handler) +} + +func _Infra_GetClusterKubeconfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraServer).GetClusterKubeconfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Infra_GetClusterKubeconfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraServer).GetClusterKubeconfig(ctx, req.(*GetClusterIn)) + } + return interceptor(ctx, in, info, handler) +} + +func _Infra_MarkClusterOnlineAt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MarkClusterOnlineAtIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraServer).MarkClusterOnlineAt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Infra_MarkClusterOnlineAt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraServer).MarkClusterOnlineAt(ctx, req.(*MarkClusterOnlineAtIn)) + } + return interceptor(ctx, in, info, handler) +} + +func _Infra_EnsureGlobalVPNConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnsureGlobalVPNConnectionIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraServer).EnsureGlobalVPNConnection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Infra_EnsureGlobalVPNConnection_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraServer).EnsureGlobalVPNConnection(ctx, req.(*EnsureGlobalVPNConnectionIn)) + } + return interceptor(ctx, in, info, handler) +} + +// Infra_ServiceDesc is the grpc.ServiceDesc for Infra service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Infra_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "Infra", + HandlerType: (*InfraServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetCluster", + Handler: _Infra_GetCluster_Handler, + }, + { + MethodName: "GetNodepool", + Handler: _Infra_GetNodepool_Handler, + }, + { + MethodName: "ClusterExists", + Handler: _Infra_ClusterExists_Handler, + }, + { + MethodName: "GetClusterKubeconfig", + Handler: _Infra_GetClusterKubeconfig_Handler, + }, + { + MethodName: "MarkClusterOnlineAt", + Handler: _Infra_MarkClusterOnlineAt_Handler, + }, + { + MethodName: "EnsureGlobalVPNConnection", + Handler: _Infra_EnsureGlobalVPNConnection_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "infra.proto", +} From 76452a1cd29a456075e0443917c1b79f04edb576 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Sat, 14 Sep 2024 02:32:16 +0530 Subject: [PATCH 53/89] feat(tenant-agent): improves logging --- apps/tenant-agent/main.go | 25 ++++++++++++++++--------- apps/tenant-agent/types/types.go | 4 ++-- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/apps/tenant-agent/main.go b/apps/tenant-agent/main.go index 0df7629d5..c0a9219b4 100644 --- a/apps/tenant-agent/main.go +++ b/apps/tenant-agent/main.go @@ -57,7 +57,6 @@ const ( func (g *grpcHandler) handleErrorOnApply(ctx context.Context, err error, msg t.AgentMessage) error { b, err := json.Marshal(t.AgentErrMessage{ AccountName: msg.AccountName, - ClusterName: msg.ClusterName, Error: err.Error(), Action: msg.Action, Object: msg.Object, @@ -80,7 +79,7 @@ func NewAuthorizedGrpcContext(ctx context.Context, accessToken string) context.C func (g *grpcHandler) handleMessage(gctx context.Context, msg t.AgentMessage) error { g.incrementCounter() start := time.Now() - logger := g.logger.With("counter", g.inMemCounter, "account", msg.AccountName, "cluster", msg.ClusterName, "action", msg.Action) + logger := g.logger.With("counter", g.inMemCounter, "account", msg.AccountName, "action", msg.Action) ctx, cf := func() (context.Context, context.CancelFunc) { if g.isDev { return context.WithCancel(gctx) @@ -95,7 +94,7 @@ func (g *grpcHandler) handleMessage(gctx context.Context, msg t.AgentMessage) er } obj := unstructured.Unstructured{Object: msg.Object} - mLogger := logger.With("gvk", obj.GetObjectKind().GroupVersionKind().String()) + mLogger := logger.With("gvk", obj.GetObjectKind().GroupVersionKind().String()).With("NN", fmt.Sprintf("%s/%s", obj.GetNamespace(), obj.GetName())) mLogger.Info("received message") @@ -106,6 +105,13 @@ func (g *grpcHandler) handleMessage(gctx context.Context, msg t.AgentMessage) er switch msg.Action { case t.ActionApply: { + // lb := obj.GetLabels() + // if lb == nil { + // lb = make(map[string]string, 1) + // } + // lb[constants.AccountNameKey] = msg.AccountName + // obj.SetLabels(lb) + b, err := yaml.Marshal(msg.Object) if err != nil { return g.handleErrorOnApply(ctx, err, msg) @@ -113,11 +119,9 @@ func (g *grpcHandler) handleMessage(gctx context.Context, msg t.AgentMessage) er if _, err := g.yamlClient.ApplyYAML(ctx, b); err != nil { // mLogger.Errorf(err, "[%d] [error-on-apply]: yaml: \n%s\n", g.inMemCounter, b) - mLogger.Info("failed to process message") - fmt.Printf("[error-on-apply] yaml: \n%s\n", b) + mLogger.Error("failed to process message, got", "err", err, "error-on-apply:YAML", fmt.Sprintf("\n%s\n", b)) return g.handleErrorOnApply(ctx, err, msg) } - mLogger.Info("processed message") } case t.ActionDelete: { @@ -127,9 +131,9 @@ func (g *grpcHandler) handleMessage(gctx context.Context, msg t.AgentMessage) er mLogger.Info("processed message, resource does not exist, might already be deleted") return g.handleErrorOnApply(ctx, err, msg) } - mLogger.Info("failed to process message") + mLogger.Error("failed to process message, got", "err", err) + return g.handleErrorOnApply(ctx, err, msg) } - mLogger.Info("processed message") } case t.ActionRestart: { @@ -280,6 +284,9 @@ func main() { flag.Parse() + start := time.Now() + common.PrintBuildInfo() + ev := env.GetEnvOrDie() logger := logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug}) @@ -327,7 +334,7 @@ func main() { } }() - common.PrintReadyBanner() + common.PrintReadyBanner2(time.Since(start)) for { cc, err := libGrpc.NewGrpcClientV2(ev.GrpcAddr, libGrpc.GrpcConnectOpts{TLSConnect: !isDev, Logger: logger}) diff --git a/apps/tenant-agent/types/types.go b/apps/tenant-agent/types/types.go index c0a3b2855..5a0bb8b5c 100644 --- a/apps/tenant-agent/types/types.go +++ b/apps/tenant-agent/types/types.go @@ -10,7 +10,7 @@ const ( type AgentMessage struct { AccountName string `json:"accountName"` - ClusterName string `json:"clusterName"` + // ClusterName string `json:"clusterName"` Action Action `json:"action"` Object map[string]any `json:"object"` @@ -18,7 +18,7 @@ type AgentMessage struct { type AgentErrMessage struct { AccountName string `json:"accountName"` - ClusterName string `json:"clusterName"` + // ClusterName string `json:"clusterName"` Error string `json:"error"` Action Action `json:"action"` From 1a3c6fc4ce697e17f2668a3a1961d4f44a897012 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 17 Sep 2024 17:28:15 +0530 Subject: [PATCH 54/89] feat(accounts): removes container registry api requirements --- .../internal/app/graph/schema.resolvers.go | 9 ++- apps/accounts/internal/domain/accounts.go | 67 +++++++++---------- apps/accounts/internal/domain/domain.go | 23 +++---- apps/accounts/internal/env/env.go | 10 +-- apps/accounts/internal/framework/framework.go | 15 +++-- 5 files changed, 63 insertions(+), 61 deletions(-) diff --git a/apps/accounts/internal/app/graph/schema.resolvers.go b/apps/accounts/internal/app/graph/schema.resolvers.go index e66c52648..ee7b8e5ac 100644 --- a/apps/accounts/internal/app/graph/schema.resolvers.go +++ b/apps/accounts/internal/app/graph/schema.resolvers.go @@ -6,6 +6,7 @@ package graph import ( "context" + "github.com/kloudlite/api/apps/accounts/internal/app/graph/generated" "github.com/kloudlite/api/apps/accounts/internal/app/graph/model" "github.com/kloudlite/api/apps/accounts/internal/domain" @@ -302,6 +303,8 @@ func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } // User returns generated.UserResolver implementation. func (r *Resolver) User() generated.UserResolver { return &userResolver{r} } -type mutationResolver struct{ *Resolver } -type queryResolver struct{ *Resolver } -type userResolver struct{ *Resolver } +type ( + mutationResolver struct{ *Resolver } + queryResolver struct{ *Resolver } + userResolver struct{ *Resolver } +) diff --git a/apps/accounts/internal/domain/accounts.go b/apps/accounts/internal/domain/accounts.go index 4f28d10c9..11d4f3256 100644 --- a/apps/accounts/internal/domain/accounts.go +++ b/apps/accounts/internal/domain/accounts.go @@ -13,7 +13,6 @@ import ( iamT "github.com/kloudlite/api/apps/iam/types" "github.com/kloudlite/api/common" "github.com/kloudlite/api/constants" - "github.com/kloudlite/api/grpc-interfaces/container_registry" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/repos" @@ -108,33 +107,33 @@ func (d *domain) ensureKloudliteRegistryCredentials(ctx UserContext, account *en return nil } - out, err := d.containerRegistryClient.CreateReadOnlyCredential(ctx, &container_registry.CreateReadOnlyCredentialIn{ - AccountName: account.Name, - UserId: string(ctx.UserId), - CredentialName: credentialsName, - RegistryUsername: fmt.Sprintf("account_%s", account.Name), - }) - if err != nil { - return err - } - - if err := d.k8sClient.Create(ctx, &corev1.Secret{ - TypeMeta: metav1.TypeMeta{ - Kind: "Secret", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: credentialsName, - Namespace: account.TargetNamespace, - }, - Immutable: new(bool), - Data: map[string][]byte{ - corev1.DockerConfigJsonKey: []byte(out.DockerConfigJson), - }, - Type: corev1.SecretTypeDockerConfigJson, - }); err != nil { - return err - } + // out, err := d.containerRegistryClient.CreateReadOnlyCredential(ctx, &container_registry.CreateReadOnlyCredentialIn{ + // AccountName: account.Name, + // UserId: string(ctx.UserId), + // CredentialName: credentialsName, + // RegistryUsername: fmt.Sprintf("account_%s", account.Name), + // }) + // if err != nil { + // return err + // } + + // if err := d.k8sClient.Create(ctx, &corev1.Secret{ + // TypeMeta: metav1.TypeMeta{ + // Kind: "Secret", + // APIVersion: "v1", + // }, + // ObjectMeta: metav1.ObjectMeta{ + // Name: credentialsName, + // Namespace: account.TargetNamespace, + // }, + // Immutable: new(bool), + // Data: map[string][]byte{ + // corev1.DockerConfigJsonKey: []byte(out.DockerConfigJson), + // }, + // Type: corev1.SecretTypeDockerConfigJson, + // }); err != nil { + // return err + // } return nil } @@ -167,13 +166,13 @@ func (d *domain) CreateAccount(ctx UserContext, account entities.Account) (*enti return nil, errors.NewE(err) } - if err := d.ensureNamespaceForAccount(ctx, account.Name, account.TargetNamespace); err != nil { - return nil, errors.NewE(err) - } + // if err := d.ensureNamespaceForAccount(ctx, account.Name, account.TargetNamespace); err != nil { + // return nil, errors.NewE(err) + // } - if err := d.ensureKloudliteRegistryCredentials(ctx, &account); err != nil { - return nil, errors.NewE(err) - } + // if err := d.ensureKloudliteRegistryCredentials(ctx, &account); err != nil { + // return nil, errors.NewE(err) + // } return acc, nil } diff --git a/apps/accounts/internal/domain/domain.go b/apps/accounts/internal/domain/domain.go index 511368a95..98b318ccc 100644 --- a/apps/accounts/internal/domain/domain.go +++ b/apps/accounts/internal/domain/domain.go @@ -4,7 +4,6 @@ import ( "github.com/kloudlite/api/apps/accounts/internal/entities" "github.com/kloudlite/api/apps/accounts/internal/env" iamT "github.com/kloudlite/api/apps/iam/types" - "github.com/kloudlite/api/grpc-interfaces/container_registry" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/auth" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/comms" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/console" @@ -73,11 +72,11 @@ type Domain interface { } type domain struct { - authClient auth.AuthClient - iamClient iam.IAMClient - consoleClient console.ConsoleClient - containerRegistryClient container_registry.ContainerRegistryClient - commsClient comms.CommsClient + authClient auth.AuthClient + iamClient iam.IAMClient + consoleClient console.ConsoleClient + // containerRegistryClient container_registry.ContainerRegistryClient + commsClient comms.CommsClient accountRepo repos.DbRepo[*entities.Account] invitationRepo repos.DbRepo[*entities.Invitation] @@ -93,7 +92,7 @@ type domain struct { func NewDomain( iamCli iam.IAMClient, consoleClient console.ConsoleClient, - containerRegistryClient container_registry.ContainerRegistryClient, + // containerRegistryClient container_registry.ContainerRegistryClient, authClient auth.AuthClient, commsClient comms.CommsClient, @@ -108,11 +107,11 @@ func NewDomain( logger logging.Logger, ) Domain { return &domain{ - authClient: authClient, - iamClient: iamCli, - consoleClient: consoleClient, - commsClient: commsClient, - containerRegistryClient: containerRegistryClient, + authClient: authClient, + iamClient: iamCli, + consoleClient: consoleClient, + commsClient: commsClient, + // containerRegistryClient: containerRegistryClient, k8sClient: k8sClient, diff --git a/apps/accounts/internal/env/env.go b/apps/accounts/internal/env/env.go index f3d17bbf0..2b06baf5e 100644 --- a/apps/accounts/internal/env/env.go +++ b/apps/accounts/internal/env/env.go @@ -19,11 +19,11 @@ type Env struct { CookieDomain string `env:"COOKIE_DOMAIN" required:"true"` - IamGrpcAddr string `env:"IAM_GRPC_ADDR" required:"true"` - CommsGrpcAddr string `env:"COMMS_GRPC_ADDR" required:"true"` - ContainerRegistryGrpcAddr string `env:"CONTAINER_REGISTRY_GRPC_ADDR" required:"true"` - ConsoleGrpcAddr string `env:"CONSOLE_GRPC_ADDR" required:"true"` - AuthGrpcAddr string `env:"AUTH_GRPC_ADDR" required:"true"` + IamGrpcAddr string `env:"IAM_GRPC_ADDR" required:"true"` + CommsGrpcAddr string `env:"COMMS_GRPC_ADDR" required:"true"` + // ContainerRegistryGrpcAddr string `env:"CONTAINER_REGISTRY_GRPC_ADDR" required:"true"` + ConsoleGrpcAddr string `env:"CONSOLE_GRPC_ADDR" required:"true"` + AuthGrpcAddr string `env:"AUTH_GRPC_ADDR" required:"true"` SessionKVBucket string `env:"SESSION_KV_BUCKET" required:"true"` NatsURL string `env:"NATS_URL" required:"true"` diff --git a/apps/accounts/internal/framework/framework.go b/apps/accounts/internal/framework/framework.go index 866c8ddf7..624dfc2cb 100644 --- a/apps/accounts/internal/framework/framework.go +++ b/apps/accounts/internal/framework/framework.go @@ -68,9 +68,9 @@ var Module = fx.Module("framework", return grpc.NewGrpcClient(ev.CommsGrpcAddr) }), - fx.Provide(func(ev *env.Env) (app.ContainerRegistryClient, error) { - return grpc.NewGrpcClient(ev.ContainerRegistryGrpcAddr) - }), + // fx.Provide(func(ev *env.Env) (app.ContainerRegistryClient, error) { + // return grpc.NewGrpcClient(ev.ContainerRegistryGrpcAddr) + // }), fx.Provide(func(ev *env.Env) (app.ConsoleClient, error) { return grpc.NewGrpcClient(ev.ConsoleGrpcAddr) @@ -78,7 +78,8 @@ var Module = fx.Module("framework", app.Module, - fx.Invoke(func(c1 app.AuthClient, c2 app.IAMClient, c3 app.CommsClient, c4 app.ContainerRegistryClient, c5 app.ConsoleClient, lf fx.Lifecycle) { + // fx.Invoke(func(c1 app.AuthClient, c2 app.IAMClient, c3 app.CommsClient, c4 app.ContainerRegistryClient, c5 app.ConsoleClient, lf fx.Lifecycle) { + fx.Invoke(func(c1 app.AuthClient, c2 app.IAMClient, c3 app.CommsClient, c5 app.ConsoleClient, lf fx.Lifecycle) { lf.Append(fx.Hook{ OnStop: func(context.Context) error { if err := c1.Close(); err != nil { @@ -90,9 +91,9 @@ var Module = fx.Module("framework", if err := c3.Close(); err != nil { return errors.NewE(err) } - if err := c4.Close(); err != nil { - return errors.NewE(err) - } + // if err := c4.Close(); err != nil { + // return errors.NewE(err) + // } if err := c5.Close(); err != nil { return errors.NewE(err) } From fd9b0ae7701cccfacf03774b1e5256bfd7545e8c Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 17 Sep 2024 17:30:31 +0530 Subject: [PATCH 55/89] feat(infra): updates gateway syncing, and supports edge on platform cluster --- apps/infra/Taskfile.yml | 3 +- apps/infra/internal/domain/clusters.go | 219 +++--------------- .../domain/global-vpn-cluster-connection.go | 19 +- .../infra/internal/domain/provider-secrets.go | 3 - apps/infra/internal/env/env.go | 54 +++-- apps/infra/main.go | 2 +- 6 files changed, 79 insertions(+), 221 deletions(-) diff --git a/apps/infra/Taskfile.yml b/apps/infra/Taskfile.yml index c16798cd5..5063ebe79 100644 --- a/apps/infra/Taskfile.yml +++ b/apps/infra/Taskfile.yml @@ -53,7 +53,8 @@ tasks: - .secrets/env cmds: - go build -o bin/infra . - - ./bin/infra --dev + # - ./bin/infra --dev + - ./bin/infra gen:constants: cmds: diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 30d42f9b2..c0ac2fc5b 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -33,6 +33,7 @@ import ( corev1 "k8s.io/api/core/v1" apiErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/rest" ) const ( @@ -380,11 +381,6 @@ func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) e defer func() { d.logger.Info("syncKloudliteGatewayDevice", "took", fmt.Sprintf("%.2fs", time.Since(t).Seconds())) }() - // 1. parse deployment template - b, err := templates.Read(templates.GlobalVPNKloudliteDeviceTemplate) - if err != nil { - return errors.NewE(err) - } svcTemplate, err := templates.Read(templates.GatewayServiceTemplate) if err != nil { @@ -450,7 +446,8 @@ func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) e } } - resourceName := fmt.Sprintf("kloudlite-device-%s", gv.Name) + // resourceName := fmt.Sprintf("kloudlite-device-%s", gv.Name) + resourceName := fmt.Sprintf("device-%s-egw", gv.Name) resourceNamespace := accNs selector := map[string]string{ "app": resourceName, @@ -468,194 +465,26 @@ func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) e return errors.Newf("invalid gateway region %q", gao.KloudliteGatewayRegion) } - wgEndpoint := gwRegion.PublicDNSHost - - c, err := k8s.RestConfigFromKubeConfig([]byte(gwRegion.Kubeconfig)) - if err != nil { - return errors.NewE(err) - } - - yc, err := kubectl.NewYAMLClient(c, kubectl.YAMLClientOpts{}) - if err != nil { - return errors.NewE(err) - } + var k8sRestConfig *rest.Config - service := &corev1.Service{} - - wgSvcName := fmt.Sprintf("%s-wg", resourceName) - - svcBytes, err := templates.ParseBytes(svcTemplate, templates.GatewayServiceTemplateVars{ - Name: wgSvcName, - Namespace: resourceNamespace, - WireguardPort: wgParams.ListenPort, - Selector: selector, - }) - if err != nil { - return errors.NewE(err) - } - - ctx2, cf := func() (context.Context, context.CancelFunc) { - if d.env.IsDev { - return context.WithCancel(ctx) - } - return context.WithTimeout(ctx, 5*time.Second) - }() - defer cf() - - for { - if ctx2.Err() != nil { - return ctx2.Err() - } - service, err = yc.Client().CoreV1().Services(resourceNamespace).Get(ctx, wgSvcName, metav1.GetOptions{}) + switch gwRegion.ID { + case "self": + k8sRestConfig, err = k8s.RestInclusterConfig() if err != nil { - if !apiErrors.IsNotFound(err) { - return err - } - if _, err := yc.ApplyYAML(ctx, svcBytes); err != nil { + return errors.NewE(err) + } + default: + { + k8sRestConfig, err = k8s.RestConfigFromKubeConfig([]byte(gwRegion.Kubeconfig)) + if err != nil { return errors.NewE(err) } - continue - } - - if service.Spec.Ports[0].NodePort != 0 { - wgEndpoint = fmt.Sprintf("%s:%d", wgEndpoint, service.Spec.Ports[0].NodePort) - break - } - } - - if _, err := d.gvpnDevicesRepo.PatchById(ctx, klDevice.Id, repos.Document{ - fc.GlobalVPNDevicePublicEndpoint: wgEndpoint, - }); err != nil { - return err - } - - wgConfig, err := wgutils.GenerateWireguardConfig(*wgParams) - if err != nil { - return err - } - - deploymentBytes, err := templates.ParseBytes(b, templates.GVPNKloudliteDeviceTemplateVars{ - Name: resourceName, - Namespace: accNs, - WgConfig: wgConfig, - EnableKubeReverseProxy: false, - KubeReverseProxyImage: d.env.GlobalVPNKubeReverseProxyImage, - AuthzToken: d.env.GlobalVPNKubeReverseProxyAuthzToken, - GatewayDNSServers: strings.Join(dnsServerArgs, ","), - GatewayServiceHosts: strings.Join(deviceSvcHosts, ","), - WireguardPort: wgParams.ListenPort, - - KloudliteAccount: gv.AccountName, - }) - if err != nil { - return err - } - - d.logger.Info("applying yaml", "yaml", string(deploymentBytes)) - if _, err := yc.ApplyYAML(ctx, deploymentBytes); err != nil { - return errors.NewE(err) - } - - return nil -} - -func (d *domain) syncKloudliteGatewayDevice2(ctx InfraContext, gvpnName string) error { - t := time.Now() - defer func() { - d.logger.Info("syncKloudliteGatewayDevice2", "took", time.Since(t).Seconds()) - }() - // 1. parse deployment template - b, err := templates.Read(templates.GlobalVPNKloudliteDeviceTemplate) - if err != nil { - return errors.NewE(err) - } - - svcTemplate, err := templates.Read(templates.GatewayServiceTemplate) - if err != nil { - return errors.NewE(err) - } - - accNs, err := d.getAccNamespace(ctx) - if err != nil { - return errors.NewE(err) - } - - gv, err := d.findGlobalVPN(ctx, gvpnName) - if err != nil { - return err - } - - if gv.KloudliteGatewayDevice.Name == "" { - return nil - } - - gvpnConns, err := d.listGlobalVPNConnections(ctx, gvpnName) - if err != nil { - return err - } - - klDevice, err := d.findGlobalVPNDevice(ctx, gvpnName, gv.KloudliteGatewayDevice.Name) - if err != nil { - return err - } - - clDevice, err := d.findGlobalVPNDevice(ctx, gvpnName, gv.KloudliteClusterLocalDevice.Name) - if err != nil { - return err - } - - wgParams, deviceHosts, err := d.buildGlobalVPNDeviceWgBaseParams(ctx, gvpnConns, klDevice) - if err != nil { - return err - } - - publicPeers := make([]wgutils.PublicPeer, 0, len(wgParams.PublicPeers)) - for _, p := range wgParams.PublicPeers { - if p.PublicKey != clDevice.PublicKey { - publicPeers = append(publicPeers, p) } } - deviceSvcHosts := make([]string, 0, len(deviceHosts)) - for k, v := range deviceHosts { - deviceSvcHosts = append(deviceSvcHosts, fmt.Sprintf("%s=%s", k, v)) - } - - wgParams.PublicPeers = publicPeers - wgParams.DNS = klDevice.IPAddr - wgParams.ListenPort = 31820 - - dnsServerArgs := make([]string, 0, len(gvpnConns)) - for _, gvpnConn := range gvpnConns { - if gvpnConn.Spec.GlobalIP != "" { - dnsServerArgs = append(dnsServerArgs, fmt.Sprintf("%s=%s:53", gvpnConn.Spec.DNSSuffix, gvpnConn.Spec.GlobalIP)) - } - } - - resourceName := fmt.Sprintf("kloudlite-device-%s", gv.Name) - resourceNamespace := accNs - selector := map[string]string{ - "app": resourceName, - } - - gao, err := d.accountsSvc.GetAccount(ctx, string(ctx.UserId), ctx.AccountName) - if err != nil { - return errors.NewE(err) - } - - gwRegion, ok := d.env.AvailableKloudliteRegions[gao.KloudliteGatewayRegion] - if !ok { - return errors.Newf("invalid gateway region %q", gao.KloudliteGatewayRegion) - } - wgEndpoint := gwRegion.PublicDNSHost - c, err := k8s.RestConfigFromKubeConfig([]byte(gwRegion.Kubeconfig)) - if err != nil { - return errors.NewE(err) - } - - yc, err := kubectl.NewYAMLClient(c, kubectl.YAMLClientOpts{}) + yc, err := kubectl.NewYAMLClient(k8sRestConfig, kubectl.YAMLClientOpts{}) if err != nil { return errors.NewE(err) } @@ -714,6 +543,11 @@ func (d *domain) syncKloudliteGatewayDevice2(ctx InfraContext, gvpnName string) return err } + b, err := templates.Read(templates.GlobalVPNKloudliteDeviceTemplate) + if err != nil { + return errors.NewE(err) + } + deploymentBytes, err := templates.ParseBytes(b, templates.GVPNKloudliteDeviceTemplateVars{ Name: resourceName, Namespace: accNs, @@ -731,6 +565,7 @@ func (d *domain) syncKloudliteGatewayDevice2(ctx InfraContext, gvpnName string) return err } + d.logger.Info("applying yaml", "yaml", string(deploymentBytes)) if _, err := yc.ApplyYAML(ctx, deploymentBytes); err != nil { return errors.NewE(err) } @@ -745,12 +580,6 @@ syncKloudliteDeviceOnPlatform: - we can read their logs, and everything on demand */ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string) error { - // 1. parse deployment template - b, err := templates.Read(templates.GlobalVPNKloudliteDeviceTemplate) - if err != nil { - return errors.NewE(err) - } - svcTemplate, err := templates.Read(templates.GatewayServiceTemplate) if err != nil { return errors.NewE(err) @@ -816,7 +645,8 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string } } - resourceName := fmt.Sprintf("kloudlite-device-%s", gv.Name) + // resourceName := fmt.Sprintf("kloudlite-device-%s", gv.Name) + resourceName := fmt.Sprintf("device-%s-pl", gv.Name) resourceNamespace := accNs selector := map[string]string{ "app": resourceName, @@ -877,6 +707,11 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string return err } + b, err := templates.Read(templates.GlobalVPNKloudliteDeviceTemplate) + if err != nil { + return errors.NewE(err) + } + deploymentBytes, err := templates.ParseBytes(b, templates.GVPNKloudliteDeviceTemplateVars{ Name: resourceName, Namespace: accNs, diff --git a/apps/infra/internal/domain/global-vpn-cluster-connection.go b/apps/infra/internal/domain/global-vpn-cluster-connection.go index 6b3a4935c..a4c7871d6 100644 --- a/apps/infra/internal/domain/global-vpn-cluster-connection.go +++ b/apps/infra/internal/domain/global-vpn-cluster-connection.go @@ -167,15 +167,18 @@ func (d *domain) reconGlobalVPNConnections(ctx InfraContext, vpnName string) err } xcc.Spec.Peers = peers - unp, err := d.gvpnConnRepo.Patch( - ctx, - repos.Filter{ - fields.AccountName: ctx.AccountName, - fields.ClusterName: xcc.ClusterName, - fields.MetadataName: xcc.Name, + unp, err := d.gvpnConnRepo.PatchById(ctx, xcc.Id, common.PatchForUpdate(ctx, xcc, common.PatchOpts{ + XPatch: map[string]any{ + fc.GlobalVPNConnectionSpecPeers: peers, }, - common.PatchForUpdate(ctx, xcc, common.PatchOpts{XPatch: map[string]any{fc.GlobalVPNConnectionSpecPeers: peers}}), - ) + })) + // unp, err := d.gvpnConnRepo.Patch(ctx, repos.Filter{ + // fields.AccountName: ctx.AccountName, + // fields.ClusterName: xcc.ClusterName, + // fields.MetadataName: xcc.Name, + // }, + // common.PatchForUpdate(ctx, xcc, common.PatchOpts{XPatch: map[string]any{fc.GlobalVPNConnectionSpecPeers: peers}}), + // ) if err != nil { return errors.NewE(err) } diff --git a/apps/infra/internal/domain/provider-secrets.go b/apps/infra/internal/domain/provider-secrets.go index e5f4e2386..bfa54e409 100644 --- a/apps/infra/internal/domain/provider-secrets.go +++ b/apps/infra/internal/domain/provider-secrets.go @@ -164,9 +164,6 @@ func (d *domain) CreateProviderSecret(ctx InfraContext, psecretIn entities.Cloud return nil, errors.NewE(err) } - if err != nil { - return nil, errors.NewE(err) - } if err := d.applyK8sResource(ctx, secret, nSecret.RecordVersion); err != nil { return nil, errors.NewE(err) } diff --git a/apps/infra/internal/env/env.go b/apps/infra/internal/env/env.go index ab93e31b1..110be4c41 100644 --- a/apps/infra/internal/env/env.go +++ b/apps/infra/internal/env/env.go @@ -9,7 +9,10 @@ import ( "sigs.k8s.io/yaml" ) -type Env struct { +type infraEnv struct { + IsDev bool + KubernetesApiProxy string `env:"KUBERNETES_API_PROXY" default:"http://localhost:8080"` + InfraDbUri string `env:"MONGO_DB_URI" required:"true"` InfraDbName string `env:"MONGO_DB_NAME" required:"true"` @@ -32,17 +35,7 @@ type Env struct { MessageOfficeInternalGrpcAddr string `env:"MESSAGE_OFFICE_INTERNAL_GRPC_ADDR" required:"true"` MessageOfficeExternalGrpcAddr string `env:"MESSAGE_OFFICE_EXTERNAL_GRPC_ADDR" required:"true"` - AWSCfParamTrustedARN string `env:"AWS_CF_PARAM_TRUSTED_ARN" required:"true"` - AWSCfStackNamePrefix string `env:"AWS_CF_STACK_NAME_PREFIX" required:"true"` - AWSCfRoleNamePrefix string `env:"AWS_CF_ROLE_NAME_PREFIX" required:"true"` - AWSCfInstanceProfileNamePrefix string `env:"AWS_CF_INSTANCE_PROFILE_NAME_PREFIX" required:"true"` - AWSCfStackS3URL string `env:"AWS_CF_STACK_S3_URL" required:"true"` - - AWSAccessKey string `env:"AWS_ACCESS_KEY" required:"true"` - AWSSecretKey string `env:"AWS_SECRET_KEY" required:"true"` - - PublicDNSHostSuffix string `env:"PUBLIC_DNS_HOST_SUFFIX" required:"true"` - SessionKVBucket string `env:"SESSION_KV_BUCKET" required:"true"` + SessionKVBucket string `env:"SESSION_KV_BUCKET" required:"true"` MsvcTemplateFilePath string `env:"MSVC_TEMPLATE_FILE_PATH" required:"true"` @@ -58,9 +51,6 @@ type Env struct { // ClusterOffset = 5, reserving 5 * 8K IPs for wireguard devices and other devices, that are not Clusters ClustersOffset int `env:"CLUSTERS_OFFSET" default:"5"` - IsDev bool - KubernetesApiProxy string `env:"KUBERNETES_API_PROXY"` - GlobalVPNKubeReverseProxyImage string `env:"GLOBAL_VPN_KUBE_REVERSE_PROXY_IMAGE" required:"true"` GlobalVPNKubeReverseProxyAuthzToken string `env:"GLOBAL_VPN_KUBE_REVERSE_PROXY_AUTHZ_TOKEN" required:"true"` @@ -68,6 +58,26 @@ type Env struct { AvailableKloudliteRegionsConfig string `env:"AVAILABLE_KLOUDLITE_REGIONS_CONFIG" required:"false"` AvailableKloudliteRegions map[string]AvailableKloudliteRegion + + EnableClusterCreation bool `env:"ENABLE_CLUSTER_CREATION" default:"false"` +} + +type Env struct { + clusterCreationEnv `json:",inline"` + infraEnv `json:",inline"` +} + +type clusterCreationEnv struct { + PublicDNSHostSuffix string `env:"PUBLIC_DNS_HOST_SUFFIX" required:"true"` + + AWSCfParamTrustedARN string `env:"AWS_CF_PARAM_TRUSTED_ARN" required:"true"` + AWSCfStackNamePrefix string `env:"AWS_CF_STACK_NAME_PREFIX" required:"true"` + AWSCfRoleNamePrefix string `env:"AWS_CF_ROLE_NAME_PREFIX" required:"true"` + AWSCfInstanceProfileNamePrefix string `env:"AWS_CF_INSTANCE_PROFILE_NAME_PREFIX" required:"true"` + AWSCfStackS3URL string `env:"AWS_CF_STACK_S3_URL" required:"true"` + + AWSAccessKey string `env:"AWS_ACCESS_KEY" required:"true"` + AWSSecretKey string `env:"AWS_SECRET_KEY" required:"true"` } type AvailableKloudliteRegion struct { @@ -81,9 +91,21 @@ type AvailableKloudliteRegion struct { func LoadEnv() (*Env, error) { var ev Env - if err := env.Set(&ev); err != nil { + + var iev infraEnv + if err := env.Set(&iev); err != nil { return nil, errors.NewE(err) } + ev.infraEnv = iev + + if iev.EnableClusterCreation { + var ccev clusterCreationEnv + if err := env.Set(&ccev); err != nil { + return nil, errors.NewE(err) + } + ev.clusterCreationEnv = ccev + } + if ev.AvailableKloudliteRegionsConfig != "" { f, err := os.Open(ev.AvailableKloudliteRegionsConfig) if err != nil { diff --git a/apps/infra/main.go b/apps/infra/main.go index d91ef0bd0..3648f26d9 100644 --- a/apps/infra/main.go +++ b/apps/infra/main.go @@ -61,7 +61,7 @@ func main() { }), fx.Provide(func(e *env.Env) (*rest.Config, error) { - if e.KubernetesApiProxy != "" { + if isDev && e.KubernetesApiProxy != "" { return &rest.Config{ Host: e.KubernetesApiProxy, }, nil From 45924f707737b1f656c3e3b143f73aa6d458b8b4 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 17 Sep 2024 17:32:30 +0530 Subject: [PATCH 56/89] feat(auth): supports enabling/disabling auth email verification This feature is useful while self-hosting the platform, as it saves initial hassle of setting up sendgrid and everything prior to installing chart itself. --- apps/auth/internal/app/app.go | 1 + .../internal/app/graph/schema.resolvers.go | 7 +++-- apps/auth/internal/domain/domain.go | 3 +- apps/auth/internal/domain/impl.go | 25 +++++++-------- apps/auth/internal/env/env.go | 2 ++ apps/auth/main.go | 31 ++++++++++++------- 6 files changed, 41 insertions(+), 28 deletions(-) diff --git a/apps/auth/internal/app/app.go b/apps/auth/internal/app/app.go index 6a1efe60e..4080b8fe8 100644 --- a/apps/auth/internal/app/app.go +++ b/apps/auth/internal/app/app.go @@ -2,6 +2,7 @@ package app import ( "context" + "github.com/99designs/gqlgen/graphql" "github.com/gofiber/fiber/v2" "github.com/kloudlite/api/apps/auth/internal/app/graph" diff --git a/apps/auth/internal/app/graph/schema.resolvers.go b/apps/auth/internal/app/graph/schema.resolvers.go index e4f9cc636..709244229 100644 --- a/apps/auth/internal/app/graph/schema.resolvers.go +++ b/apps/auth/internal/app/graph/schema.resolvers.go @@ -6,6 +6,7 @@ package graph import ( "context" + "github.com/kloudlite/api/apps/auth/internal/app/graph/generated" "github.com/kloudlite/api/apps/auth/internal/app/graph/model" "github.com/kloudlite/api/common" @@ -285,5 +286,7 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type mutationResolver struct{ *Resolver } -type queryResolver struct{ *Resolver } +type ( + mutationResolver struct{ *Resolver } + queryResolver struct{ *Resolver } +) diff --git a/apps/auth/internal/domain/domain.go b/apps/auth/internal/domain/domain.go index b752dd56a..54a317d20 100644 --- a/apps/auth/internal/domain/domain.go +++ b/apps/auth/internal/domain/domain.go @@ -2,6 +2,7 @@ package domain import ( "context" + "github.com/kloudlite/api/apps/auth/internal/entities" "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/repos" @@ -38,7 +39,7 @@ type Domain interface { CreateInviteCode(ctx context.Context, name string, inviteCode string) (*entities.InviteCode, error) DeleteInviteCode(ctx context.Context, invCodeId string) error - //UpdateInviteCode(ctx context.Context, invCode entities.InviteCode) (*entities.InviteCode, error) + // UpdateInviteCode(ctx context.Context, invCode entities.InviteCode) (*entities.InviteCode, error) VerifyInviteCode(ctx context.Context, userId repos.ID, invitationCode string) (bool, error) } diff --git a/apps/auth/internal/domain/impl.go b/apps/auth/internal/domain/impl.go index 00af8d286..7e934a30c 100644 --- a/apps/auth/internal/domain/impl.go +++ b/apps/auth/internal/domain/impl.go @@ -7,11 +7,12 @@ import ( "encoding/hex" "encoding/json" "fmt" - "github.com/kloudlite/api/apps/auth/internal/entities" - "github.com/kloudlite/api/apps/auth/internal/env" "strings" "time" + "github.com/kloudlite/api/apps/auth/internal/entities" + "github.com/kloudlite/api/apps/auth/internal/env" + "github.com/kloudlite/api/constants" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/comms" @@ -146,7 +147,6 @@ func (d *domainI) OauthAddLogin(ctx context.Context, userId repos.ID, provider s return false, errors.Newf("unknown provider=%s, aborting request", provider) } } - } func (d *domainI) GetUserById(ctx context.Context, id repos.ID) (*entities.User, error) { @@ -179,17 +179,14 @@ func (d *domainI) Login(ctx context.Context, email string, password string) (*co func (d *domainI) SignUp(ctx context.Context, name string, email string, password string) (*common.AuthSession, error) { matched, err := d.userRepo.FindOne(ctx, repos.Filter{"email": email}) - if err != nil { if matched != nil { return nil, errors.NewE(err) } } - if matched != nil { - if matched.Email == email { - return nil, errors.Newf("user(email=%s) already exists", email) - } + if matched != nil && matched.Email == email { + return nil, errors.Newf("user(email=%q) already exists", email) } salt := generateId("salt") @@ -199,21 +196,22 @@ func (d *domainI) SignUp(ctx context.Context, name string, email string, passwor Name: name, Email: email, Password: hex.EncodeToString(sum[:]), - Verified: false, + Verified: !d.envVars.UserEmailVerifactionEnabled, Approved: false, Metadata: nil, Joined: time.Now(), PasswordSalt: salt, }, ) - if err != nil { return nil, errors.NewE(err) } - err = d.generateAndSendVerificationToken(ctx, user) - if err != nil { - return nil, errors.NewE(err) + if d.envVars.UserEmailVerifactionEnabled { + err = d.generateAndSendVerificationToken(ctx, user) + if err != nil { + return nil, errors.NewE(err) + } } return newAuthSession(user.Id, user.Email, user.Name, user.Verified, "email/password"), nil @@ -437,7 +435,6 @@ func (d *domainI) addOAuthLogin(ctx context.Context, provider string, token *oau Token: token, }, ) - if err != nil { return nil, errors.NewEf(err, "could not store access token in repo") } diff --git a/apps/auth/internal/env/env.go b/apps/auth/internal/env/env.go index a009e28f4..8086e8ca9 100644 --- a/apps/auth/internal/env/env.go +++ b/apps/auth/internal/env/env.go @@ -14,6 +14,8 @@ type Env struct { CookieDomain string `env:"COOKIE_DOMAIN" required:"true"` + UserEmailVerifactionEnabled bool `env:"USER_EMAIL_VERIFICATION_ENABLED" default:"true"` + OAuth2Enabled bool `env:"OAUTH2_ENABLED" required:"true"` OAuth2GithubEnabled bool `env:"OAUTH2_GITHUB_ENABLED" required:"false"` diff --git a/apps/auth/main.go b/apps/auth/main.go index 944ed2adc..d9d5abf4f 100644 --- a/apps/auth/main.go +++ b/apps/auth/main.go @@ -3,7 +3,7 @@ package main import ( "context" "flag" - "log/slog" + "os" "time" "github.com/kloudlite/api/pkg/errors" @@ -18,9 +18,23 @@ import ( ) func main() { + common.PrintBuildInfo() + start := time.Now() + var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") + + var debug bool + flag.BoolVar(&debug, "debug", false, "--debug") + flag.Parse() + + if isDev { + debug = true + } + + logger := logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug, SetAsDefaultLogger: true}) + app := fx.New( fx.NopLogger, fn.FxErrorHandler(), @@ -38,29 +52,24 @@ func main() { }, ), - fx.Provide(func() *slog.Logger { - return logging.NewSlogLogger(logging.SlogOptions{ - ShowCaller: true, - ShowDebugLogs: isDev, - SetAsDefaultLogger: true, - }) - }), + fx.Supply(logger), framework.Module, ) ctx, cancelFunc := func() (context.Context, context.CancelFunc) { if isDev { - return context.WithTimeout(context.TODO(), 20*time.Second) + return context.WithTimeout(context.TODO(), 10*time.Second) } return context.WithTimeout(context.TODO(), 5*time.Second) }() defer cancelFunc() if err := app.Start(ctx); err != nil { - panic(err) + logger.Error("failed to start auth-api, got", "err", err) + os.Exit(1) } - common.PrintReadyBanner() + common.PrintReadyBanner2(time.Since(start)) <-app.Done() } From df918ed8755850f7a4276ee667784a8953e94fb3 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 17 Sep 2024 17:34:42 +0530 Subject: [PATCH 57/89] refactor(console): removes unused env vars --- apps/console/internal/env/env.go | 3 --- apps/console/main.go | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/console/internal/env/env.go b/apps/console/internal/env/env.go index 7e6582252..b119c4e5a 100644 --- a/apps/console/internal/env/env.go +++ b/apps/console/internal/env/env.go @@ -28,14 +28,11 @@ type Env struct { MessageOfficeInternalGRPCAddr string `env:"MESSAGE_OFFICE_INTERNAL_GRPC_ADDR" required:"true"` AccountGRPCAddr string `env:"ACCOUNT_GRPC_ADDR" required:"true"` - PromHttpAddr string `env:"PROM_HTTP_ADDR" required:"true"` SessionKVBucket string `env:"SESSION_KV_BUCKET" required:"true"` ConsoleCacheKVBucket string `env:"CONSOLE_CACHE_KV_BUCKET" required:"true"` IsDev bool KubernetesApiProxy string `env:"KUBERNETES_API_PROXY" default:"localhost:8080"` - - DeviceNamespace string `env:"DEVICE_NAMESPACE" required:"true"` } func LoadEnv() (*Env, error) { diff --git a/apps/console/main.go b/apps/console/main.go index 10fbee98d..ebf4dc4f5 100644 --- a/apps/console/main.go +++ b/apps/console/main.go @@ -54,7 +54,7 @@ func main() { }), fx.Provide(func(e *env.Env) (*rest.Config, error) { - if isDev && e.KubernetesApiProxy != "" { + if isDev { return &rest.Config{ Host: e.KubernetesApiProxy, }, nil From 6802a6b53c1ba8b86b6398cc173339905e389118 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 17 Sep 2024 17:35:41 +0530 Subject: [PATCH 58/89] chore: message-office, tenant-agent and observability improvements --- .../__http__/accounts/accounts.graphql.yml | 5 +- .tools/nvim/__http__/console/apps.graphql.yml | 14 +- .../__http__/console/environments.graphql.yml | 16 +- .../internal/domain/environments/errors.go | 1 - .../internal/domain/environments/repo.go | 211 ------------------ .../internal/domain/environments/repo_test.go | 1 - .../internal/app/adapter-resource-apply.go | 2 - .../internal/framework/framework.go | 4 +- .../domain/platform-edge/repo_test.go | 1 + apps/observability/internal/app/app.go | 4 +- apps/tenant-agent/main.go | 7 +- .../internal/framework/framework.go | 5 +- apps/worker-audit-logging/main.go | 16 +- 13 files changed, 51 insertions(+), 236 deletions(-) delete mode 100644 apps/console/internal/domain/environments/errors.go delete mode 100644 apps/console/internal/domain/environments/repo.go delete mode 100644 apps/console/internal/domain/environments/repo_test.go diff --git a/.tools/nvim/__http__/accounts/accounts.graphql.yml b/.tools/nvim/__http__/accounts/accounts.graphql.yml index 72f09b06a..fc1c006d2 100644 --- a/.tools/nvim/__http__/accounts/accounts.graphql.yml +++ b/.tools/nvim/__http__/accounts/accounts.graphql.yml @@ -44,14 +44,15 @@ query: | accounts_createAccount(account: $account) { id isActive + kloudliteGatewayRegion } } variables: account: - contactEmail: "{{.email}}" - displayName: "Example Account Name" + displayName: "test account - nxt" metadata: name: "{{.accountName}}" + kloudliteGatewayRegion: "k3d/mt1" --- diff --git a/.tools/nvim/__http__/console/apps.graphql.yml b/.tools/nvim/__http__/console/apps.graphql.yml index 79296ef1e..8596d2df1 100644 --- a/.tools/nvim/__http__/console/apps.graphql.yml +++ b/.tools/nvim/__http__/console/apps.graphql.yml @@ -1,7 +1,7 @@ --- global: name: sample-app - envName: "test-env" + envName: "test-env5" --- label: List Apps @@ -85,7 +85,7 @@ variables: app: displayName: "sample app" metadata: - name: "{{.name}}" + name: "{{.name}}1" spec: services: - port: 80 @@ -145,3 +145,13 @@ variables: envName: "{{.envName}}" appName: "{{.name}}" --- + +label: Resync App +query: |+ + query Query($envName: String!, $name: String!) { + core_resyncApp(envName: $envName, name: $name) + } +variables: + envName: "{{.envName}}" + name: "{{.name}}" +--- diff --git a/.tools/nvim/__http__/console/environments.graphql.yml b/.tools/nvim/__http__/console/environments.graphql.yml index de567dc8f..d4694580e 100644 --- a/.tools/nvim/__http__/console/environments.graphql.yml +++ b/.tools/nvim/__http__/console/environments.graphql.yml @@ -1,7 +1,5 @@ --- -global: - envTargetNamespace: "nxtcoder17" - envName: "test-env" +global: {} --- label: List Environments @@ -41,6 +39,10 @@ query: |+ #graphql action } recordVersion + onlineStatus { + lastOnlineAt + willBeOfflineAt + } } } pageInfo { @@ -62,7 +64,7 @@ query: |+ #graphql apiVersion kind spec { - targetNamespace + targetNamespace } syncStatus { state @@ -78,9 +80,7 @@ variables: displayName: Display Name of a sample environment clusterName: "__kloudlite_enabled_cluster" metadata: - name: "{{.envName}}" - # spec: - # projectName: "{{.projectName}}" + name: "{{.envName}}8" --- label: resync environment @@ -125,7 +125,7 @@ query: |+ core_deleteEnvironment(envName: $envName) } variables: - envName: "{{.envName}}" + envName: "{{.envName}}4" --- --- diff --git a/apps/console/internal/domain/environments/errors.go b/apps/console/internal/domain/environments/errors.go deleted file mode 100644 index d4fcbc9f9..000000000 --- a/apps/console/internal/domain/environments/errors.go +++ /dev/null @@ -1 +0,0 @@ -package environments diff --git a/apps/console/internal/domain/environments/repo.go b/apps/console/internal/domain/environments/repo.go deleted file mode 100644 index e6a836be2..000000000 --- a/apps/console/internal/domain/environments/repo.go +++ /dev/null @@ -1,211 +0,0 @@ -package environments - -// import ( -// "fmt" -// "log/slog" -// "strings" -// -// "github.com/kloudlite/api/apps/console/internal/domain/ports" -// "github.com/kloudlite/api/apps/console/internal/domain/types" -// "github.com/kloudlite/api/apps/console/internal/entities" -// "github.com/kloudlite/api/common" -// "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" -// "github.com/kloudlite/api/pkg/errors" -// "github.com/kloudlite/api/pkg/k8s" -// "github.com/kloudlite/api/pkg/repos" -// -// iamT "github.com/kloudlite/api/apps/iam/types" -// t "github.com/kloudlite/api/pkg/types" -// crdsv1 "github.com/kloudlite/operator/apis/crds/v1" -// ) -// -// type Repo struct { -// logger *slog.Logger -// -// k8sClient k8s.Client -// environmentRepo repos.DbRepo[*entities.Environment] -// -// resourceEventPublisher types.ResourceEventPublisher -// -// iamSvc ports.IAMService -// } -// -// func getEnvironmentTargetNamespace(envName string) string { -// return fmt.Sprintf("env-%s", envName) -// } -// -// // ArchiveEnvironmentsForCluster implements Domain. -// func (r *Repo) ArchiveEnvironmentsForCluster(ctx types.ConsoleContext, clusterName string) (bool, error) { -// panic("unimplemented") -// } -// -// // CloneEnvironment implements Domain. -// func (r *Repo) CloneEnvironment(ctx types.ConsoleContext, args CloneEnvironmentArgs) (*entities.Environment, error) { -// panic("unimplemented") -// } -// -// // CreateEnvironment implements Domain. -// func (r *Repo) CreateEnvironment(ctx types.ConsoleContext, env entities.Environment) (*entities.Environment, error) { -// if strings.TrimSpace(env.ClusterName) == "" { -// return nil, errors.New("clustername must be set while creating environments") -// } -// -// env.EnsureGVK() -// if err := r.k8sClient.ValidateObject(ctx, &env.Environment); err != nil { -// return nil, errors.NewE(err) -// } -// -// env.IncrementRecordVersion() -// -// if env.Spec.TargetNamespace == "" { -// env.Spec.TargetNamespace = getEnvironmentTargetNamespace(env.Name) -// } -// -// if env.Spec.Routing == nil { -// env.Spec.Routing = &crdsv1.EnvironmentRouting{ -// Mode: crdsv1.EnvironmentRoutingModePrivate, -// } -// } -// -// env.CreatedBy = common.CreatedOrUpdatedBy{ -// UserId: ctx.UserId, -// UserName: ctx.UserName, -// UserEmail: ctx.UserEmail, -// } -// env.LastUpdatedBy = env.CreatedBy -// -// env.AccountName = ctx.AccountName -// env.SyncStatus = t.GenSyncStatus(t.SyncActionApply, env.RecordVersion) -// -// nenv, err := r.environmentRepo.Create(ctx, &env) -// if err != nil { -// if r.environmentRepo.ErrAlreadyExists(err) { -// // TODO: better insights into error, when it is being caused by duplicated indexes -// return nil, errors.NewE(err) -// } -// return nil, errors.NewE(err) -// } -// -// // FIXME: this should be setup when actually dispatching resource -// // if _, err := d.upsertEnvironmentResourceMapping(ResourceContext{ConsoleContext: ctx, EnvironmentName: env.Name}, &env); err != nil { -// // return nil, errors.NewE(err) -// // } -// -// r.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeEnvironment, nenv.Name, types.PublishAdd) -// -// if _, err := r.iamSvc.AddMembership(ctx, &iam.AddMembershipIn{ -// UserId: string(ctx.UserId), -// ResourceType: string(iamT.ResourceEnvironment), -// ResourceRef: iamT.NewResourceRef(ctx.AccountName, iamT.ResourceEnvironment, nenv.Name), -// Role: string(iamT.RoleResourceOwner), -// }); err != nil { -// r.logger.Error("while adding membership, got", "err", err) -// } -// -// if err := d.applyEnvironmentTargetNamespace(ctx, nenv); err != nil { -// return nil, errors.NewE(err) -// } -// -// if err := d.applyK8sResource(ctx, nenv.Name, &nenv.Environment, nenv.RecordVersion); err != nil { -// return nil, errors.NewE(err) -// } -// -// if err := d.syncImagePullSecretsToEnvironment(ctx, nenv.Name); err != nil { -// return nil, errors.NewE(err) -// } -// -// return nenv, nil -// } -// -// // func (d *domain) CreateEnvironment(ctx ConsoleContext, env entities.Environment) (*entities.Environment, error) { -// // if strings.TrimSpace(env.ClusterName) == "" { -// // return nil, fmt.Errorf("clustername must be set while creating environments") -// // } -// // -// // env.EnsureGVK() -// // if err := d.k8sClient.ValidateObject(ctx, &env.Environment); err != nil { -// // return nil, errors.NewE(err) -// // } -// // -// // env.IncrementRecordVersion() -// // -// // if env.Spec.TargetNamespace == "" { -// // env.Spec.TargetNamespace = d.getEnvironmentTargetNamespace(env.Name) -// // } -// // -// // if env.Spec.Routing == nil { -// // env.Spec.Routing = &crdsv1.EnvironmentRouting{ -// // Mode: crdsv1.EnvironmentRoutingModePrivate, -// // } -// // } -// // -// // env.CreatedBy = common.CreatedOrUpdatedBy{ -// // UserId: ctx.UserId, -// // UserName: ctx.UserName, -// // UserEmail: ctx.UserEmail, -// // } -// // env.LastUpdatedBy = env.CreatedBy -// // -// // env.AccountName = ctx.AccountName -// // env.SyncStatus = t.GenSyncStatus(t.SyncActionApply, env.RecordVersion) -// // -// // nenv, err := d.environmentRepo.Create(ctx, &env) -// // if err != nil { -// // if d.environmentRepo.ErrAlreadyExists(err) { -// // // TODO: better insights into error, when it is being caused by duplicated indexes -// // return nil, errors.NewE(err) -// // } -// // return nil, errors.NewE(err) -// // } -// // -// // if _, err := d.upsertEnvironmentResourceMapping(ResourceContext{ConsoleContext: ctx, EnvironmentName: env.Name}, &env); err != nil { -// // return nil, errors.NewE(err) -// // } -// // -// // d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeEnvironment, nenv.Name, PublishAdd) -// // -// // if _, err := d.iamClient.AddMembership(ctx, &iam.AddMembershipIn{ -// // UserId: string(ctx.UserId), -// // ResourceType: string(iamT.ResourceEnvironment), -// // ResourceRef: iamT.NewResourceRef(ctx.AccountName, iamT.ResourceEnvironment, nenv.Name), -// // Role: string(iamT.RoleResourceOwner), -// // }); err != nil { -// // d.logger.Errorf(err, "error while adding membership") -// // } -// // -// // if err := d.applyEnvironmentTargetNamespace(ctx, nenv); err != nil { -// // return nil, errors.NewE(err) -// // } -// // -// // if err := d.applyK8sResource(ctx, nenv.Name, &nenv.Environment, nenv.RecordVersion); err != nil { -// // return nil, errors.NewE(err) -// // } -// // -// // if err := d.syncImagePullSecretsToEnvironment(ctx, nenv.Name); err != nil { -// // return nil, errors.NewE(err) -// // } -// // -// // return nenv, nil -// // } -// -// // DeleteEnvironment implements Domain. -// func (r *Repo) DeleteEnvironment(ctx types.ConsoleContext, name string) error { -// panic("unimplemented") -// } -// -// // GetEnvironment implements Domain. -// func (r *Repo) GetEnvironment(ctx types.ConsoleContext, name string) (*entities.Environment, error) { -// panic("unimplemented") -// } -// -// // ListEnvironments implements Domain. -// func (r *Repo) ListEnvironments(ctx types.ConsoleContext, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.Environment], error) { -// panic("unimplemented") -// } -// -// // UpdateEnvironment implements Domain. -// func (r *Repo) UpdateEnvironment(ctx types.ConsoleContext, env entities.Environment) (*entities.Environment, error) { -// panic("unimplemented") -// } -// -// var _ Domain = (*Repo)(nil) diff --git a/apps/console/internal/domain/environments/repo_test.go b/apps/console/internal/domain/environments/repo_test.go deleted file mode 100644 index d4fcbc9f9..000000000 --- a/apps/console/internal/domain/environments/repo_test.go +++ /dev/null @@ -1 +0,0 @@ -package environments diff --git a/apps/container-registry/internal/app/adapter-resource-apply.go b/apps/container-registry/internal/app/adapter-resource-apply.go index e9defdefd..fa0247e32 100644 --- a/apps/container-registry/internal/app/adapter-resource-apply.go +++ b/apps/container-registry/internal/app/adapter-resource-apply.go @@ -43,7 +43,6 @@ func (a *resourceDispatcherImpl) ApplyToTargetCluster(ctx domain.RegistryContext b, err := json.Marshal(t.AgentMessage{ AccountName: ctx.AccountName, - ClusterName: clusterName, Action: t.ActionApply, Object: m, }) @@ -67,7 +66,6 @@ func (d *resourceDispatcherImpl) DeleteFromTargetCluster(ctx domain.RegistryCont b, err := json.Marshal(t.AgentMessage{ AccountName: ctx.AccountName, - ClusterName: clusterName, Action: t.ActionDelete, Object: m, }) diff --git a/apps/iot-console/internal/framework/framework.go b/apps/iot-console/internal/framework/framework.go index b4daacb32..138dc2cd6 100644 --- a/apps/iot-console/internal/framework/framework.go +++ b/apps/iot-console/internal/framework/framework.go @@ -3,6 +3,8 @@ package framework import ( "context" "fmt" + "log/slog" + "github.com/kloudlite/api/apps/iot-console/internal/app" "github.com/kloudlite/api/apps/iot-console/internal/domain" "github.com/kloudlite/api/apps/iot-console/internal/env" @@ -32,7 +34,7 @@ var Module = fx.Module("framework", mongoDb.NewMongoClientFx[*fm](), - fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.Client, error) { + fx.Provide(func(ev *env.Env, logger *slog.Logger) (*nats.Client, error) { return nats.NewClient(ev.NatsURL, nats.ClientOpts{ Name: "console", Logger: logger, diff --git a/apps/message-office/internal/domain/platform-edge/repo_test.go b/apps/message-office/internal/domain/platform-edge/repo_test.go index a4c4ef4f7..a76a04c4b 100644 --- a/apps/message-office/internal/domain/platform-edge/repo_test.go +++ b/apps/message-office/internal/domain/platform-edge/repo_test.go @@ -172,6 +172,7 @@ func TestRepo_AllocatePlatformEdgeCluster(t *testing.T) { wantErr: mo_errors.ErrNoClustersInRegion, }, } + for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { r := &Repo{ diff --git a/apps/observability/internal/app/app.go b/apps/observability/internal/app/app.go index 8741b1068..110eb18f9 100644 --- a/apps/observability/internal/app/app.go +++ b/apps/observability/internal/app/app.go @@ -118,7 +118,7 @@ var Module = fx.Module( } return k8s.NewClient(&rest.Config{ - Host: fmt.Sprintf("http://kloudlite-device-%s.kl-account-%s.svc.cluster.local:8080/clusters/%s", "default", accountName, clusterName), + Host: fmt.Sprintf("http://device-%s-pl.kl-%s.svc.cluster.local:8080/clusters/%s", "default", accountName, clusterName), WrapTransport: func(rt http.RoundTripper) http.RoundTripper { return httpServer.NewRoundTripperWithHeaders(rt, map[string][]string{ "X-Kloudlite-Authz": {fmt.Sprintf("Bearer %s", ev.GlobalVPNAuthzSecret)}, @@ -181,7 +181,7 @@ var Module = fx.Module( } return k8s.NewClient(&rest.Config{ - Host: fmt.Sprintf("http://kloudlite-device-%s.kl-account-%s.svc.cluster.local:8080/clusters/%s", "default", accountName, clusterName), + Host: fmt.Sprintf("http://device-%s-pl.kl-%s.svc.cluster.local:8080/clusters/%s", "default", accountName, clusterName), WrapTransport: func(rt http.RoundTripper) http.RoundTripper { return httpServer.NewRoundTripperWithHeaders(rt, map[string][]string{ "X-Kloudlite-Authz": {fmt.Sprintf("Bearer %s", ev.GlobalVPNAuthzSecret)}, diff --git a/apps/tenant-agent/main.go b/apps/tenant-agent/main.go index c0a9219b4..b75e08463 100644 --- a/apps/tenant-agent/main.go +++ b/apps/tenant-agent/main.go @@ -76,15 +76,16 @@ func NewAuthorizedGrpcContext(ctx context.Context, accessToken string) context.C return metadata.NewOutgoingContext(ctx, metadata.Pairs("authorization", accessToken)) } -func (g *grpcHandler) handleMessage(gctx context.Context, msg t.AgentMessage) error { +func (g *grpcHandler) handleMessage(_ context.Context, msg t.AgentMessage) error { g.incrementCounter() start := time.Now() + logger := g.logger.With("counter", g.inMemCounter, "account", msg.AccountName, "action", msg.Action) ctx, cf := func() (context.Context, context.CancelFunc) { if g.isDev { - return context.WithCancel(gctx) + return context.WithCancel(context.TODO()) } - return context.WithTimeout(gctx, 3*time.Second) + return context.WithTimeout(context.TODO(), 2*time.Second) }() defer cf() diff --git a/apps/worker-audit-logging/internal/framework/framework.go b/apps/worker-audit-logging/internal/framework/framework.go index f667dc202..a55017552 100644 --- a/apps/worker-audit-logging/internal/framework/framework.go +++ b/apps/worker-audit-logging/internal/framework/framework.go @@ -1,10 +1,11 @@ package framework import ( + "log/slog" + "github.com/kloudlite/api/apps/worker-audit-logging/internal/app" "github.com/kloudlite/api/apps/worker-audit-logging/internal/env" "github.com/kloudlite/api/pkg/errors" - "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/api/pkg/nats" repos "github.com/kloudlite/api/pkg/repos" "go.uber.org/fx" @@ -27,7 +28,7 @@ var Module fx.Option = fx.Module("framework", return &redpandaCfg{ev: ev} }), - fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.JetstreamClient, error) { + fx.Provide(func(ev *env.Env, logger *slog.Logger) (*nats.JetstreamClient, error) { name := "audit-worker:jetstream-client" nc, err := nats.NewClient(ev.NatsURL, nats.ClientOpts{ Name: name, diff --git a/apps/worker-audit-logging/main.go b/apps/worker-audit-logging/main.go index b62561146..cdfad30b2 100644 --- a/apps/worker-audit-logging/main.go +++ b/apps/worker-audit-logging/main.go @@ -4,21 +4,33 @@ import ( "context" "flag" "fmt" + "time" + "github.com/kloudlite/api/apps/worker-audit-logging/internal/env" "github.com/kloudlite/api/apps/worker-audit-logging/internal/framework" "github.com/kloudlite/api/pkg/config" fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/logging" "go.uber.org/fx" - "time" ) func main() { var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") + + var debug bool + flag.BoolVar(&debug, "debug", false, "--debug") + flag.Parse() + logger := logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: debug, + SetAsDefaultLogger: true, + }) + app := fx.New( + fx.NopLogger, func() fx.Option { if isDev { return fx.Options() @@ -30,6 +42,8 @@ func main() { return logging.New(&logging.Options{Name: "audit-logging-worker", Dev: isDev}) }, ), + fx.Supply(logger), + fn.FxErrorHandler(), config.EnvFx[env.Env](), framework.Module, From d5c1324f2875702ea017570be55a7163490a262c Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 17 Sep 2024 18:22:25 +0530 Subject: [PATCH 59/89] chore: updates github.com/kloudlite/operator --- .../container-registry/internal/app/process-error-on-apply.go | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/container-registry/internal/app/process-error-on-apply.go b/apps/container-registry/internal/app/process-error-on-apply.go index 36ba29c7e..fa23b52f6 100644 --- a/apps/container-registry/internal/app/process-error-on-apply.go +++ b/apps/container-registry/internal/app/process-error-on-apply.go @@ -36,8 +36,8 @@ func ProcessErrorOnApply(consumer ErrorOnApplyConsumer, logger logging.Logger, d mLogger := logger.WithKV( "gvk", obj.GroupVersionKind(), - "accountName", errMsg.AccountName, - "clusterName", errMsg.ClusterName, + "accountName", em.AccountName, + "clusterName", em.ClusterName, ) mLogger.Infof("[%d] received message", counter) diff --git a/go.mod b/go.mod index ce261d87b..8c2e56cb3 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/google/go-github/v43 v43.0.0 github.com/google/go-github/v45 v45.2.0 github.com/gorilla/websocket v1.5.0 - github.com/kloudlite/operator v0.0.0-20240828110352-a9cc09ec2511 + github.com/kloudlite/operator v0.0.0-20240917124613-0418df6214cf github.com/matoous/go-nanoid/v2 v2.0.0 github.com/pkg/errors v0.9.1 github.com/sendgrid/sendgrid-go v3.11.1+incompatible diff --git a/go.sum b/go.sum index 5a3647830..440a7dcd0 100644 --- a/go.sum +++ b/go.sum @@ -177,8 +177,8 @@ github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2 github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 h1:YnZh3TL6AG4EfoInx1/L5zcPHd2QxgLKseJB1KtHjdQ= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55/go.mod h1:GZj3wZmIw/qCciclRhgQTgmGiqe8wxoVzMXQjbOfnbc= -github.com/kloudlite/operator v0.0.0-20240828110352-a9cc09ec2511 h1:6+Dt7TsoCI9U0UIk6BNxdFCB2YZ4nkjBqSrG3qoyGdw= -github.com/kloudlite/operator v0.0.0-20240828110352-a9cc09ec2511/go.mod h1:VkreINDW43qeTsDv9gfGH5M9c5OG/jPGYOGxj8otsGY= +github.com/kloudlite/operator v0.0.0-20240917124613-0418df6214cf h1:GPPzhVCddW5Ba+gxaumhdX3cq5HB6qs99v47v2aKbkc= +github.com/kloudlite/operator v0.0.0-20240917124613-0418df6214cf/go.mod h1:VkreINDW43qeTsDv9gfGH5M9c5OG/jPGYOGxj8otsGY= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= From e67a8bf209ddf0817136b603a2ad620a599e6842 Mon Sep 17 00:00:00 2001 From: nxtcoder36 Date: Wed, 18 Sep 2024 00:09:58 +0530 Subject: [PATCH 60/89] registry image search api added --- .../console/registry-image.graphql.yml | 16 ++ .../internal/app/graph/generated/generated.go | 197 ++++++++++++++++++ .../internal/app/graph/schema.graphqls | 1 + .../internal/app/graph/schema.resolvers.go | 22 +- apps/console/internal/domain/api.go | 1 + .../console/internal/domain/registry-image.go | 45 ++++ .../internal/entities/registry-image.go | 7 + pkg/repos/db-repo-mongo.go | 9 +- pkg/repos/db-repo.go | 5 +- 9 files changed, 294 insertions(+), 9 deletions(-) diff --git a/.tools/nvim/__http__/console/registry-image.graphql.yml b/.tools/nvim/__http__/console/registry-image.graphql.yml index f1822e63c..9361c47bd 100644 --- a/.tools/nvim/__http__/console/registry-image.graphql.yml +++ b/.tools/nvim/__http__/console/registry-image.graphql.yml @@ -1,6 +1,7 @@ --- global: image: "imageName1:imageTag1" + query: "gitla" --- label: List Registry Images @@ -70,3 +71,18 @@ variables: tag: "latest" --- + +label: Search Registry Images +query: |+ + query Core_searchRegistryImages($query: String!) { + core_searchRegistryImages(query: $query) { + accountName + imageName + imageTag + meta + } + } +variables: + query: "{{.query}}" +--- + diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index f67d3e540..7806f949c 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -830,6 +830,7 @@ type ComplexityRoot struct { CoreResyncManagedResource func(childComplexity int, msvcName string, name string) int CoreResyncRouter func(childComplexity int, envName string, name string) int CoreResyncSecret func(childComplexity int, envName string, name string) int + CoreSearchRegistryImages func(childComplexity int, query string) int InfraGetClusterManagedService func(childComplexity int, name string) int InfraListClusterManagedServices func(childComplexity int, search *model.SearchClusterManagedService, pagination *repos.CursorPagination) int __resolve__service func(childComplexity int) int @@ -1114,6 +1115,7 @@ type QueryResolver interface { CoreGetRegistryImageURL(ctx context.Context) (*model.RegistryImageURL, error) CoreGetRegistryImage(ctx context.Context, image string) (*entities.RegistryImage, error) CoreListRegistryImages(ctx context.Context, pq *repos.CursorPagination) (*model.RegistryImagePaginatedRecords, error) + CoreSearchRegistryImages(ctx context.Context, query string) ([]*entities.RegistryImage, 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) @@ -5003,6 +5005,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.CoreResyncSecret(childComplexity, args["envName"].(string), args["name"].(string)), true + case "Query.core_searchRegistryImages": + if e.complexity.Query.CoreSearchRegistryImages == nil { + break + } + + args, err := ec.field_Query_core_searchRegistryImages_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.CoreSearchRegistryImages(childComplexity, args["query"].(string)), true + case "Query.infra_getClusterManagedService": if e.complexity.Query.InfraGetClusterManagedService == nil { break @@ -5926,6 +5940,7 @@ type Query { core_getRegistryImageURL: RegistryImageURL! @isLoggedInAndVerified @hasAccount core_getRegistryImage(image: String!,): RegistryImage @isLoggedInAndVerified @hasAccount core_listRegistryImages(pq: CursorPaginationIn): RegistryImagePaginatedRecords @isLoggedInAndVerified @hasAccount + core_searchRegistryImages(query: String!): [RegistryImage!]! @isLoggedInAndVerified @hasAccount core_listApps(envName: String!, search: SearchApps, pq: CursorPaginationIn): AppPaginatedRecords @isLoggedInAndVerified @hasAccount core_getApp(envName: String!, name: String!): App @isLoggedInAndVerified @hasAccount @@ -9252,6 +9267,21 @@ func (ec *executionContext) field_Query_core_resyncSecret_args(ctx context.Conte return args, nil } +func (ec *executionContext) field_Query_core_searchRegistryImages_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["query"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("query")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["query"] = arg0 + return args, nil +} + func (ec *executionContext) field_Query_infra_getClusterManagedService_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -33114,6 +33144,107 @@ func (ec *executionContext) fieldContext_Query_core_listRegistryImages(ctx conte return fc, nil } +func (ec *executionContext) _Query_core_searchRegistryImages(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_searchRegistryImages(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().CoreSearchRegistryImages(rctx, fc.Args["query"].(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.RegistryImage); ok { + return data, nil + } + 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) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*entities.RegistryImage) + fc.Result = res + return ec.marshalNRegistryImage2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRegistryImageᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_core_searchRegistryImages(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_RegistryImage_accountName(ctx, field) + case "creationTime": + return ec.fieldContext_RegistryImage_creationTime(ctx, field) + case "id": + 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_RegistryImage_markedForDeletion(ctx, field) + case "meta": + return ec.fieldContext_RegistryImage_meta(ctx, field) + case "recordVersion": + return ec.fieldContext_RegistryImage_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_RegistryImage_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type RegistryImage", 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_searchRegistryImages_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + 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) if err != nil { @@ -51650,6 +51781,28 @@ 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_searchRegistryImages": + 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_searchRegistryImages(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_listApps": field := field @@ -55230,6 +55383,50 @@ func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapi return ec._PageInfo(ctx, sel, v) } +func (ec *executionContext) marshalNRegistryImage2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRegistryImageᚄ(ctx context.Context, sel ast.SelectionSet, v []*entities.RegistryImage) 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.marshalNRegistryImage2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRegistryImage(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) 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)) { diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index ede08f51c..d95c85a68 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -119,6 +119,7 @@ type Query { core_getRegistryImageURL: RegistryImageURL! @isLoggedInAndVerified @hasAccount core_getRegistryImage(image: String!,): RegistryImage @isLoggedInAndVerified @hasAccount core_listRegistryImages(pq: CursorPaginationIn): RegistryImagePaginatedRecords @isLoggedInAndVerified @hasAccount + core_searchRegistryImages(query: String!): [RegistryImage!]! @isLoggedInAndVerified @hasAccount core_listApps(envName: String!, search: SearchApps, pq: CursorPaginationIn): AppPaginatedRecords @isLoggedInAndVerified @hasAccount core_getApp(envName: String!, name: String!): App @isLoggedInAndVerified @hasAccount diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index 92719307f..1bb3a1eb0 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -7,9 +7,8 @@ package graph import ( "context" "fmt" - "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" @@ -588,6 +587,19 @@ func (r *queryResolver) CoreListRegistryImages(ctx context.Context, pq *repos.Cu return fn.JsonConvertP[model.RegistryImagePaginatedRecords](pImages) } +// CoreSearchRegistryImages is the resolver for the core_searchRegistryImages field. +func (r *queryResolver) CoreSearchRegistryImages(ctx context.Context, query string) ([]*entities.RegistryImage, error) { + cc, err := toConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + images, err := r.Domain.SearchRegistryImages(cc, query) + if err != nil { + return nil, errors.NewE(err) + } + return images, nil +} + // 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) @@ -1060,7 +1072,5 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type ( - mutationResolver struct{ *Resolver } - queryResolver struct{ *Resolver } -) +type mutationResolver struct{ *Resolver } +type queryResolver struct{ *Resolver } diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index 072b847cb..2c50d6065 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -185,6 +185,7 @@ type Domain interface { 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) + SearchRegistryImages(ctx ConsoleContext, query string) ([]*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/registry-image.go b/apps/console/internal/domain/registry-image.go index 9e1304b19..19105a571 100644 --- a/apps/console/internal/domain/registry-image.go +++ b/apps/console/internal/domain/registry-image.go @@ -35,6 +35,30 @@ func encodeAccessToken(accountName string, tokenSecret string) string { return base64.StdEncoding.EncodeToString([]byte(info)) } +func generatePartialWords(word string) []string { + var partials []string + for i := 3; i <= len(word); i++ { + partials = append(partials, word[:i]) + } + return partials +} + +func generateAutocompleteWords(meta map[string]any) string { + metaString := "" + for _, value := range meta { + metaString += fmt.Sprintf("%s ", value) + } + + words := strings.Fields(metaString) + var autocompleteWords []string + for _, word := range words { + partials := generatePartialWords(word) + autocompleteWords = append(autocompleteWords, partials...) + } + + return strings.Join(autocompleteWords, " ") +} + func getImageNameTag(image string) (string, string) { parts := strings.Split(image, ":") @@ -66,13 +90,34 @@ func (d *domain) CreateRegistryImage(ctx context.Context, accountName string, im ImageName: imageName, ImageTag: imageTag, Meta: meta, + MetaData: generateAutocompleteWords(meta), }) if err != nil { return nil, errors.NewE(err) } return createdImage, nil +} + +func (d *domain) SearchRegistryImages(ctx ConsoleContext, query string) ([]*entities.RegistryImage, error) { + if err := d.canPerformActionInAccount(ctx, iamT.ListRegistryImages); err != nil { + return nil, errors.NewE(err) + } + + filters := repos.Filter{ + fields.AccountName: ctx.AccountName, + "$text": map[string]any{"$search": query}, + } + + searchedImages, err := d.registryImageRepo.Find(ctx, repos.Query{ + Filter: filters, + Limit: fn.New(int64(10)), + }) + if err != nil { + return nil, errors.NewE(err) + } + return searchedImages, nil } func (d *domain) DeleteRegistryImage(ctx ConsoleContext, image string) error { diff --git a/apps/console/internal/entities/registry-image.go b/apps/console/internal/entities/registry-image.go index b01d4927a..d22b7ced7 100644 --- a/apps/console/internal/entities/registry-image.go +++ b/apps/console/internal/entities/registry-image.go @@ -12,6 +12,7 @@ type RegistryImage struct { ImageName string `json:"imageName"` ImageTag string `json:"imageTag"` Meta map[string]any `json:"meta"` + MetaData string `json:"metadata" graphql:"ignore"` } type RegistryImageURL struct { @@ -34,4 +35,10 @@ var RegistryImageIndexes = []repos.IndexField{ }, Unique: true, }, + { + Field: []repos.IndexKey{ + {Key: fields.AccountName, Value: repos.IndexAsc}, + {Key: fc.Metadata, Value: repos.IndexAsc, IsText: true}, + }, + }, } diff --git a/pkg/repos/db-repo-mongo.go b/pkg/repos/db-repo-mongo.go index 0735473a3..0b4e66c83 100644 --- a/pkg/repos/db-repo-mongo.go +++ b/pkg/repos/db-repo-mongo.go @@ -625,6 +625,11 @@ func (repo *dbRepo[T]) IndexFields(ctx context.Context, indices []IndexField) er // READ MORE @ https://www.mongodb.com/docs/manual/tutorial/manage-indexes/#modify-an-index indexName := "" for _, field := range f.Field { + if field.IsText { + b = append(b, bson.E{Key: field.Key, Value: "text"}) + indexName = buildIndexName(indexName, field.Key, 1) + continue + } switch field.Value { case IndexAsc: b = append(b, bson.E{Key: field.Key, Value: 1}) @@ -635,7 +640,9 @@ func (repo *dbRepo[T]) IndexFields(ctx context.Context, indices []IndexField) er } } - indexModel := mongo.IndexModel{Keys: b, Options: &options.IndexOptions{Unique: &f.Unique, Name: &indexName}} + indexModel := mongo.IndexModel{ + Keys: b, Options: &options.IndexOptions{Unique: &f.Unique, Name: &indexName}, + } _, err := repo.db.Collection(repo.collectionName).Indexes().CreateOne(ctx, indexModel) if err != nil { diff --git a/pkg/repos/db-repo.go b/pkg/repos/db-repo.go index 3b4dd045c..7641ee833 100644 --- a/pkg/repos/db-repo.go +++ b/pkg/repos/db-repo.go @@ -128,8 +128,9 @@ const ( ) type IndexKey struct { - Key string - Value indexOrder + Key string + Value indexOrder + IsText bool } type IndexField struct { From 96278291b5eaafd23e9a9e5f3d71189f5e1192a4 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 19 Sep 2024 22:35:51 +0530 Subject: [PATCH 61/89] feat: kloudlite edge gateway, now uses LoadBalancer --- apps/infra/internal/domain/clusters.go | 33 ++++++++++++++++--- .../templates/kloudlite-gateway-svc.yml.tpl | 3 +- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index c0ac2fc5b..04ef02c6c 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -507,7 +507,8 @@ func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) e if d.env.IsDev { return context.WithCancel(ctx) } - return context.WithTimeout(ctx, 5*time.Second) + // return context.WithTimeout(ctx, 10*time.Second) + return context.WithTimeout(context.TODO(), 45*time.Second) }() defer cf() @@ -526,8 +527,20 @@ func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) e continue } - if service.Spec.Ports[0].NodePort != 0 { + switch service.Spec.Type { + case "LoadBalancer": + if len(service.Status.LoadBalancer.Ingress) == 0 { + wgEndpoint = "" + break + } + wgEndpoint = service.Status.LoadBalancer.Ingress[0].IP + ":" + fmt.Sprintf("%d", wgParams.ListenPort) + case "NodePort": wgEndpoint = fmt.Sprintf("%s:%d", wgEndpoint, service.Spec.Ports[0].NodePort) + default: + return errors.Newf("unknown service type %q", service.Spec.Type) + } + + if wgEndpoint != "" { break } } @@ -657,7 +670,7 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string if d.env.IsDev { return context.WithCancel(ctx) } - return context.WithTimeout(ctx, 5*time.Second) + return context.WithTimeout(context.TODO(), 45*time.Second) // 45 seconds, as it might take a while for a cloud provider to allocate IP }() defer cf() @@ -690,8 +703,20 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string continue } - if service.Spec.Ports[0].NodePort != 0 { + switch service.Spec.Type { + case "LoadBalancer": + if len(service.Status.LoadBalancer.Ingress) == 0 { + wgEndpoint = "" + break + } + wgEndpoint = service.Status.LoadBalancer.Ingress[0].IP + ":" + fmt.Sprintf("%d", wgParams.ListenPort) + case "NodePort": wgEndpoint = fmt.Sprintf("%s:%d", wgEndpoint, service.Spec.Ports[0].NodePort) + default: + return errors.Newf("unknown service type %q", service.Spec.Type) + } + + if wgEndpoint != "" { break } } diff --git a/apps/infra/internal/domain/templates/kloudlite-gateway-svc.yml.tpl b/apps/infra/internal/domain/templates/kloudlite-gateway-svc.yml.tpl index 3961e08f0..704264dc8 100644 --- a/apps/infra/internal/domain/templates/kloudlite-gateway-svc.yml.tpl +++ b/apps/infra/internal/domain/templates/kloudlite-gateway-svc.yml.tpl @@ -13,7 +13,8 @@ metadata: labels: app: {{.Name}} spec: - type: NodePort + {{- /* type: NodePort */}} + type: LoadBalancer ports: - name: wireguard protocol: UDP From d9c89e1ede12480eb2cb184d0864ffb5ec131ed1 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 19 Sep 2024 22:38:10 +0530 Subject: [PATCH 62/89] feat(apps/webhook): fixes image-meta push scripts --- apps/webhook/internal/app/image-hook.go | 37 ++++++++++--------------- apps/webhook/kl-image-script.sh | 5 ++-- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/apps/webhook/internal/app/image-hook.go b/apps/webhook/internal/app/image-hook.go index e22406e73..d13ed7d96 100644 --- a/apps/webhook/internal/app/image-hook.go +++ b/apps/webhook/internal/app/image-hook.go @@ -5,6 +5,12 @@ import ( "encoding/base64" "encoding/json" "fmt" + "io" + "net/http" + "os" + "strings" + "time" + "github.com/gofiber/fiber/v2" "github.com/kloudlite/api/apps/webhook/internal/domain" "github.com/kloudlite/api/apps/webhook/internal/env" @@ -15,11 +21,6 @@ import ( types2 "github.com/kloudlite/api/pkg/messaging/types" "github.com/pkg/errors" "go.uber.org/fx" - "io" - "net/http" - "os" - "strings" - "time" ) func validateAndDecodeAccessToken(accessToken string, tokenSecret string) (accountName string, err error) { @@ -66,10 +67,9 @@ func validateAndDecodeAccessToken(accessToken string, tokenSecret string) (accou 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-metadata", func(ctx *fiber.Ctx) error { + app.Post("/image-meta-push", func(ctx *fiber.Ctx) error { logger := logr.WithName("image-hook") headers := ctx.GetReqHeaders() @@ -103,15 +103,10 @@ func LoadImageHook() fx.Option { return err } - err = producer.Produce(ctx.Context(), types2.ProduceMsg{ + if err = producer.Produce(ctx.Context(), types2.ProduceMsg{ Subject: string(common.ImageRegistryHookTopicName), Payload: jsonPayload, - }) - if err != nil { - return err - } - - if err != nil { + }); err != nil { errMsg := fmt.Sprintf("failed to produce message: %s", "webhook-provider") logger.Errorf(err, errMsg) return ctx.Status(http.StatusInternalServerError).JSON(errMsg) @@ -121,19 +116,15 @@ func LoadImageHook() fx.Option { "produced.timestamp", time.Now(), ).Infof("queued webhook") - err = producer.Produce(ctx.Context(), types2.ProduceMsg{ + if err = producer.Produce(ctx.Context(), types2.ProduceMsg{ Subject: string(common.ImageUpdateRegistryHookTopicName), Payload: jsonPayload, - }) - if err != nil { - return err - } - - if err != nil { + }); 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(), @@ -141,7 +132,7 @@ func LoadImageHook() fx.Option { return ctx.Status(http.StatusAccepted).JSON(map[string]string{"status": "ok"}) }) - app.Get("/image-metadata", func(c *fiber.Ctx) error { + app.Get("/image-meta-push", func(c *fiber.Ctx) error { f, err := os.Open("kl-image-script.sh") if err != nil { return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("Error opening script: %s", err.Error())) @@ -152,7 +143,7 @@ func LoadImageHook() fx.Option { return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("Error reading script: %s", err.Error())) } script := string(all) - script = strings.ReplaceAll(script, "$WEBHOOK_URL", envVars.WebhookURL) + script = strings.ReplaceAll(script, "$WEBHOOK_URL", fmt.Sprintf("%s/image-meta-push", envVars.WebhookURL)) return c.SendString(script) }) diff --git a/apps/webhook/kl-image-script.sh b/apps/webhook/kl-image-script.sh index bec6a7fc5..bfe67c8ea 100755 --- a/apps/webhook/kl-image-script.sh +++ b/apps/webhook/kl-image-script.sh @@ -4,9 +4,8 @@ meta=$(echo "$meta" | tr -d ' ') json_data='{"image": "'"$image"'", "meta": {' -IFS=',' read -r -a array <<< "$meta" -for element in "${array[@]}" -do +IFS=',' read -r -a array <<<"$meta" +for element in "${array[@]}"; do key=$(echo "$element" | cut -d '=' -f 1) value=$(echo "$element" | cut -d '=' -f 2) json_data+='"'"$key"'":"'"$value"'",' From a236354e4d352658f9d39a7cc0a95ca8faf7bae6 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 19 Sep 2024 22:39:46 +0530 Subject: [PATCH 63/89] chore: updates console-api, image push scripts URL --- apps/console/internal/domain/registry-image.go | 11 ++++------- apps/gateway/src/index.js | 4 ---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/apps/console/internal/domain/registry-image.go b/apps/console/internal/domain/registry-image.go index 9e1304b19..70a5b93e8 100644 --- a/apps/console/internal/domain/registry-image.go +++ b/apps/console/internal/domain/registry-image.go @@ -5,6 +5,8 @@ import ( "crypto/sha256" "encoding/base64" "fmt" + "strings" + "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" @@ -12,7 +14,6 @@ import ( "github.com/kloudlite/api/pkg/errors" fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/repos" - "strings" ) type ImageHookPayload struct { @@ -49,8 +50,8 @@ func (d *domain) GetRegistryImageURL(ctx ConsoleContext) (*entities.RegistryImag encodedToken := encodeAccessToken(ctx.AccountName, d.envVars.WebhookTokenHashingSecret) return &entities.RegistryImageURL{ - URL: fmt.Sprintf(`curl -X POST "%s" -H "Authorization: %s" -H "Content-Type: application/json" -d '{"image": "imageName:imageTag", "meta": {"repository": "github", "registry": "docker", "author":"kloudlite"}}'`, d.envVars.WebhookURL, encodedToken), - ScriptURL: fmt.Sprintf(`curl "%s" | authorization=%s image=imageName:imageTag meta="repository=github,registry=docker,author=kloudlite" sh`, d.envVars.WebhookURL, encodedToken), + URL: fmt.Sprintf(`curl -X POST "%s/image-meta-push" -H "Authorization: %s" -H "Content-Type: application/json" -d '{"image": "imageName:imageTag", "meta": {"repository": "github", "registry": "docker", "author":"kloudlite"}}'`, d.envVars.WebhookURL, encodedToken), + ScriptURL: fmt.Sprintf(`curl "%s/image-meta-push" | authorization=%s image=imageName:imageTag meta="repository=github,registry=docker,author=kloudlite" sh`, d.envVars.WebhookURL, encodedToken), }, nil } @@ -72,7 +73,6 @@ func (d *domain) CreateRegistryImage(ctx context.Context, accountName string, im } return createdImage, nil - } func (d *domain) DeleteRegistryImage(ctx ConsoleContext, image string) error { @@ -83,7 +83,6 @@ func (d *domain) DeleteRegistryImage(ctx ConsoleContext, image string) error { fc.RegistryImageImageName: imageName, fc.RegistryImageImageTag: imageTag, }) - if err != nil { return errors.NewE(err) } @@ -97,7 +96,6 @@ func (d *domain) DeleteRegistryImage(ctx ConsoleContext, image string) error { fc.RegistryImageImageName: imageName, fc.RegistryImageImageTag: imageTag, }) - if err != nil { return errors.NewE(err) } @@ -112,7 +110,6 @@ func (d *domain) GetRegistryImage(ctx ConsoleContext, image string) (*entities.R fc.RegistryImageImageName: imageName, fc.RegistryImageImageTag: imageTag, }) - if err != nil { return nil, errors.NewE(err) } diff --git a/apps/gateway/src/index.js b/apps/gateway/src/index.js index 273dfe6c3..db2cf26f4 100644 --- a/apps/gateway/src/index.js +++ b/apps/gateway/src/index.js @@ -3,7 +3,6 @@ import {expressMiddleware} from '@apollo/server/express4'; import express from 'express'; import {ApolloGateway, IntrospectAndCompose, RemoteGraphQLDataSource} from '@apollo/gateway'; import fs from 'fs/promises'; -import yaml from 'js-yaml'; import assert from 'assert'; const useEnv = (key) => { @@ -26,7 +25,6 @@ class CustomDataSource extends RemoteGraphQLDataSource { return request; } -} didReceiveResponse({ response, context }) { const x = response.http.headers.get('set-cookie'); if (!x) return response; @@ -87,8 +85,6 @@ app.listen(port, (err) => { console.log(String.raw` , - -`) ##### ######## ######## From 27c03dac06ae183b29d225a695b9c568534f8d89 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 24 Sep 2024 16:23:28 +0530 Subject: [PATCH 64/89] refactor: migrating grpc logger to `log/slog` --- apps/accounts/internal/framework/framework.go | 6 +- apps/comms/Taskfile.yml | 2 +- apps/comms/internal/framework/framework.go | 5 +- apps/comms/main.go | 42 ++++++------- apps/console/internal/framework/framework.go | 6 +- apps/iam/internal/framework/main.go | 11 ++-- apps/iam/main.go | 22 ++++--- .../domain/global-vpn-cluster-connection.go | 3 +- .../internal/domain/global-vpn-devices.go | 20 ++++--- .../field-constants/generated_constants.go | 59 ++++++++++--------- apps/infra/internal/framework/framework.go | 6 +- .../internal/framework/framework.go | 4 +- apps/tenant-agent/main.go | 2 +- common/banner.go | 30 ++++------ pkg/grpc/server.go | 29 +++++---- 15 files changed, 129 insertions(+), 118 deletions(-) diff --git a/apps/accounts/internal/framework/framework.go b/apps/accounts/internal/framework/framework.go index 624dfc2cb..d33f0e96a 100644 --- a/apps/accounts/internal/framework/framework.go +++ b/apps/accounts/internal/framework/framework.go @@ -102,10 +102,8 @@ var Module = fx.Module("framework", }) }), - fx.Provide(func(logger logging.Logger) (app.AccountsGrpcServer, error) { - return grpc.NewGrpcServer(grpc.ServerOpts{ - Logger: logger.WithKV("component", "grpc-server"), - }) + fx.Provide(func(logger *slog.Logger) (app.AccountsGrpcServer, error) { + return grpc.NewGrpcServer(grpc.ServerOpts{Logger: logger}) }), fx.Invoke(func(lf fx.Lifecycle, server app.AccountsGrpcServer, ev *env.Env, logger logging.Logger) { diff --git a/apps/comms/Taskfile.yml b/apps/comms/Taskfile.yml index bcc3ccb18..192245092 100644 --- a/apps/comms/Taskfile.yml +++ b/apps/comms/Taskfile.yml @@ -39,7 +39,7 @@ tasks: run: dotenv: [".secrets/env"] cmds: - - nodemon -e go --signal SIGKILL --exec 'go run -tags dynamic main.go --dev || exit 1' + - go run ./main.go --dev build: cmds: diff --git a/apps/comms/internal/framework/framework.go b/apps/comms/internal/framework/framework.go index 2058bcc86..f06cc27a3 100644 --- a/apps/comms/internal/framework/framework.go +++ b/apps/comms/internal/framework/framework.go @@ -11,7 +11,6 @@ import ( "github.com/kloudlite/api/common" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/pkg/grpc" - rpc "github.com/kloudlite/api/pkg/grpc" httpServer "github.com/kloudlite/api/pkg/http-server" "github.com/kloudlite/api/pkg/kv" "github.com/kloudlite/api/pkg/logging" @@ -51,7 +50,7 @@ var Module = fx.Module( return mail.NewSendgridMailer(ev.SendgridApiKey) }), - fx.Provide(func(logger logging.Logger) (app.CommsGrpcServer, error) { + fx.Provide(func(logger *slog.Logger) (app.CommsGrpcServer, error) { return grpc.NewGrpcServer(grpc.ServerOpts{Logger: logger}) }), @@ -81,7 +80,7 @@ var Module = fx.Module( ), fx.Provide(func(ev *env.Env) (app.IAMGrpcClient, error) { - return rpc.NewGrpcClient(ev.IAMGrpcAddr) + return grpc.NewGrpcClient(ev.IAMGrpcAddr) }), mongoDb.NewMongoClientFx[*fm](), diff --git a/apps/comms/main.go b/apps/comms/main.go index 4927f97f3..fd4b8b270 100644 --- a/apps/comms/main.go +++ b/apps/comms/main.go @@ -4,8 +4,9 @@ import ( "context" "embed" "flag" - "log/slog" "os" + "os/signal" + "syscall" "time" "github.com/kloudlite/api/apps/comms/internal/domain" @@ -20,28 +21,22 @@ import ( var EmailTemplatesDir embed.FS func main() { + start := time.Now() + common.PrintBuildInfo() + var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") flag.Parse() - logger, err := logging.New(&logging.Options{Name: "comms", Dev: isDev}) - if err != nil { - panic(err) - } + logger := logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: isDev, SetAsDefaultLogger: true}) - webApp := fx.New( + app := fx.New( fx.NopLogger, - fx.Provide(func() logging.Logger { - return logger + fx.Provide(func() (logging.Logger, error) { + return logging.New(&logging.Options{Name: "comms", Dev: isDev}) }), - fx.Provide(func() *slog.Logger { - return logging.NewSlogLogger(logging.SlogOptions{ - ShowCaller: true, - ShowDebugLogs: isDev, - SetAsDefaultLogger: true, - }) - }), + fx.Supply(logger), fx.Provide(func() (*env.Env, error) { return env.LoadEnv() @@ -54,15 +49,22 @@ func main() { framework.Module, ) + ch := make(chan os.Signal, 1) + signal.Notify(ch, syscall.SIGINT, syscall.SIGTERM) + go func() { + <-ch + logger.Info("shutting down...") + app.Stop(context.Background()) + }() + ctx, cf := context.WithTimeout(context.Background(), 5*time.Second) defer cf() - if err := webApp.Start(ctx); err != nil { - logger.Errorf(err, "comms-api startup errors") - logger.Infof("EXITING as errors encountered during startup") + if err := app.Start(ctx); err != nil { + logger.Error("failed to start comms api, got", "err", err) os.Exit(1) } - common.PrintReadyBanner() - <-webApp.Done() + common.PrintReadyBanner2(time.Since(start)) + <-app.Done() } diff --git a/apps/console/internal/framework/framework.go b/apps/console/internal/framework/framework.go index 03cda93a8..cae0d8771 100644 --- a/apps/console/internal/framework/framework.go +++ b/apps/console/internal/framework/framework.go @@ -101,10 +101,8 @@ var Module = fx.Module("framework", app.Module, - fx.Provide(func(logr logging.Logger) (app.ConsoleGrpcServer, error) { - return grpc.NewGrpcServer(grpc.ServerOpts{ - Logger: logr, - }) + fx.Provide(func(logger *slog.Logger) (app.ConsoleGrpcServer, error) { + return grpc.NewGrpcServer(grpc.ServerOpts{Logger: logger}) }), fx.Invoke(func(ev *env.Env, server app.ConsoleGrpcServer, lf fx.Lifecycle, logger logging.Logger) { diff --git a/apps/iam/internal/framework/main.go b/apps/iam/internal/framework/main.go index e4fa73135..cb60565e3 100644 --- a/apps/iam/internal/framework/main.go +++ b/apps/iam/internal/framework/main.go @@ -3,14 +3,15 @@ package framework import ( "context" "fmt" + "log/slog" + "time" + "github.com/kloudlite/api/apps/iam/internal/app" "github.com/kloudlite/api/apps/iam/internal/env" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/pkg/grpc" - "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/api/pkg/repos" "go.uber.org/fx" - "time" ) type fm struct { @@ -32,10 +33,8 @@ var Module fx.Option = fx.Module( }), repos.NewMongoClientFx[*fm](), - fx.Provide(func(logger logging.Logger) (app.IAMGrpcServer, error) { - return grpc.NewGrpcServer(grpc.ServerOpts{ - Logger: logger, - }) + fx.Provide(func(logger *slog.Logger) (app.IAMGrpcServer, error) { + return grpc.NewGrpcServer(grpc.ServerOpts{Logger: logger}) }), app.Module, diff --git a/apps/iam/main.go b/apps/iam/main.go index 2e356368a..564607137 100644 --- a/apps/iam/main.go +++ b/apps/iam/main.go @@ -14,19 +14,26 @@ import ( ) func main() { + start := time.Now() + var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") + + var debug bool + flag.BoolVar(&debug, "debug", false, "--debug") flag.Parse() - logger, err := logging.New(&logging.Options{Name: "iam", Dev: isDev}) - if err != nil { - panic(err) + if isDev { + debug = true } + logger := logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, SetAsDefaultLogger: true, ShowDebugLogs: debug}) + app := fx.New( fx.NopLogger, - fx.Provide(func() logging.Logger { - return logger + fx.Supply(logger), + fx.Provide(func() (logging.Logger, error) { + return logging.New(&logging.Options{Name: "iam", Dev: isDev}) }), fx.Provide(func() (*env.Env, error) { @@ -39,11 +46,10 @@ func main() { ctx, cancelFunc := context.WithTimeout(context.Background(), 5*time.Second) defer cancelFunc() if err := app.Start(ctx); err != nil { - logger.Errorf(err, "IAM api startup errors") - logger.Infof("EXITING as errors encountered during startup") + logger.Error("failed to start iam api, got", "err", err) os.Exit(1) } - common.PrintReadyBanner() + common.PrintReadyBanner2(time.Since(start)) <-app.Done() } diff --git a/apps/infra/internal/domain/global-vpn-cluster-connection.go b/apps/infra/internal/domain/global-vpn-cluster-connection.go index a4c7871d6..78ee7b644 100644 --- a/apps/infra/internal/domain/global-vpn-cluster-connection.go +++ b/apps/infra/internal/domain/global-vpn-cluster-connection.go @@ -60,7 +60,7 @@ func (d *domain) getGlobalVPNConnectionPeers(args getGlobalVPNConnectionPeersArg Comments: fmt.Sprintf("gateway/%s/%s", c.GlobalVPNName, c.ClusterName), PublicKey: c.ParsedWgParams.PublicKey, AllowedIPs: []string{c.ClusterCIDR, fmt.Sprintf("%s/32", c.DeviceRef.IPAddr)}, - IP: c.Spec.GlobalIP, + IP: &c.Spec.GlobalIP, DNSSuffix: &c.Spec.DNSSuffix, } @@ -480,7 +480,6 @@ func (d *domain) OnGlobalVPNConnectionDeleteMessage(ctx InfraContext, clusterNam func (d *domain) OnGlobalVPNConnectionUpdateMessage(ctx InfraContext, dispatchAddr entities.DispatchAddr, gvpn entities.GlobalVPNConnection, status types.ResourceStatus, opts UpdateAndDeleteOpts) error { // FIXME: need a way to find global vpn connection, receiving it from other clusters - xconn, err := d.gvpnConnRepo.FindOne(ctx, repos.Filter{ fields.AccountName: ctx.AccountName, fc.GlobalVPNConnectionDispatchAddrAccountName: dispatchAddr.AccountName, diff --git a/apps/infra/internal/domain/global-vpn-devices.go b/apps/infra/internal/domain/global-vpn-devices.go index 003ae7463..8719c8b74 100644 --- a/apps/infra/internal/domain/global-vpn-devices.go +++ b/apps/infra/internal/domain/global-vpn-devices.go @@ -217,7 +217,7 @@ func (d *domain) createGlobalVPNDevice(ctx InfraContext, gvpnDevice entities.Glo return gv, nil } -func (d *domain) buildPeerFromGlobalVPNDevice(ctx InfraContext, gvpn *entities.GlobalVPN, device *entities.GlobalVPNDevice) *networkingv1.Peer { +func (d *domain) buildPeerFromGlobalVPNDevice(_ InfraContext, gvpn *entities.GlobalVPN, device *entities.GlobalVPNDevice) *networkingv1.Peer { allowedIPs := []string{fmt.Sprintf("%s/32", device.IPAddr)} // privateConns, err := d.gvpnConnRepo.Find(ctx, repos.Query{ @@ -246,7 +246,7 @@ func (d *domain) buildPeerFromGlobalVPNDevice(ctx InfraContext, gvpn *entities.G DNSHostname: fmt.Sprintf("%s.device.local", device.Name), PublicKey: device.PublicKey, PublicEndpoint: device.PublicEndpoint, - IP: device.IPAddr, + IP: &device.IPAddr, DNSSuffix: nil, AllowedIPs: allowedIPs, } @@ -287,7 +287,7 @@ func (d *domain) buildPeersFromGlobalVPNDevices(ctx InfraContext, gvpn string) ( DNSHostname: fmt.Sprintf("%s.device.local", devices[i].Name), PublicKey: devices[i].PublicKey, PublicEndpoint: devices[i].PublicEndpoint, - IP: devices[i].IPAddr, + IP: &devices[i].IPAddr, DNSSuffix: nil, AllowedIPs: allowedIPs, }) @@ -298,7 +298,7 @@ func (d *domain) buildPeersFromGlobalVPNDevices(ctx InfraContext, gvpn string) ( Comments: fmt.Sprintf("device/%s/%s", devices[i].GlobalVPNName, devices[i].Name), DNSHostname: fmt.Sprintf("%s.device.local", devices[i].Name), PublicKey: devices[i].PublicKey, - IP: devices[i].IPAddr, + IP: &devices[i].IPAddr, DNSSuffix: nil, AllowedIPs: allowedIPs, }) @@ -334,7 +334,9 @@ func (d *domain) buildGlobalVPNDeviceWgBaseParams(ctx InfraContext, gvpnConns [] publicPeers := make([]wgutils.PublicPeer, 0, len(pubPeers)+len(gvpnConnPeers)) for _, peer := range gvpnConnPeers { - deviceHosts[peer.DNSHostname] = peer.IP + if peer.IP != nil { + deviceHosts[peer.DNSHostname] = *peer.IP + } if peer.DNSHostname == fmt.Sprintf("%s.device.local", gvpnDevice.Name) { continue } @@ -352,7 +354,9 @@ func (d *domain) buildGlobalVPNDeviceWgBaseParams(ctx InfraContext, gvpnConns [] } for _, peer := range pubPeers { - deviceHosts[peer.DNSHostname] = peer.IP + if peer.IP != nil { + deviceHosts[peer.DNSHostname] = *peer.IP + } if peer.DNSHostname == fmt.Sprintf("%s.device.local", gvpnDevice.Name) { continue } @@ -372,7 +376,9 @@ func (d *domain) buildGlobalVPNDeviceWgBaseParams(ctx InfraContext, gvpnConns [] privatePeers := make([]wgutils.PrivatePeer, 0, len(privPeers)) for _, peer := range privPeers { - deviceHosts[peer.DNSHostname] = peer.IP + if peer.IP != nil { + deviceHosts[peer.DNSHostname] = *peer.IP + } if peer.DNSHostname == fmt.Sprintf("%s.device.local", gvpnDevice.Name) { continue } diff --git a/apps/infra/internal/entities/field-constants/generated_constants.go b/apps/infra/internal/entities/field-constants/generated_constants.go index eccdabad3..bb2281349 100644 --- a/apps/infra/internal/entities/field-constants/generated_constants.go +++ b/apps/infra/internal/entities/field-constants/generated_constants.go @@ -207,34 +207,37 @@ const ( // constant vars generated for struct GlobalVPNConnection const ( - GlobalVPNConnectionClusterSvcCIDR = "clusterSvcCIDR" - GlobalVPNConnectionDeviceRef = "deviceRef" - GlobalVPNConnectionDeviceRefIpAddr = "deviceRef.ipAddr" - GlobalVPNConnectionDeviceRefName = "deviceRef.name" - GlobalVPNConnectionDispatchAddr = "dispatchAddr" - GlobalVPNConnectionDispatchAddrAccountName = "dispatchAddr.accountName" - GlobalVPNConnectionDispatchAddrClusterName = "dispatchAddr.clusterName" - GlobalVPNConnectionGlobalVPNName = "globalVPNName" - GlobalVPNConnectionParsedWgParams = "parsedWgParams" - GlobalVPNConnectionParsedWgParamsPrivateKey = "parsedWgParams.private_key" - GlobalVPNConnectionParsedWgParamsPublicKey = "parsedWgParams.public_key" - GlobalVPNConnectionSpec = "spec" - GlobalVPNConnectionSpecClusterCIDR = "spec.clusterCIDR" - GlobalVPNConnectionSpecDnsSuffix = "spec.dnsSuffix" - GlobalVPNConnectionSpecGlobalIP = "spec.globalIP" - GlobalVPNConnectionSpecLoadBalancer = "spec.loadBalancer" - GlobalVPNConnectionSpecLoadBalancerHosts = "spec.loadBalancer.hosts" - GlobalVPNConnectionSpecLoadBalancerPort = "spec.loadBalancer.port" - GlobalVPNConnectionSpecNodePort = "spec.nodePort" - GlobalVPNConnectionSpecPeers = "spec.peers" - GlobalVPNConnectionSpecServiceType = "spec.serviceType" - GlobalVPNConnectionSpecSvcCIDR = "spec.svcCIDR" - GlobalVPNConnectionSpecTargetNamespace = "spec.targetNamespace" - GlobalVPNConnectionSpecWireguardKeysRef = "spec.wireguardKeysRef" - GlobalVPNConnectionSpecWireguardKeysRefName = "spec.wireguardKeysRef.name" - GlobalVPNConnectionVisibility = "visibility" - GlobalVPNConnectionVisibilityMode = "visibility.mode" - GlobalVPNConnectionVisibilityPublicEndpoint = "visibility.publicEndpoint" + GlobalVPNConnectionClusterSvcCIDR = "clusterSvcCIDR" + GlobalVPNConnectionDeviceRef = "deviceRef" + GlobalVPNConnectionDeviceRefIpAddr = "deviceRef.ipAddr" + GlobalVPNConnectionDeviceRefName = "deviceRef.name" + GlobalVPNConnectionDispatchAddr = "dispatchAddr" + GlobalVPNConnectionDispatchAddrAccountName = "dispatchAddr.accountName" + GlobalVPNConnectionDispatchAddrClusterName = "dispatchAddr.clusterName" + GlobalVPNConnectionGlobalVPNName = "globalVPNName" + GlobalVPNConnectionParsedWgParams = "parsedWgParams" + GlobalVPNConnectionParsedWgParamsPrivateKey = "parsedWgParams.private_key" + GlobalVPNConnectionParsedWgParamsPublicKey = "parsedWgParams.public_key" + GlobalVPNConnectionSpec = "spec" + GlobalVPNConnectionSpecClusterCIDR = "spec.clusterCIDR" + GlobalVPNConnectionSpecDnsSuffix = "spec.dnsSuffix" + GlobalVPNConnectionSpecGlobalIP = "spec.globalIP" + GlobalVPNConnectionSpecLoadBalancer = "spec.loadBalancer" + GlobalVPNConnectionSpecLoadBalancerHosts = "spec.loadBalancer.hosts" + GlobalVPNConnectionSpecLoadBalancerPort = "spec.loadBalancer.port" + GlobalVPNConnectionSpecLocalOverrides = "spec.localOverrides" + GlobalVPNConnectionSpecLocalOverridesName = "spec.localOverrides.name" + GlobalVPNConnectionSpecLocalOverridesNamespace = "spec.localOverrides.namespace" + GlobalVPNConnectionSpecNodePort = "spec.nodePort" + GlobalVPNConnectionSpecPeers = "spec.peers" + GlobalVPNConnectionSpecServiceType = "spec.serviceType" + GlobalVPNConnectionSpecSvcCIDR = "spec.svcCIDR" + GlobalVPNConnectionSpecTargetNamespace = "spec.targetNamespace" + GlobalVPNConnectionSpecWireguardKeysRef = "spec.wireguardKeysRef" + GlobalVPNConnectionSpecWireguardKeysRefName = "spec.wireguardKeysRef.name" + GlobalVPNConnectionVisibility = "visibility" + GlobalVPNConnectionVisibilityMode = "visibility.mode" + GlobalVPNConnectionVisibilityPublicEndpoint = "visibility.publicEndpoint" ) // constant vars generated for struct GlobalVPNDevice diff --git a/apps/infra/internal/framework/framework.go b/apps/infra/internal/framework/framework.go index 75c091eaa..adee446e2 100644 --- a/apps/infra/internal/framework/framework.go +++ b/apps/infra/internal/framework/framework.go @@ -90,10 +90,8 @@ var Module = fx.Module("framework", app.Module, - fx.Provide(func(logr logging.Logger) (app.InfraGrpcServer, error) { - return grpc.NewGrpcServer(grpc.ServerOpts{ - Logger: logr, - }) + fx.Provide(func(logger *slog.Logger) (app.InfraGrpcServer, error) { + return grpc.NewGrpcServer(grpc.ServerOpts{Logger: logger}) }), fx.Invoke(func(ev *env.Env, server app.InfraGrpcServer, lf fx.Lifecycle, logger logging.Logger) { diff --git a/apps/message-office/internal/framework/framework.go b/apps/message-office/internal/framework/framework.go index 9806e6d6a..7dd3a5bc5 100644 --- a/apps/message-office/internal/framework/framework.go +++ b/apps/message-office/internal/framework/framework.go @@ -55,7 +55,7 @@ var Module = fx.Module("framework", app.Module, fx.Provide(func(logger *slog.Logger) (app.InternalGrpcServer, error) { - return grpc.NewGrpcServer(grpc.ServerOpts{Slogger: logger.With(slog.String("component", "internal-grpc"))}) + return grpc.NewGrpcServer(grpc.ServerOpts{Logger: logger.With(slog.String("component", "internal-grpc"))}) }), fx.Invoke(func(lf fx.Lifecycle, logr logging.Logger, server app.InternalGrpcServer, ev *env.Env) { @@ -80,7 +80,7 @@ var Module = fx.Module("framework", }), fx.Provide(func(logger *slog.Logger) (app.ExternalGrpcServer, error) { - return grpc.NewGrpcServer(grpc.ServerOpts{Slogger: logger.With(slog.String("component", "external-grpc"))}) + return grpc.NewGrpcServer(grpc.ServerOpts{Logger: logger.With(slog.String("component", "external-grpc"))}) }), fx.Invoke(func(lf fx.Lifecycle, logr logging.Logger, server app.ExternalGrpcServer, ev *env.Env) { diff --git a/apps/tenant-agent/main.go b/apps/tenant-agent/main.go index b75e08463..b080df346 100644 --- a/apps/tenant-agent/main.go +++ b/apps/tenant-agent/main.go @@ -321,7 +321,7 @@ func main() { accessToken: ev.AccessToken, } - gs, err := libGrpc.NewGrpcServer(libGrpc.ServerOpts{Slogger: logger.With("component", "vector-grpc-proxy")}) + gs, err := libGrpc.NewGrpcServer(libGrpc.ServerOpts{Logger: logger.With("component", "vector-grpc-proxy")}) if err != nil { logger.Error("failed to create grpc server, got", "err", err) } diff --git a/common/banner.go b/common/banner.go index b747e5a0d..839623f4b 100644 --- a/common/banner.go +++ b/common/banner.go @@ -59,24 +59,18 @@ func PrintKloudliteBanner() { func PrintReadyBanner2(readyIn time.Duration) { fmt.Printf(` - , - ##### - ######## - ######## - ######## ##### - ######## *######### ██╗ ██╗██╗ ██████╗ ██╗ ██╗██████╗ ██╗ ██╗████████╗███████╗ - ######## ############### ██║ ██╔╝██║ ██╔═══██╗██║ ██║██╔══██╗██║ ██║╚══██╔══╝██╔════╝ - ######## *################### █████╔╝ ██║ ██║ ██║██║ ██║██║ ██║██║ ██║ ██║ █████╗ - #######/ ######################## ██╔═██╗ ██║ ██║ ██║██║ ██║██║ ██║██║ ██║ ██║ ██╔══╝ - #######( ################### ██║ ██╗███████╗╚██████╔╝╚██████╔╝██████╔╝███████╗██║ ██║ ███████╗ - (#######. ##############* ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚══════╝ - ######## #(####### - (#######. ####* - ######## 🚀 running in %.2fs - /######(. - ##### - , - + ** + **** + **** * + **** ***** ▗▖ ▗▖▗▖ ▗▄▖ ▗▖ ▗▖▗▄▄▄ ▗▖ ▗▄▄▄▖▗▄▄▄▖▗▄▄▄▖ + **** ********* ▐▌▗▞▘▐▌ ▐▌ ▐▌▐▌ ▐▌▐▌ █▐▌ █ █ ▐▌ + **** ************ ▐▛▚▖ ▐▌ ▐▌ ▐▌▐▌ ▐▌▐▌ █▐▌ █ █ ▐▛▀▀▘ + **** ********* ▐▌ ▐▌▐▙▄▄▖▝▚▄▞▘▝▚▄▞▘▐▙▄▄▀▐▙▄▄▖▗▄█▄▖ █ ▐▙▄▄▖ + **** ***** + **** * 🚀 running in %.2fs + **** + ** + `, readyIn.Seconds()) } diff --git a/pkg/grpc/server.go b/pkg/grpc/server.go index 97c190914..9ef309a84 100644 --- a/pkg/grpc/server.go +++ b/pkg/grpc/server.go @@ -1,11 +1,12 @@ package grpc import ( + "context" "log/slog" "net" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" "github.com/kloudlite/api/pkg/errors" - "github.com/kloudlite/api/pkg/logging" "google.golang.org/grpc" "google.golang.org/grpc/peer" ) @@ -17,15 +18,12 @@ type Server interface { } type ServerOpts struct { - Logger logging.Logger - Slogger *slog.Logger + Logger *slog.Logger } type grpcServer struct { *grpc.Server - // Deprecated: use slogger - logger logging.Logger - slogger *slog.Logger + logger *slog.Logger } func (g *grpcServer) Listen(addr string) error { @@ -33,7 +31,7 @@ func (g *grpcServer) Listen(addr string) error { if err != nil { return errors.NewEf(err, "could not listen to net/tcp server") } - g.slogger.Info("grpc server listening", "at", addr) + g.logger.Info("grpc server listening", "at", addr) return g.Serve(listen) } @@ -42,11 +40,22 @@ func (g *grpcServer) Stop() { } func NewGrpcServer(opts ServerOpts) (Server, error) { - if opts.Slogger == nil { - opts.Slogger = slog.Default() + if opts.Logger == nil { + opts.Logger = slog.Default() + } + + grpcLogger := logging.LoggerFunc(func(ctx context.Context, lvl logging.Level, msg string, fields ...any) { + opts.Logger.Log(ctx, slog.Level(lvl), msg, fields...) + }) + + grpcLoggingOpts := []logging.Option{ + logging.WithLogOnEvents(logging.StartCall, logging.FinishCall), } server := grpc.NewServer( + grpc.ChainUnaryInterceptor(logging.UnaryServerInterceptor(grpcLogger, grpcLoggingOpts...)), + grpc.ChainStreamInterceptor(logging.StreamServerInterceptor(grpcLogger, grpcLoggingOpts...)), + grpc.StreamInterceptor(func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { p, ok := peer.FromContext(stream.Context()) if ok { @@ -61,7 +70,7 @@ func NewGrpcServer(opts ServerOpts) (Server, error) { }), ) - return &grpcServer{Server: server, logger: opts.Logger, slogger: opts.Slogger}, nil + return &grpcServer{Server: server, logger: opts.Logger}, nil } // Type guard to ensure grpcServer implements Server interface, at compile time From e183316a28d03159adb642a6e404719d1be2584f Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 24 Sep 2024 16:41:55 +0530 Subject: [PATCH 65/89] feat: control edge gateway service type via Env --- apps/infra/internal/app/process-resource-updates.go | 9 ++++----- apps/infra/internal/domain/clusters.go | 2 ++ .../domain/templates/kloudlite-gateway-svc.yml.tpl | 3 +-- apps/infra/internal/domain/templates/types.go | 1 + apps/infra/internal/env/env.go | 2 ++ 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/infra/internal/app/process-resource-updates.go b/apps/infra/internal/app/process-resource-updates.go index 01631df1d..210717027 100644 --- a/apps/infra/internal/app/process-resource-updates.go +++ b/apps/infra/internal/app/process-resource-updates.go @@ -9,7 +9,6 @@ import ( "sync" "time" - "github.com/kloudlite/api/constants" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/apps/infra/internal/domain" @@ -111,10 +110,10 @@ func processResourceUpdates(consumer ReceiveResourceUpdatesConsumer, d domain.Do dctx := domain.InfraContext{Context: context.TODO(), UserId: "sys-user-process-infra-updates", AccountName: ru.AccountName} - if strings.HasPrefix(ru.AccountName, "kl-") { - // FIXME: this is a kloudlite account, so we should handle it differently, as it is definitely not a tenant account - dctx.AccountName = obj.GetLabels()[constants.AccountNameKey] - } + // if strings.HasPrefix(ru.AccountName, "kl-") { + // // FIXME: this is a kloudlite account, so we should handle it differently, as it is definitely not a tenant account + // dctx.AccountName = obj.GetLabels()[constants.AccountNameKey] + // } mlogger.Debug("validated message") defer func() { diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 04ef02c6c..898f55b40 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -498,6 +498,7 @@ func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) e Namespace: resourceNamespace, WireguardPort: wgParams.ListenPort, Selector: selector, + ServiceType: d.env.KloudliteEdgeGatewayServiceType, }) if err != nil { return errors.NewE(err) @@ -682,6 +683,7 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string Namespace: resourceNamespace, WireguardPort: wgParams.ListenPort, Selector: selector, + ServiceType: d.env.KloudliteEdgeGatewayServiceType, }) if err != nil { return errors.NewE(err) diff --git a/apps/infra/internal/domain/templates/kloudlite-gateway-svc.yml.tpl b/apps/infra/internal/domain/templates/kloudlite-gateway-svc.yml.tpl index 704264dc8..512b4fe5d 100644 --- a/apps/infra/internal/domain/templates/kloudlite-gateway-svc.yml.tpl +++ b/apps/infra/internal/domain/templates/kloudlite-gateway-svc.yml.tpl @@ -13,8 +13,7 @@ metadata: labels: app: {{.Name}} spec: - {{- /* type: NodePort */}} - type: LoadBalancer + type: {{ .ServiceType }} ports: - name: wireguard protocol: UDP diff --git a/apps/infra/internal/domain/templates/types.go b/apps/infra/internal/domain/templates/types.go index 49dc16fa5..458d4c8df 100644 --- a/apps/infra/internal/domain/templates/types.go +++ b/apps/infra/internal/domain/templates/types.go @@ -21,4 +21,5 @@ type GatewayServiceTemplateVars struct { Namespace string WireguardPort uint16 Selector map[string]string + ServiceType string } diff --git a/apps/infra/internal/env/env.go b/apps/infra/internal/env/env.go index 110be4c41..6f643cdc8 100644 --- a/apps/infra/internal/env/env.go +++ b/apps/infra/internal/env/env.go @@ -59,6 +59,8 @@ type infraEnv struct { AvailableKloudliteRegionsConfig string `env:"AVAILABLE_KLOUDLITE_REGIONS_CONFIG" required:"false"` AvailableKloudliteRegions map[string]AvailableKloudliteRegion + KloudliteEdgeGatewayServiceType string `env:"KLOUDLITE_EDGE_GATEWAY_SERVICE_TYPE" default:"LoadBalancer"` + EnableClusterCreation bool `env:"ENABLE_CLUSTER_CREATION" default:"false"` } From badb8a97d3f8dbab9179082c6b96275e929b1daf Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 24 Sep 2024 16:46:20 +0530 Subject: [PATCH 66/89] chore: go mod tidy --- go.mod | 7 ++++--- go.sum | 14 ++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 8c2e56cb3..b529b379d 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( go.uber.org/zap v1.26.0 golang.org/x/oauth2 v0.16.0 golang.org/x/sync v0.7.0 - google.golang.org/grpc v1.61.0 + google.golang.org/grpc v1.61.1 google.golang.org/protobuf v1.34.1 gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/api v0.29.0 @@ -45,6 +45,7 @@ require ( github.com/charmbracelet/lipgloss v0.10.0 github.com/charmbracelet/log v0.4.0 github.com/go-chi/chi/v5 v5.0.10 + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 github.com/miekg/dns v1.1.55 github.com/nats-io/nats.go v1.31.0 @@ -82,12 +83,12 @@ require ( github.com/seancfoley/bintree v1.2.1 // indirect github.com/sosodev/duration v1.3.1 // indirect github.com/stretchr/objx v0.5.2 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) require ( - cloud.google.com/go/compute v1.23.3 // indirect + cloud.google.com/go/compute v1.23.4 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect diff --git a/go.sum b/go.sum index 440a7dcd0..90ed2d814 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute v1.23.4 h1:EBT9Nw4q3zyE7G45Wvv3MzolIrCJEuHys5muLY0wvAw= +cloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= @@ -146,6 +146,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 h1:pRhl55Yx1eC7BZ1N+BBWwnKaMyD8uC+34TLdndZMAKk= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0/go.mod h1:XKMd7iuf/RGPSMJ/U4HP0zS2Z9Fh8Ps9a+6X26m/tmI= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= @@ -448,10 +450,10 @@ gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuB google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac h1:nUQEQmH/csSvFECKYRv6HWEyypysidKl2I6Qpsglq/0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= -google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= -google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 h1:hZB7eLIaYlW9qXRfCq/qDaPdbeY3757uARz5Vvfv+cY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:YUWgXUFRPfoYK1IHMuxH5K6nPEXSCzIMljnQ59lLRCk= +google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= +google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= From fd9a7c488d50b790efea503988c65447a77285e6 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 24 Sep 2024 16:46:58 +0530 Subject: [PATCH 67/89] ci: migrating from local actions to kloudlite/actions --- .github/actions/build-api-images/action.yml | 418 ++++++++++-------- .github/workflows/building-with-nix.yml | 4 +- README.md | 67 +-- .../internal/framework/framework.go | 6 +- apps/container-registry/main.go | 36 +- go.mod | 2 +- go.sum | 4 +- 7 files changed, 277 insertions(+), 260 deletions(-) diff --git a/.github/actions/build-api-images/action.yml b/.github/actions/build-api-images/action.yml index 4e9eec6db..0fedc12fe 100644 --- a/.github/actions/build-api-images/action.yml +++ b/.github/actions/build-api-images/action.yml @@ -7,13 +7,9 @@ inputs: required: true image_tag: - description: 'image tag, if empty, will be generated from branch or tag' + description: 'image tag, when empty, will be generated from branch/tag' default: '' - cachix_enabled: - description: "cachix enabled" - default: "false" - cachix_cache_name: description: "cachix cache name" default: "kloudlite" @@ -95,18 +91,18 @@ runs: steps: - name: setup ENV Variables shell: bash - id: env-vars + # id: env-vars working-directory: ${{ inputs.git_directory }} run: |+ - GOMODCACHE=${{github.workspace}}/actions/go-mod-cache - GOCACHE=${{github.workspace}}/actions/go-cache - echo "GOMODCACHE=$GOMODCACHE" >> $GITHUB_OUTPUT - echo "GOCACHE=$GOCACHE" >> $GITHUB_OUTPUT - - echo "GOMODCACHE=$GOMODCACHE" >> $GITHUB_ENV - echo "GOCACHE=$GOCACHE" >> $GITHUB_ENV - echo "FILES_HASH=${{ hashFiles('**/*.go', '**/go.mod', '**/go.sum')}}" >> $GITHUB_OUTPUT - echo "PUSH_IMAGE=false" >> $GITHUB_ENV + # GOMODCACHE=${{github.workspace}}/actions/go-mod-cache + # GOCACHE=${{github.workspace}}/actions/go-cache + # echo "GOMODCACHE=$GOMODCACHE" >> $GITHUB_OUTPUT + # echo "GOCACHE=$GOCACHE" >> $GITHUB_OUTPUT + # + # echo "GOMODCACHE=$GOMODCACHE" >> $GITHUB_ENV + # echo "GOCACHE=$GOCACHE" >> $GITHUB_ENV + # echo "FILES_HASH=${{ hashFiles('**/*.go', '**/go.mod', '**/go.sum')}}" >> $GITHUB_OUTPUT + # echo "PUSH_IMAGE=false" >> $GITHUB_ENV if [ "$(basename ${{ inputs.git_directory }})" != "." ]; then echo "IMAGE_REPOSITORY_PREFIX=ghcr.io/${{ github.repository }}/$(basename ${{inputs.git_directory}})" >> $GITHUB_ENV else @@ -119,8 +115,8 @@ runs: ln -sf ${{ inputs.git_directory }}/.github/actions ./github-actions - name: setup nix (with cachix) - if: ${{ inputs.cachix_enabled == 'true' }} - uses: ./github-actions/setup-nix-cachix/ + uses: kloudlite/actions/setup-nix-cachix@v1 + # uses: ./github-actions/setup-nix-cachix/ with: flake_lock: ${{ inputs.git_directory }}/flake.lock nix_develop_arguments: "${{ inputs.git_directory }}#default" @@ -128,16 +124,10 @@ runs: cachix_cache_name: ${{ inputs.cachix_cache_name }} cachix_auth_token: ${{ inputs.cachix_auth_token }} - - name: setup nix cache (with github cache) - if: ${{ inputs.cachix_enabled == 'false' }} - uses: ./github-actions/setup-nix-github/ - with: - flake_lock: ${{ inputs.git_directory }}/flake.lock - nix_develop_arguments: "${{ inputs.git_directory }}#default" - - name: setup docker if: ${{ inputs.docker_enabled == 'true' }} - uses: ./github-actions/setup-docker + uses: kloudlite/actions/setup-docker@v1 + # uses: ./github-actions/setup-docker with: docker_username: ${{ github.actor }} docker_password: ${{ inputs.github_token }} @@ -155,26 +145,9 @@ runs: run: |+ echo "IMAGE_TAG=${{ inputs.image_tag }}" >> $GITHUB_ENV - - name: Create Image Tag from branch name - if: ${{ inputs.image_tag == '' && startsWith(github.ref, 'refs/heads/release-') }} - shell: bash - run: | - set +e - IMAGE_TAG=$(echo ${GITHUB_REF#refs/heads/} | sed 's/release-//g') - echo "$IMAGE_TAG" | grep -i '\-nightly$' - if [ $? -ne 0 ]; then - IMAGE_TAG="$IMAGE_TAG-nightly" - fi - set -e - - echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV - - - name: Create Image Tag from tag - if: ${{ inputs.image_tag == '' && startsWith(github.ref, 'refs/tags/') }} - shell: bash - run: | - IMAGE_TAG=$(echo ${GITHUB_REF#refs/tags/}) - echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV + - name: generate image tag + if: inputs.image_tag == '' + uses: kloudlite/actions/generate-image-tag@v1 - name: override image if image_tag is nightly if: "${{ endsWith(env.IMAGE_TAG, '-nightly') }}" @@ -182,272 +155,371 @@ runs: run: |+ echo "OVERRIDE_PUSHED_IMAGE=true" >> $GITHUB_ENV - - name: accounts api go build cache - if: ${{ inputs.accounts-api == 'true' }} - uses: actions/cache@v4 + # - name: accounts api go build cache + # if: ${{ inputs.accounts-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-accounts-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-accounts-api- + + - name: setup accounts api go cache + uses: kloudlite/actions/setup-cache-go@v1 + if: inputs.accounts-api == 'true' with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-accounts-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-accounts-api- + cache_key: accounts-api + working_directory: ${{ inputs.git_directory }} - name: accounts api - if: ${{ inputs.accounts-api == 'true' }} + if: inputs.accounts-api == 'true' working-directory: ${{ inputs.git_directory }}/apps/accounts shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/accounts:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/accounts:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: auth api go build cache + # if: ${{ inputs.auth-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-auth-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-auth-api- - name: auth api go build cache if: ${{ inputs.auth-api == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-auth-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-auth-api- + cache_key: auth-api + working_directory: ${{ inputs.git_directory }} - name: auth api if: ${{ inputs.auth-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/auth shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/auth:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/auth:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: comms api go build cache + # if: ${{ inputs.comms-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-comms-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-comms-api- - name: comms api go build cache if: ${{ inputs.comms-api == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-comms-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-comms-api- + cache_key: comms-api + working_directory: ${{ inputs.git_directory }} - name: comms api if: ${{ inputs.comms-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/comms shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/comms:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/comms:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: console api go build cache + # if: ${{ inputs.console-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-console-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-console-api- - name: console api go build cache if: ${{ inputs.console-api == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-console-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-console-api- + cache_key: console-api + working_directory: ${{ inputs.git_directory }} - name: console api if: ${{ inputs.console-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/console shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/console:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/console:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: container-registry api go build cache + # if: ${{ inputs.container-registry-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-container-registry-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-container-registry-api- + # - name: container-registry api go build cache if: ${{ inputs.container-registry-api == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-container-registry-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-container-registry-api- + cache_key: "container-registry-api" + working_directory: ${{ inputs.git_directory }} - name: container-registry api if: ${{ inputs.container-registry-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/container-registry shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/container-registry:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} - - - name: gateway api go build cache - if: ${{ inputs.gateway-api == 'true' }} - uses: actions/cache@v4 - with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-gateway-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-gateway-api- + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/container-registry:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: gateway api go build cache + # if: ${{ inputs.gateway-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-gateway-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-gateway-api- - name: gateway api if: ${{ inputs.gateway-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/gateway shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/gateway:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/gateway:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: iam api go build cache + # if: ${{ inputs.iam-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-iam-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-iam-api- - name: iam api go build cache if: ${{ inputs.iam-api == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-iam-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-iam-api- + cache_key: "iam-api" + working_directory: ${{ inputs.git_directory }} - name: iam api if: ${{ inputs.iam-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/iam shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/iam:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/iam:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: infra api go build cache + # if: ${{ inputs.infra-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-infra-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-infra-api- - name: infra api go build cache if: ${{ inputs.infra-api == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-infra-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-infra-api- + cache_key: "infra-api" + working_directory: ${{ inputs.git_directory }} - name: infra api if: ${{ inputs.infra-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/infra shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/infra:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/infra:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: iot-console api go build cache + # if: ${{ inputs.iot-console-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-iot-console-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-iot-console-api- - name: iot-console api go build cache if: ${{ inputs.iot-console-api == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-iot-console-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-iot-console-api- + cache_key: "iot-console-api" + working_directory: ${{ inputs.git_directory }} - name: iot-console api if: ${{ inputs.iot-console-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/iot-console shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/iot-console:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/iot-console:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: message-office api go build cache + # if: ${{ inputs.message-office-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-message-office-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-message-office-api- - name: message-office api go build cache if: ${{ inputs.message-office-api == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-message-office-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-message-office-api- + cache_key: "message-office-api" + working_directory: ${{ inputs.git_directory }} - name: message-office api if: ${{ inputs.message-office-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/message-office shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/message-office:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/message-office:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: observability api go build cache + # if: ${{ inputs.observability-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-observability-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-observability-api- - name: observability api go build cache if: ${{ inputs.observability-api == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-observability-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-observability-api- + cache_key: "observability-api" + working_directory: ${{ inputs.git_directory }} + - name: observability api if: ${{ inputs.observability-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/observability shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/observability:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/observability:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: tenant-agent go build cache + # if: ${{ inputs.tenant-agent == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-tenant-agent-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-tenant-agent- - name: tenant-agent go build cache if: ${{ inputs.tenant-agent == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-tenant-agent-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-tenant-agent- + cache_key: "tenant-agent" + working_directory: ${{ inputs.git_directory }} - name: tenant-agent if: ${{ inputs.tenant-agent == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/tenant-agent shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/tenant-agent:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/tenant-agent:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: webhook api go build cache + # if: ${{ inputs.webhook-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-webhook-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-webhook-api- - name: webhook api go build cache if: ${{ inputs.webhook-api == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-webhook-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-webhook-api- + cache_key: "webhook-api" + working_directory: ${{ inputs.git_directory }} - name: webhook api if: ${{ inputs.webhook-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/webhook shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/webhook:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/webhook:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: websocket-server api go build cache + # if: ${{ inputs.websocket-server-api == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-websocket-server-api-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-websocket-server-api- - name: websocket-server api go build cache if: ${{ inputs.websocket-server-api == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-websocket-server-api-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-websocket-server-api- + cache_key: "websocket-server-api" + working_directory: ${{ inputs.git_directory }} - name: websocket-server api if: ${{ inputs.websocket-server-api == 'true' }} working-directory: ${{ inputs.git_directory }}/apps/websocket-server shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/websocket-server:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/websocket-server:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + + # - name: gateway kube proxy api build cache + # if: ${{ inputs.gateway-kube-proxy == 'true' }} + # uses: actions/cache@v4 + # with: + # path: |+ + # ${{ env.GOMODCACHE }} + # ${{ env.GOCACHE }} + # key: go-${{ runner.os }}-gateway-kube-proxy-${{ steps.env-vars.outputs.FILES_HASH }} + # save-always: true + # restore-keys: go-${{ runner.os }}-gateway-kube-proxy- - name: gateway kube proxy api build cache if: ${{ inputs.gateway-kube-proxy == 'true' }} - uses: actions/cache@v4 + uses: kloudlite/actions/setup-cache-go@v1 with: - path: |+ - ${{ env.GOMODCACHE }} - ${{ env.GOCACHE }} - key: go-${{ runner.os }}-gateway-kube-proxy-${{ steps.env-vars.outputs.FILES_HASH }} - save-always: true - restore-keys: go-${{ runner.os }}-gateway-kube-proxy- + cache_key: "gateway-kube-proxy" + working_directory: ${{ inputs.git_directory }} - name: gateway logs proxy if: ${{ inputs.gateway-kube-proxy == 'true' }} working-directory: ${{ inputs.git_directory }}/cmd/gateway-kube-proxy shell: bash run: | - task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/cmd/gateway-kube-proxy:${IMAGE_TAG:-latest} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} + task container:build-and-push image=${IMAGE_REPOSITORY_PREFIX}/cmd/gateway-kube-proxy:${IMAGE_TAG} upx=true override=$OVERRIDE_PUSHED_IMAGE push_image=${PUSH_IMAGE} diff --git a/.github/workflows/building-with-nix.yml b/.github/workflows/building-with-nix.yml index 5462b6bc2..ecc5cdda3 100644 --- a/.github/workflows/building-with-nix.yml +++ b/.github/workflows/building-with-nix.yml @@ -30,7 +30,7 @@ permissions: jobs: build-images: strategy: - fail-fast: false + fail-fast: true matrix: images: - name: accounts-api @@ -59,7 +59,7 @@ jobs: with: image_tag: ${{ inputs.image_tag }} - cachix_enabled: true + # cachix_enabled: true cachix_auth_token: ${{ secrets.CACHIX_AUTH_TOKEN }} docker_enabled: true diff --git a/README.md b/README.md index ab678b409..2e5a38c4c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Kloudlite Platform Backend -[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B37304%2Fgit%40github.com%3Akloudlite%2Fapi-go.svg?type=shield)](https://app.fossa.com/projects/custom%2B37304%2Fgit%40github.com%3Akloudlite%2Fapi-go?ref=badge_shield) +![GitHub License](https://img.shields.io/github/license/kloudlite/api) ![Nightly CI](https://github.com/k3s-io/k3s/actions/workflows/nightly-install.yaml/badge.svg) [![Build Status](https://drone-publish.k3s.io/api/badges/k3s-io/k3s/status.svg)](https://drone-publish.k3s.io/k3s-io/k3s) [![Integration Test Coverage](https://github.com/k3s-io/k3s/actions/workflows/integration.yaml/badge.svg)](https://github.com/k3s-io/k3s/actions/workflows/integration.yaml) @@ -18,68 +18,5 @@ to effectively manage complex multi-cloud and hybrid infrastructures without req expertise. -## Table of Contents - -1. [Installation](#installation) -2. [Uninstallation](#uninstallation) -3. [Usage](#usage) -4. [Contributing](docs/code-contribution-guidelines.md) -5. [License](LICENSE) - ## Installation - -This section provides instructions for installing our application using Helm, a popular package manager for Kubernetes. Before proceeding, make sure you have the following prerequisites: - -- Kubernetes cluster up and running -- kubectl configured to connect to your cluster -- Helm v3.x installed - -### Step 1: Add the Helm Repository -First, add the Helm repository containing the chart for our application: - -``` -helm repo add kloudlite https://github.com/kloudlite/helm -helm repo update -``` - -### Step 2: Configure the Application -Create a values.yaml file to customize the application's configuration according to your needs. -Use the values.yaml file provided in the Helm chart as a reference. - -``` -# values.yaml -someFeature: - enabled: true - replicas: 2 - -anotherFeature: - size: "large" -``` - -### Step 3: Install the Application - -Install the application using the helm install command, specifying your custom values.yaml file: - -``` -helm install / -f values.yaml -``` - -### Step 4: Verify the Installation - -After the installation is complete, check that the application's resources have been created in your Kubernetes cluster: - -``` -kubectl get all -l app.kubernetes.io/instance= -``` - -### Step 5: Access the Application - -Depending on your application's configuration, you may need to expose its services to access it. Follow the specific instructions provided by your application's documentation. - -## Uninstalling the Application - -To uninstall the application, use the helm uninstall command: - -``` -helm uninstall -``` +[Follow installation docs](https://github.com/kloudlite/helm-charts) diff --git a/apps/container-registry/internal/framework/framework.go b/apps/container-registry/internal/framework/framework.go index b602c0b45..1cf21b39e 100644 --- a/apps/container-registry/internal/framework/framework.go +++ b/apps/container-registry/internal/framework/framework.go @@ -107,10 +107,8 @@ var Module = fx.Module("framework", }), // creates New GRPC server - fx.Provide(func(logger logging.Logger) (app.ContainerRegistryGRPCServer, error) { - return grpc.NewGrpcServer(grpc.ServerOpts{ - Logger: logger.WithName("GRPC server"), - }) + fx.Provide(func(logger *slog.Logger) (app.ContainerRegistryGRPCServer, error) { + return grpc.NewGrpcServer(grpc.ServerOpts{Logger: logger}) }), // handles GRPC server lifecycle diff --git a/apps/container-registry/main.go b/apps/container-registry/main.go index e9bb338c0..1eb7e10b6 100644 --- a/apps/container-registry/main.go +++ b/apps/container-registry/main.go @@ -3,8 +3,9 @@ package main import ( "context" "flag" - "log/slog" - "runtime/trace" + "os" + "os/signal" + "time" "github.com/kloudlite/api/apps/container-registry/internal/env" "github.com/kloudlite/api/pkg/errors" @@ -17,10 +18,22 @@ import ( ) func main() { + start := time.Now() + var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") + + var debug bool + flag.BoolVar(&debug, "debug", false, "--debug") + flag.Parse() + if isDev { + debug = true + } + + logger := logging.NewSlogLogger(logging.SlogOptions{ShowCaller: true, ShowDebugLogs: debug, SetAsDefaultLogger: true}) + app := fx.New( fx.Provide(func() (*env.Env, error) { if e, err := env.LoadEnv(); err != nil { @@ -37,23 +50,20 @@ func main() { }, ), - fx.Provide(func() *slog.Logger { - return logging.NewSlogLogger(logging.SlogOptions{ - ShowCaller: true, - ShowDebugLogs: isDev, - SetAsDefaultLogger: true, - }) - }), + fx.Supply(logger), fn.FxErrorHandler(), framework.Module, ) - if err := app.Start(context.TODO()); err != nil { - trace.Log(context.TODO(), "app.Start", err.Error()) - panic(err) + ctx, cf := signal.NotifyContext(context.TODO(), os.Interrupt) + defer cf() + + if err := app.Start(ctx); err != nil { + logger.Error("failed to start container registry api, got", "err", err) + os.Exit(1) } - common.PrintReadyBanner() + common.PrintReadyBanner2(time.Since(start)) <-app.Done() } diff --git a/go.mod b/go.mod index b529b379d..953d3f2c9 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/google/go-github/v43 v43.0.0 github.com/google/go-github/v45 v45.2.0 github.com/gorilla/websocket v1.5.0 - github.com/kloudlite/operator v0.0.0-20240917124613-0418df6214cf + github.com/kloudlite/operator v0.0.0-20240924122932-030f95a15613 github.com/matoous/go-nanoid/v2 v2.0.0 github.com/pkg/errors v0.9.1 github.com/sendgrid/sendgrid-go v3.11.1+incompatible diff --git a/go.sum b/go.sum index 90ed2d814..8bf458a03 100644 --- a/go.sum +++ b/go.sum @@ -179,8 +179,8 @@ github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2 github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 h1:YnZh3TL6AG4EfoInx1/L5zcPHd2QxgLKseJB1KtHjdQ= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55/go.mod h1:GZj3wZmIw/qCciclRhgQTgmGiqe8wxoVzMXQjbOfnbc= -github.com/kloudlite/operator v0.0.0-20240917124613-0418df6214cf h1:GPPzhVCddW5Ba+gxaumhdX3cq5HB6qs99v47v2aKbkc= -github.com/kloudlite/operator v0.0.0-20240917124613-0418df6214cf/go.mod h1:VkreINDW43qeTsDv9gfGH5M9c5OG/jPGYOGxj8otsGY= +github.com/kloudlite/operator v0.0.0-20240924122932-030f95a15613 h1:2vmIyEscCnsRpZ0zaXov1jglR+UcRnCwa4va7DbwcYc= +github.com/kloudlite/operator v0.0.0-20240924122932-030f95a15613/go.mod h1:VkreINDW43qeTsDv9gfGH5M9c5OG/jPGYOGxj8otsGY= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= From aec2dadbc8a2e66548a3d94de4c3f4e4795801ff Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Wed, 25 Sep 2024 13:56:16 +0530 Subject: [PATCH 68/89] feat: text search on image name - search image registries, with empty query, returns 10 recent images --- apps/console/internal/app/graph/schema.resolvers.go | 9 ++++++--- apps/console/internal/domain/registry-image.go | 8 ++++++++ apps/console/internal/entities/registry-image.go | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index 1bb3a1eb0..5f8491f05 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -7,9 +7,10 @@ package graph import ( "context" "fmt" - "github.com/kloudlite/api/pkg/errors" "time" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/apps/console/internal/app/graph/generated" "github.com/kloudlite/api/apps/console/internal/app/graph/model" "github.com/kloudlite/api/apps/console/internal/domain" @@ -1072,5 +1073,7 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type mutationResolver struct{ *Resolver } -type queryResolver struct{ *Resolver } +type ( + mutationResolver struct{ *Resolver } + queryResolver struct{ *Resolver } +) diff --git a/apps/console/internal/domain/registry-image.go b/apps/console/internal/domain/registry-image.go index 8e77708c7..73c8c144b 100644 --- a/apps/console/internal/domain/registry-image.go +++ b/apps/console/internal/domain/registry-image.go @@ -105,6 +105,14 @@ func (d *domain) SearchRegistryImages(ctx ConsoleContext, query string) ([]*enti return nil, errors.NewE(err) } + if query == "" { + return d.registryImageRepo.Find(ctx, repos.Query{ + Filter: repos.Filter{}, + Sort: map[string]any{"_id": -1}, + Limit: fn.New(int64(10)), + }) + } + filters := repos.Filter{ fields.AccountName: ctx.AccountName, "$text": map[string]any{"$search": query}, diff --git a/apps/console/internal/entities/registry-image.go b/apps/console/internal/entities/registry-image.go index d22b7ced7..8de87d27c 100644 --- a/apps/console/internal/entities/registry-image.go +++ b/apps/console/internal/entities/registry-image.go @@ -39,6 +39,7 @@ var RegistryImageIndexes = []repos.IndexField{ Field: []repos.IndexKey{ {Key: fields.AccountName, Value: repos.IndexAsc}, {Key: fc.Metadata, Value: repos.IndexAsc, IsText: true}, + {Key: fc.RegistryImageImageName, Value: repos.IndexAsc, IsText: true}, }, }, } From 6f03821ede719f6be93c224a98d96fe966cb3c6a Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 26 Sep 2024 16:44:23 +0530 Subject: [PATCH 69/89] fix: updates global vpn gateway allowed IPs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - apparently, cluster gateway's allowed IP could easily have been 100.64.0.0/10, but idk why i had all possible 256 combinations in there 😂 --- apps/infra/internal/domain/global-vpn-cluster-connection.go | 2 +- apps/infra/internal/domain/global-vpn-devices.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/infra/internal/domain/global-vpn-cluster-connection.go b/apps/infra/internal/domain/global-vpn-cluster-connection.go index 78ee7b644..26faf8602 100644 --- a/apps/infra/internal/domain/global-vpn-cluster-connection.go +++ b/apps/infra/internal/domain/global-vpn-cluster-connection.go @@ -96,7 +96,7 @@ func (d *domain) listGlobalVPNConnections(ctx InfraContext, vpnName string) ([]* func hashPeer(peer networkingv1.Peer) string { sort.Strings(peer.AllowedIPs) - return fmt.Sprintf("%x", md5.Sum([]byte(fmt.Sprintf("%s:%s:%s:%s:%s", peer.IP, peer.PublicKey, fn.DefaultIfNil(peer.PublicEndpoint), fn.DefaultIfNil(peer.DNSSuffix), strings.Join(peer.AllowedIPs, ","))))) + return fmt.Sprintf("%x", md5.Sum([]byte(fmt.Sprintf("%s:%s:%s:%s:%s", fn.DefaultIfNil(peer.IP, ""), peer.PublicKey, fn.DefaultIfNil(peer.PublicEndpoint), fn.DefaultIfNil(peer.DNSSuffix), strings.Join(peer.AllowedIPs, ","))))) } func hashPeers(peers []networkingv1.Peer) string { diff --git a/apps/infra/internal/domain/global-vpn-devices.go b/apps/infra/internal/domain/global-vpn-devices.go index 8719c8b74..736233aa4 100644 --- a/apps/infra/internal/domain/global-vpn-devices.go +++ b/apps/infra/internal/domain/global-vpn-devices.go @@ -237,7 +237,10 @@ func (d *domain) buildPeerFromGlobalVPNDevice(_ InfraContext, gvpn *entities.Glo if device.IPAddr == gvpn.KloudliteGatewayDevice.IPAddr { // FIXME: this should not be used - allowedIPs = append(allowedIPs, gvpn.NonClusterUseAllowedIPs...) + // allowedIPs = append(allowedIPs, gvpn.NonClusterUseAllowedIPs...) + + // NOTE: i don't even remember what is the use case of non-cluster-use allowed IPs + allowedIPs = append(allowedIPs, "100.64.0.0/10") // allowedIPs = append(allowedIPs, privateCIDRs...) } From c8d11c601f3853b7bca3d7c18cd241ad60157e0f Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 26 Sep 2024 16:46:45 +0530 Subject: [PATCH 70/89] feat(console): getDNSHostSuffix method --- .../internal/app/graph/generated/generated.go | 77 +++++++++++++++++++ .../internal/app/graph/schema.graphqls | 2 + .../internal/app/graph/schema.resolvers.go | 5 ++ 3 files changed, 84 insertions(+) diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 7806f949c..5f70958c9 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -800,6 +800,7 @@ type ComplexityRoot struct { CoreGetApp func(childComplexity int, envName string, name string) int CoreGetConfig func(childComplexity int, envName string, name string) int CoreGetConfigValues func(childComplexity int, envName string, queries []*domain.ConfigKeyRef) int + CoreGetDNSHostSuffix func(childComplexity int) int CoreGetEnvironment func(childComplexity int, name string) int CoreGetExternalApp func(childComplexity int, envName string, name string) int CoreGetImagePullSecret func(childComplexity int, name string) int @@ -1106,6 +1107,7 @@ type MutationResolver interface { } type QueryResolver interface { CoreCheckNameAvailability(ctx context.Context, envName *string, msvcName *string, resType entities.ResourceType, name string) (*domain.CheckNameAvailabilityOutput, error) + CoreGetDNSHostSuffix(ctx context.Context) (string, error) CoreListEnvironments(ctx context.Context, search *model.SearchEnvironments, pq *repos.CursorPagination) (*model.EnvironmentPaginatedRecords, error) CoreGetEnvironment(ctx context.Context, name string) (*entities.Environment, error) CoreResyncEnvironment(ctx context.Context, name string) (bool, error) @@ -4650,6 +4652,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.CoreGetConfigValues(childComplexity, args["envName"].(string), args["queries"].([]*domain.ConfigKeyRef)), true + case "Query.core_getDNSHostSuffix": + if e.complexity.Query.CoreGetDNSHostSuffix == nil { + break + } + + return e.complexity.Query.CoreGetDNSHostSuffix(childComplexity), true + case "Query.core_getEnvironment": if e.complexity.Query.CoreGetEnvironment == nil { break @@ -5928,6 +5937,8 @@ input CoreSearchVPNDevices { type Query { core_checkNameAvailability(envName: String, msvcName: String ,resType: ConsoleResType!, name: String!): ConsoleCheckNameAvailabilityOutput! @isLoggedIn @hasAccount + core_getDNSHostSuffix: String! + core_listEnvironments(search: SearchEnvironments, pq: CursorPaginationIn): EnvironmentPaginatedRecords @isLoggedInAndVerified @hasAccount core_getEnvironment(name: String!): Environment @isLoggedInAndVerified @hasAccount core_resyncEnvironment(name: String!): Boolean! @isLoggedInAndVerified @hasAccount @@ -32320,6 +32331,50 @@ func (ec *executionContext) fieldContext_Query_core_checkNameAvailability(ctx co return fc, nil } +func (ec *executionContext) _Query_core_getDNSHostSuffix(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_core_getDNSHostSuffix(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.Query().CoreGetDNSHostSuffix(rctx) + }) + 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_Query_core_getDNSHostSuffix(_ 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 fc, nil +} + func (ec *executionContext) _Query_core_listEnvironments(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Query_core_listEnvironments(ctx, field) if err != nil { @@ -51601,6 +51656,28 @@ 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_getDNSHostSuffix": + 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_getDNSHostSuffix(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_listEnvironments": field := field diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index d95c85a68..1574c875b 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -107,6 +107,8 @@ input CoreSearchVPNDevices { type Query { core_checkNameAvailability(envName: String, msvcName: String ,resType: ConsoleResType!, name: String!): ConsoleCheckNameAvailabilityOutput! @isLoggedIn @hasAccount + core_getDNSHostSuffix: String! + core_listEnvironments(search: SearchEnvironments, pq: CursorPaginationIn): EnvironmentPaginatedRecords @isLoggedInAndVerified @hasAccount core_getEnvironment(name: String!): Environment @isLoggedInAndVerified @hasAccount core_resyncEnvironment(name: 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 5f8491f05..fa37b21a7 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -453,6 +453,11 @@ func (r *queryResolver) CoreCheckNameAvailability(ctx context.Context, envName * return r.Domain.CheckNameAvailability(ctx, cc.AccountName, envName, msvcName, resType, name) } +// CoreGetDNSHostSuffix is the resolver for the core_getDNSHostSuffix field. +func (r *queryResolver) CoreGetDNSHostSuffix(ctx context.Context) (string, error) { + return r.EnvVars.KloudliteDNSSuffix, nil +} + // CoreListEnvironments is the resolver for the core_listEnvironments field. func (r *queryResolver) CoreListEnvironments(ctx context.Context, search *model.SearchEnvironments, pq *repos.CursorPagination) (*model.EnvironmentPaginatedRecords, error) { cc, err := toConsoleContext(ctx) From c1d981d639d88790ae5ab70f60f13fdc7605f18b Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Fri, 27 Sep 2024 10:28:35 +0530 Subject: [PATCH 71/89] feat: supports intercepting app on local cluster --- .../internal/app/graph/generated/generated.go | 163 ++++++++++++++++++ .../internal/app/graph/schema.graphqls | 1 + .../internal/app/graph/schema.resolvers.go | 17 ++ apps/console/internal/domain/api.go | 1 + apps/console/internal/domain/app.go | 26 +++ .../field-constants/generated_constants.go | 2 + go.mod | 2 +- go.sum | 4 +- 8 files changed, 213 insertions(+), 3 deletions(-) diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 5f70958c9..e4b0b840f 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -762,6 +762,7 @@ type ComplexityRoot struct { CoreDeleteSecret func(childComplexity int, envName string, secretName string) int CoreImportManagedResource func(childComplexity int, envName string, msvcName string, mresName string, importName string) int CoreInterceptApp func(childComplexity int, envName string, appname string, deviceName string, intercept bool, portMappings []*v1.AppInterceptPortMappings) int + CoreInterceptAppOnLocalCluster func(childComplexity int, envName string, appname string, clusterName string, ipAddr string, intercept bool, portMappings []*v1.AppInterceptPortMappings) int CoreInterceptExternalApp func(childComplexity int, envName string, externalAppName string, deviceName string, intercept bool, portMappings []*v1.AppInterceptPortMappings) int CoreRemoveDeviceIntercepts func(childComplexity int, envName string, deviceName string) int CoreUpdateApp func(childComplexity int, envName string, app entities.App) int @@ -1081,6 +1082,7 @@ type MutationResolver interface { CoreUpdateApp(ctx context.Context, envName string, app entities.App) (*entities.App, error) CoreDeleteApp(ctx context.Context, envName string, appName string) (bool, error) CoreInterceptApp(ctx context.Context, envName string, appname string, deviceName string, intercept bool, portMappings []*v1.AppInterceptPortMappings) (bool, error) + CoreInterceptAppOnLocalCluster(ctx context.Context, envName string, appname string, clusterName string, ipAddr string, intercept bool, portMappings []*v1.AppInterceptPortMappings) (bool, error) CoreRemoveDeviceIntercepts(ctx context.Context, envName string, deviceName string) (bool, error) CoreCreateExternalApp(ctx context.Context, envName string, externalApp entities.ExternalApp) (*entities.ExternalApp, error) CoreUpdateExternalApp(ctx context.Context, envName string, externalApp entities.ExternalApp) (*entities.ExternalApp, error) @@ -4380,6 +4382,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CoreInterceptApp(childComplexity, args["envName"].(string), args["appname"].(string), args["deviceName"].(string), args["intercept"].(bool), args["portMappings"].([]*v1.AppInterceptPortMappings)), true + case "Mutation.core_interceptAppOnLocalCluster": + if e.complexity.Mutation.CoreInterceptAppOnLocalCluster == nil { + break + } + + args, err := ec.field_Mutation_core_interceptAppOnLocalCluster_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.CoreInterceptAppOnLocalCluster(childComplexity, args["envName"].(string), args["appname"].(string), args["clusterName"].(string), args["ipAddr"].(string), args["intercept"].(bool), args["portMappings"].([]*v1.AppInterceptPortMappings)), true + case "Mutation.core_interceptExternalApp": if e.complexity.Mutation.CoreInterceptExternalApp == nil { break @@ -6005,6 +6019,7 @@ type Mutation { core_updateApp(envName: String!, app: AppIn!): App @isLoggedInAndVerified @hasAccount core_deleteApp(envName: String!, appName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_interceptApp(envName: String!, appname: String!, deviceName: String!, intercept: Boolean!, portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn!]): Boolean! @isLoggedInAndVerified @hasAccount + core_interceptAppOnLocalCluster(envName: String!, appname: String!, clusterName: String!, ipAddr: String!, intercept: Boolean!, portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn!]): Boolean! @isLoggedInAndVerified @hasAccount core_removeDeviceIntercepts(envName: String!, deviceName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_createExternalApp(envName: String!, externalApp: ExternalAppIn!): ExternalApp @isLoggedInAndVerified @hasAccount @@ -8024,6 +8039,66 @@ func (ec *executionContext) field_Mutation_core_importManagedResource_args(ctx c return args, nil } +func (ec *executionContext) field_Mutation_core_interceptAppOnLocalCluster_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["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["appname"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("appname")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["appname"] = arg1 + var arg2 string + if tmp, ok := rawArgs["clusterName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["clusterName"] = arg2 + var arg3 string + if tmp, ok := rawArgs["ipAddr"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ipAddr")) + arg3, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["ipAddr"] = arg3 + var arg4 bool + if tmp, ok := rawArgs["intercept"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("intercept")) + arg4, err = ec.unmarshalNBoolean2bool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["intercept"] = arg4 + var arg5 []*v1.AppInterceptPortMappings + if tmp, ok := rawArgs["portMappings"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("portMappings")) + arg5, err = ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn2ᚕᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐAppInterceptPortMappingsᚄ(ctx, tmp) + if err != nil { + return nil, err + } + } + args["portMappings"] = arg5 + return args, nil +} + func (ec *executionContext) field_Mutation_core_interceptApp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -29559,6 +29634,87 @@ func (ec *executionContext) fieldContext_Mutation_core_interceptApp(ctx context. return fc, nil } +func (ec *executionContext) _Mutation_core_interceptAppOnLocalCluster(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_interceptAppOnLocalCluster(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().CoreInterceptAppOnLocalCluster(rctx, fc.Args["envName"].(string), fc.Args["appname"].(string), fc.Args["clusterName"].(string), fc.Args["ipAddr"].(string), fc.Args["intercept"].(bool), fc.Args["portMappings"].([]*v1.AppInterceptPortMappings)) + } + 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_interceptAppOnLocalCluster(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_interceptAppOnLocalCluster_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + func (ec *executionContext) _Mutation_core_removeDeviceIntercepts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Mutation_core_removeDeviceIntercepts(ctx, field) if err != nil { @@ -51350,6 +51506,13 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) if out.Values[i] == graphql.Null { out.Invalids++ } + case "core_interceptAppOnLocalCluster": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_core_interceptAppOnLocalCluster(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } case "core_removeDeviceIntercepts": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Mutation_core_removeDeviceIntercepts(ctx, field) diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index 1574c875b..d509fa652 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -175,6 +175,7 @@ type Mutation { core_updateApp(envName: String!, app: AppIn!): App @isLoggedInAndVerified @hasAccount core_deleteApp(envName: String!, appName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_interceptApp(envName: String!, appname: String!, deviceName: String!, intercept: Boolean!, portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn!]): Boolean! @isLoggedInAndVerified @hasAccount + core_interceptAppOnLocalCluster(envName: String!, appname: String!, clusterName: String!, ipAddr: String!, intercept: Boolean!, portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn!]): Boolean! @isLoggedInAndVerified @hasAccount core_removeDeviceIntercepts(envName: String!, deviceName: String!): Boolean! @isLoggedInAndVerified @hasAccount core_createExternalApp(envName: String!, externalApp: ExternalAppIn!): ExternalApp @isLoggedInAndVerified @hasAccount diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index fa37b21a7..ef08ea747 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -207,6 +207,23 @@ func (r *mutationResolver) CoreInterceptApp(ctx context.Context, envName string, return r.Domain.InterceptApp(newResourceContext(cc, envName), appname, deviceName, intercept, pmappings) } +// CoreInterceptAppOnLocalCluster is the resolver for the core_interceptAppOnLocalCluster field. +func (r *mutationResolver) CoreInterceptAppOnLocalCluster(ctx context.Context, envName string, appname string, clusterName string, ipAddr string, intercept bool, portMappings []*v11.AppInterceptPortMappings) (bool, error) { + cc, err := toConsoleContext(ctx) + if err != nil { + return false, errors.NewE(err) + } + + pmappings := make([]v11.AppInterceptPortMappings, 0, len(portMappings)) + for i := range portMappings { + if portMappings[i] != nil { + pmappings = append(pmappings, *portMappings[i]) + } + } + + return r.Domain.InterceptAppOnLocalCluster(newResourceContext(cc, envName), appname, clusterName, ipAddr, intercept, pmappings) +} + // CoreRemoveDeviceIntercepts is the resolver for the core_removeDeviceIntercepts field. func (r *mutationResolver) CoreRemoveDeviceIntercepts(ctx context.Context, envName string, deviceName string) (bool, error) { cc, err := toConsoleContext(ctx) diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index 2c50d6065..601b6c2b7 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -195,6 +195,7 @@ type Domain interface { DeleteApp(ctx ResourceContext, name string) error InterceptApp(ctx ResourceContext, appName string, deviceName string, intercept bool, portMappings []crdsv1.AppInterceptPortMappings) (bool, error) + InterceptAppOnLocalCluster(ctx ResourceContext, appName string, clusterName string, ipAddr string, intercept bool, portMappings []crdsv1.AppInterceptPortMappings) (bool, error) RestartApp(ctx ResourceContext, appName string) error RemoveDeviceIntercepts(ctx ResourceContext, deviceName string) error diff --git a/apps/console/internal/domain/app.go b/apps/console/internal/domain/app.go index db23bca45..65d02086b 100644 --- a/apps/console/internal/domain/app.go +++ b/apps/console/internal/domain/app.go @@ -233,6 +233,32 @@ func (d *domain) InterceptApp(ctx ResourceContext, appName string, deviceName st return true, nil } +// InterceptApp implements Domain. +func (d *domain) InterceptAppOnLocalCluster(ctx ResourceContext, appName string, clusterName string, ipAddr string, intercept bool, portMappings []crdsv1.AppInterceptPortMappings) (bool, error) { + if err := d.canMutateResourcesInEnvironment(ctx); err != nil { + return false, errors.NewE(err) + } + + patch := repos.Document{ + fc.AppSpecInterceptEnabled: intercept, + fc.AppSpecInterceptToDevice: clusterName, + fc.AppSpecInterceptToIPAddr: ipAddr, + } + + if portMappings != nil { + patch[fc.AppSpecInterceptPortMappings] = portMappings + } + + uApp, err := d.appRepo.Patch(ctx, ctx.DBFilters().Add(fields.MetadataName, appName), patch) + if err != nil { + return false, errors.NewE(err) + } + if err := d.applyApp(ctx, uApp); err != nil { + return false, errors.NewE(err) + } + return true, nil +} + func (d *domain) RestartApp(ctx ResourceContext, appName string) error { if err := d.canMutateResourcesInEnvironment(ctx); err != nil { return errors.NewE(err) diff --git a/apps/console/internal/entities/field-constants/generated_constants.go b/apps/console/internal/entities/field-constants/generated_constants.go index b31327d13..ba396a632 100644 --- a/apps/console/internal/entities/field-constants/generated_constants.go +++ b/apps/console/internal/entities/field-constants/generated_constants.go @@ -21,6 +21,7 @@ const ( AppSpecInterceptEnabled = "spec.intercept.enabled" AppSpecInterceptPortMappings = "spec.intercept.portMappings" AppSpecInterceptToDevice = "spec.intercept.toDevice" + AppSpecInterceptToIPAddr = "spec.intercept.toIPAddr" AppSpecNodeSelector = "spec.nodeSelector" AppSpecRegion = "spec.region" AppSpecReplicas = "spec.replicas" @@ -122,6 +123,7 @@ const ( ExternalAppSpecInterceptEnabled = "spec.intercept.enabled" ExternalAppSpecInterceptPortMappings = "spec.intercept.portMappings" ExternalAppSpecInterceptToDevice = "spec.intercept.toDevice" + ExternalAppSpecInterceptToIPAddr = "spec.intercept.toIPAddr" ExternalAppSpecRecord = "spec.record" ExternalAppSpecRecordType = "spec.recordType" ) diff --git a/go.mod b/go.mod index 953d3f2c9..b39e27ea2 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/google/go-github/v43 v43.0.0 github.com/google/go-github/v45 v45.2.0 github.com/gorilla/websocket v1.5.0 - github.com/kloudlite/operator v0.0.0-20240924122932-030f95a15613 + github.com/kloudlite/operator v0.0.0-20240927061728-c8cb9559e4c3 github.com/matoous/go-nanoid/v2 v2.0.0 github.com/pkg/errors v0.9.1 github.com/sendgrid/sendgrid-go v3.11.1+incompatible diff --git a/go.sum b/go.sum index 8bf458a03..35ae5f098 100644 --- a/go.sum +++ b/go.sum @@ -179,8 +179,8 @@ github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2 github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 h1:YnZh3TL6AG4EfoInx1/L5zcPHd2QxgLKseJB1KtHjdQ= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55/go.mod h1:GZj3wZmIw/qCciclRhgQTgmGiqe8wxoVzMXQjbOfnbc= -github.com/kloudlite/operator v0.0.0-20240924122932-030f95a15613 h1:2vmIyEscCnsRpZ0zaXov1jglR+UcRnCwa4va7DbwcYc= -github.com/kloudlite/operator v0.0.0-20240924122932-030f95a15613/go.mod h1:VkreINDW43qeTsDv9gfGH5M9c5OG/jPGYOGxj8otsGY= +github.com/kloudlite/operator v0.0.0-20240927061728-c8cb9559e4c3 h1:7FaI5EE5oxaf10qVhunIrh2p9cf2U1e7AzarfzDuKtQ= +github.com/kloudlite/operator v0.0.0-20240927061728-c8cb9559e4c3/go.mod h1:VkreINDW43qeTsDv9gfGH5M9c5OG/jPGYOGxj8otsGY= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= From 92a337c6fea107e833c5f4eb870bbaa825f0496d Mon Sep 17 00:00:00 2001 From: Abdhesh Nayak Date: Fri, 27 Sep 2024 12:40:42 +0530 Subject: [PATCH 72/89] Feat/owned cluster (#373) * :sparkles: Added checks for owned cluster added checks for owned cluster, while creating and listing * :construction: Added owner checks to model * :construction: Changed label key for owned by * :bug: Fixed issues * :construction: Changed to byok * :sparkles: Added app rollout * :sparkles: Added app rollout on image push --- .../adapters/infra-service/infra-service.go | 15 + apps/console/internal/app/webhook-consumer.go | 24 +- apps/console/internal/domain/api.go | 3 +- apps/console/internal/domain/app.go | 45 + apps/console/internal/domain/environment.go | 22 + .../internal/domain/ports/infra-service.go | 10 + .../console/internal/domain/registry-image.go | 2 +- .../internal/app/graph/generated/generated.go | 2016 ++++++++++++----- .../app/graph/helmrelease.resolvers.go | 6 + .../internal/app/graph/model/models_gen.go | 162 +- .../internal/app/graph/nodepool.resolvers.go | 6 + .../struct-to-graphql/byokcluster.graphqls | 2 + .../graph/struct-to-graphql/cluster.graphqls | 2 + .../struct-to-graphql/common-types.graphqls | 69 +- .../struct-to-graphql/helmrelease.graphqls | 1 + .../graph/struct-to-graphql/nodepool.graphqls | 1 + apps/infra/internal/app/grpc-server.go | 34 + apps/infra/internal/domain/byok-clusters.go | 19 +- apps/infra/internal/domain/clusters.go | 13 + apps/infra/internal/entities/byok-cluster.go | 8 + apps/infra/internal/entities/cluster.go | 8 + .../field-constants/generated_constants.go | 2 + apps/infra/protobufs/infra.proto | 2 + apps/infra/protobufs/infra/infra.pb.go | 221 +- apps/infra/protobufs/infra/infra_grpc.pb.go | 73 +- constants/constants.go | 5 + 26 files changed, 1969 insertions(+), 802 deletions(-) diff --git a/apps/console/internal/app/adapters/infra-service/infra-service.go b/apps/console/internal/app/adapters/infra-service/infra-service.go index b11212b81..df0ba16f6 100644 --- a/apps/console/internal/app/adapters/infra-service/infra-service.go +++ b/apps/console/internal/app/adapters/infra-service/infra-service.go @@ -30,6 +30,21 @@ func (s *InfraService) EnsureGlobalVPNConnection(ctx context.Context, args ports return nil } +func (s *InfraService) GetByokClusterOwnedBy(ctx context.Context, args ports.IsClusterLabelsIn) (string, error) { + cl, err := s.infraClient.GetCluster(ctx, &infra.GetClusterIn{ + UserId: args.UserId, + UserName: args.UserName, + UserEmail: args.UserEmail, + AccountName: args.AccountName, + ClusterName: args.ClusterName, + }) + if err != nil { + return "", err + } + + return cl.OwnedBy, nil +} + var _ ports.InfraService = (*InfraService)(nil) func NewInfraService(infraClient infra.InfraClient) ports.InfraService { diff --git a/apps/console/internal/app/webhook-consumer.go b/apps/console/internal/app/webhook-consumer.go index d46ac3642..081570440 100644 --- a/apps/console/internal/app/webhook-consumer.go +++ b/apps/console/internal/app/webhook-consumer.go @@ -3,6 +3,8 @@ package app import ( "context" "encoding/json" + "fmt" + "github.com/kloudlite/api/apps/console/internal/domain" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/pkg/logging" @@ -18,25 +20,29 @@ func processWebhooks(consumer WebhookConsumer, d domain.Domain, logger logging.L logger.Infof("finished processing message") }() - webhook := &domain.ImageHookPayload{} - if err := json.Unmarshal(msg.Payload, &webhook); err != nil { + hook := &domain.ImageHookPayload{} + if err := json.Unmarshal(msg.Payload, &hook); err != nil { logger.Errorf(err, "could not unmarshal into *ImageHookPayload") return errors.NewE(err) } - if webhook.Image == "" || webhook.AccountName == "" { + if hook.Image == "" || hook.AccountName == "" { return errors.Newf("invalid webhook payload") } - hook := &domain.ImageHookPayload{ - Image: webhook.Image, - AccountName: webhook.AccountName, - Meta: webhook.Meta, - } - _, err := d.CreateRegistryImage(context.TODO(), hook.AccountName, hook.Image, hook.Meta) + _, err := d.UpsertRegistryImage(context.TODO(), hook.AccountName, hook.Image, hook.Meta) if err != nil { logger.Errorf(err, "could not process image hook") return errors.NewE(err) } + + // domain.NewConsoleContext(ctx, userId repos.ID, accountName string) + dctx := domain.NewConsoleContext(context.TODO(), "sys-user:apply-on-error-worker", hook.AccountName) + + if err := d.RolloutAppsByImage(dctx, fmt.Sprintf("%s:%s", hook.Image, hook.Image)); err != nil { + logger.Errorf(err, "could not rollout apps by image") + return errors.NewE(err) + } + return nil }, msgTypes.ConsumeOpts{ OnError: func(err error) error { diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index 601b6c2b7..c6e99ab61 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -183,7 +183,7 @@ type Domain interface { GetRegistryImageURL(ctx ConsoleContext) (*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) + UpsertRegistryImage(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) SearchRegistryImages(ctx ConsoleContext, query string) ([]*entities.RegistryImage, error) @@ -204,6 +204,7 @@ type Domain interface { OnAppUpdateMessage(ctx ResourceContext, app entities.App, status types.ResourceStatus, opts UpdateAndDeleteOpts) error ResyncApp(ctx ResourceContext, name string) error + RolloutAppsByImage(ctx ConsoleContext, imageName string) error ListConfigs(ctx ResourceContext, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.Config], error) GetConfig(ctx ResourceContext, name string) (*entities.Config, error) diff --git a/apps/console/internal/domain/app.go b/apps/console/internal/domain/app.go index 65d02086b..1e4979977 100644 --- a/apps/console/internal/domain/app.go +++ b/apps/console/internal/domain/app.go @@ -371,3 +371,48 @@ func (d *domain) ResyncApp(ctx ResourceContext, name string) error { } return d.resyncK8sResource(ctx, a.EnvironmentName, a.SyncStatus.Action, &a.App, a.RecordVersion) } + +func (d *domain) listAppsByImage(ctx ConsoleContext, image string) ([]*entities.App, error) { + apps, err := d.appRepo.Find(ctx, repos.Query{ + Filter: repos.Filter{ + fields.AccountName: ctx.AccountName, + fmt.Sprintf("%s.image", fc.AppSpecContainers): image, + fmt.Sprintf("%s.imagePullPolicy", fc.AppSpecContainers): "Always", + }, + Sort: nil, + }) + if err != nil { + return nil, errors.NewE(err) + } + return apps, nil +} + +func (d *domain) RolloutAppsByImage(ctx ConsoleContext, imageName string) error { + + iName, iTag := getImageNameTag(imageName) + + apps, err := d.listAppsByImage(ctx, fmt.Sprintf("%s:%s", iName, iTag)) + if err != nil { + return errors.NewE(err) + } + + // for the latest + apps2, err := d.listAppsByImage(ctx, iName) + if err != nil { + return errors.NewE(err) + } + + for _, app := range apps { + if err := d.resyncK8sResource(ctx, app.EnvironmentName, app.SyncStatus.Action, &app.App, app.RecordVersion); err != nil { + return errors.NewE(err) + } + } + + for _, app := range apps2 { + if err := d.resyncK8sResource(ctx, app.EnvironmentName, app.SyncStatus.Action, &app.App, app.RecordVersion); err != nil { + return errors.NewE(err) + } + } + + return nil +} diff --git a/apps/console/internal/domain/environment.go b/apps/console/internal/domain/environment.go index 8a3cb6679..cb813d269 100644 --- a/apps/console/internal/domain/environment.go +++ b/apps/console/internal/domain/environment.go @@ -18,6 +18,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "github.com/kloudlite/api/apps/console/internal/domain/ports" "github.com/kloudlite/api/apps/console/internal/entities" fc "github.com/kloudlite/api/apps/console/internal/entities/field-constants" "github.com/kloudlite/api/pkg/repos" @@ -134,10 +135,30 @@ func (d *domain) findEnvironmentByTargetNs(ctx ConsoleContext, targetNs string) } func (d *domain) CreateEnvironment(ctx ConsoleContext, env entities.Environment) (*entities.Environment, error) { + if err := d.canPerformActionInAccount(ctx, iamT.CreateEnvironment); err != nil { + return nil, errors.NewE(err) + } + if strings.TrimSpace(env.ClusterName) == "" { return nil, fmt.Errorf("clustername must be set while creating environments") } + ownedBy, err := d.infraSvc.GetByokClusterOwnedBy(ctx, ports.IsClusterLabelsIn{ + UserId: string(ctx.UserId), + UserEmail: ctx.UserEmail, + UserName: ctx.UserName, + AccountName: ctx.AccountName, + ClusterName: env.ClusterName, + }) + if err != nil { + return nil, errors.NewE(err) + } + + if ownedBy != "" && ownedBy != string(ctx.UserId) { + return nil, fmt.Errorf("it's owned cluster, but you are not the owner") + } + env.Labels[constants.ClusterLabelOwnedBy] = string(ctx.UserId) + env.EnsureGVK() if err := d.k8sClient.ValidateObject(ctx, &env.Environment); err != nil { return nil, errors.NewE(err) @@ -160,6 +181,7 @@ func (d *domain) CreateEnvironment(ctx ConsoleContext, env entities.Environment) UserName: ctx.UserName, UserEmail: ctx.UserEmail, } + env.LastUpdatedBy = env.CreatedBy env.AccountName = ctx.AccountName diff --git a/apps/console/internal/domain/ports/infra-service.go b/apps/console/internal/domain/ports/infra-service.go index c3ea80100..052ada408 100644 --- a/apps/console/internal/domain/ports/infra-service.go +++ b/apps/console/internal/domain/ports/infra-service.go @@ -4,6 +4,16 @@ import "context" type InfraService interface { EnsureGlobalVPNConnection(ctx context.Context, args EnsureGlobalVPNConnectionIn) error + GetByokClusterOwnedBy(ctx context.Context, args IsClusterLabelsIn) (string, error) +} + +type IsClusterLabelsIn struct { + UserId string + UserEmail string + UserName string + + AccountName string + ClusterName string } type EnsureGlobalVPNConnectionIn struct { diff --git a/apps/console/internal/domain/registry-image.go b/apps/console/internal/domain/registry-image.go index 73c8c144b..0d84cbc9c 100644 --- a/apps/console/internal/domain/registry-image.go +++ b/apps/console/internal/domain/registry-image.go @@ -79,7 +79,7 @@ func (d *domain) GetRegistryImageURL(ctx ConsoleContext) (*entities.RegistryImag }, nil } -func (d *domain) CreateRegistryImage(ctx context.Context, accountName string, image string, meta map[string]any) (*entities.RegistryImage, error) { +func (d *domain) UpsertRegistryImage(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{ diff --git a/apps/infra/internal/app/graph/generated/generated.go b/apps/infra/internal/app/graph/generated/generated.go index 2dcfb60b8..a817e42bf 100644 --- a/apps/infra/internal/app/graph/generated/generated.go +++ b/apps/infra/internal/app/graph/generated/generated.go @@ -102,6 +102,7 @@ type ComplexityRoot struct { MarkedForDeletion func(childComplexity int) int MessageQueueTopicName func(childComplexity int) int ObjectMeta func(childComplexity int) int + OwnedBy func(childComplexity int) int RecordVersion func(childComplexity int) int SyncStatus func(childComplexity int) int UpdateTime func(childComplexity int) int @@ -176,6 +177,7 @@ type ComplexityRoot struct { LastUpdatedBy func(childComplexity int) int MarkedForDeletion func(childComplexity int) int ObjectMeta func(childComplexity int) int + OwnedBy func(childComplexity int) int RecordVersion func(childComplexity int) int Spec func(childComplexity int) int Status func(childComplexity int) int @@ -260,6 +262,11 @@ type ComplexityRoot struct { PublicEndpoint func(childComplexity int) int } + Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr struct { + AccountName func(childComplexity int) int + ClusterName func(childComplexity int) int + } + Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials struct { ServiceAccountJSON func(childComplexity int) int } @@ -651,6 +658,7 @@ type ComplexityRoot struct { ClusterName func(childComplexity int) int CreatedBy func(childComplexity int) int CreationTime func(childComplexity int) int + DispatchAddr func(childComplexity int) int DisplayName func(childComplexity int) int ID func(childComplexity int) int Kind func(childComplexity int) int @@ -792,6 +800,11 @@ type ComplexityRoot struct { Path func(childComplexity int) int } + K8s__io___api___core___v1__ModifyVolumeStatus struct { + Status func(childComplexity int) int + TargetVolumeAttributesClassName func(childComplexity int) int + } + K8s__io___api___core___v1__NFSVolumeSource struct { Path func(childComplexity int) int ReadOnly func(childComplexity int) int @@ -855,23 +868,26 @@ type ComplexityRoot struct { } K8s__io___api___core___v1__PersistentVolumeClaimSpec struct { - AccessModes func(childComplexity int) int - DataSource func(childComplexity int) int - DataSourceRef func(childComplexity int) int - Resources func(childComplexity int) int - Selector func(childComplexity int) int - StorageClassName func(childComplexity int) int - VolumeMode func(childComplexity int) int - VolumeName func(childComplexity int) int + AccessModes func(childComplexity int) int + DataSource func(childComplexity int) int + DataSourceRef func(childComplexity int) int + Resources func(childComplexity int) int + Selector func(childComplexity int) int + StorageClassName func(childComplexity int) int + VolumeAttributesClassName func(childComplexity int) int + VolumeMode func(childComplexity int) int + VolumeName func(childComplexity int) int } K8s__io___api___core___v1__PersistentVolumeClaimStatus struct { - AccessModes func(childComplexity int) int - AllocatedResourceStatuses func(childComplexity int) int - AllocatedResources func(childComplexity int) int - Capacity func(childComplexity int) int - Conditions func(childComplexity int) int - Phase func(childComplexity int) int + AccessModes func(childComplexity int) int + AllocatedResourceStatuses func(childComplexity int) int + AllocatedResources func(childComplexity int) int + Capacity func(childComplexity int) int + Conditions func(childComplexity int) int + CurrentVolumeAttributesClassName func(childComplexity int) int + ModifyVolumeStatus func(childComplexity int) int + Phase func(childComplexity int) int } K8s__io___api___core___v1__PersistentVolumeSpec struct { @@ -903,6 +919,7 @@ type ComplexityRoot struct { ScaleIo func(childComplexity int) int StorageClassName func(childComplexity int) int Storageos func(childComplexity int) int + VolumeAttributesClassName func(childComplexity int) int VolumeMode func(childComplexity int) int VsphereVolume func(childComplexity int) int } @@ -926,6 +943,8 @@ type ComplexityRoot struct { K8s__io___api___core___v1__PodAffinityTerm struct { LabelSelector func(childComplexity int) int + MatchLabelKeys func(childComplexity int) int + MismatchLabelKeys func(childComplexity int) int NamespaceSelector func(childComplexity int) int Namespaces func(childComplexity int) int TopologyKey func(childComplexity int) int @@ -967,16 +986,6 @@ type ComplexityRoot struct { User func(childComplexity int) int } - K8s__io___api___core___v1__ResourceClaim struct { - Name func(childComplexity int) int - } - - K8s__io___api___core___v1__ResourceRequirements struct { - Claims func(childComplexity int) int - Limits func(childComplexity int) int - Requests func(childComplexity int) int - } - K8s__io___api___core___v1__ScaleIOPersistentVolumeSource struct { FsType func(childComplexity int) int Gateway func(childComplexity int) int @@ -1035,6 +1044,11 @@ type ComplexityRoot struct { Required func(childComplexity int) int } + K8s__io___api___core___v1__VolumeResourceRequirements struct { + Limits func(childComplexity int) int + Requests func(childComplexity int) int + } + K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource struct { FsType func(childComplexity int) int StoragePolicyID func(childComplexity int) int @@ -1201,6 +1215,7 @@ type ComplexityRoot struct { ClusterName func(childComplexity int) int CreatedBy func(childComplexity int) int CreationTime func(childComplexity int) int + DispatchAddr func(childComplexity int) int DisplayName func(childComplexity int) int ID func(childComplexity int) int Kind func(childComplexity int) int @@ -1445,6 +1460,7 @@ type GlobalVPNDeviceResolver interface { } type HelmReleaseResolver interface { CreationTime(ctx context.Context, obj *entities.HelmRelease) (string, error) + DispatchAddr(ctx context.Context, obj *entities.HelmRelease) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr, error) ID(ctx context.Context, obj *entities.HelmRelease) (repos.ID, error) @@ -1508,6 +1524,7 @@ type NodeResolver interface { } type NodePoolResolver interface { CreationTime(ctx context.Context, obj *entities.NodePool) (string, error) + DispatchAddr(ctx context.Context, obj *entities.NodePool) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr, error) ID(ctx context.Context, obj *entities.NodePool) (repos.ID, error) @@ -1579,6 +1596,7 @@ type VolumeAttachmentResolver interface { type BYOKClusterInResolver interface { Metadata(ctx context.Context, obj *entities.BYOKCluster, data *v1.ObjectMeta) error + Visibility(ctx context.Context, obj *entities.BYOKCluster, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesClusterVisbilityIn) error } type CloudProviderSecretInResolver interface { @@ -1590,6 +1608,7 @@ type CloudProviderSecretInResolver interface { } type ClusterInResolver interface { Metadata(ctx context.Context, obj *entities.Cluster, data *v1.ObjectMeta) error + Spec(ctx context.Context, obj *entities.Cluster, data *model.GithubComKloudliteOperatorApisClustersV1ClusterSpecIn) error } type GlobalVPNDeviceInResolver interface { @@ -1743,6 +1762,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.BYOKCluster.ObjectMeta(childComplexity), true + case "BYOKCluster.ownedBy": + if e.complexity.BYOKCluster.OwnedBy == nil { + break + } + + return e.complexity.BYOKCluster.OwnedBy(childComplexity), true + case "BYOKCluster.recordVersion": if e.complexity.BYOKCluster.RecordVersion == nil { break @@ -2072,6 +2098,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Cluster.ObjectMeta(childComplexity), true + case "Cluster.ownedBy": + if e.complexity.Cluster.OwnedBy == nil { + break + } + + return e.complexity.Cluster.OwnedBy(childComplexity), true + case "Cluster.recordVersion": if e.complexity.Cluster.RecordVersion == nil { break @@ -2415,6 +2448,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___api___apps___infra___internal___entities__ClusterVisbility.PublicEndpoint(childComplexity), true + case "Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr.accountName": + if e.complexity.Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr.AccountName == nil { + break + } + + return e.complexity.Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr.AccountName(childComplexity), true + + case "Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr.clusterName": + if e.complexity.Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr.ClusterName == nil { + break + } + + return e.complexity.Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr.ClusterName(childComplexity), true + case "Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials.serviceAccountJSON": if e.complexity.Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials.ServiceAccountJSON == nil { break @@ -4158,6 +4205,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.HelmRelease.CreationTime(childComplexity), true + case "HelmRelease.dispatchAddr": + if e.complexity.HelmRelease.DispatchAddr == nil { + break + } + + return e.complexity.HelmRelease.DispatchAddr(childComplexity), true + case "HelmRelease.displayName": if e.complexity.HelmRelease.DisplayName == nil { break @@ -4774,6 +4828,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.K8s__io___api___core___v1__LocalVolumeSource.Path(childComplexity), true + case "K8s__io___api___core___v1__ModifyVolumeStatus.status": + if e.complexity.K8s__io___api___core___v1__ModifyVolumeStatus.Status == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__ModifyVolumeStatus.Status(childComplexity), true + + case "K8s__io___api___core___v1__ModifyVolumeStatus.targetVolumeAttributesClassName": + if e.complexity.K8s__io___api___core___v1__ModifyVolumeStatus.TargetVolumeAttributesClassName == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__ModifyVolumeStatus.TargetVolumeAttributesClassName(childComplexity), true + case "K8s__io___api___core___v1__NFSVolumeSource.path": if e.complexity.K8s__io___api___core___v1__NFSVolumeSource.Path == nil { break @@ -5040,6 +5108,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.K8s__io___api___core___v1__PersistentVolumeClaimSpec.StorageClassName(childComplexity), true + case "K8s__io___api___core___v1__PersistentVolumeClaimSpec.volumeAttributesClassName": + if e.complexity.K8s__io___api___core___v1__PersistentVolumeClaimSpec.VolumeAttributesClassName == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__PersistentVolumeClaimSpec.VolumeAttributesClassName(childComplexity), true + case "K8s__io___api___core___v1__PersistentVolumeClaimSpec.volumeMode": if e.complexity.K8s__io___api___core___v1__PersistentVolumeClaimSpec.VolumeMode == nil { break @@ -5089,6 +5164,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.K8s__io___api___core___v1__PersistentVolumeClaimStatus.Conditions(childComplexity), true + case "K8s__io___api___core___v1__PersistentVolumeClaimStatus.currentVolumeAttributesClassName": + if e.complexity.K8s__io___api___core___v1__PersistentVolumeClaimStatus.CurrentVolumeAttributesClassName == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__PersistentVolumeClaimStatus.CurrentVolumeAttributesClassName(childComplexity), true + + case "K8s__io___api___core___v1__PersistentVolumeClaimStatus.modifyVolumeStatus": + if e.complexity.K8s__io___api___core___v1__PersistentVolumeClaimStatus.ModifyVolumeStatus == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__PersistentVolumeClaimStatus.ModifyVolumeStatus(childComplexity), true + case "K8s__io___api___core___v1__PersistentVolumeClaimStatus.phase": if e.complexity.K8s__io___api___core___v1__PersistentVolumeClaimStatus.Phase == nil { break @@ -5292,6 +5381,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.Storageos(childComplexity), true + case "K8s__io___api___core___v1__PersistentVolumeSpec.volumeAttributesClassName": + if e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.VolumeAttributesClassName == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.VolumeAttributesClassName(childComplexity), true + case "K8s__io___api___core___v1__PersistentVolumeSpec.volumeMode": if e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.VolumeMode == nil { break @@ -5369,6 +5465,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.K8s__io___api___core___v1__PodAffinityTerm.LabelSelector(childComplexity), true + case "K8s__io___api___core___v1__PodAffinityTerm.matchLabelKeys": + if e.complexity.K8s__io___api___core___v1__PodAffinityTerm.MatchLabelKeys == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__PodAffinityTerm.MatchLabelKeys(childComplexity), true + + case "K8s__io___api___core___v1__PodAffinityTerm.mismatchLabelKeys": + if e.complexity.K8s__io___api___core___v1__PodAffinityTerm.MismatchLabelKeys == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__PodAffinityTerm.MismatchLabelKeys(childComplexity), true + case "K8s__io___api___core___v1__PodAffinityTerm.namespaceSelector": if e.complexity.K8s__io___api___core___v1__PodAffinityTerm.NamespaceSelector == nil { break @@ -5537,34 +5647,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.K8s__io___api___core___v1__RBDPersistentVolumeSource.User(childComplexity), true - case "K8s__io___api___core___v1__ResourceClaim.name": - if e.complexity.K8s__io___api___core___v1__ResourceClaim.Name == nil { - break - } - - return e.complexity.K8s__io___api___core___v1__ResourceClaim.Name(childComplexity), true - - case "K8s__io___api___core___v1__ResourceRequirements.claims": - if e.complexity.K8s__io___api___core___v1__ResourceRequirements.Claims == nil { - break - } - - return e.complexity.K8s__io___api___core___v1__ResourceRequirements.Claims(childComplexity), true - - case "K8s__io___api___core___v1__ResourceRequirements.limits": - if e.complexity.K8s__io___api___core___v1__ResourceRequirements.Limits == nil { - break - } - - return e.complexity.K8s__io___api___core___v1__ResourceRequirements.Limits(childComplexity), true - - case "K8s__io___api___core___v1__ResourceRequirements.requests": - if e.complexity.K8s__io___api___core___v1__ResourceRequirements.Requests == nil { - break - } - - return e.complexity.K8s__io___api___core___v1__ResourceRequirements.Requests(childComplexity), true - case "K8s__io___api___core___v1__ScaleIOPersistentVolumeSource.fsType": if e.complexity.K8s__io___api___core___v1__ScaleIOPersistentVolumeSource.FsType == nil { break @@ -5803,6 +5885,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.K8s__io___api___core___v1__VolumeNodeAffinity.Required(childComplexity), true + case "K8s__io___api___core___v1__VolumeResourceRequirements.limits": + if e.complexity.K8s__io___api___core___v1__VolumeResourceRequirements.Limits == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__VolumeResourceRequirements.Limits(childComplexity), true + + case "K8s__io___api___core___v1__VolumeResourceRequirements.requests": + if e.complexity.K8s__io___api___core___v1__VolumeResourceRequirements.Requests == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__VolumeResourceRequirements.Requests(childComplexity), true + case "K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource.fsType": if e.complexity.K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource.FsType == nil { break @@ -6689,6 +6785,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.NodePool.CreationTime(childComplexity), true + case "NodePool.dispatchAddr": + if e.complexity.NodePool.DispatchAddr == nil { + break + } + + return e.complexity.NodePool.DispatchAddr(childComplexity), true + case "NodePool.displayName": if e.complexity.NodePool.DisplayName == nil { break @@ -7682,6 +7785,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputK8s__io___api___core___v1__HostPathVolumeSourceIn, ec.unmarshalInputK8s__io___api___core___v1__ISCSIPersistentVolumeSourceIn, ec.unmarshalInputK8s__io___api___core___v1__LocalVolumeSourceIn, + ec.unmarshalInputK8s__io___api___core___v1__ModifyVolumeStatusIn, ec.unmarshalInputK8s__io___api___core___v1__NFSVolumeSourceIn, ec.unmarshalInputK8s__io___api___core___v1__NamespaceConditionIn, ec.unmarshalInputK8s__io___api___core___v1__NamespaceSpecIn, @@ -7704,8 +7808,6 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputK8s__io___api___core___v1__PreferredSchedulingTermIn, ec.unmarshalInputK8s__io___api___core___v1__QuobyteVolumeSourceIn, ec.unmarshalInputK8s__io___api___core___v1__RBDPersistentVolumeSourceIn, - ec.unmarshalInputK8s__io___api___core___v1__ResourceClaimIn, - ec.unmarshalInputK8s__io___api___core___v1__ResourceRequirementsIn, ec.unmarshalInputK8s__io___api___core___v1__ScaleIOPersistentVolumeSourceIn, ec.unmarshalInputK8s__io___api___core___v1__SecretReferenceIn, ec.unmarshalInputK8s__io___api___core___v1__StorageOSPersistentVolumeSourceIn, @@ -7714,6 +7816,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputK8s__io___api___core___v1__TypedLocalObjectReferenceIn, ec.unmarshalInputK8s__io___api___core___v1__TypedObjectReferenceIn, ec.unmarshalInputK8s__io___api___core___v1__VolumeNodeAffinityIn, + ec.unmarshalInputK8s__io___api___core___v1__VolumeResourceRequirementsIn, ec.unmarshalInputK8s__io___api___core___v1__VsphereVirtualDiskVolumeSourceIn, ec.unmarshalInputK8s__io___api___core___v1__WeightedPodAffinityTermIn, ec.unmarshalInputK8s__io___api___storage___v1__VolumeAttachmentSourceIn, @@ -8042,6 +8145,7 @@ extend type GlobalVPNDevice { markedForDeletion: Boolean messageQueueTopicName: String! metadata: Metadata! @goField(name: "objectMeta") + ownedBy: String recordVersion: Int! syncStatus: Github__com___kloudlite___api___pkg___types__SyncStatus! updateTime: Date! @@ -8062,6 +8166,7 @@ type BYOKClusterPaginatedRecords @shareable { input BYOKClusterIn { displayName: String! metadata: MetadataIn! + ownedBy: String visibility: Github__com___kloudlite___api___apps___infra___internal___entities__ClusterVisbilityIn! } @@ -8126,6 +8231,7 @@ input CloudProviderSecretIn { lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! markedForDeletion: Boolean metadata: Metadata! @goField(name: "objectMeta") + ownedBy: String recordVersion: Int! spec: Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec! status: Github__com___kloudlite___operator___pkg___operator__Status @@ -8150,6 +8256,7 @@ input ClusterIn { globalVPN: String kind: String metadata: MetadataIn! + ownedBy: String spec: Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpecIn! } @@ -8181,6 +8288,11 @@ type Github__com___kloudlite___api___apps___infra___internal___entities__Cluster publicEndpoint: String } +type Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr @shareable { + accountName: String! + clusterName: String! +} + type Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials @shareable { serviceAccountJSON: String! } @@ -8609,6 +8721,11 @@ type K8s__io___api___core___v1__LocalVolumeSource @shareable { path: String! } +type K8s__io___api___core___v1__ModifyVolumeStatus @shareable { + status: K8s__io___api___core___v1__PersistentVolumeClaimModifyVolumeStatus! + targetVolumeAttributesClassName: String +} + type K8s__io___api___core___v1__NFSVolumeSource @shareable { path: String! readOnly: Boolean @@ -8675,9 +8792,10 @@ type K8s__io___api___core___v1__PersistentVolumeClaimSpec @shareable { accessModes: [String!] dataSource: K8s__io___api___core___v1__TypedLocalObjectReference dataSourceRef: K8s__io___api___core___v1__TypedObjectReference - resources: K8s__io___api___core___v1__ResourceRequirements + resources: K8s__io___api___core___v1__VolumeResourceRequirements selector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector storageClassName: String + volumeAttributesClassName: String volumeMode: String volumeName: String } @@ -8688,6 +8806,8 @@ type K8s__io___api___core___v1__PersistentVolumeClaimStatus @shareable { allocatedResourceStatuses: Map capacity: Map conditions: [K8s__io___api___core___v1__PersistentVolumeClaimCondition!] + currentVolumeAttributesClassName: String + modifyVolumeStatus: K8s__io___api___core___v1__ModifyVolumeStatus phase: K8s__io___api___core___v1__PersistentVolumeClaimPhase } @@ -8720,6 +8840,7 @@ type K8s__io___api___core___v1__PersistentVolumeSpec @shareable { scaleIO: K8s__io___api___core___v1__ScaleIOPersistentVolumeSource storageClassName: String storageos: K8s__io___api___core___v1__StorageOSPersistentVolumeSource + volumeAttributesClassName: String volumeMode: String vsphereVolume: K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource } @@ -8743,6 +8864,8 @@ type K8s__io___api___core___v1__PodAffinity @shareable { type K8s__io___api___core___v1__PodAffinityTerm @shareable { labelSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector + matchLabelKeys: [String!] + mismatchLabelKeys: [String!] namespaces: [String!] namespaceSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector topologyKey: String! @@ -8784,16 +8907,6 @@ type K8s__io___api___core___v1__RBDPersistentVolumeSource @shareable { user: String } -type K8s__io___api___core___v1__ResourceClaim @shareable { - name: String! -} - -type K8s__io___api___core___v1__ResourceRequirements @shareable { - claims: [K8s__io___api___core___v1__ResourceClaim!] - limits: Map - requests: Map -} - type K8s__io___api___core___v1__ScaleIOPersistentVolumeSource @shareable { fsType: String gateway: String! @@ -8852,6 +8965,11 @@ type K8s__io___api___core___v1__VolumeNodeAffinity @shareable { required: K8s__io___api___core___v1__NodeSelector } +type K8s__io___api___core___v1__VolumeResourceRequirements @shareable { + limits: Map + requests: Map +} + type K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource @shareable { fsType: String storagePolicyID: String @@ -9169,6 +9287,11 @@ input K8s__io___api___core___v1__LocalVolumeSourceIn { path: String! } +input K8s__io___api___core___v1__ModifyVolumeStatusIn { + status: K8s__io___api___core___v1__PersistentVolumeClaimModifyVolumeStatus! + targetVolumeAttributesClassName: String +} + input K8s__io___api___core___v1__NFSVolumeSourceIn { path: String! readOnly: Boolean @@ -9235,9 +9358,10 @@ input K8s__io___api___core___v1__PersistentVolumeClaimSpecIn { accessModes: [String!] dataSource: K8s__io___api___core___v1__TypedLocalObjectReferenceIn dataSourceRef: K8s__io___api___core___v1__TypedObjectReferenceIn - resources: K8s__io___api___core___v1__ResourceRequirementsIn + resources: K8s__io___api___core___v1__VolumeResourceRequirementsIn selector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn storageClassName: String + volumeAttributesClassName: String volumeMode: String volumeName: String } @@ -9248,6 +9372,8 @@ input K8s__io___api___core___v1__PersistentVolumeClaimStatusIn { allocatedResourceStatuses: Map capacity: Map conditions: [K8s__io___api___core___v1__PersistentVolumeClaimConditionIn!] + currentVolumeAttributesClassName: String + modifyVolumeStatus: K8s__io___api___core___v1__ModifyVolumeStatusIn phase: K8s__io___api___core___v1__PersistentVolumeClaimPhase } @@ -9280,6 +9406,7 @@ input K8s__io___api___core___v1__PersistentVolumeSpecIn { scaleIO: K8s__io___api___core___v1__ScaleIOPersistentVolumeSourceIn storageClassName: String storageos: K8s__io___api___core___v1__StorageOSPersistentVolumeSourceIn + volumeAttributesClassName: String volumeMode: String vsphereVolume: K8s__io___api___core___v1__VsphereVirtualDiskVolumeSourceIn } @@ -9303,6 +9430,8 @@ input K8s__io___api___core___v1__PodAffinityIn { input K8s__io___api___core___v1__PodAffinityTermIn { labelSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn + matchLabelKeys: [String!] + mismatchLabelKeys: [String!] namespaces: [String!] namespaceSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn topologyKey: String! @@ -9344,16 +9473,6 @@ input K8s__io___api___core___v1__RBDPersistentVolumeSourceIn { user: String } -input K8s__io___api___core___v1__ResourceClaimIn { - name: String! -} - -input K8s__io___api___core___v1__ResourceRequirementsIn { - claims: [K8s__io___api___core___v1__ResourceClaimIn!] - limits: Map - requests: Map -} - input K8s__io___api___core___v1__ScaleIOPersistentVolumeSourceIn { fsType: String gateway: String! @@ -9412,6 +9531,11 @@ input K8s__io___api___core___v1__VolumeNodeAffinityIn { required: K8s__io___api___core___v1__NodeSelectorIn } +input K8s__io___api___core___v1__VolumeResourceRequirementsIn { + limits: Map + requests: Map +} + input K8s__io___api___core___v1__VsphereVirtualDiskVolumeSourceIn { fsType: String storagePolicyID: String @@ -9560,9 +9684,17 @@ enum K8s__io___api___core___v1__NodeSelectorOperator { enum K8s__io___api___core___v1__PersistentVolumeClaimConditionType { FileSystemResizePending + ModifyingVolume + ModifyVolumeError Resizing } +enum K8s__io___api___core___v1__PersistentVolumeClaimModifyVolumeStatus { + Infeasible + InProgress + Pending +} + enum K8s__io___api___core___v1__PersistentVolumeClaimPhase { Bound Lost @@ -9771,6 +9903,7 @@ input GlobalVPNDeviceIn { clusterName: String! createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! creationTime: Date! + dispatchAddr: Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr displayName: String! id: ID! kind: String @@ -9908,6 +10041,7 @@ input NodeIn { clusterName: String! createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! creationTime: Date! + dispatchAddr: Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr displayName: String! id: ID! kind: String @@ -11934,6 +12068,47 @@ func (ec *executionContext) fieldContext_BYOKCluster_metadata(_ context.Context, return fc, nil } +func (ec *executionContext) _BYOKCluster_ownedBy(ctx context.Context, field graphql.CollectedField, obj *entities.BYOKCluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BYOKCluster_ownedBy(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.OwnedBy, 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.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_BYOKCluster_ownedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "BYOKCluster", + 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) _BYOKCluster_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.BYOKCluster) (ret graphql.Marshaler) { fc, err := ec.fieldContext_BYOKCluster_recordVersion(ctx, field) if err != nil { @@ -12283,6 +12458,8 @@ func (ec *executionContext) fieldContext_BYOKClusterEdge_node(_ context.Context, return ec.fieldContext_BYOKCluster_messageQueueTopicName(ctx, field) case "metadata": return ec.fieldContext_BYOKCluster_metadata(ctx, field) + case "ownedBy": + return ec.fieldContext_BYOKCluster_ownedBy(ctx, field) case "recordVersion": return ec.fieldContext_BYOKCluster_recordVersion(ctx, field) case "syncStatus": @@ -14131,6 +14308,47 @@ func (ec *executionContext) fieldContext_Cluster_metadata(_ context.Context, fie return fc, nil } +func (ec *executionContext) _Cluster_ownedBy(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Cluster_ownedBy(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.OwnedBy, 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.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Cluster_ownedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Cluster", + 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) _Cluster_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.Cluster) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Cluster_recordVersion(ctx, field) if err != nil { @@ -14610,6 +14828,8 @@ func (ec *executionContext) fieldContext_ClusterEdge_node(_ context.Context, fie return ec.fieldContext_Cluster_markedForDeletion(ctx, field) case "metadata": return ec.fieldContext_Cluster_metadata(ctx, field) + case "ownedBy": + return ec.fieldContext_Cluster_ownedBy(ctx, field) case "recordVersion": return ec.fieldContext_Cluster_recordVersion(ctx, field) case "spec": @@ -16530,6 +16750,94 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___ return fc, nil } +func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_accountName(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_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_Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_accountName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr", + 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) _Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_clusterName(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_clusterName(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.ClusterName, 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_Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_clusterName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr", + 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) _Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials_serviceAccountJSON(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials_serviceAccountJSON(ctx, field) if err != nil { @@ -27801,6 +28109,53 @@ func (ec *executionContext) fieldContext_HelmRelease_creationTime(_ context.Cont return fc, nil } +func (ec *executionContext) _HelmRelease_dispatchAddr(ctx context.Context, field graphql.CollectedField, obj *entities.HelmRelease) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_HelmRelease_dispatchAddr(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.HelmRelease().DispatchAddr(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_HelmRelease_dispatchAddr(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "HelmRelease", + 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_Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_accountName(ctx, field) + case "clusterName": + return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_clusterName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _HelmRelease_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.HelmRelease) (ret graphql.Marshaler) { fc, err := ec.fieldContext_HelmRelease_displayName(ctx, field) if err != nil { @@ -28443,6 +28798,8 @@ func (ec *executionContext) fieldContext_HelmReleaseEdge_node(_ context.Context, return ec.fieldContext_HelmRelease_createdBy(ctx, field) case "creationTime": return ec.fieldContext_HelmRelease_creationTime(ctx, field) + case "dispatchAddr": + return ec.fieldContext_HelmRelease_dispatchAddr(ctx, field) case "displayName": return ec.fieldContext_HelmRelease_displayName(ctx, field) case "id": @@ -31698,6 +32055,91 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__LocalVolumeS return fc, nil } +func (ec *executionContext) _K8s__io___api___core___v1__ModifyVolumeStatus_status(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1ModifyVolumeStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__ModifyVolumeStatus_status(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.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.(model.K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus) + fc.Result = res + return ec.marshalNK8s__io___api___core___v1__PersistentVolumeClaimModifyVolumeStatus2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ModifyVolumeStatus_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__ModifyVolumeStatus", + Field: field, + 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__PersistentVolumeClaimModifyVolumeStatus does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__ModifyVolumeStatus_targetVolumeAttributesClassName(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1ModifyVolumeStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__ModifyVolumeStatus_targetVolumeAttributesClassName(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.TargetVolumeAttributesClassName, 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.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ModifyVolumeStatus_targetVolumeAttributesClassName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__ModifyVolumeStatus", + 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) _K8s__io___api___core___v1__NFSVolumeSource_path(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1NFSVolumeSource) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__NFSVolumeSource_path(ctx, field) if err != nil { @@ -33245,9 +33687,9 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpe if resTmp == nil { return graphql.Null } - res := resTmp.(*model.K8sIoAPICoreV1ResourceRequirements) + res := resTmp.(*model.K8sIoAPICoreV1VolumeResourceRequirements) fc.Result = res - return ec.marshalOK8s__io___api___core___v1__ResourceRequirements2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceRequirements(ctx, field.Selections, res) + return ec.marshalOK8s__io___api___core___v1__VolumeResourceRequirements2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1VolumeResourceRequirements(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_resources(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -33258,14 +33700,12 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVo IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "claims": - return ec.fieldContext_K8s__io___api___core___v1__ResourceRequirements_claims(ctx, field) case "limits": - return ec.fieldContext_K8s__io___api___core___v1__ResourceRequirements_limits(ctx, field) + return ec.fieldContext_K8s__io___api___core___v1__VolumeResourceRequirements_limits(ctx, field) case "requests": - return ec.fieldContext_K8s__io___api___core___v1__ResourceRequirements_requests(ctx, field) + return ec.fieldContext_K8s__io___api___core___v1__VolumeResourceRequirements_requests(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type K8s__io___api___core___v1__ResourceRequirements", field.Name) + return nil, fmt.Errorf("no field named %q was found under type K8s__io___api___core___v1__VolumeResourceRequirements", field.Name) }, } return fc, nil @@ -33359,6 +33799,47 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVo return fc, nil } +func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeAttributesClassName(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1PersistentVolumeClaimSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeAttributesClassName(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.VolumeAttributesClassName, 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.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeAttributesClassName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__PersistentVolumeClaimSpec", + 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) _K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeMode(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1PersistentVolumeClaimSpec) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeMode(ctx, field) if err != nil { @@ -33660,6 +34141,94 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVo return fc, nil } +func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimStatus_currentVolumeAttributesClassName(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1PersistentVolumeClaimStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_currentVolumeAttributesClassName(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.CurrentVolumeAttributesClassName, 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.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_currentVolumeAttributesClassName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__PersistentVolumeClaimStatus", + 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) _K8s__io___api___core___v1__PersistentVolumeClaimStatus_modifyVolumeStatus(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1PersistentVolumeClaimStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_modifyVolumeStatus(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.ModifyVolumeStatus, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.K8sIoAPICoreV1ModifyVolumeStatus) + fc.Result = res + return ec.marshalOK8s__io___api___core___v1__ModifyVolumeStatus2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ModifyVolumeStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_modifyVolumeStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__PersistentVolumeClaimStatus", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "status": + return ec.fieldContext_K8s__io___api___core___v1__ModifyVolumeStatus_status(ctx, field) + case "targetVolumeAttributesClassName": + return ec.fieldContext_K8s__io___api___core___v1__ModifyVolumeStatus_targetVolumeAttributesClassName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type K8s__io___api___core___v1__ModifyVolumeStatus", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimStatus_phase(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1PersistentVolumeClaimStatus) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_phase(ctx, field) if err != nil { @@ -35123,6 +35692,47 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVo return fc, nil } +func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_volumeAttributesClassName(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1PersistentVolumeSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_volumeAttributesClassName(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.VolumeAttributesClassName, 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.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_volumeAttributesClassName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__PersistentVolumeSpec", + 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) _K8s__io___api___core___v1__PersistentVolumeSpec_volumeMode(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1PersistentVolumeSpec) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_volumeMode(ctx, field) if err != nil { @@ -35549,6 +36159,10 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinity_ switch field.Name { case "labelSelector": return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_labelSelector(ctx, field) + case "matchLabelKeys": + return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_matchLabelKeys(ctx, field) + case "mismatchLabelKeys": + return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_mismatchLabelKeys(ctx, field) case "namespaces": return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_namespaces(ctx, field) case "namespaceSelector": @@ -35609,6 +36223,88 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinityT return fc, nil } +func (ec *executionContext) _K8s__io___api___core___v1__PodAffinityTerm_matchLabelKeys(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1PodAffinityTerm) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_matchLabelKeys(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.MatchLabelKeys, 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.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinityTerm_matchLabelKeys(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__PodAffinityTerm", + 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) _K8s__io___api___core___v1__PodAffinityTerm_mismatchLabelKeys(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1PodAffinityTerm) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_mismatchLabelKeys(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.MismatchLabelKeys, 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.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAffinityTerm_mismatchLabelKeys(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__PodAffinityTerm", + 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) _K8s__io___api___core___v1__PodAffinityTerm_namespaces(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1PodAffinityTerm) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_namespaces(ctx, field) if err != nil { @@ -35826,6 +36522,10 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__PodAntiAffin switch field.Name { case "labelSelector": return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_labelSelector(ctx, field) + case "matchLabelKeys": + return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_matchLabelKeys(ctx, field) + case "mismatchLabelKeys": + return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_mismatchLabelKeys(ctx, field) case "namespaces": return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_namespaces(ctx, field) case "namespaceSelector": @@ -36651,177 +37351,6 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__RBDPersisten return fc, nil } -func (ec *executionContext) _K8s__io___api___core___v1__ResourceClaim_name(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1ResourceClaim) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_K8s__io___api___core___v1__ResourceClaim_name(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.Name, 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_K8s__io___api___core___v1__ResourceClaim_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "K8s__io___api___core___v1__ResourceClaim", - 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) _K8s__io___api___core___v1__ResourceRequirements_claims(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1ResourceRequirements) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_K8s__io___api___core___v1__ResourceRequirements_claims(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.Claims, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]*model.K8sIoAPICoreV1ResourceClaim) - fc.Result = res - return ec.marshalOK8s__io___api___core___v1__ResourceClaim2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceClaimᚄ(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_K8s__io___api___core___v1__ResourceRequirements_claims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "K8s__io___api___core___v1__ResourceRequirements", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_K8s__io___api___core___v1__ResourceClaim_name(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type K8s__io___api___core___v1__ResourceClaim", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _K8s__io___api___core___v1__ResourceRequirements_limits(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1ResourceRequirements) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_K8s__io___api___core___v1__ResourceRequirements_limits(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.Limits, nil - }) - 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_K8s__io___api___core___v1__ResourceRequirements_limits(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "K8s__io___api___core___v1__ResourceRequirements", - Field: field, - IsMethod: false, - IsResolver: false, - 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) _K8s__io___api___core___v1__ResourceRequirements_requests(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1ResourceRequirements) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_K8s__io___api___core___v1__ResourceRequirements_requests(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.Requests, nil - }) - 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_K8s__io___api___core___v1__ResourceRequirements_requests(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "K8s__io___api___core___v1__ResourceRequirements", - Field: field, - IsMethod: false, - IsResolver: false, - 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) _K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_fsType(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1ScaleIOPersistentVolumeSource) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__ScaleIOPersistentVolumeSource_fsType(ctx, field) if err != nil { @@ -38266,6 +38795,88 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__VolumeNodeAf return fc, nil } +func (ec *executionContext) _K8s__io___api___core___v1__VolumeResourceRequirements_limits(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1VolumeResourceRequirements) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__VolumeResourceRequirements_limits(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.Limits, nil + }) + 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_K8s__io___api___core___v1__VolumeResourceRequirements_limits(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__VolumeResourceRequirements", + Field: field, + IsMethod: false, + IsResolver: false, + 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) _K8s__io___api___core___v1__VolumeResourceRequirements_requests(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1VolumeResourceRequirements) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__VolumeResourceRequirements_requests(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.Requests, nil + }) + 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_K8s__io___api___core___v1__VolumeResourceRequirements_requests(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__VolumeResourceRequirements", + Field: field, + IsMethod: false, + IsResolver: false, + 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) _K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource_fsType(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1VsphereVirtualDiskVolumeSource) (ret graphql.Marshaler) { fc, err := ec.fieldContext_K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource_fsType(ctx, field) if err != nil { @@ -38474,6 +39085,10 @@ func (ec *executionContext) fieldContext_K8s__io___api___core___v1__WeightedPodA switch field.Name { case "labelSelector": return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_labelSelector(ctx, field) + case "matchLabelKeys": + return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_matchLabelKeys(ctx, field) + case "mismatchLabelKeys": + return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_mismatchLabelKeys(ctx, field) case "namespaces": return ec.fieldContext_K8s__io___api___core___v1__PodAffinityTerm_namespaces(ctx, field) case "namespaceSelector": @@ -38623,6 +39238,8 @@ func (ec *executionContext) fieldContext_K8s__io___api___storage___v1__VolumeAtt return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_storageClassName(ctx, field) case "storageos": return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_storageos(ctx, field) + case "volumeAttributesClassName": + return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_volumeAttributesClassName(ctx, field) case "volumeMode": return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_volumeMode(ctx, field) case "vsphereVolume": @@ -40081,6 +40698,8 @@ func (ec *executionContext) fieldContext_Mutation_infra_createCluster(ctx contex return ec.fieldContext_Cluster_markedForDeletion(ctx, field) case "metadata": return ec.fieldContext_Cluster_metadata(ctx, field) + case "ownedBy": + return ec.fieldContext_Cluster_ownedBy(ctx, field) case "recordVersion": return ec.fieldContext_Cluster_recordVersion(ctx, field) case "spec": @@ -40199,6 +40818,8 @@ func (ec *executionContext) fieldContext_Mutation_infra_updateCluster(ctx contex return ec.fieldContext_Cluster_markedForDeletion(ctx, field) case "metadata": return ec.fieldContext_Cluster_metadata(ctx, field) + case "ownedBy": + return ec.fieldContext_Cluster_ownedBy(ctx, field) case "recordVersion": return ec.fieldContext_Cluster_recordVersion(ctx, field) case "spec": @@ -41026,6 +41647,8 @@ func (ec *executionContext) fieldContext_Mutation_infra_createBYOKCluster(ctx co return ec.fieldContext_BYOKCluster_messageQueueTopicName(ctx, field) case "metadata": return ec.fieldContext_BYOKCluster_metadata(ctx, field) + case "ownedBy": + return ec.fieldContext_BYOKCluster_ownedBy(ctx, field) case "recordVersion": return ec.fieldContext_BYOKCluster_recordVersion(ctx, field) case "syncStatus": @@ -41142,6 +41765,8 @@ func (ec *executionContext) fieldContext_Mutation_infra_updateBYOKCluster(ctx co return ec.fieldContext_BYOKCluster_messageQueueTopicName(ctx, field) case "metadata": return ec.fieldContext_BYOKCluster_metadata(ctx, field) + case "ownedBy": + return ec.fieldContext_BYOKCluster_ownedBy(ctx, field) case "recordVersion": return ec.fieldContext_BYOKCluster_recordVersion(ctx, field) case "syncStatus": @@ -41982,6 +42607,8 @@ func (ec *executionContext) fieldContext_Mutation_infra_createNodePool(ctx conte return ec.fieldContext_NodePool_createdBy(ctx, field) case "creationTime": return ec.fieldContext_NodePool_creationTime(ctx, field) + case "dispatchAddr": + return ec.fieldContext_NodePool_dispatchAddr(ctx, field) case "displayName": return ec.fieldContext_NodePool_displayName(ctx, field) case "id": @@ -42094,6 +42721,8 @@ func (ec *executionContext) fieldContext_Mutation_infra_updateNodePool(ctx conte return ec.fieldContext_NodePool_createdBy(ctx, field) case "creationTime": return ec.fieldContext_NodePool_creationTime(ctx, field) + case "dispatchAddr": + return ec.fieldContext_NodePool_dispatchAddr(ctx, field) case "displayName": return ec.fieldContext_NodePool_displayName(ctx, field) case "id": @@ -42287,6 +42916,8 @@ func (ec *executionContext) fieldContext_Mutation_infra_createHelmRelease(ctx co return ec.fieldContext_HelmRelease_createdBy(ctx, field) case "creationTime": return ec.fieldContext_HelmRelease_creationTime(ctx, field) + case "dispatchAddr": + return ec.fieldContext_HelmRelease_dispatchAddr(ctx, field) case "displayName": return ec.fieldContext_HelmRelease_displayName(ctx, field) case "id": @@ -42399,6 +43030,8 @@ func (ec *executionContext) fieldContext_Mutation_infra_updateHelmRelease(ctx co return ec.fieldContext_HelmRelease_createdBy(ctx, field) case "creationTime": return ec.fieldContext_HelmRelease_creationTime(ctx, field) + case "dispatchAddr": + return ec.fieldContext_HelmRelease_dispatchAddr(ctx, field) case "displayName": return ec.fieldContext_HelmRelease_displayName(ctx, field) case "id": @@ -44709,6 +45342,53 @@ func (ec *executionContext) fieldContext_NodePool_creationTime(_ context.Context return fc, nil } +func (ec *executionContext) _NodePool_dispatchAddr(ctx context.Context, field graphql.CollectedField, obj *entities.NodePool) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodePool_dispatchAddr(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.NodePool().DispatchAddr(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_NodePool_dispatchAddr(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NodePool", + 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_Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_accountName(ctx, field) + case "clusterName": + return ec.fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_clusterName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _NodePool_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.NodePool) (ret graphql.Marshaler) { fc, err := ec.fieldContext_NodePool_displayName(ctx, field) if err != nil { @@ -45344,6 +46024,8 @@ func (ec *executionContext) fieldContext_NodePoolEdge_node(_ context.Context, fi return ec.fieldContext_NodePool_createdBy(ctx, field) case "creationTime": return ec.fieldContext_NodePool_creationTime(ctx, field) + case "dispatchAddr": + return ec.fieldContext_NodePool_dispatchAddr(ctx, field) case "displayName": return ec.fieldContext_NodePool_displayName(ctx, field) case "id": @@ -46325,6 +47007,8 @@ func (ec *executionContext) fieldContext_PersistentVolume_spec(_ context.Context return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_storageClassName(ctx, field) case "storageos": return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_storageos(ctx, field) + case "volumeAttributesClassName": + return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_volumeAttributesClassName(ctx, field) case "volumeMode": return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeSpec_volumeMode(ctx, field) case "vsphereVolume": @@ -47085,6 +47769,8 @@ func (ec *executionContext) fieldContext_PersistentVolumeClaim_spec(_ context.Co return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_selector(ctx, field) case "storageClassName": return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_storageClassName(ctx, field) + case "volumeAttributesClassName": + return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeAttributesClassName(ctx, field) case "volumeMode": return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeMode(ctx, field) case "volumeName": @@ -47142,6 +47828,10 @@ func (ec *executionContext) fieldContext_PersistentVolumeClaim_status(_ context. return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_capacity(ctx, field) case "conditions": return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_conditions(ctx, field) + case "currentVolumeAttributesClassName": + return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_currentVolumeAttributesClassName(ctx, field) + case "modifyVolumeStatus": + return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_modifyVolumeStatus(ctx, field) case "phase": return ec.fieldContext_K8s__io___api___core___v1__PersistentVolumeClaimStatus_phase(ctx, field) } @@ -48052,6 +48742,8 @@ func (ec *executionContext) fieldContext_Query_infra_getCluster(ctx context.Cont return ec.fieldContext_Cluster_markedForDeletion(ctx, field) case "metadata": return ec.fieldContext_Cluster_metadata(ctx, field) + case "ownedBy": + return ec.fieldContext_Cluster_ownedBy(ctx, field) case "recordVersion": return ec.fieldContext_Cluster_recordVersion(ctx, field) case "spec": @@ -48258,6 +48950,8 @@ func (ec *executionContext) fieldContext_Query_infra_getBYOKCluster(ctx context. return ec.fieldContext_BYOKCluster_messageQueueTopicName(ctx, field) case "metadata": return ec.fieldContext_BYOKCluster_metadata(ctx, field) + case "ownedBy": + return ec.fieldContext_BYOKCluster_ownedBy(ctx, field) case "recordVersion": return ec.fieldContext_BYOKCluster_recordVersion(ctx, field) case "syncStatus": @@ -48932,6 +49626,8 @@ func (ec *executionContext) fieldContext_Query_infra_getNodePool(ctx context.Con return ec.fieldContext_NodePool_createdBy(ctx, field) case "creationTime": return ec.fieldContext_NodePool_creationTime(ctx, field) + case "dispatchAddr": + return ec.fieldContext_NodePool_dispatchAddr(ctx, field) case "displayName": return ec.fieldContext_NodePool_displayName(ctx, field) case "id": @@ -49597,6 +50293,8 @@ func (ec *executionContext) fieldContext_Query_infra_getHelmRelease(ctx context. return ec.fieldContext_HelmRelease_createdBy(ctx, field) case "creationTime": return ec.fieldContext_HelmRelease_creationTime(ctx, field) + case "dispatchAddr": + return ec.fieldContext_HelmRelease_dispatchAddr(ctx, field) case "displayName": return ec.fieldContext_HelmRelease_displayName(ctx, field) case "id": @@ -53573,7 +54271,7 @@ func (ec *executionContext) unmarshalInputBYOKClusterIn(ctx context.Context, obj asMap[k] = v } - fieldsInOrder := [...]string{"displayName", "metadata", "visibility"} + fieldsInOrder := [...]string{"displayName", "metadata", "ownedBy", "visibility"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -53596,6 +54294,13 @@ func (ec *executionContext) unmarshalInputBYOKClusterIn(ctx context.Context, obj if err = ec.resolvers.BYOKClusterIn().Metadata(ctx, &it, data); err != nil { return it, err } + case "ownedBy": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ownedBy")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.OwnedBy = data case "visibility": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("visibility")) data, err := ec.unmarshalNGithub__com___kloudlite___api___apps___infra___internal___entities__ClusterVisbilityIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesClusterVisbilityIn(ctx, v) @@ -53715,7 +54420,7 @@ func (ec *executionContext) unmarshalInputClusterIn(ctx context.Context, obj int asMap[k] = v } - fieldsInOrder := [...]string{"apiVersion", "displayName", "globalVPN", "kind", "metadata", "spec"} + fieldsInOrder := [...]string{"apiVersion", "displayName", "globalVPN", "kind", "metadata", "ownedBy", "spec"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -53759,6 +54464,13 @@ func (ec *executionContext) unmarshalInputClusterIn(ctx context.Context, obj int if err = ec.resolvers.ClusterIn().Metadata(ctx, &it, data); err != nil { return it, err } + case "ownedBy": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ownedBy")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.OwnedBy = data case "spec": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spec")) data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__ClusterSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1ClusterSpecIn(ctx, v) @@ -55790,6 +56502,40 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__LocalVolume return it, nil } +func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__ModifyVolumeStatusIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1ModifyVolumeStatusIn, error) { + var it model.K8sIoAPICoreV1ModifyVolumeStatusIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"status", "targetVolumeAttributesClassName"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "status": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status")) + data, err := ec.unmarshalNK8s__io___api___core___v1__PersistentVolumeClaimModifyVolumeStatus2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus(ctx, v) + if err != nil { + return it, err + } + it.Status = data + case "targetVolumeAttributesClassName": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("targetVolumeAttributesClassName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.TargetVolumeAttributesClassName = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__NFSVolumeSourceIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1NFSVolumeSourceIn, error) { var it model.K8sIoAPICoreV1NFSVolumeSourceIn asMap := map[string]interface{}{} @@ -56221,7 +56967,7 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__PersistentV asMap[k] = v } - fieldsInOrder := [...]string{"accessModes", "dataSource", "dataSourceRef", "resources", "selector", "storageClassName", "volumeMode", "volumeName"} + fieldsInOrder := [...]string{"accessModes", "dataSource", "dataSourceRef", "resources", "selector", "storageClassName", "volumeAttributesClassName", "volumeMode", "volumeName"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -56251,7 +56997,7 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__PersistentV it.DataSourceRef = data case "resources": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resources")) - data, err := ec.unmarshalOK8s__io___api___core___v1__ResourceRequirementsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceRequirementsIn(ctx, v) + data, err := ec.unmarshalOK8s__io___api___core___v1__VolumeResourceRequirementsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1VolumeResourceRequirementsIn(ctx, v) if err != nil { return it, err } @@ -56270,6 +57016,13 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__PersistentV return it, err } it.StorageClassName = data + case "volumeAttributesClassName": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("volumeAttributesClassName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VolumeAttributesClassName = data case "volumeMode": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("volumeMode")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) @@ -56297,7 +57050,7 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__PersistentV asMap[k] = v } - fieldsInOrder := [...]string{"accessModes", "allocatedResources", "allocatedResourceStatuses", "capacity", "conditions", "phase"} + fieldsInOrder := [...]string{"accessModes", "allocatedResources", "allocatedResourceStatuses", "capacity", "conditions", "currentVolumeAttributesClassName", "modifyVolumeStatus", "phase"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -56339,6 +57092,20 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__PersistentV return it, err } it.Conditions = data + case "currentVolumeAttributesClassName": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("currentVolumeAttributesClassName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.CurrentVolumeAttributesClassName = data + case "modifyVolumeStatus": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("modifyVolumeStatus")) + data, err := ec.unmarshalOK8s__io___api___core___v1__ModifyVolumeStatusIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ModifyVolumeStatusIn(ctx, v) + if err != nil { + return it, err + } + it.ModifyVolumeStatus = data case "phase": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("phase")) data, err := ec.unmarshalOK8s__io___api___core___v1__PersistentVolumeClaimPhase2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeClaimPhase(ctx, v) @@ -56359,7 +57126,7 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__PersistentV asMap[k] = v } - fieldsInOrder := [...]string{"accessModes", "awsElasticBlockStore", "azureDisk", "azureFile", "capacity", "cephfs", "cinder", "claimRef", "csi", "fc", "flexVolume", "flocker", "gcePersistentDisk", "glusterfs", "hostPath", "iscsi", "local", "mountOptions", "nfs", "nodeAffinity", "persistentVolumeReclaimPolicy", "photonPersistentDisk", "portworxVolume", "quobyte", "rbd", "scaleIO", "storageClassName", "storageos", "volumeMode", "vsphereVolume"} + fieldsInOrder := [...]string{"accessModes", "awsElasticBlockStore", "azureDisk", "azureFile", "capacity", "cephfs", "cinder", "claimRef", "csi", "fc", "flexVolume", "flocker", "gcePersistentDisk", "glusterfs", "hostPath", "iscsi", "local", "mountOptions", "nfs", "nodeAffinity", "persistentVolumeReclaimPolicy", "photonPersistentDisk", "portworxVolume", "quobyte", "rbd", "scaleIO", "storageClassName", "storageos", "volumeAttributesClassName", "volumeMode", "vsphereVolume"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -56562,6 +57329,13 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__PersistentV return it, err } it.Storageos = data + case "volumeAttributesClassName": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("volumeAttributesClassName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VolumeAttributesClassName = data case "volumeMode": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("volumeMode")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) @@ -56705,7 +57479,7 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__PodAffinity asMap[k] = v } - fieldsInOrder := [...]string{"labelSelector", "namespaces", "namespaceSelector", "topologyKey"} + fieldsInOrder := [...]string{"labelSelector", "matchLabelKeys", "mismatchLabelKeys", "namespaces", "namespaceSelector", "topologyKey"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -56719,6 +57493,20 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__PodAffinity return it, err } it.LabelSelector = data + case "matchLabelKeys": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("matchLabelKeys")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.MatchLabelKeys = data + case "mismatchLabelKeys": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("mismatchLabelKeys")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.MismatchLabelKeys = data case "namespaces": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespaces")) data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) @@ -56993,74 +57781,6 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__RBDPersiste return it, nil } -func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__ResourceClaimIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1ResourceClaimIn, error) { - var it model.K8sIoAPICoreV1ResourceClaimIn - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"name"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "name": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Name = data - } - } - - return it, nil -} - -func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__ResourceRequirementsIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1ResourceRequirementsIn, error) { - var it model.K8sIoAPICoreV1ResourceRequirementsIn - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"claims", "limits", "requests"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "claims": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("claims")) - data, err := ec.unmarshalOK8s__io___api___core___v1__ResourceClaimIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceClaimInᚄ(ctx, v) - if err != nil { - return it, err - } - it.Claims = data - case "limits": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limits")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.Limits = data - case "requests": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("requests")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.Requests = data - } - } - - return it, nil -} - func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__ScaleIOPersistentVolumeSourceIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1ScaleIOPersistentVolumeSourceIn, error) { var it model.K8sIoAPICoreV1ScaleIOPersistentVolumeSourceIn asMap := map[string]interface{}{} @@ -57384,75 +58104,109 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TypedLocalO return it, nil } -func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TypedObjectReferenceIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1TypedObjectReferenceIn, error) { - var it model.K8sIoAPICoreV1TypedObjectReferenceIn +func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TypedObjectReferenceIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1TypedObjectReferenceIn, error) { + var it model.K8sIoAPICoreV1TypedObjectReferenceIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"apiGroup", "kind", "name", "namespace"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "apiGroup": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiGroup")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.APIGroup = data + case "kind": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Kind = data + case "name": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__VolumeNodeAffinityIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1VolumeNodeAffinityIn, error) { + var it model.K8sIoAPICoreV1VolumeNodeAffinityIn asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"apiGroup", "kind", "name", "namespace"} + fieldsInOrder := [...]string{"required"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { continue } switch k { - case "apiGroup": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiGroup")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.APIGroup = data - case "kind": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Kind = data - case "name": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Name = data - case "namespace": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + case "required": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("required")) + data, err := ec.unmarshalOK8s__io___api___core___v1__NodeSelectorIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NodeSelectorIn(ctx, v) if err != nil { return it, err } - it.Namespace = data + it.Required = data } } return it, nil } -func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__VolumeNodeAffinityIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1VolumeNodeAffinityIn, error) { - var it model.K8sIoAPICoreV1VolumeNodeAffinityIn +func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__VolumeResourceRequirementsIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1VolumeResourceRequirementsIn, error) { + var it model.K8sIoAPICoreV1VolumeResourceRequirementsIn asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"required"} + fieldsInOrder := [...]string{"limits", "requests"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { continue } switch k { - case "required": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("required")) - data, err := ec.unmarshalOK8s__io___api___core___v1__NodeSelectorIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NodeSelectorIn(ctx, v) + case "limits": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limits")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.Required = data + it.Limits = data + case "requests": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("requests")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Requests = data } } @@ -58714,6 +59468,8 @@ func (ec *executionContext) _BYOKCluster(ctx context.Context, sel ast.SelectionS if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } + case "ownedBy": + out.Values[i] = ec._BYOKCluster_ownedBy(ctx, field, obj) case "recordVersion": out.Values[i] = ec._BYOKCluster_recordVersion(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -59595,6 +60351,8 @@ func (ec *executionContext) _Cluster(ctx context.Context, sel ast.SelectionSet, if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } + case "ownedBy": + out.Values[i] = ec._Cluster_ownedBy(ctx, field, obj) case "recordVersion": out.Values[i] = ec._Cluster_recordVersion(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -60419,6 +61177,50 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte return out } +var github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddrImplementors = []string{"Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr"} + +func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddrImplementors) + + 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("Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr") + case "accountName": + out.Values[i] = ec._Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_accountName(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "clusterName": + out.Values[i] = ec._Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr_clusterName(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 github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentialsImplementors = []string{"Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials"} func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials) graphql.Marshaler { @@ -63681,6 +64483,39 @@ func (ec *executionContext) _HelmRelease(ctx context.Context, sel ast.SelectionS continue } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "dispatchAddr": + 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._HelmRelease_dispatchAddr(ctx, field, obj) + 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 "displayName": out.Values[i] = ec._HelmRelease_displayName(ctx, field, obj) @@ -64670,6 +65505,47 @@ func (ec *executionContext) _K8s__io___api___core___v1__LocalVolumeSource(ctx co return out } +var k8s__io___api___core___v1__ModifyVolumeStatusImplementors = []string{"K8s__io___api___core___v1__ModifyVolumeStatus"} + +func (ec *executionContext) _K8s__io___api___core___v1__ModifyVolumeStatus(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1ModifyVolumeStatus) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__ModifyVolumeStatusImplementors) + + 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("K8s__io___api___core___v1__ModifyVolumeStatus") + case "status": + out.Values[i] = ec._K8s__io___api___core___v1__ModifyVolumeStatus_status(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "targetVolumeAttributesClassName": + out.Values[i] = ec._K8s__io___api___core___v1__ModifyVolumeStatus_targetVolumeAttributesClassName(ctx, field, obj) + 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 k8s__io___api___core___v1__NFSVolumeSourceImplementors = []string{"K8s__io___api___core___v1__NFSVolumeSource"} func (ec *executionContext) _K8s__io___api___core___v1__NFSVolumeSource(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1NFSVolumeSource) graphql.Marshaler { @@ -65124,6 +66000,8 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpe out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimSpec_selector(ctx, field, obj) case "storageClassName": out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimSpec_storageClassName(ctx, field, obj) + case "volumeAttributesClassName": + out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeAttributesClassName(ctx, field, obj) case "volumeMode": out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimSpec_volumeMode(ctx, field, obj) case "volumeName": @@ -65172,6 +66050,10 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSta out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimStatus_capacity(ctx, field, obj) case "conditions": out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimStatus_conditions(ctx, field, obj) + case "currentVolumeAttributesClassName": + out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimStatus_currentVolumeAttributesClassName(ctx, field, obj) + case "modifyVolumeStatus": + out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimStatus_modifyVolumeStatus(ctx, field, obj) case "phase": out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimStatus_phase(ctx, field, obj) default: @@ -65264,6 +66146,8 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec(ctx out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeSpec_storageClassName(ctx, field, obj) case "storageos": out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeSpec_storageos(ctx, field, obj) + case "volumeAttributesClassName": + out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeSpec_volumeAttributesClassName(ctx, field, obj) case "volumeMode": out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeSpec_volumeMode(ctx, field, obj) case "vsphereVolume": @@ -65425,6 +66309,10 @@ func (ec *executionContext) _K8s__io___api___core___v1__PodAffinityTerm(ctx cont out.Values[i] = graphql.MarshalString("K8s__io___api___core___v1__PodAffinityTerm") case "labelSelector": out.Values[i] = ec._K8s__io___api___core___v1__PodAffinityTerm_labelSelector(ctx, field, obj) + case "matchLabelKeys": + out.Values[i] = ec._K8s__io___api___core___v1__PodAffinityTerm_matchLabelKeys(ctx, field, obj) + case "mismatchLabelKeys": + out.Values[i] = ec._K8s__io___api___core___v1__PodAffinityTerm_mismatchLabelKeys(ctx, field, obj) case "namespaces": out.Values[i] = ec._K8s__io___api___core___v1__PodAffinityTerm_namespaces(ctx, field, obj) case "namespaceSelector": @@ -65538,135 +66426,27 @@ func (ec *executionContext) _K8s__io___api___core___v1__PortworxVolumeSource(ctx return out } -var k8s__io___api___core___v1__PreferredSchedulingTermImplementors = []string{"K8s__io___api___core___v1__PreferredSchedulingTerm"} - -func (ec *executionContext) _K8s__io___api___core___v1__PreferredSchedulingTerm(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1PreferredSchedulingTerm) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__PreferredSchedulingTermImplementors) - - 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("K8s__io___api___core___v1__PreferredSchedulingTerm") - case "preference": - out.Values[i] = ec._K8s__io___api___core___v1__PreferredSchedulingTerm_preference(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "weight": - out.Values[i] = ec._K8s__io___api___core___v1__PreferredSchedulingTerm_weight(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 k8s__io___api___core___v1__QuobyteVolumeSourceImplementors = []string{"K8s__io___api___core___v1__QuobyteVolumeSource"} - -func (ec *executionContext) _K8s__io___api___core___v1__QuobyteVolumeSource(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1QuobyteVolumeSource) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__QuobyteVolumeSourceImplementors) - - 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("K8s__io___api___core___v1__QuobyteVolumeSource") - case "group": - out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_group(ctx, field, obj) - case "readOnly": - out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_readOnly(ctx, field, obj) - case "registry": - out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_registry(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "tenant": - out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_tenant(ctx, field, obj) - case "user": - out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_user(ctx, field, obj) - case "volume": - out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_volume(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 k8s__io___api___core___v1__RBDPersistentVolumeSourceImplementors = []string{"K8s__io___api___core___v1__RBDPersistentVolumeSource"} +var k8s__io___api___core___v1__PreferredSchedulingTermImplementors = []string{"K8s__io___api___core___v1__PreferredSchedulingTerm"} -func (ec *executionContext) _K8s__io___api___core___v1__RBDPersistentVolumeSource(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1RBDPersistentVolumeSource) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__RBDPersistentVolumeSourceImplementors) +func (ec *executionContext) _K8s__io___api___core___v1__PreferredSchedulingTerm(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1PreferredSchedulingTerm) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__PreferredSchedulingTermImplementors) 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("K8s__io___api___core___v1__RBDPersistentVolumeSource") - case "fsType": - out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_fsType(ctx, field, obj) - case "image": - out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_image(ctx, field, obj) + out.Values[i] = graphql.MarshalString("K8s__io___api___core___v1__PreferredSchedulingTerm") + case "preference": + out.Values[i] = ec._K8s__io___api___core___v1__PreferredSchedulingTerm_preference(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "keyring": - out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_keyring(ctx, field, obj) - case "monitors": - out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_monitors(ctx, field, obj) + case "weight": + out.Values[i] = ec._K8s__io___api___core___v1__PreferredSchedulingTerm_weight(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "pool": - out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_pool(ctx, field, obj) - case "readOnly": - out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_readOnly(ctx, field, obj) - case "secretRef": - out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_secretRef(ctx, field, obj) - case "user": - out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_user(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -65690,19 +66470,32 @@ func (ec *executionContext) _K8s__io___api___core___v1__RBDPersistentVolumeSourc return out } -var k8s__io___api___core___v1__ResourceClaimImplementors = []string{"K8s__io___api___core___v1__ResourceClaim"} +var k8s__io___api___core___v1__QuobyteVolumeSourceImplementors = []string{"K8s__io___api___core___v1__QuobyteVolumeSource"} -func (ec *executionContext) _K8s__io___api___core___v1__ResourceClaim(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1ResourceClaim) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__ResourceClaimImplementors) +func (ec *executionContext) _K8s__io___api___core___v1__QuobyteVolumeSource(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1QuobyteVolumeSource) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__QuobyteVolumeSourceImplementors) 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("K8s__io___api___core___v1__ResourceClaim") - case "name": - out.Values[i] = ec._K8s__io___api___core___v1__ResourceClaim_name(ctx, field, obj) + out.Values[i] = graphql.MarshalString("K8s__io___api___core___v1__QuobyteVolumeSource") + case "group": + out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_group(ctx, field, obj) + case "readOnly": + out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_readOnly(ctx, field, obj) + case "registry": + out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_registry(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "tenant": + out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_tenant(ctx, field, obj) + case "user": + out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_user(ctx, field, obj) + case "volume": + out.Values[i] = ec._K8s__io___api___core___v1__QuobyteVolumeSource_volume(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -65729,23 +66522,39 @@ func (ec *executionContext) _K8s__io___api___core___v1__ResourceClaim(ctx contex return out } -var k8s__io___api___core___v1__ResourceRequirementsImplementors = []string{"K8s__io___api___core___v1__ResourceRequirements"} +var k8s__io___api___core___v1__RBDPersistentVolumeSourceImplementors = []string{"K8s__io___api___core___v1__RBDPersistentVolumeSource"} -func (ec *executionContext) _K8s__io___api___core___v1__ResourceRequirements(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1ResourceRequirements) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__ResourceRequirementsImplementors) +func (ec *executionContext) _K8s__io___api___core___v1__RBDPersistentVolumeSource(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1RBDPersistentVolumeSource) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__RBDPersistentVolumeSourceImplementors) 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("K8s__io___api___core___v1__ResourceRequirements") - case "claims": - out.Values[i] = ec._K8s__io___api___core___v1__ResourceRequirements_claims(ctx, field, obj) - case "limits": - out.Values[i] = ec._K8s__io___api___core___v1__ResourceRequirements_limits(ctx, field, obj) - case "requests": - out.Values[i] = ec._K8s__io___api___core___v1__ResourceRequirements_requests(ctx, field, obj) + out.Values[i] = graphql.MarshalString("K8s__io___api___core___v1__RBDPersistentVolumeSource") + case "fsType": + out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_fsType(ctx, field, obj) + case "image": + out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_image(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "keyring": + out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_keyring(ctx, field, obj) + case "monitors": + out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_monitors(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pool": + out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_pool(ctx, field, obj) + case "readOnly": + out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_readOnly(ctx, field, obj) + case "secretRef": + out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_secretRef(ctx, field, obj) + case "user": + out.Values[i] = ec._K8s__io___api___core___v1__RBDPersistentVolumeSource_user(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -66133,6 +66942,44 @@ func (ec *executionContext) _K8s__io___api___core___v1__VolumeNodeAffinity(ctx c return out } +var k8s__io___api___core___v1__VolumeResourceRequirementsImplementors = []string{"K8s__io___api___core___v1__VolumeResourceRequirements"} + +func (ec *executionContext) _K8s__io___api___core___v1__VolumeResourceRequirements(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1VolumeResourceRequirements) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__VolumeResourceRequirementsImplementors) + + 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("K8s__io___api___core___v1__VolumeResourceRequirements") + case "limits": + out.Values[i] = ec._K8s__io___api___core___v1__VolumeResourceRequirements_limits(ctx, field, obj) + case "requests": + out.Values[i] = ec._K8s__io___api___core___v1__VolumeResourceRequirements_requests(ctx, field, obj) + 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 k8s__io___api___core___v1__VsphereVirtualDiskVolumeSourceImplementors = []string{"K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource"} func (ec *executionContext) _K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1VsphereVirtualDiskVolumeSource) graphql.Marshaler { @@ -67676,6 +68523,39 @@ func (ec *executionContext) _NodePool(ctx context.Context, sel ast.SelectionSet, continue } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "dispatchAddr": + 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._NodePool_dispatchAddr(ctx, field, obj) + 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 "displayName": out.Values[i] = ec._NodePool_displayName(ctx, field, obj) @@ -71369,6 +72249,16 @@ func (ec *executionContext) marshalNK8s__io___api___core___v1__PersistentVolumeC return v } +func (ec *executionContext) unmarshalNK8s__io___api___core___v1__PersistentVolumeClaimModifyVolumeStatus2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus(ctx context.Context, v interface{}) (model.K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus, error) { + var res model.K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNK8s__io___api___core___v1__PersistentVolumeClaimModifyVolumeStatus2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus(ctx context.Context, sel ast.SelectionSet, v model.K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus) graphql.Marshaler { + return v +} + func (ec *executionContext) marshalNK8s__io___api___core___v1__PodAffinityTerm2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1PodAffinityTerm(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1PodAffinityTerm) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { @@ -71399,21 +72289,6 @@ func (ec *executionContext) unmarshalNK8s__io___api___core___v1__PreferredSchedu return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNK8s__io___api___core___v1__ResourceClaim2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceClaim(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1ResourceClaim) 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__ResourceClaim(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNK8s__io___api___core___v1__ResourceClaimIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceClaimIn(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1ResourceClaimIn, error) { - res, err := ec.unmarshalInputK8s__io___api___core___v1__ResourceClaimIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - func (ec *executionContext) marshalNK8s__io___api___core___v1__Taint2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Taint(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1Taint) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { @@ -72751,6 +73626,13 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___api___apps___inf return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr(ctx, sel, v) +} + func (ec *executionContext) marshalOGithub__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials) graphql.Marshaler { if v == nil { return graphql.Null @@ -73472,6 +74354,21 @@ func (ec *executionContext) unmarshalOK8s__io___api___core___v1__LocalVolumeSour return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) marshalOK8s__io___api___core___v1__ModifyVolumeStatus2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ModifyVolumeStatus(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1ModifyVolumeStatus) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._K8s__io___api___core___v1__ModifyVolumeStatus(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOK8s__io___api___core___v1__ModifyVolumeStatusIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ModifyVolumeStatusIn(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1ModifyVolumeStatusIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputK8s__io___api___core___v1__ModifyVolumeStatusIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalOK8s__io___api___core___v1__NFSVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1NFSVolumeSource(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1NFSVolumeSource) graphql.Marshaler { if v == nil { return graphql.Null @@ -74095,88 +74992,6 @@ func (ec *executionContext) unmarshalOK8s__io___api___core___v1__RBDPersistentVo return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOK8s__io___api___core___v1__ResourceClaim2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceClaimᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.K8sIoAPICoreV1ResourceClaim) graphql.Marshaler { - if v == nil { - return graphql.Null - } - 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.marshalNK8s__io___api___core___v1__ResourceClaim2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceClaim(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) unmarshalOK8s__io___api___core___v1__ResourceClaimIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceClaimInᚄ(ctx context.Context, v interface{}) ([]*model.K8sIoAPICoreV1ResourceClaimIn, error) { - if v == nil { - return nil, nil - } - var vSlice []interface{} - if v != nil { - vSlice = graphql.CoerceList(v) - } - var err error - res := make([]*model.K8sIoAPICoreV1ResourceClaimIn, len(vSlice)) - for i := range vSlice { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNK8s__io___api___core___v1__ResourceClaimIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceClaimIn(ctx, vSlice[i]) - if err != nil { - return nil, err - } - } - return res, nil -} - -func (ec *executionContext) marshalOK8s__io___api___core___v1__ResourceRequirements2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceRequirements(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1ResourceRequirements) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._K8s__io___api___core___v1__ResourceRequirements(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOK8s__io___api___core___v1__ResourceRequirementsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ResourceRequirementsIn(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1ResourceRequirementsIn, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputK8s__io___api___core___v1__ResourceRequirementsIn(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - func (ec *executionContext) marshalOK8s__io___api___core___v1__ScaleIOPersistentVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1ScaleIOPersistentVolumeSource(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1ScaleIOPersistentVolumeSource) graphql.Marshaler { if v == nil { return graphql.Null @@ -74433,6 +75248,21 @@ func (ec *executionContext) unmarshalOK8s__io___api___core___v1__VolumeNodeAffin return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) marshalOK8s__io___api___core___v1__VolumeResourceRequirements2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1VolumeResourceRequirements(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1VolumeResourceRequirements) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._K8s__io___api___core___v1__VolumeResourceRequirements(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOK8s__io___api___core___v1__VolumeResourceRequirementsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1VolumeResourceRequirementsIn(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1VolumeResourceRequirementsIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputK8s__io___api___core___v1__VolumeResourceRequirementsIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalOK8s__io___api___core___v1__VsphereVirtualDiskVolumeSource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1VsphereVirtualDiskVolumeSource(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1VsphereVirtualDiskVolumeSource) graphql.Marshaler { if v == nil { return graphql.Null diff --git a/apps/infra/internal/app/graph/helmrelease.resolvers.go b/apps/infra/internal/app/graph/helmrelease.resolvers.go index 073ed5f96..63dff8140 100644 --- a/apps/infra/internal/app/graph/helmrelease.resolvers.go +++ b/apps/infra/internal/app/graph/helmrelease.resolvers.go @@ -6,6 +6,7 @@ package graph import ( "context" + "fmt" "github.com/kloudlite/api/pkg/errors" "time" @@ -26,6 +27,11 @@ func (r *helmReleaseResolver) CreationTime(ctx context.Context, obj *entities.He return obj.CreationTime.Format(time.RFC3339), nil } +// DispatchAddr is the resolver for the dispatchAddr field. +func (r *helmReleaseResolver) DispatchAddr(ctx context.Context, obj *entities.HelmRelease) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr, error) { + panic(fmt.Errorf("not implemented: DispatchAddr - dispatchAddr")) +} + // ID is the resolver for the id field. func (r *helmReleaseResolver) ID(ctx context.Context, obj *entities.HelmRelease) (repos.ID, error) { if obj == nil { diff --git a/apps/infra/internal/app/graph/model/models_gen.go b/apps/infra/internal/app/graph/model/models_gen.go index 9314b21eb..cfad554f2 100644 --- a/apps/infra/internal/app/graph/model/models_gen.go +++ b/apps/infra/internal/app/graph/model/models_gen.go @@ -123,6 +123,11 @@ type GithubComKloudliteAPIAppsInfraInternalEntitiesClusterVisbilityIn struct { Mode GithubComKloudliteAPIAppsInfraInternalEntitiesClusterVisibilityMode `json:"mode"` } +type GithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr struct { + AccountName string `json:"accountName"` + ClusterName string `json:"clusterName"` +} + type GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials struct { ServiceAccountJSON string `json:"serviceAccountJSON"` } @@ -769,6 +774,16 @@ type K8sIoAPICoreV1LocalVolumeSourceIn struct { Path string `json:"path"` } +type K8sIoAPICoreV1ModifyVolumeStatus struct { + Status K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus `json:"status"` + TargetVolumeAttributesClassName *string `json:"targetVolumeAttributesClassName,omitempty"` +} + +type K8sIoAPICoreV1ModifyVolumeStatusIn struct { + Status K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus `json:"status"` + TargetVolumeAttributesClassName *string `json:"targetVolumeAttributesClassName,omitempty"` +} + type K8sIoAPICoreV1NFSVolumeSource struct { Path string `json:"path"` ReadOnly *bool `json:"readOnly,omitempty"` @@ -894,43 +909,49 @@ type K8sIoAPICoreV1PersistentVolumeClaimConditionIn struct { } type K8sIoAPICoreV1PersistentVolumeClaimSpec struct { - AccessModes []string `json:"accessModes,omitempty"` - DataSource *K8sIoAPICoreV1TypedLocalObjectReference `json:"dataSource,omitempty"` - DataSourceRef *K8sIoAPICoreV1TypedObjectReference `json:"dataSourceRef,omitempty"` - Resources *K8sIoAPICoreV1ResourceRequirements `json:"resources,omitempty"` - Selector *K8sIoApimachineryPkgApisMetaV1LabelSelector `json:"selector,omitempty"` - StorageClassName *string `json:"storageClassName,omitempty"` - VolumeMode *string `json:"volumeMode,omitempty"` - VolumeName *string `json:"volumeName,omitempty"` + AccessModes []string `json:"accessModes,omitempty"` + DataSource *K8sIoAPICoreV1TypedLocalObjectReference `json:"dataSource,omitempty"` + DataSourceRef *K8sIoAPICoreV1TypedObjectReference `json:"dataSourceRef,omitempty"` + Resources *K8sIoAPICoreV1VolumeResourceRequirements `json:"resources,omitempty"` + Selector *K8sIoApimachineryPkgApisMetaV1LabelSelector `json:"selector,omitempty"` + StorageClassName *string `json:"storageClassName,omitempty"` + VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty"` + VolumeMode *string `json:"volumeMode,omitempty"` + VolumeName *string `json:"volumeName,omitempty"` } type K8sIoAPICoreV1PersistentVolumeClaimSpecIn struct { - AccessModes []string `json:"accessModes,omitempty"` - DataSource *K8sIoAPICoreV1TypedLocalObjectReferenceIn `json:"dataSource,omitempty"` - DataSourceRef *K8sIoAPICoreV1TypedObjectReferenceIn `json:"dataSourceRef,omitempty"` - Resources *K8sIoAPICoreV1ResourceRequirementsIn `json:"resources,omitempty"` - Selector *K8sIoApimachineryPkgApisMetaV1LabelSelectorIn `json:"selector,omitempty"` - StorageClassName *string `json:"storageClassName,omitempty"` - VolumeMode *string `json:"volumeMode,omitempty"` - VolumeName *string `json:"volumeName,omitempty"` + AccessModes []string `json:"accessModes,omitempty"` + DataSource *K8sIoAPICoreV1TypedLocalObjectReferenceIn `json:"dataSource,omitempty"` + DataSourceRef *K8sIoAPICoreV1TypedObjectReferenceIn `json:"dataSourceRef,omitempty"` + Resources *K8sIoAPICoreV1VolumeResourceRequirementsIn `json:"resources,omitempty"` + Selector *K8sIoApimachineryPkgApisMetaV1LabelSelectorIn `json:"selector,omitempty"` + StorageClassName *string `json:"storageClassName,omitempty"` + VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty"` + VolumeMode *string `json:"volumeMode,omitempty"` + VolumeName *string `json:"volumeName,omitempty"` } type K8sIoAPICoreV1PersistentVolumeClaimStatus struct { - AccessModes []string `json:"accessModes,omitempty"` - AllocatedResources map[string]interface{} `json:"allocatedResources,omitempty"` - AllocatedResourceStatuses map[string]interface{} `json:"allocatedResourceStatuses,omitempty"` - Capacity map[string]interface{} `json:"capacity,omitempty"` - Conditions []*K8sIoAPICoreV1PersistentVolumeClaimCondition `json:"conditions,omitempty"` - Phase *K8sIoAPICoreV1PersistentVolumeClaimPhase `json:"phase,omitempty"` + AccessModes []string `json:"accessModes,omitempty"` + AllocatedResources map[string]interface{} `json:"allocatedResources,omitempty"` + AllocatedResourceStatuses map[string]interface{} `json:"allocatedResourceStatuses,omitempty"` + Capacity map[string]interface{} `json:"capacity,omitempty"` + Conditions []*K8sIoAPICoreV1PersistentVolumeClaimCondition `json:"conditions,omitempty"` + CurrentVolumeAttributesClassName *string `json:"currentVolumeAttributesClassName,omitempty"` + ModifyVolumeStatus *K8sIoAPICoreV1ModifyVolumeStatus `json:"modifyVolumeStatus,omitempty"` + Phase *K8sIoAPICoreV1PersistentVolumeClaimPhase `json:"phase,omitempty"` } type K8sIoAPICoreV1PersistentVolumeClaimStatusIn struct { - AccessModes []string `json:"accessModes,omitempty"` - AllocatedResources map[string]interface{} `json:"allocatedResources,omitempty"` - AllocatedResourceStatuses map[string]interface{} `json:"allocatedResourceStatuses,omitempty"` - Capacity map[string]interface{} `json:"capacity,omitempty"` - Conditions []*K8sIoAPICoreV1PersistentVolumeClaimConditionIn `json:"conditions,omitempty"` - Phase *K8sIoAPICoreV1PersistentVolumeClaimPhase `json:"phase,omitempty"` + AccessModes []string `json:"accessModes,omitempty"` + AllocatedResources map[string]interface{} `json:"allocatedResources,omitempty"` + AllocatedResourceStatuses map[string]interface{} `json:"allocatedResourceStatuses,omitempty"` + Capacity map[string]interface{} `json:"capacity,omitempty"` + Conditions []*K8sIoAPICoreV1PersistentVolumeClaimConditionIn `json:"conditions,omitempty"` + CurrentVolumeAttributesClassName *string `json:"currentVolumeAttributesClassName,omitempty"` + ModifyVolumeStatus *K8sIoAPICoreV1ModifyVolumeStatusIn `json:"modifyVolumeStatus,omitempty"` + Phase *K8sIoAPICoreV1PersistentVolumeClaimPhase `json:"phase,omitempty"` } type K8sIoAPICoreV1PersistentVolumeSpec struct { @@ -962,6 +983,7 @@ type K8sIoAPICoreV1PersistentVolumeSpec struct { ScaleIo *K8sIoAPICoreV1ScaleIOPersistentVolumeSource `json:"scaleIO,omitempty"` StorageClassName *string `json:"storageClassName,omitempty"` Storageos *K8sIoAPICoreV1StorageOSPersistentVolumeSource `json:"storageos,omitempty"` + VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty"` VolumeMode *string `json:"volumeMode,omitempty"` VsphereVolume *K8sIoAPICoreV1VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"` } @@ -995,6 +1017,7 @@ type K8sIoAPICoreV1PersistentVolumeSpecIn struct { ScaleIo *K8sIoAPICoreV1ScaleIOPersistentVolumeSourceIn `json:"scaleIO,omitempty"` StorageClassName *string `json:"storageClassName,omitempty"` Storageos *K8sIoAPICoreV1StorageOSPersistentVolumeSourceIn `json:"storageos,omitempty"` + VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty"` VolumeMode *string `json:"volumeMode,omitempty"` VsphereVolume *K8sIoAPICoreV1VsphereVirtualDiskVolumeSourceIn `json:"vsphereVolume,omitempty"` } @@ -1035,6 +1058,8 @@ type K8sIoAPICoreV1PodAffinityIn struct { type K8sIoAPICoreV1PodAffinityTerm struct { LabelSelector *K8sIoApimachineryPkgApisMetaV1LabelSelector `json:"labelSelector,omitempty"` + MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` + MismatchLabelKeys []string `json:"mismatchLabelKeys,omitempty"` Namespaces []string `json:"namespaces,omitempty"` NamespaceSelector *K8sIoApimachineryPkgApisMetaV1LabelSelector `json:"namespaceSelector,omitempty"` TopologyKey string `json:"topologyKey"` @@ -1042,6 +1067,8 @@ type K8sIoAPICoreV1PodAffinityTerm struct { type K8sIoAPICoreV1PodAffinityTermIn struct { LabelSelector *K8sIoApimachineryPkgApisMetaV1LabelSelectorIn `json:"labelSelector,omitempty"` + MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` + MismatchLabelKeys []string `json:"mismatchLabelKeys,omitempty"` Namespaces []string `json:"namespaces,omitempty"` NamespaceSelector *K8sIoApimachineryPkgApisMetaV1LabelSelectorIn `json:"namespaceSelector,omitempty"` TopologyKey string `json:"topologyKey"` @@ -1119,26 +1146,6 @@ type K8sIoAPICoreV1RBDPersistentVolumeSourceIn struct { User *string `json:"user,omitempty"` } -type K8sIoAPICoreV1ResourceClaim struct { - Name string `json:"name"` -} - -type K8sIoAPICoreV1ResourceClaimIn struct { - Name string `json:"name"` -} - -type K8sIoAPICoreV1ResourceRequirements struct { - Claims []*K8sIoAPICoreV1ResourceClaim `json:"claims,omitempty"` - Limits map[string]interface{} `json:"limits,omitempty"` - Requests map[string]interface{} `json:"requests,omitempty"` -} - -type K8sIoAPICoreV1ResourceRequirementsIn struct { - Claims []*K8sIoAPICoreV1ResourceClaimIn `json:"claims,omitempty"` - Limits map[string]interface{} `json:"limits,omitempty"` - Requests map[string]interface{} `json:"requests,omitempty"` -} - type K8sIoAPICoreV1ScaleIOPersistentVolumeSource struct { FsType *string `json:"fsType,omitempty"` Gateway string `json:"gateway"` @@ -1255,6 +1262,16 @@ type K8sIoAPICoreV1VolumeNodeAffinityIn struct { Required *K8sIoAPICoreV1NodeSelectorIn `json:"required,omitempty"` } +type K8sIoAPICoreV1VolumeResourceRequirements struct { + Limits map[string]interface{} `json:"limits,omitempty"` + Requests map[string]interface{} `json:"requests,omitempty"` +} + +type K8sIoAPICoreV1VolumeResourceRequirementsIn struct { + Limits map[string]interface{} `json:"limits,omitempty"` + Requests map[string]interface{} `json:"requests,omitempty"` +} + type K8sIoAPICoreV1VsphereVirtualDiskVolumeSource struct { FsType *string `json:"fsType,omitempty"` StoragePolicyID *string `json:"storagePolicyID,omitempty"` @@ -1971,17 +1988,21 @@ type K8sIoAPICoreV1PersistentVolumeClaimConditionType string const ( K8sIoAPICoreV1PersistentVolumeClaimConditionTypeFileSystemResizePending K8sIoAPICoreV1PersistentVolumeClaimConditionType = "FileSystemResizePending" + K8sIoAPICoreV1PersistentVolumeClaimConditionTypeModifyingVolume K8sIoAPICoreV1PersistentVolumeClaimConditionType = "ModifyingVolume" + K8sIoAPICoreV1PersistentVolumeClaimConditionTypeModifyVolumeError K8sIoAPICoreV1PersistentVolumeClaimConditionType = "ModifyVolumeError" K8sIoAPICoreV1PersistentVolumeClaimConditionTypeResizing K8sIoAPICoreV1PersistentVolumeClaimConditionType = "Resizing" ) var AllK8sIoAPICoreV1PersistentVolumeClaimConditionType = []K8sIoAPICoreV1PersistentVolumeClaimConditionType{ K8sIoAPICoreV1PersistentVolumeClaimConditionTypeFileSystemResizePending, + K8sIoAPICoreV1PersistentVolumeClaimConditionTypeModifyingVolume, + K8sIoAPICoreV1PersistentVolumeClaimConditionTypeModifyVolumeError, K8sIoAPICoreV1PersistentVolumeClaimConditionTypeResizing, } func (e K8sIoAPICoreV1PersistentVolumeClaimConditionType) IsValid() bool { switch e { - case K8sIoAPICoreV1PersistentVolumeClaimConditionTypeFileSystemResizePending, K8sIoAPICoreV1PersistentVolumeClaimConditionTypeResizing: + case K8sIoAPICoreV1PersistentVolumeClaimConditionTypeFileSystemResizePending, K8sIoAPICoreV1PersistentVolumeClaimConditionTypeModifyingVolume, K8sIoAPICoreV1PersistentVolumeClaimConditionTypeModifyVolumeError, K8sIoAPICoreV1PersistentVolumeClaimConditionTypeResizing: return true } return false @@ -2008,6 +2029,49 @@ func (e K8sIoAPICoreV1PersistentVolumeClaimConditionType) MarshalGQL(w io.Writer fmt.Fprint(w, strconv.Quote(e.String())) } +type K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus string + +const ( + K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatusInfeasible K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus = "Infeasible" + K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatusInProgress K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus = "InProgress" + K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatusPending K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus = "Pending" +) + +var AllK8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus = []K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus{ + K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatusInfeasible, + K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatusInProgress, + K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatusPending, +} + +func (e K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus) IsValid() bool { + switch e { + case K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatusInfeasible, K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatusInProgress, K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatusPending: + return true + } + return false +} + +func (e K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus) String() string { + return string(e) +} + +func (e *K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus) UnmarshalGQL(v interface{}) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid K8s__io___api___core___v1__PersistentVolumeClaimModifyVolumeStatus", str) + } + return nil +} + +func (e K8sIoAPICoreV1PersistentVolumeClaimModifyVolumeStatus) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + type K8sIoAPICoreV1PersistentVolumeClaimPhase string const ( diff --git a/apps/infra/internal/app/graph/nodepool.resolvers.go b/apps/infra/internal/app/graph/nodepool.resolvers.go index e59d72f8d..eb55c2ff2 100644 --- a/apps/infra/internal/app/graph/nodepool.resolvers.go +++ b/apps/infra/internal/app/graph/nodepool.resolvers.go @@ -6,6 +6,7 @@ package graph import ( "context" + "fmt" "github.com/kloudlite/api/pkg/errors" "time" @@ -25,6 +26,11 @@ func (r *nodePoolResolver) CreationTime(ctx context.Context, obj *entities.NodeP return obj.CreationTime.Format(time.RFC3339), nil } +// DispatchAddr is the resolver for the dispatchAddr field. +func (r *nodePoolResolver) DispatchAddr(ctx context.Context, obj *entities.NodePool) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesDispatchAddr, error) { + panic(fmt.Errorf("not implemented: DispatchAddr - dispatchAddr")) +} + // ID is the resolver for the id field. func (r *nodePoolResolver) ID(ctx context.Context, obj *entities.NodePool) (repos.ID, error) { if obj == nil { diff --git a/apps/infra/internal/app/graph/struct-to-graphql/byokcluster.graphqls b/apps/infra/internal/app/graph/struct-to-graphql/byokcluster.graphqls index 113a14d98..2a9038a5b 100644 --- a/apps/infra/internal/app/graph/struct-to-graphql/byokcluster.graphqls +++ b/apps/infra/internal/app/graph/struct-to-graphql/byokcluster.graphqls @@ -12,6 +12,7 @@ type BYOKCluster @shareable { markedForDeletion: Boolean messageQueueTopicName: String! metadata: Metadata! @goField(name: "objectMeta") + ownedBy: String recordVersion: Int! syncStatus: Github__com___kloudlite___api___pkg___types__SyncStatus! updateTime: Date! @@ -32,6 +33,7 @@ type BYOKClusterPaginatedRecords @shareable { input BYOKClusterIn { displayName: String! metadata: MetadataIn! + ownedBy: String visibility: Github__com___kloudlite___api___apps___infra___internal___entities__ClusterVisbilityIn! } diff --git a/apps/infra/internal/app/graph/struct-to-graphql/cluster.graphqls b/apps/infra/internal/app/graph/struct-to-graphql/cluster.graphqls index 027ac9df5..529a504a2 100644 --- a/apps/infra/internal/app/graph/struct-to-graphql/cluster.graphqls +++ b/apps/infra/internal/app/graph/struct-to-graphql/cluster.graphqls @@ -11,6 +11,7 @@ type Cluster @shareable { lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! markedForDeletion: Boolean metadata: Metadata! @goField(name: "objectMeta") + ownedBy: String recordVersion: Int! spec: Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec! status: Github__com___kloudlite___operator___pkg___operator__Status @@ -35,6 +36,7 @@ input ClusterIn { globalVPN: String kind: String metadata: MetadataIn! + ownedBy: String spec: Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpecIn! } diff --git a/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls index 75bc292fb..085b7793e 100644 --- a/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -25,6 +25,11 @@ type Github__com___kloudlite___api___apps___infra___internal___entities__Cluster publicEndpoint: String } +type Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr @shareable { + accountName: String! + clusterName: String! +} + type Github__com___kloudlite___api___apps___infra___internal___entities__GCPSecretCredentials @shareable { serviceAccountJSON: String! } @@ -453,6 +458,11 @@ type K8s__io___api___core___v1__LocalVolumeSource @shareable { path: String! } +type K8s__io___api___core___v1__ModifyVolumeStatus @shareable { + status: K8s__io___api___core___v1__PersistentVolumeClaimModifyVolumeStatus! + targetVolumeAttributesClassName: String +} + type K8s__io___api___core___v1__NFSVolumeSource @shareable { path: String! readOnly: Boolean @@ -519,9 +529,10 @@ type K8s__io___api___core___v1__PersistentVolumeClaimSpec @shareable { accessModes: [String!] dataSource: K8s__io___api___core___v1__TypedLocalObjectReference dataSourceRef: K8s__io___api___core___v1__TypedObjectReference - resources: K8s__io___api___core___v1__ResourceRequirements + resources: K8s__io___api___core___v1__VolumeResourceRequirements selector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector storageClassName: String + volumeAttributesClassName: String volumeMode: String volumeName: String } @@ -532,6 +543,8 @@ type K8s__io___api___core___v1__PersistentVolumeClaimStatus @shareable { allocatedResourceStatuses: Map capacity: Map conditions: [K8s__io___api___core___v1__PersistentVolumeClaimCondition!] + currentVolumeAttributesClassName: String + modifyVolumeStatus: K8s__io___api___core___v1__ModifyVolumeStatus phase: K8s__io___api___core___v1__PersistentVolumeClaimPhase } @@ -564,6 +577,7 @@ type K8s__io___api___core___v1__PersistentVolumeSpec @shareable { scaleIO: K8s__io___api___core___v1__ScaleIOPersistentVolumeSource storageClassName: String storageos: K8s__io___api___core___v1__StorageOSPersistentVolumeSource + volumeAttributesClassName: String volumeMode: String vsphereVolume: K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource } @@ -587,6 +601,8 @@ type K8s__io___api___core___v1__PodAffinity @shareable { type K8s__io___api___core___v1__PodAffinityTerm @shareable { labelSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector + matchLabelKeys: [String!] + mismatchLabelKeys: [String!] namespaces: [String!] namespaceSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector topologyKey: String! @@ -628,16 +644,6 @@ type K8s__io___api___core___v1__RBDPersistentVolumeSource @shareable { user: String } -type K8s__io___api___core___v1__ResourceClaim @shareable { - name: String! -} - -type K8s__io___api___core___v1__ResourceRequirements @shareable { - claims: [K8s__io___api___core___v1__ResourceClaim!] - limits: Map - requests: Map -} - type K8s__io___api___core___v1__ScaleIOPersistentVolumeSource @shareable { fsType: String gateway: String! @@ -696,6 +702,11 @@ type K8s__io___api___core___v1__VolumeNodeAffinity @shareable { required: K8s__io___api___core___v1__NodeSelector } +type K8s__io___api___core___v1__VolumeResourceRequirements @shareable { + limits: Map + requests: Map +} + type K8s__io___api___core___v1__VsphereVirtualDiskVolumeSource @shareable { fsType: String storagePolicyID: String @@ -1013,6 +1024,11 @@ input K8s__io___api___core___v1__LocalVolumeSourceIn { path: String! } +input K8s__io___api___core___v1__ModifyVolumeStatusIn { + status: K8s__io___api___core___v1__PersistentVolumeClaimModifyVolumeStatus! + targetVolumeAttributesClassName: String +} + input K8s__io___api___core___v1__NFSVolumeSourceIn { path: String! readOnly: Boolean @@ -1079,9 +1095,10 @@ input K8s__io___api___core___v1__PersistentVolumeClaimSpecIn { accessModes: [String!] dataSource: K8s__io___api___core___v1__TypedLocalObjectReferenceIn dataSourceRef: K8s__io___api___core___v1__TypedObjectReferenceIn - resources: K8s__io___api___core___v1__ResourceRequirementsIn + resources: K8s__io___api___core___v1__VolumeResourceRequirementsIn selector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn storageClassName: String + volumeAttributesClassName: String volumeMode: String volumeName: String } @@ -1092,6 +1109,8 @@ input K8s__io___api___core___v1__PersistentVolumeClaimStatusIn { allocatedResourceStatuses: Map capacity: Map conditions: [K8s__io___api___core___v1__PersistentVolumeClaimConditionIn!] + currentVolumeAttributesClassName: String + modifyVolumeStatus: K8s__io___api___core___v1__ModifyVolumeStatusIn phase: K8s__io___api___core___v1__PersistentVolumeClaimPhase } @@ -1124,6 +1143,7 @@ input K8s__io___api___core___v1__PersistentVolumeSpecIn { scaleIO: K8s__io___api___core___v1__ScaleIOPersistentVolumeSourceIn storageClassName: String storageos: K8s__io___api___core___v1__StorageOSPersistentVolumeSourceIn + volumeAttributesClassName: String volumeMode: String vsphereVolume: K8s__io___api___core___v1__VsphereVirtualDiskVolumeSourceIn } @@ -1147,6 +1167,8 @@ input K8s__io___api___core___v1__PodAffinityIn { input K8s__io___api___core___v1__PodAffinityTermIn { labelSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn + matchLabelKeys: [String!] + mismatchLabelKeys: [String!] namespaces: [String!] namespaceSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn topologyKey: String! @@ -1188,16 +1210,6 @@ input K8s__io___api___core___v1__RBDPersistentVolumeSourceIn { user: String } -input K8s__io___api___core___v1__ResourceClaimIn { - name: String! -} - -input K8s__io___api___core___v1__ResourceRequirementsIn { - claims: [K8s__io___api___core___v1__ResourceClaimIn!] - limits: Map - requests: Map -} - input K8s__io___api___core___v1__ScaleIOPersistentVolumeSourceIn { fsType: String gateway: String! @@ -1256,6 +1268,11 @@ input K8s__io___api___core___v1__VolumeNodeAffinityIn { required: K8s__io___api___core___v1__NodeSelectorIn } +input K8s__io___api___core___v1__VolumeResourceRequirementsIn { + limits: Map + requests: Map +} + input K8s__io___api___core___v1__VsphereVirtualDiskVolumeSourceIn { fsType: String storagePolicyID: String @@ -1404,9 +1421,17 @@ enum K8s__io___api___core___v1__NodeSelectorOperator { enum K8s__io___api___core___v1__PersistentVolumeClaimConditionType { FileSystemResizePending + ModifyingVolume + ModifyVolumeError Resizing } +enum K8s__io___api___core___v1__PersistentVolumeClaimModifyVolumeStatus { + Infeasible + InProgress + Pending +} + enum K8s__io___api___core___v1__PersistentVolumeClaimPhase { Bound Lost diff --git a/apps/infra/internal/app/graph/struct-to-graphql/helmrelease.graphqls b/apps/infra/internal/app/graph/struct-to-graphql/helmrelease.graphqls index c99dec297..fa05613d0 100644 --- a/apps/infra/internal/app/graph/struct-to-graphql/helmrelease.graphqls +++ b/apps/infra/internal/app/graph/struct-to-graphql/helmrelease.graphqls @@ -4,6 +4,7 @@ type HelmRelease @shareable { clusterName: String! createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! creationTime: Date! + dispatchAddr: Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr displayName: String! id: ID! kind: String diff --git a/apps/infra/internal/app/graph/struct-to-graphql/nodepool.graphqls b/apps/infra/internal/app/graph/struct-to-graphql/nodepool.graphqls index 4a956681a..aaa4a71d8 100644 --- a/apps/infra/internal/app/graph/struct-to-graphql/nodepool.graphqls +++ b/apps/infra/internal/app/graph/struct-to-graphql/nodepool.graphqls @@ -4,6 +4,7 @@ type NodePool @shareable { clusterName: String! createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! creationTime: Date! + dispatchAddr: Github__com___kloudlite___api___apps___infra___internal___entities__DispatchAddr displayName: String! id: ID! kind: String diff --git a/apps/infra/internal/app/grpc-server.go b/apps/infra/internal/app/grpc-server.go index 73395dc88..468749176 100644 --- a/apps/infra/internal/app/grpc-server.go +++ b/apps/infra/internal/app/grpc-server.go @@ -69,6 +69,34 @@ func (g *grpcServer) GetClusterKubeconfig(ctx context.Context, in *infra.GetClus return &infra.GetClusterKubeconfigOut{Kubeconfig: creds.Data[c.Spec.Output.KeyKubeconfig]}, nil } +// GetCluster implements infra.InfraServer. +func (g *grpcServer) GetByokCluster(ctx context.Context, in *infra.GetClusterIn) (*infra.GetClusterOut, error) { + infraCtx := domain.InfraContext{ + Context: ctx, + UserId: repos.ID(in.UserId), + UserEmail: in.UserEmail, + UserName: in.UserName, + AccountName: in.AccountName, + } + c, err := g.d.GetBYOKCluster(infraCtx, in.ClusterName) + if err != nil { + return nil, errors.NewE(err) + } + + if c == nil { + return nil, errors.Newf("cluster %s not found", in.ClusterName) + } + + return &infra.GetClusterOut{ + OwnedBy: func() string { + if c.OwnedBy != nil { + return *c.OwnedBy + } + return "" + }(), + }, nil +} + // GetCluster implements infra.InfraServer. func (g *grpcServer) GetCluster(ctx context.Context, in *infra.GetClusterIn) (*infra.GetClusterOut, error) { infraCtx := domain.InfraContext{ @@ -103,6 +131,12 @@ func (g *grpcServer) GetCluster(ctx context.Context, in *infra.GetClusterIn) (*i } return "" }(), + OwnedBy: func() string { + if c.OwnedBy != nil { + return *c.OwnedBy + } + return "" + }(), }, nil } diff --git a/apps/infra/internal/domain/byok-clusters.go b/apps/infra/internal/domain/byok-clusters.go index 83575b958..e6fcf2fb6 100644 --- a/apps/infra/internal/domain/byok-clusters.go +++ b/apps/infra/internal/domain/byok-clusters.go @@ -10,6 +10,7 @@ import ( fc "github.com/kloudlite/api/apps/infra/internal/entities/field-constants" "github.com/kloudlite/api/common" "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/constants" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/console" "github.com/kloudlite/api/pkg/errors" fn "github.com/kloudlite/api/pkg/functions" @@ -63,6 +64,14 @@ func (d *domain) CreateBYOKCluster(ctx InfraContext, cluster entities.BYOKCluste return nil, errors.NewE(err) } + if s, ok := cluster.GetLabels()[constants.ClusterLabelOwnedBy]; ok { + if s != string(ctx.UserId) { + return nil, errors.Newf("provided wrong owner for cluster %q, expected %q", cluster.Name, ctx.UserId) + } + + cluster.OwnedBy = &s + } + cluster.Namespace = accNs if cluster.GlobalVPN == "" { @@ -147,7 +156,15 @@ func (d *domain) ListBYOKCluster(ctx InfraContext, search map[string]repos.Match return nil, errors.NewE(err) } - pRecords, err := d.byokClusterRepo.FindPaginated(ctx, d.byokClusterRepo.MergeMatchFilters(entities.ListBYOKClusterFilter(ctx.AccountName), search), pagination) + f := repos.Filter{ + fields.AccountName: ctx.AccountName, + "$or": []map[string]any{ + {fc.BYOKClusterOwnedBy: ctx.UserId}, + {fc.BYOKClusterOwnedBy: nil}, + }, + } + + pRecords, err := d.byokClusterRepo.FindPaginated(ctx, d.byokClusterRepo.MergeMatchFilters(f, search), pagination) if err != nil { return nil, errors.NewE(err) } diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 898f55b40..16faad548 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -14,6 +14,7 @@ import ( fc "github.com/kloudlite/api/apps/infra/internal/entities/field-constants" "github.com/kloudlite/api/common" "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/constants" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/console" ct "github.com/kloudlite/operator/apis/common-types" "github.com/kloudlite/operator/operators/resource-watcher/types" @@ -166,6 +167,14 @@ func (d *domain) CreateCluster(ctx InfraContext, cluster entities.Cluster) (*ent return nil, ErrClusterAlreadyExists{ClusterName: cluster.Name, AccountName: ctx.AccountName} } + if s, ok := cluster.GetLabels()[constants.ClusterLabelOwnedBy]; ok { + if s != string(ctx.UserId) { + return nil, errors.Newf("provided wrong owner for cluster %q, expected %q", cluster.Name, ctx.UserId) + } + + cluster.OwnedBy = &s + } + cluster.AccountName = ctx.AccountName out, err := d.accountsSvc.GetAccount(ctx, string(ctx.UserId), ctx.AccountName) if err != nil { @@ -894,6 +903,10 @@ func (d *domain) ListClusters(ctx InfraContext, mf map[string]repos.MatchFilter, f := repos.Filter{ fields.AccountName: ctx.AccountName, fields.MetadataNamespace: accNs, + "$or": []map[string]any{ + {fc.ClusterOwnedBy: ctx.UserId}, + {fc.ClusterOwnedBy: nil}, + }, } pr, err := d.clusterRepo.FindPaginated(ctx, d.clusterRepo.MergeMatchFilters(f, mf), pagination) diff --git a/apps/infra/internal/entities/byok-cluster.go b/apps/infra/internal/entities/byok-cluster.go index 5e8387340..d1cc08186 100644 --- a/apps/infra/internal/entities/byok-cluster.go +++ b/apps/infra/internal/entities/byok-cluster.go @@ -44,6 +44,8 @@ type BYOKCluster struct { Kubeconfig t.EncodedString `json:"kubeconfig" graphql:"ignore"` LastOnlineAt *time.Time `json:"lastOnlineAt,omitempty" graphql:"noinput"` + + OwnedBy *string `json:"ownedBy,omitempty", graphql:"noinput"` } func (c *BYOKCluster) GetDisplayName() string { @@ -71,6 +73,12 @@ var BYOKClusterIndices = []repos.IndexField{ }, Unique: true, }, + { + Field: []repos.IndexKey{ + {Key: fc.BYOKClusterOwnedBy, Value: repos.IndexAsc}, + }, + Unique: false, + }, } func UniqueBYOKClusterFilter(accountName string, clusterName string) repos.Filter { diff --git a/apps/infra/internal/entities/cluster.go b/apps/infra/internal/entities/cluster.go index 2722f51de..3deda8549 100644 --- a/apps/infra/internal/entities/cluster.go +++ b/apps/infra/internal/entities/cluster.go @@ -25,6 +25,8 @@ type Cluster struct { SyncStatus t.SyncStatus `json:"syncStatus" graphql:"noinput"` LastOnlineAt *time.Time `json:"lastOnlineAt,omitempty" graphql:"noinput"` + + OwnedBy *string `json:"ownedBy,omitempty", graphql:"noinput"` } func (c *Cluster) GetDisplayName() string { @@ -57,4 +59,10 @@ var ClusterIndices = []repos.IndexField{ }, Unique: true, }, + { + Field: []repos.IndexKey{ + {Key: fc.ClusterOwnedBy, Value: repos.IndexAsc}, + }, + Unique: false, + }, } diff --git a/apps/infra/internal/entities/field-constants/generated_constants.go b/apps/infra/internal/entities/field-constants/generated_constants.go index bb2281349..0a7638ffd 100644 --- a/apps/infra/internal/entities/field-constants/generated_constants.go +++ b/apps/infra/internal/entities/field-constants/generated_constants.go @@ -44,6 +44,7 @@ const ( BYOKClusterKubeconfigValue = "kubeconfig.value" BYOKClusterLastOnlineAt = "lastOnlineAt" BYOKClusterMessageQueueTopicName = "messageQueueTopicName" + BYOKClusterOwnedBy = "ownedBy" BYOKClusterVisibility = "visibility" BYOKClusterVisibilityMode = "visibility.mode" BYOKClusterVisibilityPublicEndpoint = "visibility.publicEndpoint" @@ -88,6 +89,7 @@ const ( const ( ClusterGlobalVPN = "globalVPN" ClusterLastOnlineAt = "lastOnlineAt" + ClusterOwnedBy = "ownedBy" ClusterSpec = "spec" ClusterSpecAccountId = "spec.accountId" ClusterSpecAccountName = "spec.accountName" diff --git a/apps/infra/protobufs/infra.proto b/apps/infra/protobufs/infra.proto index 068d71d7d..a6c8cc719 100644 --- a/apps/infra/protobufs/infra.proto +++ b/apps/infra/protobufs/infra.proto @@ -6,6 +6,7 @@ option go_package = "./infra"; service Infra { rpc GetCluster(GetClusterIn) returns (GetClusterOut); + rpc GetByokCluster(GetClusterIn) returns (GetClusterOut); rpc GetNodepool(GetNodepoolIn) returns (GetNodepoolOut); rpc ClusterExists(ClusterExistsIn) returns (ClusterExistsOut); rpc GetClusterKubeconfig(GetClusterIn) returns (GetClusterKubeconfigOut); @@ -29,6 +30,7 @@ message GetClusterOut { string IACJobName = 3; string IACJobNamespace = 4; + string OwnedBy = 5; } message GetNodepoolIn { diff --git a/apps/infra/protobufs/infra/infra.pb.go b/apps/infra/protobufs/infra/infra.pb.go index 81dfa38bb..38d96839c 100644 --- a/apps/infra/protobufs/infra/infra.pb.go +++ b/apps/infra/protobufs/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.30.0 +// protoc v5.28.1 // source: infra.proto package infra @@ -109,6 +109,7 @@ type GetClusterOut struct { DnsHost string `protobuf:"bytes,2,opt,name=dnsHost,proto3" json:"dnsHost,omitempty"` IACJobName string `protobuf:"bytes,3,opt,name=IACJobName,proto3" json:"IACJobName,omitempty"` IACJobNamespace string `protobuf:"bytes,4,opt,name=IACJobNamespace,proto3" json:"IACJobNamespace,omitempty"` + OwnedBy string `protobuf:"bytes,5,opt,name=OwnedBy,proto3" json:"OwnedBy,omitempty"` } func (x *GetClusterOut) Reset() { @@ -171,6 +172,13 @@ func (x *GetClusterOut) GetIACJobNamespace() string { return "" } +func (x *GetClusterOut) GetOwnedBy() string { + if x != nil { + return x.OwnedBy + } + return "" +} + type GetNodepoolIn struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -744,7 +752,7 @@ var file_infra_proto_rawDesc = []byte{ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xa1, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, @@ -754,27 +762,10 @@ var file_infra_proto_rawDesc = []byte{ 0x01, 0x28, 0x09, 0x52, 0x0a, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x0d, 0x47, 0x65, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, - 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, - 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x70, 0x6f, 0x6f, 0x6c, 0x4f, 0x75, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x41, 0x43, 0x4a, 0x6f, - 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x49, 0x41, 0x43, - 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x41, 0x43, 0x4a, 0x6f, - 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, - 0x73, 0x74, 0x73, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x77, 0x6e, + 0x65, 0x64, 0x42, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4f, 0x77, 0x6e, 0x65, + 0x64, 0x42, 0x79, 0x22, 0xc9, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, + 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, @@ -783,73 +774,95 @@ var file_infra_proto_rawDesc = []byte{ 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x10, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4f, 0x75, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x39, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, - 0x75, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x22, 0x95, 0x01, 0x0a, 0x15, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x49, 0x6e, 0x12, 0x20, 0x0a, 0x0b, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x61, - 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, - 0x74, 0x4f, 0x75, 0x74, 0x22, 0xcf, 0x02, 0x0a, 0x1b, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x47, - 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, - 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, - 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6e, + 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0x5a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x4f, 0x75, + 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x49, 0x41, 0x43, 0x4a, + 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x0f, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x49, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x22, 0x39, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, + 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x75, 0x74, 0x12, 0x1e, 0x0a, 0x0a, + 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x95, 0x01, 0x0a, + 0x15, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x41, 0x74, 0x49, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x6c, - 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x39, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x64, 0x64, 0x72, - 0x5f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x17, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x64, 0x64, 0x72, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x18, 0x64, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x64, 0x64, 0x72, 0x5f, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x64, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1e, 0x0a, 0x1c, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, - 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x32, 0xfd, 0x02, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x72, 0x61, - 0x12, 0x2b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0d, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x0e, 0x2e, - 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x2e, 0x0a, - 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x0e, 0x2e, 0x47, - 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x47, - 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x4f, 0x75, 0x74, 0x12, 0x34, 0x0a, - 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x10, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x49, 0x6e, - 0x1a, 0x11, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, - 0x4f, 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0d, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x18, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x4f, 0x75, 0x74, 0x12, 0x46, 0x0a, 0x13, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x12, 0x16, 0x2e, 0x4d, 0x61, - 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, - 0x74, 0x49, 0x6e, 0x1a, 0x17, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x58, 0x0a, 0x19, - 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x45, 0x6e, 0x73, 0x75, - 0x72, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x1a, 0x1d, 0x2e, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, - 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x69, 0x6e, 0x66, 0x72, - 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x4f, 0x75, 0x74, 0x22, 0xcf, + 0x02, 0x0a, 0x1b, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, + 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, + 0x4e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x67, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x18, 0x64, 0x69, + 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x64, 0x64, 0x72, 0x5f, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x64, 0x69, + 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x64, 0x64, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x41, 0x64, 0x64, 0x72, 0x5f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x22, 0x1e, 0x0a, 0x1c, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, + 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, 0x74, + 0x32, 0xae, 0x03, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x12, 0x2b, 0x0a, 0x0a, 0x47, 0x65, + 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x2f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x79, + 0x6f, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x2e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x4f, 0x75, 0x74, 0x12, 0x34, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x10, 0x2e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x49, 0x6e, 0x1a, 0x11, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4f, 0x75, 0x74, 0x12, 0x3f, + 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x75, 0x74, 0x12, + 0x46, 0x0a, 0x13, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, + 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x12, 0x16, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x74, 0x49, 0x6e, 0x1a, 0x17, + 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x41, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x58, 0x0a, 0x19, 0x45, 0x6e, 0x73, 0x75, 0x72, + 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x47, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x6e, 0x1a, 0x1d, 0x2e, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, + 0x6c, 0x56, 0x50, 0x4e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x75, + 0x74, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -882,19 +895,21 @@ var file_infra_proto_goTypes = []interface{}{ var file_infra_proto_depIdxs = []int32{ 11, // 0: MarkClusterOnlineAtIn.timestamp:type_name -> google.protobuf.Timestamp 0, // 1: Infra.GetCluster:input_type -> GetClusterIn - 2, // 2: Infra.GetNodepool:input_type -> GetNodepoolIn - 4, // 3: Infra.ClusterExists:input_type -> ClusterExistsIn - 0, // 4: Infra.GetClusterKubeconfig:input_type -> GetClusterIn - 7, // 5: Infra.MarkClusterOnlineAt:input_type -> MarkClusterOnlineAtIn - 9, // 6: Infra.EnsureGlobalVPNConnection:input_type -> EnsureGlobalVPNConnectionIn - 1, // 7: Infra.GetCluster:output_type -> GetClusterOut - 3, // 8: Infra.GetNodepool:output_type -> GetNodepoolOut - 5, // 9: Infra.ClusterExists:output_type -> ClusterExistsOut - 6, // 10: Infra.GetClusterKubeconfig:output_type -> GetClusterKubeconfigOut - 8, // 11: Infra.MarkClusterOnlineAt:output_type -> MarkClusterOnlineAtOut - 10, // 12: Infra.EnsureGlobalVPNConnection:output_type -> EnsureGlobalVPNConnectionOut - 7, // [7:13] is the sub-list for method output_type - 1, // [1:7] is the sub-list for method input_type + 0, // 2: Infra.GetByokCluster:input_type -> GetClusterIn + 2, // 3: Infra.GetNodepool:input_type -> GetNodepoolIn + 4, // 4: Infra.ClusterExists:input_type -> ClusterExistsIn + 0, // 5: Infra.GetClusterKubeconfig:input_type -> GetClusterIn + 7, // 6: Infra.MarkClusterOnlineAt:input_type -> MarkClusterOnlineAtIn + 9, // 7: Infra.EnsureGlobalVPNConnection:input_type -> EnsureGlobalVPNConnectionIn + 1, // 8: Infra.GetCluster:output_type -> GetClusterOut + 1, // 9: Infra.GetByokCluster:output_type -> GetClusterOut + 3, // 10: Infra.GetNodepool:output_type -> GetNodepoolOut + 5, // 11: Infra.ClusterExists:output_type -> ClusterExistsOut + 6, // 12: Infra.GetClusterKubeconfig:output_type -> GetClusterKubeconfigOut + 8, // 13: Infra.MarkClusterOnlineAt:output_type -> MarkClusterOnlineAtOut + 10, // 14: Infra.EnsureGlobalVPNConnection:output_type -> EnsureGlobalVPNConnectionOut + 8, // [8:15] is the sub-list for method output_type + 1, // [1:8] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name diff --git a/apps/infra/protobufs/infra/infra_grpc.pb.go b/apps/infra/protobufs/infra/infra_grpc.pb.go index 1d2d625c6..e1c4bb67d 100644 --- a/apps/infra/protobufs/infra/infra_grpc.pb.go +++ b/apps/infra/protobufs/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-gen-go-grpc v1.2.0 +// - protoc v5.28.1 // source: infra.proto package infra @@ -18,20 +18,12 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Infra_GetCluster_FullMethodName = "/Infra/GetCluster" - Infra_GetNodepool_FullMethodName = "/Infra/GetNodepool" - Infra_ClusterExists_FullMethodName = "/Infra/ClusterExists" - Infra_GetClusterKubeconfig_FullMethodName = "/Infra/GetClusterKubeconfig" - Infra_MarkClusterOnlineAt_FullMethodName = "/Infra/MarkClusterOnlineAt" - Infra_EnsureGlobalVPNConnection_FullMethodName = "/Infra/EnsureGlobalVPNConnection" -) - // InfraClient is the client API for Infra service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type InfraClient interface { GetCluster(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterOut, error) + GetByokCluster(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterOut, error) GetNodepool(ctx context.Context, in *GetNodepoolIn, opts ...grpc.CallOption) (*GetNodepoolOut, error) ClusterExists(ctx context.Context, in *ClusterExistsIn, opts ...grpc.CallOption) (*ClusterExistsOut, error) GetClusterKubeconfig(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterKubeconfigOut, error) @@ -49,7 +41,16 @@ func NewInfraClient(cc grpc.ClientConnInterface) InfraClient { func (c *infraClient) GetCluster(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterOut, error) { out := new(GetClusterOut) - err := c.cc.Invoke(ctx, Infra_GetCluster_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Infra/GetCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infraClient) GetByokCluster(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterOut, error) { + out := new(GetClusterOut) + err := c.cc.Invoke(ctx, "/Infra/GetByokCluster", in, out, opts...) if err != nil { return nil, err } @@ -58,7 +59,7 @@ func (c *infraClient) GetCluster(ctx context.Context, in *GetClusterIn, opts ... func (c *infraClient) GetNodepool(ctx context.Context, in *GetNodepoolIn, opts ...grpc.CallOption) (*GetNodepoolOut, error) { out := new(GetNodepoolOut) - err := c.cc.Invoke(ctx, Infra_GetNodepool_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Infra/GetNodepool", in, out, opts...) if err != nil { return nil, err } @@ -67,7 +68,7 @@ func (c *infraClient) GetNodepool(ctx context.Context, in *GetNodepoolIn, opts . func (c *infraClient) ClusterExists(ctx context.Context, in *ClusterExistsIn, opts ...grpc.CallOption) (*ClusterExistsOut, error) { out := new(ClusterExistsOut) - err := c.cc.Invoke(ctx, Infra_ClusterExists_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Infra/ClusterExists", in, out, opts...) if err != nil { return nil, err } @@ -76,7 +77,7 @@ func (c *infraClient) ClusterExists(ctx context.Context, in *ClusterExistsIn, op func (c *infraClient) GetClusterKubeconfig(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterKubeconfigOut, error) { out := new(GetClusterKubeconfigOut) - err := c.cc.Invoke(ctx, Infra_GetClusterKubeconfig_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Infra/GetClusterKubeconfig", in, out, opts...) if err != nil { return nil, err } @@ -85,7 +86,7 @@ func (c *infraClient) GetClusterKubeconfig(ctx context.Context, in *GetClusterIn func (c *infraClient) MarkClusterOnlineAt(ctx context.Context, in *MarkClusterOnlineAtIn, opts ...grpc.CallOption) (*MarkClusterOnlineAtOut, error) { out := new(MarkClusterOnlineAtOut) - err := c.cc.Invoke(ctx, Infra_MarkClusterOnlineAt_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Infra/MarkClusterOnlineAt", in, out, opts...) if err != nil { return nil, err } @@ -94,7 +95,7 @@ func (c *infraClient) MarkClusterOnlineAt(ctx context.Context, in *MarkClusterOn func (c *infraClient) EnsureGlobalVPNConnection(ctx context.Context, in *EnsureGlobalVPNConnectionIn, opts ...grpc.CallOption) (*EnsureGlobalVPNConnectionOut, error) { out := new(EnsureGlobalVPNConnectionOut) - err := c.cc.Invoke(ctx, Infra_EnsureGlobalVPNConnection_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Infra/EnsureGlobalVPNConnection", in, out, opts...) if err != nil { return nil, err } @@ -106,6 +107,7 @@ func (c *infraClient) EnsureGlobalVPNConnection(ctx context.Context, in *EnsureG // for forward compatibility type InfraServer interface { GetCluster(context.Context, *GetClusterIn) (*GetClusterOut, error) + GetByokCluster(context.Context, *GetClusterIn) (*GetClusterOut, error) GetNodepool(context.Context, *GetNodepoolIn) (*GetNodepoolOut, error) ClusterExists(context.Context, *ClusterExistsIn) (*ClusterExistsOut, error) GetClusterKubeconfig(context.Context, *GetClusterIn) (*GetClusterKubeconfigOut, error) @@ -121,6 +123,9 @@ type UnimplementedInfraServer struct { func (UnimplementedInfraServer) GetCluster(context.Context, *GetClusterIn) (*GetClusterOut, error) { return nil, status.Errorf(codes.Unimplemented, "method GetCluster not implemented") } +func (UnimplementedInfraServer) GetByokCluster(context.Context, *GetClusterIn) (*GetClusterOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByokCluster not implemented") +} func (UnimplementedInfraServer) GetNodepool(context.Context, *GetNodepoolIn) (*GetNodepoolOut, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNodepool not implemented") } @@ -159,7 +164,7 @@ func _Infra_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Infra_GetCluster_FullMethodName, + FullMethod: "/Infra/GetCluster", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).GetCluster(ctx, req.(*GetClusterIn)) @@ -167,6 +172,24 @@ func _Infra_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Infra_GetByokCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraServer).GetByokCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Infra/GetByokCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraServer).GetByokCluster(ctx, req.(*GetClusterIn)) + } + return interceptor(ctx, in, info, handler) +} + func _Infra_GetNodepool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetNodepoolIn) if err := dec(in); err != nil { @@ -177,7 +200,7 @@ func _Infra_GetNodepool_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Infra_GetNodepool_FullMethodName, + FullMethod: "/Infra/GetNodepool", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).GetNodepool(ctx, req.(*GetNodepoolIn)) @@ -195,7 +218,7 @@ func _Infra_ClusterExists_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Infra_ClusterExists_FullMethodName, + FullMethod: "/Infra/ClusterExists", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).ClusterExists(ctx, req.(*ClusterExistsIn)) @@ -213,7 +236,7 @@ func _Infra_GetClusterKubeconfig_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Infra_GetClusterKubeconfig_FullMethodName, + FullMethod: "/Infra/GetClusterKubeconfig", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).GetClusterKubeconfig(ctx, req.(*GetClusterIn)) @@ -231,7 +254,7 @@ func _Infra_MarkClusterOnlineAt_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Infra_MarkClusterOnlineAt_FullMethodName, + FullMethod: "/Infra/MarkClusterOnlineAt", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).MarkClusterOnlineAt(ctx, req.(*MarkClusterOnlineAtIn)) @@ -249,7 +272,7 @@ func _Infra_EnsureGlobalVPNConnection_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Infra_EnsureGlobalVPNConnection_FullMethodName, + FullMethod: "/Infra/EnsureGlobalVPNConnection", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).EnsureGlobalVPNConnection(ctx, req.(*EnsureGlobalVPNConnectionIn)) @@ -268,6 +291,10 @@ var Infra_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetCluster", Handler: _Infra_GetCluster_Handler, }, + { + MethodName: "GetByokCluster", + Handler: _Infra_GetByokCluster_Handler, + }, { MethodName: "GetNodepool", Handler: _Infra_GetNodepool_Handler, diff --git a/constants/constants.go b/constants/constants.go index 555c2425b..27cf845d4 100644 --- a/constants/constants.go +++ b/constants/constants.go @@ -2,6 +2,11 @@ package constants import "fmt" +const ( + ClusterLabelOwnedBy string = "kloudlite.io/owned-by" + ClusterLabelLocalUuidKey string = "kloudlite.io/local-uuid" +) + type ResourceType string const ( From b27891f9af9b88c2ecb58ccf9c505cc720babc0a Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Mon, 30 Sep 2024 12:47:55 +0530 Subject: [PATCH 73/89] Add recaptcha validation for sign and forget password --- apps/auth/internal/app/app.go | 11 ++ .../internal/app/graph/entity.resolvers.go | 2 +- .../app/graph/generated/federation.go | 12 +- .../internal/app/graph/generated/generated.go | 184 ++++++++++-------- .../internal/app/graph/model/models_gen.go | 6 + apps/auth/internal/app/graph/schema.graphqls | 4 +- .../internal/app/graph/schema.resolvers.go | 17 +- apps/auth/internal/domain/domain.go | 4 +- apps/auth/internal/domain/impl.go | 49 ++++- apps/auth/internal/env/env.go | 7 +- go.mod | 13 ++ go.sum | 96 +++++++++ 12 files changed, 306 insertions(+), 99 deletions(-) diff --git a/apps/auth/internal/app/app.go b/apps/auth/internal/app/app.go index 4080b8fe8..806d4f595 100644 --- a/apps/auth/internal/app/app.go +++ b/apps/auth/internal/app/app.go @@ -1,6 +1,7 @@ package app import ( + recaptchaenterprise "cloud.google.com/go/recaptchaenterprise/v2/apiv1" "context" "github.com/99designs/gqlgen/graphql" @@ -49,6 +50,16 @@ var Module = fx.Module( }, ), + fx.Provide( + func(ev *env.Env) (*recaptchaenterprise.Client, error) { + client, err := recaptchaenterprise.NewClient(context.TODO()) + if err != nil { + return nil, err + } + return client, nil + }, + ), + fx.Provide(fxGithub), fx.Provide(fxGitlab), fx.Provide(fxGoogle), diff --git a/apps/auth/internal/app/graph/entity.resolvers.go b/apps/auth/internal/app/graph/entity.resolvers.go index 9adc82c7c..9a23fcd88 100644 --- a/apps/auth/internal/app/graph/entity.resolvers.go +++ b/apps/auth/internal/app/graph/entity.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.39 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" diff --git a/apps/auth/internal/app/graph/generated/federation.go b/apps/auth/internal/app/graph/generated/federation.go index 214bc3d46..ff5b95b0a 100644 --- a/apps/auth/internal/app/graph/generated/federation.go +++ b/apps/auth/internal/app/graph/generated/federation.go @@ -177,8 +177,18 @@ func entityResolverNameForUser(ctx context.Context, rep map[string]interface{}) ok bool ) _ = val + // if all of the KeyFields values for this resolver are null, + // we shouldn't use use it + allNull := true m = rep - if _, ok = m["id"]; !ok { + val, ok = m["id"] + if !ok { + break + } + if allNull { + allNull = val == nil + } + if allNull { break } return "findUserByID", nil diff --git a/apps/auth/internal/app/graph/generated/generated.go b/apps/auth/internal/app/graph/generated/generated.go index c211978d0..9a087930f 100644 --- a/apps/auth/internal/app/graph/generated/generated.go +++ b/apps/auth/internal/app/graph/generated/generated.go @@ -70,12 +70,12 @@ type ComplexityRoot struct { AuthDeleteInviteCode func(childComplexity int, inviteCodeID string) int AuthLogin func(childComplexity int, email string, password string) int AuthLogout func(childComplexity int) int - AuthRequestResetPassword func(childComplexity int, email string) int + AuthRequestResetPassword func(childComplexity int, email string, captchaToken string) int AuthResendVerificationEmail func(childComplexity int) int AuthResetPassword func(childComplexity int, token string, password string) int AuthSetMetadata func(childComplexity int, values map[string]interface{}) int AuthSetRemoteAuthHeader func(childComplexity int, loginID string, authHeader *string) int - AuthSignup func(childComplexity int, name string, email string, password string) int + AuthSignup func(childComplexity int, name string, email string, password string, captchaToken string) int AuthVerifyEmail func(childComplexity int, token string) int AuthVerifyInviteCode func(childComplexity int, invitationCode string) int OAuthAddLogin func(childComplexity int, provider string, state string, code string) int @@ -137,7 +137,7 @@ type MutationResolver interface { AuthSetRemoteAuthHeader(ctx context.Context, loginID string, authHeader *string) (bool, error) AuthCreateRemoteLogin(ctx context.Context, secret *string) (string, error) AuthLogin(ctx context.Context, email string, password string) (*model.Session, error) - AuthSignup(ctx context.Context, name string, email string, password string) (*model.Session, error) + AuthSignup(ctx context.Context, name string, email string, password string, captchaToken string) (*model.Session, error) OAuthLogin(ctx context.Context, provider string, code string, state *string) (*model.Session, error) OAuthAddLogin(ctx context.Context, provider string, state string, code string) (bool, error) AuthLogout(ctx context.Context) (bool, error) @@ -145,7 +145,7 @@ type MutationResolver interface { AuthClearMetadata(ctx context.Context) (*model.User, error) AuthVerifyEmail(ctx context.Context, token string) (*model.Session, error) AuthResetPassword(ctx context.Context, token string, password string) (bool, error) - AuthRequestResetPassword(ctx context.Context, email string) (bool, error) + AuthRequestResetPassword(ctx context.Context, email string, captchaToken string) (bool, error) AuthChangeEmail(ctx context.Context, email string) (bool, error) AuthResendVerificationEmail(ctx context.Context) (bool, error) AuthChangePassword(ctx context.Context, currentPassword string, newPassword string) (bool, error) @@ -309,7 +309,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return 0, false } - return e.complexity.Mutation.AuthRequestResetPassword(childComplexity, args["email"].(string)), true + return e.complexity.Mutation.AuthRequestResetPassword(childComplexity, args["email"].(string), args["captchaToken"].(string)), true case "Mutation.auth_resendVerificationEmail": if e.complexity.Mutation.AuthResendVerificationEmail == nil { @@ -364,7 +364,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return 0, false } - return e.complexity.Mutation.AuthSignup(childComplexity, args["name"].(string), args["email"].(string), args["password"].(string)), true + return e.complexity.Mutation.AuthSignup(childComplexity, args["name"].(string), args["email"].(string), args["password"].(string), args["captchaToken"].(string)), true case "Mutation.auth_verifyEmail": if e.complexity.Mutation.AuthVerifyEmail == nil { @@ -773,7 +773,7 @@ type Mutation { auth_createRemoteLogin(secret: String):String! # public-access auth_login(email: String!, password: String!): Session # public-access - auth_signup(name: String!, email: String!, password: String!): Session # public-access + auth_signup(name: String!, email: String!, password: String!, captchaToken: String!): Session! # public-access oAuth_login(provider: String!, code: String!, state: String): Session! # public-access oAuth_addLogin(provider: String!, state: String!, code: String!): Boolean! # public-access @@ -785,7 +785,7 @@ type Mutation { auth_verifyEmail(token: String!): Session! auth_resetPassword(token: String!, password: String!): Boolean! - auth_requestResetPassword(email: String!): Boolean! + auth_requestResetPassword(email: String!, captchaToken: String!): Boolean! auth_changeEmail(email: String!): Boolean! @isLoggedInAndVerified auth_resendVerificationEmail: Boolean! @isLoggedIn auth_changePassword(currentPassword: String!, newPassword: String!): Boolean! @isLoggedInAndVerified @@ -1003,6 +1003,15 @@ func (ec *executionContext) field_Mutation_auth_requestResetPassword_args(ctx co } } args["email"] = arg0 + var arg1 string + if tmp, ok := rawArgs["captchaToken"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("captchaToken")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["captchaToken"] = arg1 return args, nil } @@ -1099,6 +1108,15 @@ func (ec *executionContext) field_Mutation_auth_signup_args(ctx context.Context, } } args["password"] = arg2 + var arg3 string + if tmp, ok := rawArgs["captchaToken"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("captchaToken")) + arg3, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["captchaToken"] = arg3 return args, nil } @@ -1441,7 +1459,7 @@ func (ec *executionContext) _InviteCode_id(ctx context.Context, field graphql.Co return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_InviteCode_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_InviteCode_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "InviteCode", Field: field, @@ -1485,7 +1503,7 @@ func (ec *executionContext) _InviteCode_name(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_InviteCode_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_InviteCode_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "InviteCode", Field: field, @@ -1529,7 +1547,7 @@ func (ec *executionContext) _InviteCode_inviteCode(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_InviteCode_inviteCode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_InviteCode_inviteCode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "InviteCode", Field: field, @@ -1730,18 +1748,21 @@ func (ec *executionContext) _Mutation_auth_signup(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 ec.resolvers.Mutation().AuthSignup(rctx, fc.Args["name"].(string), fc.Args["email"].(string), fc.Args["password"].(string)) + return ec.resolvers.Mutation().AuthSignup(rctx, fc.Args["name"].(string), fc.Args["email"].(string), fc.Args["password"].(string), fc.Args["captchaToken"].(string)) }) 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.Session) fc.Result = res - return ec.marshalOSession2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋauthᚋinternalᚋappᚋgraphᚋmodelᚐSession(ctx, field.Selections, res) + return ec.marshalNSession2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋauthᚋinternalᚋappᚋgraphᚋmodelᚐSession(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_auth_signup(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1953,7 +1974,7 @@ func (ec *executionContext) _Mutation_auth_logout(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_auth_logout(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_auth_logout(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -2118,7 +2139,7 @@ func (ec *executionContext) _Mutation_auth_clearMetadata(ctx context.Context, fi return ec.marshalNUser2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋauthᚋinternalᚋappᚋgraphᚋmodelᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_auth_clearMetadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_auth_clearMetadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -2293,7 +2314,7 @@ func (ec *executionContext) _Mutation_auth_requestResetPassword(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().AuthRequestResetPassword(rctx, fc.Args["email"].(string)) + return ec.resolvers.Mutation().AuthRequestResetPassword(rctx, fc.Args["email"].(string), fc.Args["captchaToken"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -2460,7 +2481,7 @@ func (ec *executionContext) _Mutation_auth_resendVerificationEmail(ctx context.C return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_auth_resendVerificationEmail(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_auth_resendVerificationEmail(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -2772,7 +2793,7 @@ func (ec *executionContext) _OAuthProviderStatus_provider(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OAuthProviderStatus_provider(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OAuthProviderStatus_provider(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OAuthProviderStatus", Field: field, @@ -2816,7 +2837,7 @@ func (ec *executionContext) _OAuthProviderStatus_enabled(ctx context.Context, fi return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OAuthProviderStatus_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OAuthProviderStatus_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OAuthProviderStatus", Field: field, @@ -2877,7 +2898,7 @@ func (ec *executionContext) _Query_auth_me(ctx context.Context, field graphql.Co return ec.marshalOUser2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋauthᚋinternalᚋappᚋgraphᚋmodelᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_auth_me(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_auth_me(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -3135,7 +3156,7 @@ func (ec *executionContext) _Query_auth_listOAuthProviders(ctx context.Context, return ec.marshalOOAuthProviderStatus2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋauthᚋinternalᚋappᚋgraphᚋmodelᚐOAuthProviderStatusᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_auth_listOAuthProviders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_auth_listOAuthProviders(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -3240,7 +3261,7 @@ func (ec *executionContext) _Query__service(ctx context.Context, field graphql.C return ec.marshalN_Service2githubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐService(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query__service(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query__service(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -3359,7 +3380,7 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -3417,7 +3438,7 @@ func (ec *executionContext) _RemoteLogin_status(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RemoteLogin_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RemoteLogin_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "RemoteLogin", Field: field, @@ -3458,7 +3479,7 @@ func (ec *executionContext) _RemoteLogin_authHeader(ctx context.Context, field g return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RemoteLogin_authHeader(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RemoteLogin_authHeader(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "RemoteLogin", Field: field, @@ -3502,7 +3523,7 @@ func (ec *executionContext) _Session_id(ctx context.Context, field graphql.Colle return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Session_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Session_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Session", Field: field, @@ -3546,7 +3567,7 @@ func (ec *executionContext) _Session_userId(ctx context.Context, field graphql.C return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Session_userId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Session_userId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Session", Field: field, @@ -3590,7 +3611,7 @@ func (ec *executionContext) _Session_userEmail(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Session_userEmail(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Session_userEmail(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Session", Field: field, @@ -3634,7 +3655,7 @@ func (ec *executionContext) _Session_loginMethod(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Session_loginMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Session_loginMethod(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Session", Field: field, @@ -3678,7 +3699,7 @@ func (ec *executionContext) _Session_userVerified(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Session_userVerified(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Session_userVerified(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Session", Field: field, @@ -3722,7 +3743,7 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -3766,7 +3787,7 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -3810,7 +3831,7 @@ func (ec *executionContext) _User_email(ctx context.Context, field graphql.Colle return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_email(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_email(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -3851,7 +3872,7 @@ func (ec *executionContext) _User_avatar(ctx context.Context, field graphql.Coll return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_avatar(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_avatar(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -3895,7 +3916,7 @@ func (ec *executionContext) _User_invite(ctx context.Context, field graphql.Coll return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_invite(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_invite(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -3939,7 +3960,7 @@ func (ec *executionContext) _User_verified(ctx context.Context, field graphql.Co return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_verified(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_verified(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -3983,7 +4004,7 @@ func (ec *executionContext) _User_approved(ctx context.Context, field graphql.Co return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_approved(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_approved(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -4024,7 +4045,7 @@ func (ec *executionContext) _User_metadata(ctx context.Context, field graphql.Co return ec.marshalOJson2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_metadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -4068,7 +4089,7 @@ func (ec *executionContext) _User_joined(ctx context.Context, field graphql.Coll return ec.marshalNDate2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_joined(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_joined(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -4109,7 +4130,7 @@ func (ec *executionContext) _User_providerGitlab(ctx context.Context, field grap return ec.marshalOProviderDetail2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_providerGitlab(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_providerGitlab(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -4150,7 +4171,7 @@ func (ec *executionContext) _User_providerGithub(ctx context.Context, field grap return ec.marshalOProviderDetail2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_providerGithub(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_providerGithub(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -4191,7 +4212,7 @@ func (ec *executionContext) _User_providerGoogle(ctx context.Context, field grap return ec.marshalOProviderDetail2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_providerGoogle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_providerGoogle(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -4232,7 +4253,7 @@ func (ec *executionContext) __Service_sdl(ctx context.Context, field graphql.Col return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext__Service_sdl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext__Service_sdl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "_Service", Field: field, @@ -4276,7 +4297,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -4317,7 +4338,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -4361,7 +4382,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_locations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -4405,7 +4426,7 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_args(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -4459,7 +4480,7 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_isRepeatable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -4503,7 +4524,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -4544,7 +4565,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -4588,7 +4609,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -4629,7 +4650,7 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -4673,7 +4694,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -4714,7 +4735,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -4758,7 +4779,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_args(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -4812,7 +4833,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -4878,7 +4899,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -4919,7 +4940,7 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -4963,7 +4984,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -5004,7 +5025,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -5048,7 +5069,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -5111,7 +5132,7 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_defaultValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -5152,7 +5173,7 @@ func (ec *executionContext) ___Schema_description(ctx context.Context, field gra return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -5196,7 +5217,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_types(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -5262,7 +5283,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_queryType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -5325,7 +5346,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_mutationType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -5388,7 +5409,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_subscriptionType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -5454,7 +5475,7 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_directives(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -5510,7 +5531,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -5551,7 +5572,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -5592,7 +5613,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -5699,7 +5720,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_interfaces(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -5762,7 +5783,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_possibleTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -5887,7 +5908,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_inputFields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -5938,7 +5959,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_ofType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -6001,7 +6022,7 @@ func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field gr return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_specifiedByURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -6196,6 +6217,9 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Mutation_auth_signup(ctx, field) }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } case "oAuth_login": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Mutation_oAuth_login(ctx, field) @@ -6383,7 +6407,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "auth_me": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6402,7 +6426,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "auth_findByEmail": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6443,7 +6467,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "auth_getRemoteLogin": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -6462,7 +6486,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "auth_listOAuthProviders": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) diff --git a/apps/auth/internal/app/graph/model/models_gen.go b/apps/auth/internal/app/graph/model/models_gen.go index f328880d5..f0687ea24 100644 --- a/apps/auth/internal/app/graph/model/models_gen.go +++ b/apps/auth/internal/app/graph/model/models_gen.go @@ -12,11 +12,17 @@ type InviteCode struct { InviteCode string `json:"inviteCode"` } +type Mutation struct { +} + type OAuthProviderStatus struct { Provider string `json:"provider"` Enabled bool `json:"enabled"` } +type Query struct { +} + type RemoteLogin struct { Status string `json:"status"` AuthHeader *string `json:"authHeader,omitempty"` diff --git a/apps/auth/internal/app/graph/schema.graphqls b/apps/auth/internal/app/graph/schema.graphqls index 15f840adc..c22189b25 100644 --- a/apps/auth/internal/app/graph/schema.graphqls +++ b/apps/auth/internal/app/graph/schema.graphqls @@ -30,7 +30,7 @@ type Mutation { auth_createRemoteLogin(secret: String):String! # public-access auth_login(email: String!, password: String!): Session # public-access - auth_signup(name: String!, email: String!, password: String!): Session # public-access + auth_signup(name: String!, email: String!, password: String!, captchaToken: String!): Session! # public-access oAuth_login(provider: String!, code: String!, state: String): Session! # public-access oAuth_addLogin(provider: String!, state: String!, code: String!): Boolean! # public-access @@ -42,7 +42,7 @@ type Mutation { auth_verifyEmail(token: String!): Session! auth_resetPassword(token: String!, password: String!): Boolean! - auth_requestResetPassword(email: String!): Boolean! + auth_requestResetPassword(email: String!, captchaToken: String!): Boolean! auth_changeEmail(email: String!): Boolean! @isLoggedInAndVerified auth_resendVerificationEmail: Boolean! @isLoggedIn auth_changePassword(currentPassword: String!, newPassword: String!): Boolean! @isLoggedInAndVerified diff --git a/apps/auth/internal/app/graph/schema.resolvers.go b/apps/auth/internal/app/graph/schema.resolvers.go index 709244229..839aa6e1e 100644 --- a/apps/auth/internal/app/graph/schema.resolvers.go +++ b/apps/auth/internal/app/graph/schema.resolvers.go @@ -2,11 +2,10 @@ 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.39 +// Code generated by github.com/99designs/gqlgen version v0.17.49 import ( "context" - "github.com/kloudlite/api/apps/auth/internal/app/graph/generated" "github.com/kloudlite/api/apps/auth/internal/app/graph/model" "github.com/kloudlite/api/common" @@ -49,8 +48,8 @@ func (r *mutationResolver) AuthLogin(ctx context.Context, email string, password } // AuthSignup is the resolver for the auth_signup field. -func (r *mutationResolver) AuthSignup(ctx context.Context, name string, email string, password string) (*model.Session, error) { - sess, err := r.d.SignUp(ctx, name, email, password) +func (r *mutationResolver) AuthSignup(ctx context.Context, name string, email string, password string, captchaToken string) (*model.Session, error) { + sess, err := r.d.SignUp(ctx, name, email, password, captchaToken) if err != nil { return nil, errors.NewE(err) } @@ -150,8 +149,8 @@ func (r *mutationResolver) AuthResetPassword(ctx context.Context, token string, } // AuthRequestResetPassword is the resolver for the auth_requestResetPassword field. -func (r *mutationResolver) AuthRequestResetPassword(ctx context.Context, email string) (bool, error) { - return r.d.RequestResetPassword(ctx, email) +func (r *mutationResolver) AuthRequestResetPassword(ctx context.Context, email string, captchaToken string) (bool, error) { + return r.d.RequestResetPassword(ctx, email, captchaToken) } // AuthChangeEmail is the resolver for the auth_changeEmail field. @@ -286,7 +285,5 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type ( - mutationResolver struct{ *Resolver } - queryResolver struct{ *Resolver } -) +type mutationResolver struct{ *Resolver } +type queryResolver struct{ *Resolver } diff --git a/apps/auth/internal/domain/domain.go b/apps/auth/internal/domain/domain.go index 54a317d20..dc59279a1 100644 --- a/apps/auth/internal/domain/domain.go +++ b/apps/auth/internal/domain/domain.go @@ -14,7 +14,7 @@ type Domain interface { CreateRemoteLogin(ctx context.Context, secret string) (repos.ID, error) Login(ctx context.Context, email string, password string) (*common.AuthSession, error) - SignUp(ctx context.Context, name string, email string, password string) (*common.AuthSession, error) + SignUp(ctx context.Context, name string, email string, password string, captchaToken string) (*common.AuthSession, error) EnsureUserByEmail(ctx context.Context, email string) (*entities.User, error) GetUserById(ctx context.Context, id repos.ID) (*entities.User, error) GetUserByEmail(ctx context.Context, email string) (*entities.User, error) @@ -22,7 +22,7 @@ type Domain interface { ClearUserMetadata(ctx context.Context, id repos.ID) (*entities.User, error) VerifyEmail(ctx context.Context, token string) (*common.AuthSession, error) ResetPassword(ctx context.Context, token string, password string) (bool, error) - RequestResetPassword(ctx context.Context, email string) (bool, error) + RequestResetPassword(ctx context.Context, email string, captchaToken string) (bool, error) ChangeEmail(ctx context.Context, id repos.ID, email string) (bool, error) ResendVerificationEmail(ctx context.Context, userId repos.ID) (bool, error) ChangePassword(ctx context.Context, id repos.ID, currentPassword string, newPassword string) (bool, error) diff --git a/apps/auth/internal/domain/impl.go b/apps/auth/internal/domain/impl.go index 7e934a30c..0ab0380ec 100644 --- a/apps/auth/internal/domain/impl.go +++ b/apps/auth/internal/domain/impl.go @@ -1,6 +1,8 @@ package domain import ( + recaptchaenterprise "cloud.google.com/go/recaptchaenterprise/v2/apiv1" + recaptchapb "cloud.google.com/go/recaptchaenterprise/v2/apiv1/recaptchaenterprisepb" "context" "crypto/md5" b64 "encoding/base64" @@ -56,6 +58,7 @@ type domainI struct { gitlab Gitlab google Google remoteLoginRepo repos.DbRepo[*entities.RemoteLogin] + recaptchaClient *recaptchaenterprise.Client envVars *env.Env } @@ -177,7 +180,38 @@ func (d *domainI) Login(ctx context.Context, email string, password string) (*co return session, nil } -func (d *domainI) SignUp(ctx context.Context, name string, email string, password string) (*common.AuthSession, error) { +func (d *domainI) verifyCaptcha(ctx context.Context, token string) (bool, error) { + req := &recaptchapb.CreateAssessmentRequest{ + Parent: fmt.Sprintf("projects/%s", d.envVars.GoogleCloudProjectId), // Project path in the format 'projects/{project-id}' + Assessment: &recaptchapb.Assessment{ + Event: &recaptchapb.Event{ + Token: token, + SiteKey: d.envVars.RecaptchaSiteKey, + }, + }, + } + + resp, err := d.recaptchaClient.CreateAssessment(ctx, req) + if err != nil { + return false, errors.NewE(err) + } + + if !resp.TokenProperties.Valid { + return false, errors.Newf("CAPTCHA token is invalid: %s", resp.TokenProperties.InvalidReason) + } + return true, nil +} + +func (d *domainI) SignUp(ctx context.Context, name string, email string, password string, captchaToken string) (*common.AuthSession, error) { + isValidCaptcha, err := d.verifyCaptcha(ctx, captchaToken) + if err != nil { + return nil, errors.Newf("failed to verify CAPTCHA: %v", err) + } + + if !isValidCaptcha { + return nil, errors.New("CAPTCHA verification failed") + } + matched, err := d.userRepo.FindOne(ctx, repos.Filter{"email": email}) if err != nil { if matched != nil { @@ -307,7 +341,16 @@ func (d *domainI) ResetPassword(ctx context.Context, token string, password stri return true, nil } -func (d *domainI) RequestResetPassword(ctx context.Context, email string) (bool, error) { +func (d *domainI) RequestResetPassword(ctx context.Context, email string, captchaToken string) (bool, error) { + isValidCaptcha, err := d.verifyCaptcha(ctx, captchaToken) + if err != nil { + return false, errors.Newf("failed to verify CAPTCHA: %v", err) + } + + if !isValidCaptcha { + return false, errors.New("CAPTCHA verification failed") + } + resetToken := generateId("reset") one, err := d.userRepo.FindOne(ctx, repos.Filter{"email": email}) if err != nil { @@ -669,6 +712,7 @@ func fxDomain( google Google, logger logging.Logger, commsClient comms.CommsClient, + recaptchaClient *recaptchaenterprise.Client, ev *env.Env, ) Domain { return &domainI{ @@ -683,6 +727,7 @@ func fxDomain( gitlab: gitlab, google: google, logger: logger, + recaptchaClient: recaptchaClient, envVars: ev, } } diff --git a/apps/auth/internal/env/env.go b/apps/auth/internal/env/env.go index 8086e8ca9..7aa0a3c5e 100644 --- a/apps/auth/internal/env/env.go +++ b/apps/auth/internal/env/env.go @@ -45,7 +45,12 @@ type Env struct { SessionKVBucket string `env:"SESSION_KV_BUCKET" required:"true"` VerifyTokenKVBucket string `env:"VERIFY_TOKEN_KV_BUCKET" required:"true"` ResetPasswordTokenKVBucket string `env:"RESET_PASSWORD_TOKEN_KV_BUCKET" required:"true"` - IsDev bool + + GoogleCloudProjectId string `env:"GOOGLE_CLOUD_PROJECT_ID" required:"true"` + RecaptchaSiteKey string `env:"RECAPTCHA_SITE_KEY" required:"true"` + GoogleApplicationCredentials string `env:"GOOGLE_APPLICATION_CREDENTIALS" required:"true"` + + IsDev bool } func (ev *Env) validateEnv() error { diff --git a/go.mod b/go.mod index b39e27ea2..a946602b0 100644 --- a/go.mod +++ b/go.mod @@ -41,6 +41,7 @@ require ( ) require ( + cloud.google.com/go/recaptchaenterprise/v2 v2.9.2 github.com/PaesslerAG/jsonpath v0.1.1 github.com/charmbracelet/lipgloss v0.10.0 github.com/charmbracelet/log v0.4.0 @@ -65,9 +66,13 @@ require ( github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect @@ -83,6 +88,14 @@ require ( github.com/seancfoley/bintree v1.2.1 // indirect github.com/sosodev/duration v1.3.1 // indirect github.com/stretchr/objx v0.5.2 // indirect + go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect + go.opentelemetry.io/otel v1.22.0 // indirect + go.opentelemetry.io/otel/metric v1.22.0 // indirect + go.opentelemetry.io/otel/trace v1.22.0 // indirect + google.golang.org/api v0.160.0 // indirect + google.golang.org/genproto v0.0.0-20240205150955-31a09d347014 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 35ae5f098..26a71b6c9 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,13 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go/compute v1.23.4 h1:EBT9Nw4q3zyE7G45Wvv3MzolIrCJEuHys5muLY0wvAw= cloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/recaptchaenterprise/v2 v2.9.2 h1:U3Wfq12X9cVMuTpsWDSURnXF0Z9hSPTHj+xsnXDRLsw= +cloud.google.com/go/recaptchaenterprise/v2 v2.9.2/go.mod h1:trwwGkfhCmp05Ll5MSJPXY7yvnO0p4v3orGANAFHAuU= github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= @@ -39,12 +43,17 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bradleyfalzon/ghinstallation/v2 v2.0.4 h1:tXKVfhE7FcSkhkv0UwkLvPDeZ4kz6OXd0PKPlFqf81M= github.com/bradleyfalzon/ghinstallation/v2 v2.0.4/go.mod h1:B40qPqJxWE0jDZgOR1JmaMy+4AY1eBP+IByOvqyAKp0= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/lipgloss v0.10.0 h1:KWeXFSexGcfahHX+54URiZGkBFazf70JNMtwg/AFW3s= github.com/charmbracelet/lipgloss v0.10.0/go.mod h1:Wig9DSfvANsxqkRsqj6x87irdy123SR4dOXlKa91ciE= github.com/charmbracelet/log v0.4.0 h1:G9bQAcx8rWA2T3pWvx7YtPTPwgqpk7D68BX21IRW8ZM= github.com/charmbracelet/log v0.4.0/go.mod h1:63bXt/djrizTec0l11H20t8FDSvA4CRZJ1KH22MdptM= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101 h1:7To3pQ+pZo0i3dsWEbinPNFs5gPSBOsJtx3wTT94VBY= +github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/codingconcepts/env v0.0.0-20200821220118-a8fbf8d84482 h1:5/aEFreBh9hH/0G+33xtczJCvMaulqsm9nDuu2BZUEo= github.com/codingconcepts/env v0.0.0-20200821220118-a8fbf8d84482/go.mod h1:TM9ug+H/2cI3EjyIDr5xKCkFGyNE59URgH1wu5NyU8E= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= @@ -61,6 +70,12 @@ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= @@ -77,9 +92,12 @@ github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk= github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -108,10 +126,21 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= @@ -121,7 +150,13 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -140,10 +175,17 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b h1:h9U78+dx9a4BKdQkBBos92HalKpaGKHrp+3Uo6yTodo= github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 h1:pRhl55Yx1eC7BZ1N+BBWwnKaMyD8uC+34TLdndZMAKk= @@ -249,6 +291,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= @@ -346,6 +389,16 @@ github.com/ztrue/tracerr v0.4.0 h1:vT5PFxwIGs7rCg9ZgJ/y0NmOpJkPCPFK8x0vVIYzd04= github.com/ztrue/tracerr v0.4.0/go.mod h1:PaFfYlas0DfmXNpo7Eay4MFhZUONqvXM+T2HyGPpngk= go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= +go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= +go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= +go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= +go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= +go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= +go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= go.uber.org/dig v1.14.0 h1:VmGvIH45/aapXPQkaOrK5u4B5B7jxZB98HM/utx0eME= go.uber.org/dig v1.14.0/go.mod h1:jHAn/z1Ld1luVVyGKOAIFYz/uBFqKjjEEdIqVAqfQ2o= go.uber.org/fx v1.17.1 h1:S42dZ6Pok8hQ3jxKwo6ZMYcCgHQA/wAS/gnpRa1Pksg= @@ -368,18 +421,27 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -391,12 +453,15 @@ golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -431,6 +496,10 @@ golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -447,13 +516,38 @@ golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6 h1:CawjfCvY golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6/go.mod h1:3rxYc4HtVcSG9gVaTs2GEBdehh+sYPOwKtyUWEOTb80= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +google.golang.org/api v0.160.0 h1:SEspjXHVqE1m5a1fRy8JFB+5jSu+V0GEDKDghF3ttO4= +google.golang.org/api v0.160.0/go.mod h1:0mu0TpK33qnydLvWqbImq2b1eQ5FHRSDCBzAxX9ZHyw= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20240205150955-31a09d347014 h1:g/4bk7P6TPMkAUbUhquq98xey1slwvuVJPosdBqYJlU= +google.golang.org/genproto v0.0.0-20240205150955-31a09d347014/go.mod h1:xEgQu1e4stdSSsxPDK8Azkrk/ECl5HvdPf6nbZrTS5M= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 h1:hZB7eLIaYlW9qXRfCq/qDaPdbeY3757uARz5Vvfv+cY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:YUWgXUFRPfoYK1IHMuxH5K6nPEXSCzIMljnQ59lLRCk= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= @@ -474,6 +568,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= From f688fbafba8ac92ff8f9ea1add4ee423372213ae Mon Sep 17 00:00:00 2001 From: Piyush Kumar <52462496+nxtCoder19@users.noreply.github.com> Date: Tue, 1 Oct 2024 14:19:54 +0530 Subject: [PATCH 74/89] API(auth): validate recaptcha only when environment will be available [#375](https://github.com/kloudlite/api/pull/375) * validate recaptcha only when environment will be available * fix: updates auth env parsing * minor refactoring --------- Co-authored-by: nxtcoder17 --- apps/auth/internal/app/app.go | 11 ++- apps/auth/internal/domain/impl.go | 30 ++++--- apps/auth/internal/env/env.go | 126 +++++++++++++++--------------- 3 files changed, 89 insertions(+), 78 deletions(-) diff --git a/apps/auth/internal/app/app.go b/apps/auth/internal/app/app.go index 806d4f595..5b3894794 100644 --- a/apps/auth/internal/app/app.go +++ b/apps/auth/internal/app/app.go @@ -52,11 +52,14 @@ var Module = fx.Module( fx.Provide( func(ev *env.Env) (*recaptchaenterprise.Client, error) { - client, err := recaptchaenterprise.NewClient(context.TODO()) - if err != nil { - return nil, err + if ev.GoogleRecaptchaEnabled { + client, err := recaptchaenterprise.NewClient(context.TODO()) + if err != nil { + return nil, err + } + return client, nil } - return client, nil + return nil, nil }, ), diff --git a/apps/auth/internal/domain/impl.go b/apps/auth/internal/domain/impl.go index 0ab0380ec..f1a492792 100644 --- a/apps/auth/internal/domain/impl.go +++ b/apps/auth/internal/domain/impl.go @@ -203,13 +203,16 @@ func (d *domainI) verifyCaptcha(ctx context.Context, token string) (bool, error) } func (d *domainI) SignUp(ctx context.Context, name string, email string, password string, captchaToken string) (*common.AuthSession, error) { - isValidCaptcha, err := d.verifyCaptcha(ctx, captchaToken) - if err != nil { - return nil, errors.Newf("failed to verify CAPTCHA: %v", err) - } - if !isValidCaptcha { - return nil, errors.New("CAPTCHA verification failed") + if d.envVars.GoogleRecaptchaEnabled { + isValidCaptcha, err := d.verifyCaptcha(ctx, captchaToken) + if err != nil { + return nil, errors.Newf("failed to verify CAPTCHA: %v", err) + } + + if !isValidCaptcha { + return nil, errors.New("CAPTCHA verification failed") + } } matched, err := d.userRepo.FindOne(ctx, repos.Filter{"email": email}) @@ -342,13 +345,16 @@ func (d *domainI) ResetPassword(ctx context.Context, token string, password stri } func (d *domainI) RequestResetPassword(ctx context.Context, email string, captchaToken string) (bool, error) { - isValidCaptcha, err := d.verifyCaptcha(ctx, captchaToken) - if err != nil { - return false, errors.Newf("failed to verify CAPTCHA: %v", err) - } - if !isValidCaptcha { - return false, errors.New("CAPTCHA verification failed") + if d.envVars.GoogleRecaptchaEnabled { + isValidCaptcha, err := d.verifyCaptcha(ctx, captchaToken) + if err != nil { + return false, errors.Newf("failed to verify CAPTCHA: %v", err) + } + + if !isValidCaptcha { + return false, errors.New("CAPTCHA verification failed") + } } resetToken := generateId("reset") diff --git a/apps/auth/internal/env/env.go b/apps/auth/internal/env/env.go index 7aa0a3c5e..86e5e1f20 100644 --- a/apps/auth/internal/env/env.go +++ b/apps/auth/internal/env/env.go @@ -5,7 +5,7 @@ import ( "github.com/kloudlite/api/pkg/errors" ) -type Env struct { +type authEnv struct { MongoUri string `env:"MONGO_URI" required:"true"` MongoDbName string `env:"MONGO_DB_NAME" required:"true"` Port uint16 `env:"PORT" required:"true"` @@ -18,27 +18,9 @@ type Env struct { OAuth2Enabled bool `env:"OAUTH2_ENABLED" required:"true"` - OAuth2GithubEnabled bool `env:"OAUTH2_GITHUB_ENABLED" required:"false"` - GithubClientId string `env:"GITHUB_CLIENT_ID" required:"false"` - GithubClientSecret string `env:"GITHUB_CLIENT_SECRET" required:"false"` - GithubCallbackUrl string `env:"GITHUB_CALLBACK_URL" required:"false"` - GithubAppId string `env:"GITHUB_APP_ID" required:"false"` - GithubAppPKFile string `env:"GITHUB_APP_PK_FILE" required:"false"` - GithubScopes string `env:"GITHUB_SCOPES" required:"false"` - GithubWebhookUrl string `env:"GITHUB_WEBHOOK_URL" required:"false"` - - OAuth2GitlabEnabled bool `env:"OAUTH2_GITLAB_ENABLED" required:"false"` - GitlabClientId string `env:"GITLAB_CLIENT_ID" required:"false"` - GitlabClientSecret string `env:"GITLAB_CLIENT_SECRET" required:"false"` - GitlabCallbackUrl string `env:"GITLAB_CALLBACK_URL" required:"false"` - GitlabScopes string `env:"GITLAB_SCOPES" required:"false"` - GitlabWebhookUrl string `env:"GITLAB_WEBHOOK_URL" required:"false"` - - OAuth2GoogleEnabled bool `env:"OAUTH2_GOOGLE_ENABLED" required:"false"` - GoogleClientId string `env:"GOOGLE_CLIENT_ID" required:"false"` - GoogleClientSecret string `env:"GOOGLE_CLIENT_SECRET" required:"false"` - GoogleCallbackUrl string `env:"GOOGLE_CALLBACK_URL" required:"false"` - GoogleScopes string `env:"GOOGLE_SCOPES" required:"false"` + OAuth2GithubEnabled bool `env:"OAUTH2_GITHUB_ENABLED" default:"false"` + OAuth2GitlabEnabled bool `env:"OAUTH2_GITLAB_ENABLED" default:"false"` + OAuth2GoogleEnabled bool `env:"OAUTH2_GOOGLE_ENABLED" default:"false"` CommsService string `env:"COMMS_SERVICE" required:"true"` NatsURL string `env:"NATS_URL" required:"true"` @@ -46,60 +28,80 @@ type Env struct { VerifyTokenKVBucket string `env:"VERIFY_TOKEN_KV_BUCKET" required:"true"` ResetPasswordTokenKVBucket string `env:"RESET_PASSWORD_TOKEN_KV_BUCKET" required:"true"` - GoogleCloudProjectId string `env:"GOOGLE_CLOUD_PROJECT_ID" required:"true"` - RecaptchaSiteKey string `env:"RECAPTCHA_SITE_KEY" required:"true"` - GoogleApplicationCredentials string `env:"GOOGLE_APPLICATION_CREDENTIALS" required:"true"` + GoogleRecaptchaEnabled bool `env:"GOOGLE_RECAPTCHA_ENABLED" default:"false"` IsDev bool } -func (ev *Env) validateEnv() error { - if ev.OAuth2Enabled { - if ev.OAuth2GithubEnabled { - err := errors.Newf("when github oauth2 is enabled, secrets `GITHUB_CLIENT_ID`, `GITHUB_CLIENT_SECRET`, `GITHUB_CALLBACK_URL`, `GITHUB_APP_ID`, `GITHUB_APP_PK_FILE`, `GITHUB_SCOPES` are required") - - if ev.GithubClientId == "" || - ev.GithubClientSecret == "" || - ev.GithubCallbackUrl == "" || - ev.GithubAppId == "" || - ev.GithubAppPKFile == "" || - ev.GithubScopes == "" { - return err - } - } +type githubOAuthEnv struct { + GithubClientId string `env:"GITHUB_CLIENT_ID" required:"true"` + GithubClientSecret string `env:"GITHUB_CLIENT_SECRET" required:"true"` + GithubCallbackUrl string `env:"GITHUB_CALLBACK_URL" required:"true"` + GithubAppId string `env:"GITHUB_APP_ID" required:"true"` + GithubAppPKFile string `env:"GITHUB_APP_PK_FILE" required:"true"` + GithubScopes string `env:"GITHUB_SCOPES" required:"true"` + GithubWebhookUrl string `env:"GITHUB_WEBHOOK_URL" required:"true"` +} - if ev.OAuth2GitlabEnabled { - err := errors.Newf("when gitlab oauth2 is enabled, secrets `GITLAB_CLIENT_ID`, `GITLAB_CLIENT_SECRET`, `GITLAB_CALLBACK_URL`, `GITLAB_SCOPES` are required") +type gitlabOAuthEnv struct { + GitlabClientId string `env:"GITLAB_CLIENT_ID" required:"true"` + GitlabClientSecret string `env:"GITLAB_CLIENT_SECRET" required:"true"` + GitlabCallbackUrl string `env:"GITLAB_CALLBACK_URL" required:"true"` + GitlabScopes string `env:"GITLAB_SCOPES" required:"true"` + GitlabWebhookUrl string `env:"GITLAB_WEBHOOK_URL" required:"true"` +} - if ev.GitlabClientId == "" || - ev.GitlabClientSecret == "" || - ev.GitlabCallbackUrl == "" || - ev.GitlabScopes == "" { - return errors.NewE(err) - } - } +type googleOAuthEnv struct { + GoogleClientId string `env:"GOOGLE_CLIENT_ID" required:"true"` + GoogleClientSecret string `env:"GOOGLE_CLIENT_SECRET" required:"true"` + GoogleCallbackUrl string `env:"GOOGLE_CALLBACK_URL" required:"true"` + GoogleScopes string `env:"GOOGLE_SCOPES" required:"true"` +} - if ev.OAuth2GoogleEnabled { - err := errors.Newf("when google oauth2 is enabled, secrets `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, `GOOGLE_CALLBACK_URL`, `GOOGLE_SCOPES` are required") +type googleRecaptchaEnv struct { + GoogleCloudProjectId string `env:"GOOGLE_CLOUD_PROJECT_ID" required:"true"` + RecaptchaSiteKey string `env:"RECAPTCHA_SITE_KEY" required:"true"` + GoogleApplicationCredentials string `env:"GOOGLE_APPLICATION_CREDENTIALS" required:"true"` +} - if ev.GoogleClientId == "" || - ev.GoogleClientSecret == "" || - ev.GoogleCallbackUrl == "" || - ev.GoogleScopes == "" { - return errors.NewE(err) - } - } - } - return nil +type Env struct { + authEnv + githubOAuthEnv + gitlabOAuthEnv + googleOAuthEnv + googleRecaptchaEnv } func LoadEnv() (*Env, error) { var ev Env - if err := env.Set(&ev); err != nil { + + if err := env.Set(&ev.authEnv); err != nil { return nil, errors.NewE(err) } - if err := ev.validateEnv(); err != nil { - return nil, errors.NewE(err) + + if ev.OAuth2GithubEnabled { + if err := env.Set(&ev.githubOAuthEnv); err != nil { + return nil, errors.NewE(err) + } + } + + if ev.OAuth2GitlabEnabled { + if err := env.Set(&ev.gitlabOAuthEnv); err != nil { + return nil, errors.NewE(err) + } } + + if ev.OAuth2GoogleEnabled { + if err := env.Set(&ev.googleOAuthEnv); err != nil { + return nil, errors.NewE(err) + } + } + + if ev.GoogleRecaptchaEnabled { + if err := env.Set(&ev.googleRecaptchaEnv); err != nil { + return nil, errors.NewE(err) + } + } + return &ev, nil } From fa6f583b418a92e5dfe9188fb6db0be32c9e9779 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 1 Oct 2024 14:33:51 +0530 Subject: [PATCH 75/89] fix: gateway resolver, advertises IP addreses, instead of domain --- .../internal/domain/global-vpn-devices.go | 64 +++++++++++++++++-- apps/infra/protobufs/infra/infra.pb.go | 4 +- apps/infra/protobufs/infra/infra_grpc.pb.go | 42 +++++++----- 3 files changed, 86 insertions(+), 24 deletions(-) diff --git a/apps/infra/internal/domain/global-vpn-devices.go b/apps/infra/internal/domain/global-vpn-devices.go index 736233aa4..76dbfcf46 100644 --- a/apps/infra/internal/domain/global-vpn-devices.go +++ b/apps/infra/internal/domain/global-vpn-devices.go @@ -2,6 +2,8 @@ package domain import ( "fmt" + "net" + "strings" "time" "github.com/kloudlite/api/pkg/errors" @@ -13,6 +15,7 @@ import ( "github.com/kloudlite/api/apps/infra/internal/entities" fc "github.com/kloudlite/api/apps/infra/internal/entities/field-constants" "github.com/kloudlite/api/common/fields" + fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/repos" networkingv1 "github.com/kloudlite/operator/apis/networking/v1" ) @@ -217,7 +220,7 @@ func (d *domain) createGlobalVPNDevice(ctx InfraContext, gvpnDevice entities.Glo return gv, nil } -func (d *domain) buildPeerFromGlobalVPNDevice(_ InfraContext, gvpn *entities.GlobalVPN, device *entities.GlobalVPNDevice) *networkingv1.Peer { +func (d *domain) buildPeerFromGlobalVPNDevice(ctx InfraContext, gvpn *entities.GlobalVPN, device *entities.GlobalVPNDevice) *networkingv1.Peer { allowedIPs := []string{fmt.Sprintf("%s/32", device.IPAddr)} // privateConns, err := d.gvpnConnRepo.Find(ctx, repos.Query{ @@ -225,6 +228,8 @@ func (d *domain) buildPeerFromGlobalVPNDevice(_ InfraContext, gvpn *entities.Glo // fc.GlobalVPNConnectionGlobalVPNName: gvpn.Name, // fc.GlobalVPNConnectionVisibilityMode: entities.ClusterVisibilityModePrivate, // }, + { + } // }) // if err != nil { // return nil @@ -236,19 +241,41 @@ func (d *domain) buildPeerFromGlobalVPNDevice(_ InfraContext, gvpn *entities.Glo // } if device.IPAddr == gvpn.KloudliteGatewayDevice.IPAddr { - // FIXME: this should not be used // allowedIPs = append(allowedIPs, gvpn.NonClusterUseAllowedIPs...) - - // NOTE: i don't even remember what is the use case of non-cluster-use allowed IPs allowedIPs = append(allowedIPs, "100.64.0.0/10") // allowedIPs = append(allowedIPs, privateCIDRs...) } + publicEndpoint := func() *string { + if device.PublicEndpoint == nil { + return nil + } + + host := *device.PublicEndpoint + + sp := strings.SplitN(host, ":", 2) + if len(sp) == 2 { + host = sp[0] + } + + addrs, err := net.DefaultResolver.LookupHost(ctx, host) + if err != nil { + d.logger.Warn("failed to lookup", "host", host) + } + + if len(addrs) == 0 { + return nil + } + + d.logger.Info("net.Lookup, for", "host", host, "got", addrs[0]) + return fn.New(fmt.Sprintf("%s:%s", addrs[0], sp[1])) + }() + return &networkingv1.Peer{ Comments: fmt.Sprintf("device/%s/%s", device.GlobalVPNName, device.Name), DNSHostname: fmt.Sprintf("%s.device.local", device.Name), PublicKey: device.PublicKey, - PublicEndpoint: device.PublicEndpoint, + PublicEndpoint: publicEndpoint, IP: &device.IPAddr, DNSSuffix: nil, AllowedIPs: allowedIPs, @@ -285,11 +312,36 @@ func (d *domain) buildPeersFromGlobalVPNDevices(ctx InfraContext, gvpn string) ( allowedIPs = append(allowedIPs, gv.NonClusterUseAllowedIPs...) } + publicEndpoint := func() *string { + if devices[i].PublicEndpoint == nil { + return nil + } + + host := *devices[i].PublicEndpoint + + sp := strings.SplitN(host, ":", 2) + if len(sp) == 2 { + host = sp[0] + } + + addrs, err := net.DefaultResolver.LookupHost(ctx, host) + if err != nil { + d.logger.Warn("failed to lookup", "host", host) + } + + if len(addrs) == 0 { + return nil + } + + d.logger.Info("net.Lookup, for", "host", host, "got", addrs[0]) + return fn.New(fmt.Sprintf("%s:%s", addrs[0], sp[1])) + }() + publicPeers = append(publicPeers, networkingv1.Peer{ Comments: fmt.Sprintf("device/%s/%s", devices[i].GlobalVPNName, devices[i].Name), DNSHostname: fmt.Sprintf("%s.device.local", devices[i].Name), PublicKey: devices[i].PublicKey, - PublicEndpoint: devices[i].PublicEndpoint, + PublicEndpoint: publicEndpoint, IP: &devices[i].IPAddr, DNSSuffix: nil, AllowedIPs: allowedIPs, diff --git a/apps/infra/protobufs/infra/infra.pb.go b/apps/infra/protobufs/infra/infra.pb.go index 38d96839c..4d4223c77 100644 --- a/apps/infra/protobufs/infra/infra.pb.go +++ b/apps/infra/protobufs/infra/infra.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 -// protoc v5.28.1 +// protoc-gen-go v1.32.0 +// protoc v4.24.4 // source: infra.proto package infra diff --git a/apps/infra/protobufs/infra/infra_grpc.pb.go b/apps/infra/protobufs/infra/infra_grpc.pb.go index e1c4bb67d..7a67711eb 100644 --- a/apps/infra/protobufs/infra/infra_grpc.pb.go +++ b/apps/infra/protobufs/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.2.0 -// - protoc v5.28.1 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.24.4 // source: infra.proto package infra @@ -18,6 +18,16 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Infra_GetCluster_FullMethodName = "/Infra/GetCluster" + Infra_GetByokCluster_FullMethodName = "/Infra/GetByokCluster" + Infra_GetNodepool_FullMethodName = "/Infra/GetNodepool" + Infra_ClusterExists_FullMethodName = "/Infra/ClusterExists" + Infra_GetClusterKubeconfig_FullMethodName = "/Infra/GetClusterKubeconfig" + Infra_MarkClusterOnlineAt_FullMethodName = "/Infra/MarkClusterOnlineAt" + Infra_EnsureGlobalVPNConnection_FullMethodName = "/Infra/EnsureGlobalVPNConnection" +) + // InfraClient is the client API for Infra service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -41,7 +51,7 @@ func NewInfraClient(cc grpc.ClientConnInterface) InfraClient { func (c *infraClient) GetCluster(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterOut, error) { out := new(GetClusterOut) - err := c.cc.Invoke(ctx, "/Infra/GetCluster", in, out, opts...) + err := c.cc.Invoke(ctx, Infra_GetCluster_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -50,7 +60,7 @@ func (c *infraClient) GetCluster(ctx context.Context, in *GetClusterIn, opts ... func (c *infraClient) GetByokCluster(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterOut, error) { out := new(GetClusterOut) - err := c.cc.Invoke(ctx, "/Infra/GetByokCluster", in, out, opts...) + err := c.cc.Invoke(ctx, Infra_GetByokCluster_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -59,7 +69,7 @@ func (c *infraClient) GetByokCluster(ctx context.Context, in *GetClusterIn, opts func (c *infraClient) GetNodepool(ctx context.Context, in *GetNodepoolIn, opts ...grpc.CallOption) (*GetNodepoolOut, error) { out := new(GetNodepoolOut) - err := c.cc.Invoke(ctx, "/Infra/GetNodepool", in, out, opts...) + err := c.cc.Invoke(ctx, Infra_GetNodepool_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -68,7 +78,7 @@ func (c *infraClient) GetNodepool(ctx context.Context, in *GetNodepoolIn, opts . func (c *infraClient) ClusterExists(ctx context.Context, in *ClusterExistsIn, opts ...grpc.CallOption) (*ClusterExistsOut, error) { out := new(ClusterExistsOut) - err := c.cc.Invoke(ctx, "/Infra/ClusterExists", in, out, opts...) + err := c.cc.Invoke(ctx, Infra_ClusterExists_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -77,7 +87,7 @@ func (c *infraClient) ClusterExists(ctx context.Context, in *ClusterExistsIn, op func (c *infraClient) GetClusterKubeconfig(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterKubeconfigOut, error) { out := new(GetClusterKubeconfigOut) - err := c.cc.Invoke(ctx, "/Infra/GetClusterKubeconfig", in, out, opts...) + err := c.cc.Invoke(ctx, Infra_GetClusterKubeconfig_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -86,7 +96,7 @@ func (c *infraClient) GetClusterKubeconfig(ctx context.Context, in *GetClusterIn func (c *infraClient) MarkClusterOnlineAt(ctx context.Context, in *MarkClusterOnlineAtIn, opts ...grpc.CallOption) (*MarkClusterOnlineAtOut, error) { out := new(MarkClusterOnlineAtOut) - err := c.cc.Invoke(ctx, "/Infra/MarkClusterOnlineAt", in, out, opts...) + err := c.cc.Invoke(ctx, Infra_MarkClusterOnlineAt_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -95,7 +105,7 @@ func (c *infraClient) MarkClusterOnlineAt(ctx context.Context, in *MarkClusterOn func (c *infraClient) EnsureGlobalVPNConnection(ctx context.Context, in *EnsureGlobalVPNConnectionIn, opts ...grpc.CallOption) (*EnsureGlobalVPNConnectionOut, error) { out := new(EnsureGlobalVPNConnectionOut) - err := c.cc.Invoke(ctx, "/Infra/EnsureGlobalVPNConnection", in, out, opts...) + err := c.cc.Invoke(ctx, Infra_EnsureGlobalVPNConnection_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -164,7 +174,7 @@ func _Infra_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Infra/GetCluster", + FullMethod: Infra_GetCluster_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).GetCluster(ctx, req.(*GetClusterIn)) @@ -182,7 +192,7 @@ func _Infra_GetByokCluster_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Infra/GetByokCluster", + FullMethod: Infra_GetByokCluster_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).GetByokCluster(ctx, req.(*GetClusterIn)) @@ -200,7 +210,7 @@ func _Infra_GetNodepool_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Infra/GetNodepool", + FullMethod: Infra_GetNodepool_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).GetNodepool(ctx, req.(*GetNodepoolIn)) @@ -218,7 +228,7 @@ func _Infra_ClusterExists_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Infra/ClusterExists", + FullMethod: Infra_ClusterExists_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).ClusterExists(ctx, req.(*ClusterExistsIn)) @@ -236,7 +246,7 @@ func _Infra_GetClusterKubeconfig_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Infra/GetClusterKubeconfig", + FullMethod: Infra_GetClusterKubeconfig_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).GetClusterKubeconfig(ctx, req.(*GetClusterIn)) @@ -254,7 +264,7 @@ func _Infra_MarkClusterOnlineAt_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Infra/MarkClusterOnlineAt", + FullMethod: Infra_MarkClusterOnlineAt_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).MarkClusterOnlineAt(ctx, req.(*MarkClusterOnlineAtIn)) @@ -272,7 +282,7 @@ func _Infra_EnsureGlobalVPNConnection_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Infra/EnsureGlobalVPNConnection", + FullMethod: Infra_EnsureGlobalVPNConnection_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).EnsureGlobalVPNConnection(ctx, req.(*EnsureGlobalVPNConnectionIn)) From 6b353e55cf7ee92110f5756896788c072ac1d645 Mon Sep 17 00:00:00 2001 From: Abdhesh Nayak Date: Tue, 1 Oct 2024 18:00:13 +0530 Subject: [PATCH 76/89] Feat/env template (#376) - added template env setup mutation query --- .../internal/app/graph/generated/generated.go | 153 +++++++++- .../internal/app/graph/model/models_gen.go | 2 + .../internal/app/graph/schema.graphqls | 1 + .../internal/app/graph/schema.resolvers.go | 22 +- .../struct-to-graphql/common-types.graphqls | 2 + apps/console/internal/domain/api.go | 1 + .../internal/domain/clone-env-template.go | 273 ++++++++++++++++++ apps/console/internal/domain/environment.go | 58 +++- .../internal/domain/resource-mapping.go | 2 +- apps/console/internal/env/env.go | 3 + apps/gateway/supergraph.yml | 8 +- 11 files changed, 497 insertions(+), 28 deletions(-) create mode 100644 apps/console/internal/domain/clone-env-template.go diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index e4b0b840f..bc2fb473f 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -464,6 +464,7 @@ type ComplexityRoot struct { Enabled func(childComplexity int) int PortMappings func(childComplexity int) int ToDevice func(childComplexity int) int + ToIPAddr func(childComplexity int) int } Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec struct { @@ -765,6 +766,7 @@ type ComplexityRoot struct { CoreInterceptAppOnLocalCluster func(childComplexity int, envName string, appname string, clusterName string, ipAddr string, intercept bool, portMappings []*v1.AppInterceptPortMappings) int CoreInterceptExternalApp func(childComplexity int, envName string, externalAppName string, deviceName string, intercept bool, portMappings []*v1.AppInterceptPortMappings) int CoreRemoveDeviceIntercepts func(childComplexity int, envName string, deviceName string) int + CoreSetupDefaultEnvironment func(childComplexity int) int CoreUpdateApp func(childComplexity int, envName string, app entities.App) int CoreUpdateConfig func(childComplexity int, envName string, config entities.Config) int CoreUpdateEnvironment func(childComplexity int, env entities.Environment) int @@ -1070,6 +1072,7 @@ type MetadataResolver interface { Labels(ctx context.Context, obj *v12.ObjectMeta) (map[string]interface{}, error) } type MutationResolver interface { + CoreSetupDefaultEnvironment(ctx context.Context) (bool, error) CoreCreateEnvironment(ctx context.Context, env entities.Environment) (*entities.Environment, error) CoreUpdateEnvironment(ctx context.Context, env entities.Environment) (*entities.Environment, error) CoreDeleteEnvironment(ctx context.Context, envName string) (bool, error) @@ -2905,6 +2908,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Intercept.ToDevice(childComplexity), true + case "Github__com___kloudlite___operator___apis___crds___v1__Intercept.toIPAddr": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Intercept.ToIPAddr == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Intercept.ToIPAddr(childComplexity), true + case "Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec.resourceNamePrefix": if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec.ResourceNamePrefix == nil { break @@ -4418,6 +4428,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CoreRemoveDeviceIntercepts(childComplexity, args["envName"].(string), args["deviceName"].(string)), true + case "Mutation.core_setupDefaultEnvironment": + if e.complexity.Mutation.CoreSetupDefaultEnvironment == nil { + break + } + + return e.complexity.Mutation.CoreSetupDefaultEnvironment(childComplexity), true + case "Mutation.core_updateApp": if e.complexity.Mutation.CoreUpdateApp == nil { break @@ -6003,6 +6020,7 @@ type Query { } type Mutation { + core_setupDefaultEnvironment: Boolean! @isLoggedInAndVerified @hasAccount core_createEnvironment(env: EnvironmentIn!): Environment @isLoggedInAndVerified @hasAccount core_updateEnvironment(env: EnvironmentIn!): Environment @isLoggedInAndVerified @hasAccount core_deleteEnvironment(envName: String!): Boolean! @isLoggedInAndVerified @hasAccount @@ -6344,6 +6362,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__Intercept @shareable enabled: Boolean! portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings!] toDevice: String! + toIPAddr: String } type Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec @shareable { @@ -6678,6 +6697,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__InterceptIn { enabled: Boolean! portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn!] toDevice: String! + toIPAddr: String } input Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpecIn { @@ -17928,6 +17948,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_portMappings(ctx, field) case "toDevice": return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toDevice(ctx, field) + case "toIPAddr": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toIPAddr(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__Intercept", field.Name) }, @@ -19728,6 +19750,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_portMappings(ctx, field) case "toDevice": return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toDevice(ctx, field) + case "toIPAddr": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toIPAddr(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__Intercept", field.Name) }, @@ -20421,6 +20445,47 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Intercept_toIPAddr(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Intercept) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toIPAddr(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.ToIPAddr, 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.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toIPAddr(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__Intercept", + 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) _Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec_resourceNamePrefix(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpec) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec_resourceNamePrefix(ctx, field) if err != nil { @@ -28409,6 +28474,76 @@ func (ec *executionContext) fieldContext_Metadata_namespace(_ context.Context, f return fc, nil } +func (ec *executionContext) _Mutation_core_setupDefaultEnvironment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_core_setupDefaultEnvironment(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().CoreSetupDefaultEnvironment(rctx) + } + 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_setupDefaultEnvironment(_ 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") + }, + } + return fc, nil +} + func (ec *executionContext) _Mutation_core_createEnvironment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Mutation_core_createEnvironment(ctx, field) if err != nil { @@ -43424,7 +43559,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a asMap[k] = v } - fieldsInOrder := [...]string{"enabled", "portMappings", "toDevice"} + fieldsInOrder := [...]string{"enabled", "portMappings", "toDevice", "toIPAddr"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -43452,6 +43587,13 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, err } it.ToDevice = data + case "toIPAddr": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("toIPAddr")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.ToIPAddr = data } } @@ -48887,6 +49029,8 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ if out.Values[i] == graphql.Null { out.Invalids++ } + case "toIPAddr": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Intercept_toIPAddr(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -51443,6 +51587,13 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Mutation") + case "core_setupDefaultEnvironment": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_core_setupDefaultEnvironment(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } case "core_createEnvironment": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Mutation_core_createEnvironment(ctx, field) diff --git a/apps/console/internal/app/graph/model/models_gen.go b/apps/console/internal/app/graph/model/models_gen.go index cfd28412a..ad830d79e 100644 --- a/apps/console/internal/app/graph/model/models_gen.go +++ b/apps/console/internal/app/graph/model/models_gen.go @@ -409,12 +409,14 @@ type GithubComKloudliteOperatorApisCrdsV1Intercept struct { Enabled bool `json:"enabled"` PortMappings []*GithubComKloudliteOperatorApisCrdsV1AppInterceptPortMappings `json:"portMappings,omitempty"` ToDevice string `json:"toDevice"` + ToIPAddr *string `json:"toIPAddr,omitempty"` } type GithubComKloudliteOperatorApisCrdsV1InterceptIn struct { Enabled bool `json:"enabled"` PortMappings []*v1.AppInterceptPortMappings `json:"portMappings,omitempty"` ToDevice string `json:"toDevice"` + ToIPAddr *string `json:"toIPAddr,omitempty"` } type GithubComKloudliteOperatorApisCrdsV1ManagedResourceSpec struct { diff --git a/apps/console/internal/app/graph/schema.graphqls b/apps/console/internal/app/graph/schema.graphqls index d509fa652..92f37eca7 100644 --- a/apps/console/internal/app/graph/schema.graphqls +++ b/apps/console/internal/app/graph/schema.graphqls @@ -159,6 +159,7 @@ type Query { } type Mutation { + core_setupDefaultEnvironment: Boolean! @isLoggedInAndVerified @hasAccount core_createEnvironment(env: EnvironmentIn!): Environment @isLoggedInAndVerified @hasAccount core_updateEnvironment(env: EnvironmentIn!): Environment @isLoggedInAndVerified @hasAccount core_deleteEnvironment(envName: 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 ef08ea747..53619178b 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -7,9 +7,8 @@ package graph import ( "context" "fmt" - "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" @@ -70,6 +69,19 @@ func (r *importedManagedResourceResolver) OnlineStatus(ctx context.Context, obj }, nil } +// CoreSetupDefaultEnvironment is the resolver for the core_setupDefaultEnvironment field. +func (r *mutationResolver) CoreSetupDefaultEnvironment(ctx context.Context) (bool, error) { + cc, err := toConsoleContext(ctx) + if err != nil { + return false, errors.NewE(err) + } + + if err := r.Domain.SetupDefaultEnvTemplate(cc); err != nil { + return false, errors.NewE(err) + } + return true, nil +} + // CoreCreateEnvironment is the resolver for the core_createEnvironment field. func (r *mutationResolver) CoreCreateEnvironment(ctx context.Context, env entities.Environment) (*entities.Environment, error) { cc, err := toConsoleContext(ctx) @@ -1095,7 +1107,5 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } -type ( - mutationResolver struct{ *Resolver } - queryResolver struct{ *Resolver } -) +type mutationResolver struct{ *Resolver } +type queryResolver struct{ *Resolver } diff --git a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls index 8b91086d3..bd7f9f743 100644 --- a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -181,6 +181,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__Intercept @shareable enabled: Boolean! portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings!] toDevice: String! + toIPAddr: String } type Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpec @shareable { @@ -515,6 +516,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__InterceptIn { enabled: Boolean! portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn!] toDevice: String! + toIPAddr: String } input Github__com___kloudlite___operator___apis___crds___v1__ManagedResourceSpecIn { diff --git a/apps/console/internal/domain/api.go b/apps/console/internal/domain/api.go index c6e99ab61..0520d0ffa 100644 --- a/apps/console/internal/domain/api.go +++ b/apps/console/internal/domain/api.go @@ -168,6 +168,7 @@ type Domain interface { ListEnvironments(ctx ConsoleContext, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.Environment], error) GetEnvironment(ctx ConsoleContext, name string) (*entities.Environment, error) + SetupDefaultEnvTemplate(ctx ConsoleContext) error CreateEnvironment(ctx ConsoleContext, env entities.Environment) (*entities.Environment, error) CloneEnvironment(ctx ConsoleContext, args CloneEnvironmentArgs) (*entities.Environment, error) UpdateEnvironment(ctx ConsoleContext, env entities.Environment) (*entities.Environment, error) diff --git a/apps/console/internal/domain/clone-env-template.go b/apps/console/internal/domain/clone-env-template.go new file mode 100644 index 000000000..50033f714 --- /dev/null +++ b/apps/console/internal/domain/clone-env-template.go @@ -0,0 +1,273 @@ +package domain + +import ( + "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" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/repos" + t "github.com/kloudlite/api/pkg/types" + crdsv1 "github.com/kloudlite/operator/apis/crds/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type CloneEnvironmentTemplateArgs struct { + SourceAccountName string + SourceEnvName string + DestinationEnvName string + DisplayName string + EnvRoutingMode crdsv1.EnvironmentRoutingMode +} + +func (d *domain) CloneEnvTemplate(ctx ConsoleContext, args CloneEnvironmentTemplateArgs) (*entities.Environment, error) { + if err := d.canPerformActionInAccount(ctx, iamT.CloneEnvironment); err != nil { + return nil, errors.NewE(err) + } + + srcCtx := NewConsoleContext(ctx, "sys-user:console-resource-updater", args.SourceAccountName) + + sourceEnv, err := d.findEnvironment(srcCtx, args.SourceEnvName) + if err != nil { + return nil, errors.NewE(err) + } + + destEnv := &entities.Environment{ + Environment: crdsv1.Environment{ + TypeMeta: sourceEnv.TypeMeta, + ObjectMeta: metav1.ObjectMeta{ + Name: args.DestinationEnvName, + Namespace: sourceEnv.Namespace, + }, + Spec: crdsv1.EnvironmentSpec{ + TargetNamespace: d.getEnvironmentTargetNamespace(args.DestinationEnvName), + Routing: &crdsv1.EnvironmentRouting{ + Mode: args.EnvRoutingMode, + }, + }, + }, + AccountName: ctx.AccountName, + ClusterName: "", + ResourceMetadata: common.ResourceMetadata{ + DisplayName: args.DisplayName, + CreatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + }, + LastUpdatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + }, + }, + SyncStatus: t.GenSyncStatus(t.SyncActionApply, 0), + } + + if err := d.k8sClient.ValidateObject(ctx, &destEnv.Environment); err != nil { + return nil, errors.NewE(err) + } + + if _, err := d.iamClient.AddMembership(ctx, &iam.AddMembershipIn{ + UserId: string(ctx.UserId), + ResourceType: string(iamT.ResourceEnvironment), + ResourceRef: iamT.NewResourceRef(ctx.AccountName, iamT.ResourceEnvironment, destEnv.Spec.TargetNamespace), + Role: string(iamT.RoleResourceOwner), + }); err != nil { + d.logger.Errorf(err, "error while adding membership") + } + + destEnv, err = d.environmentRepo.Create(ctx, destEnv) + if err != nil { + return nil, errors.NewE(err) + } + + resCtx := ResourceContext{ + ConsoleContext: ctx, + EnvironmentName: destEnv.Name, + } + + filters := repos.Filter{ + fields.AccountName: args.SourceAccountName, + fields.EnvironmentName: args.SourceEnvName, + } + + apps, err := d.appRepo.Find(srcCtx, repos.Query{ + Filter: filters, + Sort: nil, + }) + if err != nil { + return nil, errors.NewE(err) + } + + externalApps, err := d.externalAppRepo.Find(srcCtx, repos.Query{ + Filter: filters, + Sort: nil, + }) + if err != nil { + return nil, errors.NewE(err) + } + + secrets, err := d.secretRepo.Find(srcCtx, repos.Query{ + Filter: d.secretRepo.MergeMatchFilters(filters, map[string]repos.MatchFilter{ + fc.SecretFor: { + MatchType: repos.MatchTypeExact, + Exact: nil, + }, + }), + Sort: nil, + }) + if err != nil { + return nil, errors.NewE(err) + } + + configs, err := d.configRepo.Find(srcCtx, repos.Query{ + Filter: filters, + Sort: nil, + }) + if err != nil { + return nil, errors.NewE(err) + } + + routers, err := d.routerRepo.Find(srcCtx, repos.Query{ + Filter: filters, + Sort: nil, + }) + if err != nil { + return nil, errors.NewE(err) + } + + mresources, err := d.importedMresRepo.Find(srcCtx, repos.Query{ + Filter: filters, + Sort: nil, + }) + if err != nil { + return nil, errors.NewE(err) + } + + resourceMetadata := func(dn string) common.ResourceMetadata { + return common.ResourceMetadata{ + DisplayName: dn, + CreatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + }, + LastUpdatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + }, + } + } + + objectMeta := func(sourceMeta metav1.ObjectMeta, namespace string) metav1.ObjectMeta { + sourceMeta.Namespace = namespace + return sourceMeta + } + + for i := range apps { + appSpec := apps[i].Spec + appSpec.Intercept = nil + if _, err := d.createAndApplyApp(resCtx, &entities.App{ + App: crdsv1.App{ + TypeMeta: apps[i].TypeMeta, + ObjectMeta: objectMeta(apps[i].ObjectMeta, destEnv.Spec.TargetNamespace), + Spec: appSpec, + }, + AccountName: ctx.AccountName, + EnvironmentName: destEnv.Name, + ResourceMetadata: resourceMetadata(apps[i].DisplayName), + SyncStatus: t.GenSyncStatus(t.SyncActionApply, 0), + }); err != nil { + return nil, err + } + } + + for i := range externalApps { + externalAppSpec := externalApps[i].Spec + externalAppSpec.Intercept = nil + if _, err := d.createAndApplyExternalApp(resCtx, &entities.ExternalApp{ + ExternalApp: crdsv1.ExternalApp{ + TypeMeta: externalApps[i].TypeMeta, + ObjectMeta: objectMeta(externalApps[i].ObjectMeta, destEnv.Spec.TargetNamespace), + Spec: externalAppSpec, + }, + AccountName: ctx.AccountName, + EnvironmentName: destEnv.Name, + ResourceMetadata: resourceMetadata(externalApps[i].DisplayName), + SyncStatus: t.GenSyncStatus(t.SyncActionApply, 0), + }); err != nil { + return nil, err + } + } + + for i := range secrets { + if _, err := d.createAndApplySecret(resCtx, &entities.Secret{ + Secret: corev1.Secret{ + TypeMeta: secrets[i].TypeMeta, + ObjectMeta: objectMeta(secrets[i].ObjectMeta, destEnv.Spec.TargetNamespace), + Immutable: secrets[i].Immutable, + Data: secrets[i].Data, + StringData: secrets[i].StringData, + Type: secrets[i].Type, + }, + AccountName: ctx.AccountName, + EnvironmentName: destEnv.Name, + ResourceMetadata: resourceMetadata(secrets[i].DisplayName), + }); err != nil { + return nil, err + } + } + + for i := range configs { + if _, err := d.createAndApplyConfig(resCtx, &entities.Config{ + ConfigMap: corev1.ConfigMap{ + TypeMeta: configs[i].TypeMeta, + ObjectMeta: objectMeta(configs[i].ObjectMeta, destEnv.Spec.TargetNamespace), + Immutable: configs[i].Immutable, + Data: configs[i].Data, + BinaryData: configs[i].BinaryData, + }, + AccountName: ctx.AccountName, + EnvironmentName: destEnv.Name, + ResourceMetadata: resourceMetadata(configs[i].DisplayName), + }); err != nil { + return nil, err + } + } + + for i := range routers { + if _, err := d.createAndApplyRouter(resCtx, &entities.Router{ + Router: crdsv1.Router{ + TypeMeta: routers[i].TypeMeta, + ObjectMeta: objectMeta(routers[i].ObjectMeta, destEnv.Spec.TargetNamespace), + Spec: routers[i].Spec, + Enabled: routers[i].Enabled, + }, + AccountName: ctx.AccountName, + EnvironmentName: destEnv.Name, + ResourceMetadata: resourceMetadata(routers[i].DisplayName), + }); err != nil { + return nil, err + } + } + + for i := range mresources { + if _, err := d.createAndApplyImportedManagedResource(resCtx, CreateAndApplyImportedManagedResourceArgs{ + ImportedManagedResourceName: mresources[i].Name, + ManagedResourceRefID: mresources[i].ManagedResourceRef.ID, + }); err != nil { + return nil, err + } + } + + // if err := d.syncImagePullSecretsToEnvironment(ctx, args.DestinationEnvName); err != nil { + // return nil, err + // } + + return destEnv, nil +} diff --git a/apps/console/internal/domain/environment.go b/apps/console/internal/domain/environment.go index cb813d269..741b6a539 100644 --- a/apps/console/internal/domain/environment.go +++ b/apps/console/internal/domain/environment.go @@ -2,7 +2,6 @@ package domain import ( "fmt" - "strings" "github.com/kloudlite/api/common/fields" crdsv1 "github.com/kloudlite/operator/apis/crds/v1" @@ -83,6 +82,7 @@ func (d *domain) getClusterAttachedToEnvironment(ctx K8sContext, name string) (* if env == nil { return nil, errors.Newf("no cluster attached to this environment") } + return &env.ClusterName, nil } @@ -134,30 +134,56 @@ func (d *domain) findEnvironmentByTargetNs(ctx ConsoleContext, targetNs string) return w, nil } +func (d *domain) SetupDefaultEnvTemplate(ctx ConsoleContext) error { + if d.envVars.DefaultEnvTemplateAccountName == "" && d.envVars.DefaultEnvTemplateName == "" { + return nil + } + + if _, err := d.CloneEnvTemplate(ctx, CloneEnvironmentTemplateArgs{ + SourceAccountName: d.envVars.DefaultEnvTemplateAccountName, + SourceEnvName: d.envVars.DefaultEnvTemplateName, + DestinationEnvName: d.envVars.DefaultEnvTemplateName, + DisplayName: "Default Environment", + EnvRoutingMode: crdsv1.EnvironmentRoutingModePublic, + }); err != nil { + return errors.NewE(err) + } + + return nil +} + func (d *domain) CreateEnvironment(ctx ConsoleContext, env entities.Environment) (*entities.Environment, error) { if err := d.canPerformActionInAccount(ctx, iamT.CreateEnvironment); err != nil { return nil, errors.NewE(err) } - if strings.TrimSpace(env.ClusterName) == "" { - return nil, fmt.Errorf("clustername must be set while creating environments") + dEnvTempName := d.envVars.DefaultEnvTemplateName + if dEnvTempName != "" && dEnvTempName == env.Name { + return nil, fmt.Errorf("name already reserved by default environment template") } - ownedBy, err := d.infraSvc.GetByokClusterOwnedBy(ctx, ports.IsClusterLabelsIn{ - UserId: string(ctx.UserId), - UserEmail: ctx.UserEmail, - UserName: ctx.UserName, - AccountName: ctx.AccountName, - ClusterName: env.ClusterName, - }) - if err != nil { - return nil, errors.NewE(err) - } + if env.ClusterName != "" { + ownedBy, err := d.infraSvc.GetByokClusterOwnedBy(ctx, ports.IsClusterLabelsIn{ + UserId: string(ctx.UserId), + UserEmail: ctx.UserEmail, + UserName: ctx.UserName, + AccountName: ctx.AccountName, + ClusterName: env.ClusterName, + }) + if err != nil { + return nil, errors.NewE(err) + } + + if ownedBy != "" && ownedBy != string(ctx.UserId) { + return nil, fmt.Errorf("it's owned cluster, but you are not the owner") + } + + if env.Labels == nil { + env.Labels = map[string]string{} + } - if ownedBy != "" && ownedBy != string(ctx.UserId) { - return nil, fmt.Errorf("it's owned cluster, but you are not the owner") + env.Labels[constants.ClusterLabelOwnedBy] = string(ctx.UserId) } - env.Labels[constants.ClusterLabelOwnedBy] = string(ctx.UserId) env.EnsureGVK() if err := d.k8sClient.ValidateObject(ctx, &env.Environment); err != nil { diff --git a/apps/console/internal/domain/resource-mapping.go b/apps/console/internal/domain/resource-mapping.go index f8a51a870..769943fdc 100644 --- a/apps/console/internal/domain/resource-mapping.go +++ b/apps/console/internal/domain/resource-mapping.go @@ -31,7 +31,7 @@ func (d *domain) upsertEnvironmentResourceMapping(ctx ResourceContext, res resou if err != nil { return nil, errors.NewE(err) } - if clusterName == nil { + if clusterName == nil || *clusterName == "" { // silent exit return nil, nil } diff --git a/apps/console/internal/env/env.go b/apps/console/internal/env/env.go index b119c4e5a..c14d88b54 100644 --- a/apps/console/internal/env/env.go +++ b/apps/console/internal/env/env.go @@ -33,6 +33,9 @@ type Env struct { IsDev bool KubernetesApiProxy string `env:"KUBERNETES_API_PROXY" default:"localhost:8080"` + + DefaultEnvTemplateAccountName string `env:"DEFAULT_ENV_TEMPLATE_ACCOUNT_NAME"` + DefaultEnvTemplateName string `env:"DEFAULT_ENV_TEMPLATE_NAME"` } func LoadEnv() (*Env, error) { diff --git a/apps/gateway/supergraph.yml b/apps/gateway/supergraph.yml index 1f403cb6b..c13e1a89a 100644 --- a/apps/gateway/supergraph.yml +++ b/apps/gateway/supergraph.yml @@ -24,7 +24,7 @@ subgraphs: routing_url: http://infra-api:3000/query schema: file: ./schemas/infra-api.schema - iot-console-api: - routing_url: http://iot-console-api:3000/query - schema: - file: ./schemas/iot-console-api.schema + # iot-console-api: + # routing_url: http://iot-console-api:3000/query + # schema: + # file: ./schemas/iot-console-api.schema From 21a138fb794c3300cd6ee7dd3337106c27cff700 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 3 Oct 2024 10:22:57 +0530 Subject: [PATCH 77/89] fix: acknowledges cluster's visibility with GlobalVPN Gateway --- .../internal/app/graph/globalvpn.resolvers.go | 9 +++-- apps/infra/internal/domain/byok-clusters.go | 7 +++- apps/infra/internal/domain/clusters.go | 7 +++- .../domain/global-vpn-cluster-connection.go | 33 +++++++++++++------ 4 files changed, 41 insertions(+), 15 deletions(-) diff --git a/apps/infra/internal/app/graph/globalvpn.resolvers.go b/apps/infra/internal/app/graph/globalvpn.resolvers.go index def2082fb..d125df308 100644 --- a/apps/infra/internal/app/graph/globalvpn.resolvers.go +++ b/apps/infra/internal/app/graph/globalvpn.resolvers.go @@ -6,9 +6,10 @@ package graph import ( "context" - "github.com/kloudlite/api/pkg/errors" "time" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/apps/infra/internal/app/graph/generated" "github.com/kloudlite/api/apps/infra/internal/app/graph/model" "github.com/kloudlite/api/apps/infra/internal/entities" @@ -65,5 +66,7 @@ func (r *Resolver) GlobalVPN() generated.GlobalVPNResolver { return &globalVPNRe // GlobalVPNIn returns generated.GlobalVPNInResolver implementation. func (r *Resolver) GlobalVPNIn() generated.GlobalVPNInResolver { return &globalVPNInResolver{r} } -type globalVPNResolver struct{ *Resolver } -type globalVPNInResolver struct{ *Resolver } +type ( + globalVPNResolver struct{ *Resolver } + globalVPNInResolver struct{ *Resolver } +) diff --git a/apps/infra/internal/domain/byok-clusters.go b/apps/infra/internal/domain/byok-clusters.go index e6fcf2fb6..bff9f4b02 100644 --- a/apps/infra/internal/domain/byok-clusters.go +++ b/apps/infra/internal/domain/byok-clusters.go @@ -91,7 +91,12 @@ func (d *domain) CreateBYOKCluster(ctx InfraContext, cluster entities.BYOKCluste cluster.MessageQueueTopicName = common.SendToAgentSubjectPrefix(ctx.AccountName, cluster.Name) - gvpnConn, err := d.ensureGlobalVPNConnection(ctx, cluster.Name, cluster.GlobalVPN, nil) + gvpnConn, err := d.ensureGlobalVPNConnection(ctx, ensureGlobalVPNConnectionArgs{ + ClusterName: cluster.Name, + GlobalVPNName: cluster.GlobalVPN, + DispatchAddr: nil, + Visibility: cluster.Visibility, + }) if err != nil { return nil, errors.NewE(err) } diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 16faad548..5a4685a73 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -353,7 +353,12 @@ func (d *domain) CreateCluster(ctx InfraContext, cluster entities.Cluster) (*ent cluster.SyncStatus = t.GenSyncStatus(t.SyncActionApply, 0) // FIXME: removing public DNS host for now - gvpnConn, err := d.ensureGlobalVPNConnection(ctx, cluster.Name, *cluster.GlobalVPN, nil) + gvpnConn, err := d.ensureGlobalVPNConnection(ctx, ensureGlobalVPNConnectionArgs{ + ClusterName: cluster.Name, + GlobalVPNName: *cluster.GlobalVPN, + DispatchAddr: nil, + Visibility: entities.ClusterVisbility{}, + }) if err != nil { return nil, errors.NewE(err) } diff --git a/apps/infra/internal/domain/global-vpn-cluster-connection.go b/apps/infra/internal/domain/global-vpn-cluster-connection.go index 26faf8602..78c3dd7e3 100644 --- a/apps/infra/internal/domain/global-vpn-cluster-connection.go +++ b/apps/infra/internal/domain/global-vpn-cluster-connection.go @@ -393,14 +393,27 @@ func (d *domain) deleteGlobalVPNConnection(ctx InfraContext, clusterName string, } func (d *domain) EnsureGlobalVPNConnection(ctx InfraContext, clusterName string, groupName string, dispatchAddr *entities.DispatchAddr) (*entities.GlobalVPNConnection, error) { - return d.ensureGlobalVPNConnection(ctx, clusterName, groupName, dispatchAddr) + // return d.ensureGlobalVPNConnection(ctx, clusterName, groupName, dispatchAddr) + return d.ensureGlobalVPNConnection(ctx, ensureGlobalVPNConnectionArgs{ + ClusterName: clusterName, + GlobalVPNName: groupName, + DispatchAddr: dispatchAddr, + Visibility: entities.ClusterVisbility{}, + }) +} + +type ensureGlobalVPNConnectionArgs struct { + ClusterName string + GlobalVPNName string + DispatchAddr *entities.DispatchAddr + Visibility entities.ClusterVisbility } -func (d *domain) ensureGlobalVPNConnection(ctx InfraContext, clusterName string, groupName string, dispatchAddr *entities.DispatchAddr) (*entities.GlobalVPNConnection, error) { +func (d *domain) ensureGlobalVPNConnection(ctx InfraContext, args ensureGlobalVPNConnectionArgs) (*entities.GlobalVPNConnection, error) { gvpnConn, err := d.gvpnConnRepo.FindOne(ctx, repos.Filter{ fields.AccountName: ctx.AccountName, - fields.ClusterName: clusterName, - fields.MetadataName: groupName, + fields.ClusterName: args.ClusterName, + fields.MetadataName: args.GlobalVPNName, }) if err != nil { return nil, errors.NewE(err) @@ -414,19 +427,19 @@ func (d *domain) ensureGlobalVPNConnection(ctx InfraContext, clusterName string, } gvpnGateway := networkingv1.Gateway{ObjectMeta: metav1.ObjectMeta{ - Name: groupName, - // Name: fmt.Sprintf("%s-%s", ctx.AccountName, groupName), + Name: args.GlobalVPNName, // Name: fmt.Sprintf("%s-%s", ctx.AccountName, groupName), }} gvpnGateway.EnsureGVK() return d.createGlobalVPNConnection(ctx, entities.GlobalVPNConnection{ Gateway: gvpnGateway, - GlobalVPNName: groupName, - ResourceMetadata: common.ResourceMetadata{DisplayName: groupName, CreatedBy: common.CreatedOrUpdatedByKloudlite, LastUpdatedBy: common.CreatedOrUpdatedByKloudlite}, + GlobalVPNName: args.GlobalVPNName, + ResourceMetadata: common.ResourceMetadata{DisplayName: args.GlobalVPNName, CreatedBy: common.CreatedOrUpdatedByKloudlite, LastUpdatedBy: common.CreatedOrUpdatedByKloudlite}, AccountName: ctx.AccountName, - ClusterName: clusterName, - DispatchAddr: dispatchAddr, + ClusterName: args.ClusterName, + DispatchAddr: args.DispatchAddr, + Visibility: args.Visibility, ParsedWgParams: nil, }) } From c4d26525e4a965226dfab1d7d3ea674e7999c2c0 Mon Sep 17 00:00:00 2001 From: Abdhesh Nayak Date: Thu, 3 Oct 2024 14:07:00 +0530 Subject: [PATCH 78/89] Feat/env template (#378) * :sparkles: Added support for env-template * handle clustername empty error in resource mapping * :art: Implemented template and owned cluster --------- Co-authored-by: Piyush Kumar --- .../internal/app/graph/generated/generated.go | 10 ++++++++- .../internal/app/graph/model/models_gen.go | 1 + apps/infra/internal/app/graph/schema.graphqls | 1 + .../internal/app/graph/schema.resolvers.go | 21 +++++++++++++++++++ apps/infra/internal/domain/byok-clusters.go | 8 +++---- apps/infra/internal/domain/clusters.go | 8 +++---- 6 files changed, 40 insertions(+), 9 deletions(-) diff --git a/apps/infra/internal/app/graph/generated/generated.go b/apps/infra/internal/app/graph/generated/generated.go index a817e42bf..c560cf602 100644 --- a/apps/infra/internal/app/graph/generated/generated.go +++ b/apps/infra/internal/app/graph/generated/generated.go @@ -7967,6 +7967,7 @@ input SearchCluster { isReady: MatchFilterIn region: MatchFilterIn text: MatchFilterIn + allClusters: MatchFilterIn } input SearchGlobalVPNs { @@ -58897,7 +58898,7 @@ func (ec *executionContext) unmarshalInputSearchCluster(ctx context.Context, obj asMap[k] = v } - fieldsInOrder := [...]string{"cloudProviderName", "isReady", "region", "text"} + fieldsInOrder := [...]string{"cloudProviderName", "isReady", "region", "text", "allClusters"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -58932,6 +58933,13 @@ func (ec *executionContext) unmarshalInputSearchCluster(ctx context.Context, obj return it, err } it.Text = data + case "allClusters": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("allClusters")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.AllClusters = data } } diff --git a/apps/infra/internal/app/graph/model/models_gen.go b/apps/infra/internal/app/graph/model/models_gen.go index cfad554f2..0bddb7e7a 100644 --- a/apps/infra/internal/app/graph/model/models_gen.go +++ b/apps/infra/internal/app/graph/model/models_gen.go @@ -1452,6 +1452,7 @@ type SearchCluster struct { IsReady *repos.MatchFilter `json:"isReady,omitempty"` Region *repos.MatchFilter `json:"region,omitempty"` Text *repos.MatchFilter `json:"text,omitempty"` + AllClusters *repos.MatchFilter `json:"allClusters,omitempty"` } type SearchDomainEntry struct { diff --git a/apps/infra/internal/app/graph/schema.graphqls b/apps/infra/internal/app/graph/schema.graphqls index 49ba7eff6..663ba3898 100644 --- a/apps/infra/internal/app/graph/schema.graphqls +++ b/apps/infra/internal/app/graph/schema.graphqls @@ -24,6 +24,7 @@ input SearchCluster { isReady: MatchFilterIn region: MatchFilterIn text: MatchFilterIn + allClusters: MatchFilterIn } input SearchGlobalVPNs { diff --git a/apps/infra/internal/app/graph/schema.resolvers.go b/apps/infra/internal/app/graph/schema.resolvers.go index 7e1cdb407..382751dbe 100644 --- a/apps/infra/internal/app/graph/schema.resolvers.go +++ b/apps/infra/internal/app/graph/schema.resolvers.go @@ -8,6 +8,7 @@ import ( "context" "encoding/base64" "fmt" + fc "github.com/kloudlite/api/apps/infra/internal/entities/field-constants" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/apps/infra/internal/app/graph/generated" @@ -382,6 +383,16 @@ func (r *queryResolver) InfraListClusters(ctx context.Context, search *model.Sea if search.Text != nil { filter[fields.MetadataName] = *search.Text } + + if search.AllClusters == nil { + filter[fc.ClusterOwnedBy] = repos.MatchFilter{ + MatchType: repos.MatchTypeArray, + Array: []any{ + ictx.UserId, + nil, + }, + } + } } pClusters, err := r.Domain.ListClusters(ictx, filter, *pagination) @@ -421,6 +432,16 @@ func (r *queryResolver) InfraListBYOKClusters(ctx context.Context, search *model } } + if search == nil || search.AllClusters == nil { + filter[fc.ClusterOwnedBy] = repos.MatchFilter{ + MatchType: repos.MatchTypeArray, + Array: []any{ + ictx.UserId, + nil, + }, + } + } + globalVPNs, err := r.Domain.ListBYOKCluster(ictx, filter, *pagination) if err != nil { return nil, errors.NewE(err) diff --git a/apps/infra/internal/domain/byok-clusters.go b/apps/infra/internal/domain/byok-clusters.go index bff9f4b02..c01395a12 100644 --- a/apps/infra/internal/domain/byok-clusters.go +++ b/apps/infra/internal/domain/byok-clusters.go @@ -163,10 +163,10 @@ func (d *domain) ListBYOKCluster(ctx InfraContext, search map[string]repos.Match f := repos.Filter{ fields.AccountName: ctx.AccountName, - "$or": []map[string]any{ - {fc.BYOKClusterOwnedBy: ctx.UserId}, - {fc.BYOKClusterOwnedBy: nil}, - }, + // "$or": []map[string]any{ + // {fc.BYOKClusterOwnedBy: ctx.UserId}, + // {fc.BYOKClusterOwnedBy: nil}, + // }, } pRecords, err := d.byokClusterRepo.FindPaginated(ctx, d.byokClusterRepo.MergeMatchFilters(f, search), pagination) diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 5a4685a73..70d1819fd 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -908,10 +908,10 @@ func (d *domain) ListClusters(ctx InfraContext, mf map[string]repos.MatchFilter, f := repos.Filter{ fields.AccountName: ctx.AccountName, fields.MetadataNamespace: accNs, - "$or": []map[string]any{ - {fc.ClusterOwnedBy: ctx.UserId}, - {fc.ClusterOwnedBy: nil}, - }, + // "$or": []map[string]any{ + // {fc.ClusterOwnedBy: ctx.UserId}, + // {fc.ClusterOwnedBy: nil}, + // }, } pr, err := d.clusterRepo.FindPaginated(ctx, d.clusterRepo.MergeMatchFilters(f, mf), pagination) From f8d2a1b797f72aadf4c137b4977a2e920f9d8923 Mon Sep 17 00:00:00 2001 From: Abdhesh Nayak Date: Mon, 7 Oct 2024 09:31:21 +0530 Subject: [PATCH 79/89] :sparkles: Added api for kubernetes resource health check --- apps/kube-health/.gitignore | 2 + apps/kube-health/Dockerfile | 5 ++ apps/kube-health/Taskfile.yml | 35 ++++++++ apps/kube-health/main.go | 161 ++++++++++++++++++++++++++++++++++ 4 files changed, 203 insertions(+) create mode 100644 apps/kube-health/.gitignore create mode 100644 apps/kube-health/Dockerfile create mode 100644 apps/kube-health/Taskfile.yml create mode 100644 apps/kube-health/main.go diff --git a/apps/kube-health/.gitignore b/apps/kube-health/.gitignore new file mode 100644 index 000000000..e8ca7c86d --- /dev/null +++ b/apps/kube-health/.gitignore @@ -0,0 +1,2 @@ +.secrets +bin diff --git a/apps/kube-health/Dockerfile b/apps/kube-health/Dockerfile new file mode 100644 index 000000000..1f1bb07a0 --- /dev/null +++ b/apps/kube-health/Dockerfile @@ -0,0 +1,5 @@ +# syntax=docker/dockerfile:1 +FROM gcr.io/distroless/static-debian11:nonroot +ARG BINARY TARGETARCH +COPY --chown=1001 $BINARY-$TARGETARCH /kube-svc-health +ENTRYPOINT ["/kube-svc-health"] diff --git a/apps/kube-health/Taskfile.yml b/apps/kube-health/Taskfile.yml new file mode 100644 index 000000000..aa61dd09b --- /dev/null +++ b/apps/kube-health/Taskfile.yml @@ -0,0 +1,35 @@ +version: 3 + +vars: + app: kube-svc-health + binary: "./bin/{{.app}}" + +tasks: + run: + dotenv: + - .secrets/env + cmds: + - go run ./main.go + + build: + env: + output: "{{.binary}}-{{.GOARCH}}" + GOARCH: "{{.GOARCH}}" + CGO_ENABLED: 0 + cmds: + - go build -o $output ./main.go + + container:build-and-push: + requires: + vars: + - image + cmds: + - task: build + vars: + GOARCH: amd64 + + - task: build + vars: + GOARCH: arm64 + + - docker buildx build --platform linux/amd64,linux/arm64 --build-arg BINARY={{.binary}} -t {{.image}} . --push diff --git a/apps/kube-health/main.go b/apps/kube-health/main.go new file mode 100644 index 000000000..c415dd233 --- /dev/null +++ b/apps/kube-health/main.go @@ -0,0 +1,161 @@ +package main + +import ( + "context" + "fmt" + "log" + + "github.com/codingconcepts/env" + "github.com/gofiber/fiber/v2" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" +) + +type Env struct { + HttpPort uint16 `env:"HTTP_PORT" default:"3000"` + KubernetesApiProxy string `env:"KUBERNETES_API_PROXY"` +} + +func LoadEnv() (*Env, error) { + var e Env + if err := env.Set(&e); err != nil { + return nil, err + } + return &e, nil +} + +func main() { + if err := Run(); err != nil { + panic(err) + } +} + +func Run() error { + env, err := LoadEnv() + if err != nil { + return err + } + + kubeconfig := &rest.Config{ + Host: env.KubernetesApiProxy, + } + + if env.KubernetesApiProxy == "" { + var err error + kubeconfig, err = rest.InClusterConfig() + if err != nil { + return err + } + } + + // Create the Kubernetes client + clientset, err := kubernetes.NewForConfig(kubeconfig) + if err != nil { + return err + } + + app := fiber.New() + + app.Get("/_healthy", func(c *fiber.Ctx) error { + return c.Status(200).JSON(fiber.Map{ + "status": "healthy", + }) + }) + + app.Get("/kubernetes", func(c *fiber.Ctx) error { + b, err := clientset.Discovery().RESTClient().Get().AbsPath("/healthz").DoRaw(context.TODO()) + if err != nil { + return err + } + + return c.Status(200).Send(b) + }) + + app.Get("/:ns/:svc", func(c *fiber.Ctx) error { + ns := c.Params("ns") + svc := c.Params("svc") + + pods, unhealthy, err := checkSvcHealth(clientset, ns, svc) + if err != nil { + return err + } + + healthy := pods - unhealthy + + if healthy == 0 { + return c.Status(500).JSON(fiber.Map{ + "status": "unhealthy", + "running": fmt.Sprintf("%d/%d", healthy, pods), + }) + } + + return c.Status(200).JSON(fiber.Map{ + "status": "healthy", + "running": fmt.Sprintf("%d/%d", healthy, pods), + }) + }) + + app.All("/*", func(c *fiber.Ctx) error { + return c.Status(404).JSON(fiber.Map{ + "status": "not found", + }) + }) + + if err := app.Listen(fmt.Sprintf(":%d", env.HttpPort)); err != nil { + return err + } + + return nil +} + +func checkSvcHealth(clientset *kubernetes.Clientset, ns, svcName string) (int, int, error) { + + if svcName == "" { + return 0, 0, fmt.Errorf("Service name must be provided") + } + if ns == "" { + return 0, 0, fmt.Errorf("Namespace must be provided") + } + + // Get the service + svc, err := clientset.CoreV1().Services(ns).Get(context.TODO(), svcName, metav1.GetOptions{}) + if err != nil { + return 0, 0, err + } + + // List the pods using the service selector + labelSelector := metav1.FormatLabelSelector(&metav1.LabelSelector{MatchLabels: svc.Spec.Selector}) + pods, err := clientset.CoreV1().Pods(ns).List(context.TODO(), metav1.ListOptions{LabelSelector: labelSelector}) + if err != nil { + return 0, 0, err + } + + count := 0 + // Check the status of each pod + for _, pod := range pods.Items { + if err := checkPodHealth(&pod); err != nil { + log.Printf("Error: %v", err) + count++ + } + } + + return len(pods.Items), count, nil +} + +func checkPodHealth(pod *v1.Pod) error { + ready := false + for _, condition := range pod.Status.Conditions { + if condition.Type == v1.PodReady && condition.Status == v1.ConditionTrue { + ready = true + break + } + } + + if !ready { + return fmt.Errorf("Pod %s is not healthy", pod.Name) + } + + return nil +} From f0602997929ede9e8e7f8588ce9e9992e07a3df3 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Mon, 7 Oct 2024 13:44:23 +0530 Subject: [PATCH 80/89] feat: pre-rendering of helm templates for kloudlite-agent It will ensure superfast installation of kloudlite-agent, at least on local clusters updates NIX flakes to latest Bumps go to v1.23 --- apps/infra/Taskfile.yml | 4 +- apps/infra/internal/app/app.go | 22 + apps/infra/internal/domain/api.go | 1 + apps/infra/internal/domain/byok-clusters.go | 62 ++- apps/infra/internal/domain/clusters.go | 27 +- apps/infra/internal/domain/domain.go | 7 + .../domain/global-vpn-cluster-connection.go | 83 ++- apps/infra/internal/domain/templates/embed.go | 4 +- .../templates/gateway/deployment.yml.tpl | 514 +++++++++++++++++ apps/infra/internal/domain/templates/types.go | 30 + apps/infra/main.go | 19 + apps/infra/protobufs/infra/infra.pb.go | 28 +- apps/infra/protobufs/infra/infra_grpc.pb.go | 2 +- flake.lock | 12 +- flake.nix | 5 +- go.mod | 187 ++++--- go.sum | 525 +++++++++++++----- pkg/grpc/server.go | 17 +- pkg/helm/client.go | 72 +++ pkg/helm/types.go | 34 ++ pkg/k8s/client.go | 3 - 21 files changed, 1382 insertions(+), 276 deletions(-) create mode 100644 apps/infra/internal/domain/templates/gateway/deployment.yml.tpl create mode 100644 pkg/helm/client.go create mode 100644 pkg/helm/types.go diff --git a/apps/infra/Taskfile.yml b/apps/infra/Taskfile.yml index 5063ebe79..7a2ab6298 100644 --- a/apps/infra/Taskfile.yml +++ b/apps/infra/Taskfile.yml @@ -53,8 +53,8 @@ tasks: - .secrets/env cmds: - go build -o bin/infra . - # - ./bin/infra --dev - - ./bin/infra + - ./bin/infra --dev + # - ./bin/infra gen:constants: cmds: diff --git a/apps/infra/internal/app/app.go b/apps/infra/internal/app/app.go index 039210b57..f163fb1f1 100644 --- a/apps/infra/internal/app/app.go +++ b/apps/infra/internal/app/app.go @@ -229,4 +229,26 @@ var Module = fx.Module( ) }, ), + + fx.Invoke( + func(server httpServer.Server, d domain.Domain, env *env.Env) { + server.Raw().Get("/render/helm/kloudlite-agent/:accountName/:clusterName", func(c *fiber.Ctx) error { + s := c.GetReqHeaders()["Authorization"] + if len(s) != 1 { + return fiber.ErrForbidden + } + + b, err := d.RenderHelmKloudliteAgent(c.Context(), c.Params("accountName"), c.Params("clusterName"), s[0]) + if err != nil { + if err.Error() == "UnAuthorized" { + return fiber.ErrUnauthorized + } + return err + } + + _, err = c.Write(b) + return err + }) + }, + ), ) diff --git a/apps/infra/internal/domain/api.go b/apps/infra/internal/domain/api.go index 4dc22ba41..52848a237 100644 --- a/apps/infra/internal/domain/api.go +++ b/apps/infra/internal/domain/api.go @@ -78,6 +78,7 @@ type Domain interface { ListBYOKCluster(ctx InfraContext, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.BYOKCluster], error) GetBYOKCluster(ctx InfraContext, name string) (*entities.BYOKCluster, error) GetBYOKClusterSetupInstructions(ctx InfraContext, name string, onlyHelmValues bool) ([]BYOKSetupInstruction, error) + RenderHelmKloudliteAgent(ctx context.Context, accountName string, clusterName string, clusterToken string) ([]byte, error) DeleteBYOKCluster(ctx InfraContext, name string) error UpsertBYOKClusterKubeconfig(ctx InfraContext, clusterName string, kubeconfig []byte) error diff --git a/apps/infra/internal/domain/byok-clusters.go b/apps/infra/internal/domain/byok-clusters.go index c01395a12..fe67c7df0 100644 --- a/apps/infra/internal/domain/byok-clusters.go +++ b/apps/infra/internal/domain/byok-clusters.go @@ -1,6 +1,7 @@ package domain import ( + "context" "encoding/base64" "encoding/json" "fmt" @@ -14,6 +15,7 @@ import ( "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/console" "github.com/kloudlite/api/pkg/errors" fn "github.com/kloudlite/api/pkg/functions" + "github.com/kloudlite/api/pkg/helm" "github.com/kloudlite/api/pkg/repos" t "github.com/kloudlite/api/pkg/types" ) @@ -182,7 +184,7 @@ func (d *domain) GetBYOKCluster(ctx InfraContext, name string) (*entities.BYOKCl return nil, errors.NewE(err) } - c, err := d.findBYOKCluster(ctx, name) + c, err := d.findBYOKCluster(ctx, ctx.AccountName, name) if err != nil { return nil, errors.NewE(err) } @@ -196,7 +198,7 @@ type BYOKSetupInstruction struct { } func (d *domain) GetBYOKClusterSetupInstructions(ctx InfraContext, name string, onlyHelmValues bool) ([]BYOKSetupInstruction, error) { - cluster, err := d.findBYOKCluster(ctx, name) + cluster, err := d.findBYOKCluster(ctx, ctx.AccountName, name) if err != nil { return nil, err } @@ -241,7 +243,7 @@ func (d *domain) DeleteBYOKCluster(ctx InfraContext, name string) error { return errors.NewE(err) } - cluster, err := d.findBYOKCluster(ctx, name) + cluster, err := d.findBYOKCluster(ctx, ctx.AccountName, name) if err != nil { return errors.NewE(err) } @@ -269,8 +271,54 @@ func (d *domain) DeleteBYOKCluster(ctx InfraContext, name string) error { return nil } -func (d *domain) findBYOKCluster(ctx InfraContext, clusterName string) (*entities.BYOKCluster, error) { - cluster, err := d.byokClusterRepo.FindOne(ctx, entities.UniqueBYOKClusterFilter(ctx.AccountName, clusterName)) +func (d *domain) RenderHelmKloudliteAgent(ctx context.Context, accountName string, clusterName string, clusterToken string) ([]byte, error) { + cluster, err := d.byokClusterRepo.FindOne(ctx, entities.UniqueBYOKClusterFilter(accountName, clusterName)) + if err != nil { + return nil, errors.NewE(err) + } + + if cluster == nil { + return nil, ErrClusterNotFound + } + + if clusterToken != cluster.ClusterToken { + return nil, fmt.Errorf("UnAuthorized") + } + + values, err := json.Marshal(map[string]any{ + "accountName": accountName, + "clusterName": clusterName, + "clusterToken": cluster.ClusterToken, + "messageOfficeGRPCAddr": d.env.MessageOfficeExternalGrpcAddr, + "kloudliteDNSSuffix": fmt.Sprintf("%s.%s", accountName, d.env.KloudliteDNSSuffix), + }) + if err != nil { + return nil, err + } + + b, err := d.helmClient.TemplateChart(ctx, &helm.ChartSpec{ + ReleaseName: "kloudlite-agent", + Namespace: "kloudlite", + ChartName: "kloudlite/kloudlite-agent", + Version: d.env.KloudliteRelease, + ValuesYaml: string(values), + }) + if err != nil { + return nil, err + } + + namespace := ` +apiVersion: v1 +kind: Namespace +metadata: + name: kloudlite +` + + return []byte(fmt.Sprintf("%s\n---\n%s", namespace, b)), nil +} + +func (d *domain) findBYOKCluster(ctx context.Context, accountName, clusterName string) (*entities.BYOKCluster, error) { + cluster, err := d.byokClusterRepo.FindOne(ctx, entities.UniqueBYOKClusterFilter(accountName, clusterName)) if err != nil { return nil, errors.NewE(err) } @@ -282,7 +330,7 @@ func (d *domain) findBYOKCluster(ctx InfraContext, clusterName string) (*entitie } func (d *domain) UpsertBYOKClusterKubeconfig(ctx InfraContext, clusterName string, kubeconfig []byte) error { - byokCluster, err := d.findBYOKCluster(ctx, clusterName) + byokCluster, err := d.findBYOKCluster(ctx, ctx.AccountName, clusterName) if err != nil { return err } @@ -300,7 +348,7 @@ func (d *domain) UpsertBYOKClusterKubeconfig(ctx InfraContext, clusterName strin } func (d *domain) isBYOKCluster(ctx InfraContext, name string) bool { - cluster, err := d.findBYOKCluster(ctx, name) + cluster, err := d.findBYOKCluster(ctx, ctx.AccountName, name) if err != nil { return false } diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 70d1819fd..82bd87dbe 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -680,15 +680,6 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string "app": resourceName, } - service := &corev1.Service{} - ctx2, cf := func() (context.Context, context.CancelFunc) { - if d.env.IsDev { - return context.WithCancel(ctx) - } - return context.WithTimeout(context.TODO(), 45*time.Second) // 45 seconds, as it might take a while for a cloud provider to allocate IP - }() - defer cf() - wgEndpoint := d.env.KloudliteGlobalVPNDeviceHost wgSvcName := fmt.Sprintf("%s-wg", resourceName) @@ -703,6 +694,18 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string return errors.NewE(err) } + service := &corev1.Service{} + ctx2, cf := func() (context.Context, context.CancelFunc) { + if d.env.IsDev { + return context.WithCancel(ctx) + } + + // FIXME: it might take a while for a cloud provider to allocate IP, but + // till then your HTTP requests might time out + return context.WithTimeout(context.TODO(), 5*time.Second) + }() + defer cf() + for { if ctx2.Err() != nil { return ctx2.Err() @@ -883,7 +886,7 @@ func (d *domain) UpgradeHelmKloudliteAgent(ctx InfraContext, clusterName string) } if cluster.GlobalVPN != nil { - gvpn, err := d.findGlobalVPNConnection(ctx, cluster.Name, *cluster.GlobalVPN) + gvpn, err := d.findGlobalVPNConnection(ctx, cluster.AccountName, cluster.Name, *cluster.GlobalVPN) if err != nil { return errors.NewE(err) } @@ -930,7 +933,7 @@ func (d *domain) GetCluster(ctx InfraContext, name string) (*entities.Cluster, e c, err := d.findCluster(ctx, name) if err != nil { if errors.Is(err, ErrClusterNotFound) { - byokCluster, err := d.findBYOKCluster(ctx, name) + byokCluster, err := d.findBYOKCluster(ctx, ctx.AccountName, name) if err != nil { return nil, err } @@ -1073,7 +1076,7 @@ func (d *domain) OnClusterDeleteMessage(ctx InfraContext, cluster entities.Clust return errors.NewE(err) } - gv, err := d.findGlobalVPNConnection(ctx, xcluster.Name, *xcluster.GlobalVPN) + gv, err := d.findGlobalVPNConnection(ctx, xcluster.AccountName, xcluster.Name, *xcluster.GlobalVPN) if err != nil { return errors.NewE(err) } diff --git a/apps/infra/internal/domain/domain.go b/apps/infra/internal/domain/domain.go index ee6393fc6..20e85f001 100644 --- a/apps/infra/internal/domain/domain.go +++ b/apps/infra/internal/domain/domain.go @@ -22,6 +22,7 @@ import ( "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" fn "github.com/kloudlite/api/pkg/functions" + "github.com/kloudlite/api/pkg/helm" "github.com/kloudlite/api/pkg/repos" "github.com/kloudlite/operator/pkg/constants" "go.uber.org/fx" @@ -67,6 +68,8 @@ type domain struct { msvcTemplates []*entities.MsvcTemplate msvcTemplatesMap map[string]map[string]*entities.MsvcTemplateEntry + + helmClient helm.Client } func (d *domain) resyncToTargetCluster(ctx InfraContext, action types.SyncAction, dispatchAddr *entities.DispatchAddr, obj client.Object, recordVersion int) error { @@ -202,6 +205,8 @@ var Module = fx.Module("domain", moSvc ports.MessageOfficeService, logger *slog.Logger, resourceEventPublisher ResourceEventPublisher, + + helmClient helm.Client, ) (Domain, error) { open, err := os.Open(env.MsvcTemplateFilePath) if err != nil { @@ -265,6 +270,8 @@ var Module = fx.Module("domain", volumeAttachmentRepo: volumeAttachmentRepo, pvRepo: pvRepo, namespaceRepo: namespaceRepo, + + helmClient: helmClient, }, nil }), ) diff --git a/apps/infra/internal/domain/global-vpn-cluster-connection.go b/apps/infra/internal/domain/global-vpn-cluster-connection.go index 78c3dd7e3..7b11f4ab0 100644 --- a/apps/infra/internal/domain/global-vpn-cluster-connection.go +++ b/apps/infra/internal/domain/global-vpn-cluster-connection.go @@ -1,6 +1,7 @@ package domain import ( + "context" "crypto/md5" "fmt" "math" @@ -9,6 +10,7 @@ import ( fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/iputils" + "github.com/kloudlite/api/pkg/wgutils" "github.com/kloudlite/api/apps/infra/internal/entities" fc "github.com/kloudlite/api/apps/infra/internal/entities/field-constants" @@ -17,8 +19,10 @@ import ( "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/pkg/repos" t "github.com/kloudlite/api/pkg/types" + common_types "github.com/kloudlite/operator/apis/common-types" networkingv1 "github.com/kloudlite/operator/apis/networking/v1" "github.com/kloudlite/operator/operators/resource-watcher/types" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -172,13 +176,6 @@ func (d *domain) reconGlobalVPNConnections(ctx InfraContext, vpnName string) err fc.GlobalVPNConnectionSpecPeers: peers, }, })) - // unp, err := d.gvpnConnRepo.Patch(ctx, repos.Filter{ - // fields.AccountName: ctx.AccountName, - // fields.ClusterName: xcc.ClusterName, - // fields.MetadataName: xcc.Name, - // }, - // common.PatchForUpdate(ctx, xcc, common.PatchOpts{XPatch: map[string]any{fc.GlobalVPNConnectionSpecPeers: peers}}), - // ) if err != nil { return errors.NewE(err) } @@ -191,6 +188,25 @@ func (d *domain) reconGlobalVPNConnections(ctx InfraContext, vpnName string) err return nil } +func (d *domain) renderGlobalVPNGatewayConnection(ctx context.Context, accountName, clusterName string) ([]byte, error) { + // cluster, err := d.findBYOKCluster(ctx, accountName, clusterName) + // if err != nil { + // return nil, err + // } + + // gvConn, err := d.findGlobalVPNConnection(ctx, accountName, clusterName, cluster.GlobalVPN) + // if err != nil { + // return nil, err + // } + // + // b, err := templates.Read(templates.ClusterGatewayDeploymentTemplate) + // if err != nil { + // return nil, err + // } + + return nil, nil +} + func (d *domain) claimNextClusterCIDR(ctx InfraContext, clusterName string, gvpnName string) (string, error) { var cidrFilter *repos.MatchFilter for { @@ -325,13 +341,27 @@ func (d *domain) createGlobalVPNConnection(ctx InfraContext, gvpnConn entities.G IPAddr: gvpnDevice.IPAddr, } + privateKey, publicKey, err := wgutils.GenerateKeyPair() + if err != nil { + return nil, err + } + gvpnConn.Gateway.Spec = networkingv1.GatewaySpec{ - GlobalIP: gvpnDevice.IPAddr, - ClusterCIDR: clusterCIDR, - SvcCIDR: svcCIDR, - DNSSuffix: fmt.Sprintf("svc.%s.local", gvpnConn.ClusterName), - Peers: nil, + GlobalIP: gvpnDevice.IPAddr, + TargetNamespace: "kl-gateway", + ClusterCIDR: clusterCIDR, + SvcCIDR: svcCIDR, + DNSSuffix: fmt.Sprintf("svc.%s.local", gvpnConn.ClusterName), + // FIXME: dispatch secret from api to cluster + WireguardKeysRef: common_types.LocalObjectReference{ + Name: fmt.Sprintf("%s-wg", gvpn.Name), + }, } + gvpnConn.ParsedWgParams = &networkingv1.WireguardKeys{ + PrivateKey: privateKey, + PublicKey: publicKey, + } + gvpnConn.Gateway.EnsureGVK() gv, err := d.gvpnConnRepo.Create(ctx, &gvpnConn) @@ -339,15 +369,36 @@ func (d *domain) createGlobalVPNConnection(ctx InfraContext, gvpnConn entities.G return nil, err } - if err := d.applyGlobalVPNConnection(ctx, gv); err != nil { + if err := d.resDispatcher.ApplyToTargetCluster(ctx, gvpnConn.DispatchAddr, &corev1.Secret{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Secret", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: gvpnConn.Spec.WireguardKeysRef.Name, + Namespace: gvpnConn.Spec.TargetNamespace, + }, + Data: map[string][]byte{ + "public_key": []byte(publicKey), + "private_key": []byte(privateKey), + }, + }, gvpn.RecordVersion); err != nil { + return nil, err + } + + if err := d.reconGlobalVPNConnections(ctx, gvpn.Name); err != nil { return nil, err } + // if err := d.applyGlobalVPNConnection(ctx, gv); err != nil { + // return nil, err + // } + return gv, nil } func (d *domain) deleteGlobalVPNConnection(ctx InfraContext, clusterName string, gvpnName string) error { - gv, err := d.findGlobalVPNConnection(ctx, clusterName, gvpnName) + gv, err := d.findGlobalVPNConnection(ctx, ctx.AccountName, clusterName, gvpnName) if err != nil { if !errors.OfType[errors.ErrNotFound](err) { return errors.NewE(err) @@ -448,9 +499,9 @@ func (d *domain) applyGlobalVPNConnection(ctx InfraContext, gvpn *entities.Globa return d.resDispatcher.ApplyToTargetCluster(ctx, gvpn.DispatchAddr, &gvpn.Gateway, gvpn.RecordVersion) } -func (d *domain) findGlobalVPNConnection(ctx InfraContext, clusterName string, groupName string) (*entities.GlobalVPNConnection, error) { +func (d *domain) findGlobalVPNConnection(ctx context.Context, accountName string, clusterName string, groupName string) (*entities.GlobalVPNConnection, error) { cc, err := d.gvpnConnRepo.FindOne(ctx, repos.Filter{ - fields.AccountName: ctx.AccountName, + fields.AccountName: accountName, fields.ClusterName: clusterName, fields.MetadataName: groupName, }) diff --git a/apps/infra/internal/domain/templates/embed.go b/apps/infra/internal/domain/templates/embed.go index 1f846663a..1fb30e460 100644 --- a/apps/infra/internal/domain/templates/embed.go +++ b/apps/infra/internal/domain/templates/embed.go @@ -15,7 +15,9 @@ type templateFile string const ( HelmKloudliteAgent templateFile = "./helm-charts-kloudlite-agent.yml.tpl" GlobalVPNKloudliteDeviceTemplate templateFile = "./global-vpn-kloudlite-device.yml.tpl" - GatewayServiceTemplate templateFile = "./kloudlite-gateway-svc.yml.tpl" + GatewayServiceTemplate templateFile = "./kloudlite-gateway-svc.yml.tpl" + + ClusterGatewayDeploymentTemplate templateFile = "./gateway/deployment.yml.tpl" ) func Read(t templateFile) ([]byte, error) { diff --git a/apps/infra/internal/domain/templates/gateway/deployment.yml.tpl b/apps/infra/internal/domain/templates/gateway/deployment.yml.tpl new file mode 100644 index 000000000..48990f63f --- /dev/null +++ b/apps/infra/internal/domain/templates/gateway/deployment.yml.tpl @@ -0,0 +1,514 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: kl-gateway +--- + +apiVersion: v1 +kind: Namespace +metadata: + name: {{.GatewayWgSecret}} + namespace: kl-gateway +data: + private_key: "{{.GatewayPrivateKey}}" + public_key: "{{.GatewayPublicKey}}" +--- +{{- $webhookServerHttpPort := "8443" }} +{{- $gatewayAdminHttpPort := "8080" }} +{{- $gatewayWgPort := "51820" }} + +{{- $dnsUDPPortWg := "53" }} +{{- $dnsUDPPortLocal := "54" }} +{{- $dnsHttpPort := "8082" }} +{{- $kubectlProxyHttpPort := "8383" }} + +{{- $serviceBindControllerHealtCheckPort := "8081" }} +{{- $serviceBindControllerMetricsPort := "9090" }} + +{{- /* INFO: should refrain from using it, as it requires coredns to be up and running */}} +{{- /* {{- $gatewayAdminApiAddr := printf "http://%s.%s.svc.cluster.local:%s" .Name .Namespace $gatewayAdminHttpPort }} */}} + +{{- define "pod-ip" -}} +- name: POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP +{{- end -}} + +apiVersion: apps/v1 +kind: Deployment +metadata: {{.ObjectMeta | toJson }} +spec: + selector: + matchLabels: &labels + kloudlite.io/deployment.name: {{.ObjectMeta.Name}} + template: + metadata: + labels: + kloudlite.io/deployment.name: {{.ObjectMeta.Name}} + annotations: + kloudlite.io/gateway-extra-peers-hash: {{.GatewayWgExtraPeersHash}} + spec: + serviceAccountName: {{.ServiceAccountName}} + initContainers: + - name: wg-hostnames + image: ghcr.io/kloudlite/hub/wireguard:latest + imagePullPolicy: IfNotPresent + command: + - sh + - -c + - | + cat > /etc/wireguard/wg0.conf < Date: Tue, 8 Oct 2024 07:51:28 +0530 Subject: [PATCH 81/89] deps: updates gqlgen, and generates graphql schemas --- .../app/graph/byokcluster.resolvers.go | 2 +- .../graph/cloudprovidersecret.resolvers.go | 56 +- .../internal/app/graph/cluster.resolvers.go | 2 +- .../app/graph/common-types.resolvers.go | 2 +- .../app/graph/domainentry.resolvers.go | 2 +- .../internal/app/graph/generated/generated.go | 3716 ++++++++++++----- .../internal/app/graph/globalvpn.resolvers.go | 11 +- .../app/graph/globalvpndevice.resolvers.go | 2 +- .../app/graph/helmrelease.resolvers.go | 2 +- .../internal/app/graph/model/models_gen.go | 126 +- .../internal/app/graph/namespace.resolvers.go | 2 +- .../internal/app/graph/node.resolvers.go | 2 +- .../internal/app/graph/nodepool.resolvers.go | 2 +- .../app/graph/persistentvolume.resolvers.go | 2 +- .../graph/persistentvolumeclaim.resolvers.go | 2 +- .../internal/app/graph/schema.resolvers.go | 48 +- .../app/graph/volumeattachment.resolvers.go | 2 +- go.mod | 10 +- go.sum | 73 +- 19 files changed, 2942 insertions(+), 1122 deletions(-) diff --git a/apps/infra/internal/app/graph/byokcluster.resolvers.go b/apps/infra/internal/app/graph/byokcluster.resolvers.go index 617515ec1..a88a79b2d 100644 --- a/apps/infra/internal/app/graph/byokcluster.resolvers.go +++ b/apps/infra/internal/app/graph/byokcluster.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/infra/internal/app/graph/cloudprovidersecret.resolvers.go b/apps/infra/internal/app/graph/cloudprovidersecret.resolvers.go index 4d093cfe1..185d25fb6 100644 --- a/apps/infra/internal/app/graph/cloudprovidersecret.resolvers.go +++ b/apps/infra/internal/app/graph/cloudprovidersecret.resolvers.go @@ -2,10 +2,11 @@ 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 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" + "fmt" "github.com/kloudlite/api/pkg/errors" "time" @@ -18,13 +19,9 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// Aws is the resolver for the aws field. -func (r *cloudProviderSecretResolver) Aws(ctx context.Context, obj *entities.CloudProviderSecret) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials, error) { - if obj == nil || obj.CreationTime.IsZero() { - return nil, errors.Newf("CloudProviderSecret object is nil") - } - - return fn.JsonConvertP[model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials](obj.AWS) +// AWS is the resolver for the aws field. +func (r *cloudProviderSecretResolver) AWS(ctx context.Context, obj *entities.CloudProviderSecret) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials, error) { + panic(fmt.Errorf("not implemented: AWS - aws")) } // CloudProviderName is the resolver for the cloudProviderName field. @@ -40,9 +37,9 @@ func (r *cloudProviderSecretResolver) CreationTime(ctx context.Context, obj *ent return obj.CreationTime.Format(time.RFC3339), nil } -// Gcp is the resolver for the gcp field. -func (r *cloudProviderSecretResolver) Gcp(ctx context.Context, obj *entities.CloudProviderSecret) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials, error) { - return fn.JsonConvertP[model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials](obj.GCP) +// GCP is the resolver for the gcp field. +func (r *cloudProviderSecretResolver) GCP(ctx context.Context, obj *entities.CloudProviderSecret) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials, error) { + panic(fmt.Errorf("not implemented: GCP - gcp")) } // ID is the resolver for the id field. @@ -63,9 +60,9 @@ func (r *cloudProviderSecretResolver) UpdateTime(ctx context.Context, obj *entit return obj.UpdateTime.Format(time.RFC3339), nil } -// Aws is the resolver for the aws field. -func (r *cloudProviderSecretInResolver) Aws(ctx context.Context, obj *entities.CloudProviderSecret, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentialsIn) error { - return fn.JsonConversion(data, &obj.AWS) +// AWS is the resolver for the aws field. +func (r *cloudProviderSecretInResolver) AWS(ctx context.Context, obj *entities.CloudProviderSecret, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentialsIn) error { + panic(fmt.Errorf("not implemented: AWS - aws")) } // CloudProviderName is the resolver for the cloudProviderName field. @@ -78,9 +75,9 @@ func (r *cloudProviderSecretInResolver) CloudProviderName(ctx context.Context, o return nil } -// Gcp is the resolver for the gcp field. -func (r *cloudProviderSecretInResolver) Gcp(ctx context.Context, obj *entities.CloudProviderSecret, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentialsIn) error { - return fn.JsonConversion(data, &obj.GCP) +// GCP is the resolver for the gcp field. +func (r *cloudProviderSecretInResolver) GCP(ctx context.Context, obj *entities.CloudProviderSecret, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentialsIn) error { + panic(fmt.Errorf("not implemented: GCP - gcp")) } // Metadata is the resolver for the metadata field. @@ -100,3 +97,28 @@ func (r *Resolver) CloudProviderSecretIn() generated.CloudProviderSecretInResolv type cloudProviderSecretResolver struct{ *Resolver } type cloudProviderSecretInResolver struct{ *Resolver } + +// !!! WARNING !!! +// The code below was going to be deleted when updating resolvers. It has been copied here so you have +// one last chance to move it out of harms way if you want. There are two reasons this happens: +// - When renaming or deleting a resolver the old code will be put in here. You can safely delete +// it when you're done. +// - You have helper methods in this file. Move them out to keep these resolver files clean. +/* + func (r *cloudProviderSecretResolver) Aws(ctx context.Context, obj *entities.CloudProviderSecret) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials, error) { + if obj == nil || obj.CreationTime.IsZero() { + return nil, errors.Newf("CloudProviderSecret object is nil") + } + + return fn.JsonConvertP[model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials](obj.AWS) +} +func (r *cloudProviderSecretResolver) Gcp(ctx context.Context, obj *entities.CloudProviderSecret) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials, error) { + return fn.JsonConvertP[model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials](obj.GCP) +} +func (r *cloudProviderSecretInResolver) Aws(ctx context.Context, obj *entities.CloudProviderSecret, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentialsIn) error { + return fn.JsonConversion(data, &obj.AWS) +} +func (r *cloudProviderSecretInResolver) Gcp(ctx context.Context, obj *entities.CloudProviderSecret, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentialsIn) error { + return fn.JsonConversion(data, &obj.GCP) +} +*/ diff --git a/apps/infra/internal/app/graph/cluster.resolvers.go b/apps/infra/internal/app/graph/cluster.resolvers.go index 491752b11..36a410d24 100644 --- a/apps/infra/internal/app/graph/cluster.resolvers.go +++ b/apps/infra/internal/app/graph/cluster.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/infra/internal/app/graph/common-types.resolvers.go b/apps/infra/internal/app/graph/common-types.resolvers.go index ea5ce8f54..f770f9edc 100644 --- a/apps/infra/internal/app/graph/common-types.resolvers.go +++ b/apps/infra/internal/app/graph/common-types.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/infra/internal/app/graph/domainentry.resolvers.go b/apps/infra/internal/app/graph/domainentry.resolvers.go index dc1325dcf..d395733bd 100644 --- a/apps/infra/internal/app/graph/domainentry.resolvers.go +++ b/apps/infra/internal/app/graph/domainentry.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/infra/internal/app/graph/generated/generated.go b/apps/infra/internal/app/graph/generated/generated.go index c560cf602..569eb34d1 100644 --- a/apps/infra/internal/app/graph/generated/generated.go +++ b/apps/infra/internal/app/graph/generated/generated.go @@ -136,13 +136,13 @@ type ComplexityRoot struct { } CloudProviderSecret struct { + AWS func(childComplexity int) int AccountName func(childComplexity int) int - Aws func(childComplexity int) int CloudProviderName func(childComplexity int) int CreatedBy func(childComplexity int) int CreationTime func(childComplexity int) int DisplayName func(childComplexity int) int - Gcp func(childComplexity int) int + GCP func(childComplexity int) int ID func(childComplexity int) int LastUpdatedBy func(childComplexity int) int MarkedForDeletion func(childComplexity int) int @@ -236,7 +236,7 @@ type ComplexityRoot struct { } Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams struct { - AwsAccountID func(childComplexity int) int + AWSAccountID func(childComplexity int) int CfParamTrustedArn func(childComplexity int) int ExternalID func(childComplexity int) int RoleArn func(childComplexity int) int @@ -408,17 +408,17 @@ type ComplexityRoot struct { } Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec struct { + AWS func(childComplexity int) int AccountID func(childComplexity int) int AccountName func(childComplexity int) int AvailabilityMode func(childComplexity int) int - Aws func(childComplexity int) int BackupToS3Enabled func(childComplexity int) int CloudProvider func(childComplexity int) int CloudflareEnabled func(childComplexity int) int ClusterInternalDNSHost func(childComplexity int) int ClusterServiceCidr func(childComplexity int) int ClusterTokenRef func(childComplexity int) int - Gcp func(childComplexity int) int + GCP func(childComplexity int) int KloudliteRelease func(childComplexity int) int MessageQueueTopicName func(childComplexity int) int Output func(childComplexity int) int @@ -428,7 +428,7 @@ type ComplexityRoot struct { Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig struct { CredentialsRef func(childComplexity int) int - GcpProjectID func(childComplexity int) int + GCPProjectID func(childComplexity int) int MasterNodes func(childComplexity int) int Region func(childComplexity int) int ServiceAccount func(childComplexity int) int @@ -446,7 +446,7 @@ type ComplexityRoot struct { BootVolumeSize func(childComplexity int) int BootVolumeType func(childComplexity int) int Credentials func(childComplexity int) int - GcpProjectID func(childComplexity int) int + GCPProjectID func(childComplexity int) int MachineType func(childComplexity int) int Nodes func(childComplexity int) int PoolType func(childComplexity int) int @@ -473,9 +473,9 @@ type ComplexityRoot struct { } Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec struct { - Aws func(childComplexity int) int + AWS func(childComplexity int) int CloudProvider func(childComplexity int) int - Gcp func(childComplexity int) int + GCP func(childComplexity int) int MaxCount func(childComplexity int) int MinCount func(childComplexity int) int NodeLabels func(childComplexity int) int @@ -891,8 +891,8 @@ type ComplexityRoot struct { } K8s__io___api___core___v1__PersistentVolumeSpec struct { + AWSElasticBlockStore func(childComplexity int) int AccessModes func(childComplexity int) int - AwsElasticBlockStore func(childComplexity int) int AzureDisk func(childComplexity int) int AzureFile func(childComplexity int) int Capacity func(childComplexity int) int @@ -1308,7 +1308,7 @@ type ComplexityRoot struct { } Query struct { - InfraCheckAwsAccess func(childComplexity int, cloudproviderName string) int + InfraCheckAWSAccess func(childComplexity int, cloudproviderName string) int InfraCheckNameAvailability func(childComplexity int, resType domain.ResType, clusterName *string, name string) int InfraGetBYOKCluster func(childComplexity int, name string) int InfraGetCluster func(childComplexity int, name string) int @@ -1386,12 +1386,12 @@ type BYOKClusterResolver interface { ClusterDNSSuffix(ctx context.Context, obj *entities.BYOKCluster) (string, error) } type CloudProviderSecretResolver interface { - Aws(ctx context.Context, obj *entities.CloudProviderSecret) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials, error) + AWS(ctx context.Context, obj *entities.CloudProviderSecret) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials, error) CloudProviderName(ctx context.Context, obj *entities.CloudProviderSecret) (model.GithubComKloudliteOperatorApisCommonTypesCloudProvider, error) CreationTime(ctx context.Context, obj *entities.CloudProviderSecret) (string, error) - Gcp(ctx context.Context, obj *entities.CloudProviderSecret) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials, error) + GCP(ctx context.Context, obj *entities.CloudProviderSecret) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentials, error) ID(ctx context.Context, obj *entities.CloudProviderSecret) (repos.ID, error) UpdateTime(ctx context.Context, obj *entities.CloudProviderSecret) (string, error) @@ -1569,7 +1569,7 @@ type QueryResolver interface { InfraGetProviderSecret(ctx context.Context, name string) (*entities.CloudProviderSecret, error) InfraListDomainEntries(ctx context.Context, search *model.SearchDomainEntry, pagination *repos.CursorPagination) (*model.DomainEntryPaginatedRecords, error) InfraGetDomainEntry(ctx context.Context, domainName string) (*entities.DomainEntry, error) - InfraCheckAwsAccess(ctx context.Context, cloudproviderName string) (*model.CheckAwsAccessOutput, error) + InfraCheckAWSAccess(ctx context.Context, cloudproviderName string) (*model.CheckAWSAccessOutput, error) InfraListHelmReleases(ctx context.Context, clusterName string, search *model.SearchHelmRelease, pagination *repos.CursorPagination) (*model.HelmReleasePaginatedRecords, error) InfraGetHelmRelease(ctx context.Context, clusterName string, name string) (*entities.HelmRelease, error) InfraListManagedServiceTemplates(ctx context.Context) ([]*entities.MsvcTemplate, error) @@ -1600,10 +1600,10 @@ type BYOKClusterInResolver interface { Visibility(ctx context.Context, obj *entities.BYOKCluster, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesClusterVisbilityIn) error } type CloudProviderSecretInResolver interface { - Aws(ctx context.Context, obj *entities.CloudProviderSecret, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentialsIn) error + AWS(ctx context.Context, obj *entities.CloudProviderSecret, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentialsIn) error CloudProviderName(ctx context.Context, obj *entities.CloudProviderSecret, data model.GithubComKloudliteOperatorApisCommonTypesCloudProvider) error - Gcp(ctx context.Context, obj *entities.CloudProviderSecret, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentialsIn) error + GCP(ctx context.Context, obj *entities.CloudProviderSecret, data *model.GithubComKloudliteAPIAppsInfraInternalEntitiesGCPSecretCredentialsIn) error Metadata(ctx context.Context, obj *entities.CloudProviderSecret, data *v1.ObjectMeta) error } type ClusterInResolver interface { @@ -1874,19 +1874,19 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.CheckNameAvailabilityOutput.SuggestedNames(childComplexity), true - case "CloudProviderSecret.accountName": - if e.complexity.CloudProviderSecret.AccountName == nil { + case "CloudProviderSecret.aws": + if e.complexity.CloudProviderSecret.AWS == nil { break } - return e.complexity.CloudProviderSecret.AccountName(childComplexity), true + return e.complexity.CloudProviderSecret.AWS(childComplexity), true - case "CloudProviderSecret.aws": - if e.complexity.CloudProviderSecret.Aws == nil { + case "CloudProviderSecret.accountName": + if e.complexity.CloudProviderSecret.AccountName == nil { break } - return e.complexity.CloudProviderSecret.Aws(childComplexity), true + return e.complexity.CloudProviderSecret.AccountName(childComplexity), true case "CloudProviderSecret.cloudProviderName": if e.complexity.CloudProviderSecret.CloudProviderName == nil { @@ -1917,11 +1917,11 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.CloudProviderSecret.DisplayName(childComplexity), true case "CloudProviderSecret.gcp": - if e.complexity.CloudProviderSecret.Gcp == nil { + if e.complexity.CloudProviderSecret.GCP == nil { break } - return e.complexity.CloudProviderSecret.Gcp(childComplexity), true + return e.complexity.CloudProviderSecret.GCP(childComplexity), true case "CloudProviderSecret.id": if e.complexity.CloudProviderSecret.ID == nil { @@ -2344,11 +2344,11 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.EncodedValue.Value(childComplexity), true case "Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams.awsAccountId": - if e.complexity.Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams.AwsAccountID == nil { + if e.complexity.Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams.AWSAccountID == nil { break } - return e.complexity.Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams.AwsAccountID(childComplexity), true + return e.complexity.Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams.AWSAccountID(childComplexity), true case "Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams.cfParamTrustedARN": if e.complexity.Github__com___kloudlite___api___apps___infra___internal___entities__AWSAssumeRoleParams.CfParamTrustedArn == nil { @@ -3064,6 +3064,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterOutput.SecretName(childComplexity), true + case "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.aws": + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.AWS == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.AWS(childComplexity), true + case "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.accountId": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.AccountID == nil { break @@ -3085,13 +3092,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.AvailabilityMode(childComplexity), true - case "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.aws": - if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.Aws == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.Aws(childComplexity), true - case "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.backupToS3Enabled": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.BackupToS3Enabled == nil { break @@ -3135,11 +3135,11 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.ClusterTokenRef(childComplexity), true case "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.gcp": - if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.Gcp == nil { + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.GCP == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.Gcp(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.GCP(childComplexity), true case "Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.kloudliteRelease": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__ClusterSpec.KloudliteRelease == nil { @@ -3184,11 +3184,11 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig.CredentialsRef(childComplexity), true case "Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig.gcpProjectID": - if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig.GcpProjectID == nil { + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig.GCPProjectID == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig.GcpProjectID(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig.GCPProjectID(childComplexity), true case "Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig.masterNodes": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig.MasterNodes == nil { @@ -3268,11 +3268,11 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig.Credentials(childComplexity), true case "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig.gcpProjectID": - if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig.GcpProjectID == nil { + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig.GCPProjectID == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig.GcpProjectID(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig.GCPProjectID(childComplexity), true case "Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig.machineType": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig.MachineType == nil { @@ -3373,11 +3373,11 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__MasterNodeProps.Role(childComplexity), true case "Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.aws": - if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.Aws == nil { + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.AWS == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.Aws(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.AWS(childComplexity), true case "Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.cloudProvider": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.CloudProvider == nil { @@ -3387,11 +3387,11 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.CloudProvider(childComplexity), true case "Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.gcp": - if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.Gcp == nil { + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.GCP == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.Gcp(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.GCP(childComplexity), true case "Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.maxCount": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__NodePoolSpec.MaxCount == nil { @@ -5185,19 +5185,19 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.K8s__io___api___core___v1__PersistentVolumeClaimStatus.Phase(childComplexity), true - case "K8s__io___api___core___v1__PersistentVolumeSpec.accessModes": - if e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.AccessModes == nil { + case "K8s__io___api___core___v1__PersistentVolumeSpec.awsElasticBlockStore": + if e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.AWSElasticBlockStore == nil { break } - return e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.AccessModes(childComplexity), true + return e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.AWSElasticBlockStore(childComplexity), true - case "K8s__io___api___core___v1__PersistentVolumeSpec.awsElasticBlockStore": - if e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.AwsElasticBlockStore == nil { + case "K8s__io___api___core___v1__PersistentVolumeSpec.accessModes": + if e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.AccessModes == nil { break } - return e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.AwsElasticBlockStore(childComplexity), true + return e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.AccessModes(childComplexity), true case "K8s__io___api___core___v1__PersistentVolumeSpec.azureDisk": if e.complexity.K8s__io___api___core___v1__PersistentVolumeSpec.AzureDisk == nil { @@ -7227,7 +7227,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PersistentVolumePaginatedRecords.TotalCount(childComplexity), true case "Query.infra_checkAwsAccess": - if e.complexity.Query.InfraCheckAwsAccess == nil { + if e.complexity.Query.InfraCheckAWSAccess == nil { break } @@ -7236,7 +7236,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return 0, false } - return e.complexity.Query.InfraCheckAwsAccess(childComplexity, args["cloudproviderName"].(string)), true + return e.complexity.Query.InfraCheckAWSAccess(childComplexity, args["cloudproviderName"].(string)), true case "Query.infra_checkNameAvailability": if e.complexity.Query.InfraCheckNameAvailability == nil { @@ -10210,7 +10210,7 @@ input VolumeAttachmentIn { directive @interfaceObject on OBJECT directive @link(import: [String!], url: String!) repeatable on SCHEMA directive @override(from: String!, label: String) on FIELD_DEFINITION - directive @policy(policies: [[federation__Policy!]!]!) on + directive @policy(policies: [[federation__Policy!]!]!) on | FIELD_DEFINITION | OBJECT | INTERFACE @@ -10218,7 +10218,7 @@ input VolumeAttachmentIn { | ENUM directive @provides(fields: FieldSet!) on FIELD_DEFINITION directive @requires(fields: FieldSet!) on FIELD_DEFINITION - directive @requiresScopes(scopes: [[federation__Scope!]!]!) on + directive @requiresScopes(scopes: [[federation__Scope!]!]!) on | FIELD_DEFINITION | OBJECT | INTERFACE @@ -10260,1208 +10260,2879 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...) func (ec *executionContext) field_Mutation_infra_createBYOKCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.BYOKCluster - if tmp, ok := rawArgs["cluster"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cluster")) - arg0, err = ec.unmarshalNBYOKClusterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐBYOKCluster(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_createBYOKCluster_argsCluster(ctx, rawArgs) + if err != nil { + return nil, err } args["cluster"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_createBYOKCluster_argsCluster( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.BYOKCluster, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["cluster"] + if !ok { + var zeroVal entities.BYOKCluster + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("cluster")) + if tmp, ok := rawArgs["cluster"]; ok { + return ec.unmarshalNBYOKClusterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐBYOKCluster(ctx, tmp) + } + + var zeroVal entities.BYOKCluster + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_createCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.Cluster - if tmp, ok := rawArgs["cluster"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cluster")) - arg0, err = ec.unmarshalNClusterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCluster(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_createCluster_argsCluster(ctx, rawArgs) + if err != nil { + return nil, err } args["cluster"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_createCluster_argsCluster( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.Cluster, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["cluster"] + if !ok { + var zeroVal entities.Cluster + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("cluster")) + if tmp, ok := rawArgs["cluster"]; ok { + return ec.unmarshalNClusterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCluster(ctx, tmp) + } + + var zeroVal entities.Cluster + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_createDomainEntry_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.DomainEntry - if tmp, ok := rawArgs["domainEntry"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("domainEntry")) - arg0, err = ec.unmarshalNDomainEntryIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_createDomainEntry_argsDomainEntry(ctx, rawArgs) + if err != nil { + return nil, err } args["domainEntry"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_createDomainEntry_argsDomainEntry( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.DomainEntry, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["domainEntry"] + if !ok { + var zeroVal entities.DomainEntry + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("domainEntry")) + if tmp, ok := rawArgs["domainEntry"]; ok { + return ec.unmarshalNDomainEntryIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx, tmp) + } + + var zeroVal entities.DomainEntry + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_createGlobalVPNDevice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.GlobalVPNDevice - if tmp, ok := rawArgs["gvpnDevice"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpnDevice")) - arg0, err = ec.unmarshalNGlobalVPNDeviceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐGlobalVPNDevice(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_createGlobalVPNDevice_argsGvpnDevice(ctx, rawArgs) + if err != nil { + return nil, err } args["gvpnDevice"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_createGlobalVPNDevice_argsGvpnDevice( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.GlobalVPNDevice, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["gvpnDevice"] + if !ok { + var zeroVal entities.GlobalVPNDevice + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpnDevice")) + if tmp, ok := rawArgs["gvpnDevice"]; ok { + return ec.unmarshalNGlobalVPNDeviceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐGlobalVPNDevice(ctx, tmp) + } + + var zeroVal entities.GlobalVPNDevice + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_createGlobalVPN_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.GlobalVPN - if tmp, ok := rawArgs["gvpn"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpn")) - arg0, err = ec.unmarshalNGlobalVPNIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐGlobalVPN(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_createGlobalVPN_argsGvpn(ctx, rawArgs) + if err != nil { + return nil, err } args["gvpn"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_createGlobalVPN_argsGvpn( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.GlobalVPN, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["gvpn"] + if !ok { + var zeroVal entities.GlobalVPN + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpn")) + if tmp, ok := rawArgs["gvpn"]; ok { + return ec.unmarshalNGlobalVPNIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐGlobalVPN(ctx, tmp) + } + + var zeroVal entities.GlobalVPN + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_createHelmRelease_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_createHelmRelease_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 entities.HelmRelease - if tmp, ok := rawArgs["release"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("release")) - arg1, err = ec.unmarshalNHelmReleaseIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐHelmRelease(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_infra_createHelmRelease_argsRelease(ctx, rawArgs) + if err != nil { + return nil, err } args["release"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_infra_createHelmRelease_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_createHelmRelease_argsRelease( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.HelmRelease, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["release"] + if !ok { + var zeroVal entities.HelmRelease + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("release")) + if tmp, ok := rawArgs["release"]; ok { + return ec.unmarshalNHelmReleaseIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐHelmRelease(ctx, tmp) + } + + var zeroVal entities.HelmRelease + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_createNodePool_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_createNodePool_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 entities.NodePool - if tmp, ok := rawArgs["pool"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pool")) - arg1, err = ec.unmarshalNNodePoolIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐNodePool(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_infra_createNodePool_argsPool(ctx, rawArgs) + if err != nil { + return nil, err } args["pool"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_infra_createNodePool_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_createNodePool_argsPool( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.NodePool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pool"] + if !ok { + var zeroVal entities.NodePool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pool")) + if tmp, ok := rawArgs["pool"]; ok { + return ec.unmarshalNNodePoolIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐNodePool(ctx, tmp) + } + + var zeroVal entities.NodePool + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_createProviderSecret_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.CloudProviderSecret - if tmp, ok := rawArgs["secret"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("secret")) - arg0, err = ec.unmarshalNCloudProviderSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCloudProviderSecret(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_createProviderSecret_argsSecret(ctx, rawArgs) + if err != nil { + return nil, err } args["secret"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_createProviderSecret_argsSecret( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.CloudProviderSecret, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["secret"] + if !ok { + var zeroVal entities.CloudProviderSecret + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("secret")) + if tmp, ok := rawArgs["secret"]; ok { + return ec.unmarshalNCloudProviderSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCloudProviderSecret(ctx, tmp) + } + + var zeroVal entities.CloudProviderSecret + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_deleteBYOKCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_deleteBYOKCluster_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_deleteBYOKCluster_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_deleteCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_deleteCluster_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_deleteCluster_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_deleteDomainEntry_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["domainName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("domainName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_deleteDomainEntry_argsDomainName(ctx, rawArgs) + if err != nil { + return nil, err } args["domainName"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_deleteDomainEntry_argsDomainName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["domainName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("domainName")) + if tmp, ok := rawArgs["domainName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_deleteGlobalVPNDevice_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["gvpn"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpn")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_deleteGlobalVPNDevice_argsGvpn(ctx, rawArgs) + if err != nil { + return nil, err } args["gvpn"] = arg0 - var arg1 string - if tmp, ok := rawArgs["deviceName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_infra_deleteGlobalVPNDevice_argsDeviceName(ctx, rawArgs) + if err != nil { + return nil, err } args["deviceName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_infra_deleteGlobalVPNDevice_argsGvpn( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["gvpn"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpn")) + if tmp, ok := rawArgs["gvpn"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_deleteGlobalVPNDevice_argsDeviceName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["deviceName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) + if tmp, ok := rawArgs["deviceName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_deleteGlobalVPN_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_deleteGlobalVPN_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_deleteGlobalVPN_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_deleteHelmRelease_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_deleteHelmRelease_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["releaseName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("releaseName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_infra_deleteHelmRelease_argsReleaseName(ctx, rawArgs) + if err != nil { + return nil, err } args["releaseName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_infra_deleteHelmRelease_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_deleteHelmRelease_argsReleaseName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["releaseName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("releaseName")) + if tmp, ok := rawArgs["releaseName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_deleteNodePool_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_deleteNodePool_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["poolName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("poolName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_infra_deleteNodePool_argsPoolName(ctx, rawArgs) + if err != nil { + return nil, err } args["poolName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_infra_deleteNodePool_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_deleteNodePool_argsPoolName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["poolName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("poolName")) + if tmp, ok := rawArgs["poolName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_deletePV_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_deletePV_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["pvName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pvName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_infra_deletePV_argsPvName(ctx, rawArgs) + if err != nil { + return nil, err } args["pvName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_infra_deletePV_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_deletePV_argsPvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pvName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pvName")) + if tmp, ok := rawArgs["pvName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_deleteProviderSecret_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["secretName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("secretName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_deleteProviderSecret_argsSecretName(ctx, rawArgs) + if err != nil { + return nil, err } args["secretName"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_deleteProviderSecret_argsSecretName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["secretName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("secretName")) + if tmp, ok := rawArgs["secretName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_updateBYOKCluster_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_updateBYOKCluster_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["displayName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_infra_updateBYOKCluster_argsDisplayName(ctx, rawArgs) + if err != nil { + return nil, err } args["displayName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_infra_updateBYOKCluster_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_updateBYOKCluster_argsDisplayName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["displayName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + if tmp, ok := rawArgs["displayName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_updateCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.Cluster - if tmp, ok := rawArgs["cluster"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cluster")) - arg0, err = ec.unmarshalNClusterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCluster(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_updateCluster_argsCluster(ctx, rawArgs) + if err != nil { + return nil, err } args["cluster"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_updateCluster_argsCluster( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.Cluster, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["cluster"] + if !ok { + var zeroVal entities.Cluster + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("cluster")) + if tmp, ok := rawArgs["cluster"]; ok { + return ec.unmarshalNClusterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCluster(ctx, tmp) + } + + var zeroVal entities.Cluster + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_updateDomainEntry_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.DomainEntry - if tmp, ok := rawArgs["domainEntry"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("domainEntry")) - arg0, err = ec.unmarshalNDomainEntryIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_updateDomainEntry_argsDomainEntry(ctx, rawArgs) + if err != nil { + return nil, err } args["domainEntry"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_updateDomainEntry_argsDomainEntry( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.DomainEntry, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["domainEntry"] + if !ok { + var zeroVal entities.DomainEntry + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("domainEntry")) + if tmp, ok := rawArgs["domainEntry"]; ok { + return ec.unmarshalNDomainEntryIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx, tmp) + } + + var zeroVal entities.DomainEntry + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_updateGlobalVPNDevice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.GlobalVPNDevice - if tmp, ok := rawArgs["gvpnDevice"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpnDevice")) - arg0, err = ec.unmarshalNGlobalVPNDeviceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐGlobalVPNDevice(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_updateGlobalVPNDevice_argsGvpnDevice(ctx, rawArgs) + if err != nil { + return nil, err } args["gvpnDevice"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_updateGlobalVPNDevice_argsGvpnDevice( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.GlobalVPNDevice, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["gvpnDevice"] + if !ok { + var zeroVal entities.GlobalVPNDevice + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpnDevice")) + if tmp, ok := rawArgs["gvpnDevice"]; ok { + return ec.unmarshalNGlobalVPNDeviceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐGlobalVPNDevice(ctx, tmp) + } + + var zeroVal entities.GlobalVPNDevice + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_updateGlobalVPN_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.GlobalVPN - if tmp, ok := rawArgs["gvpn"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpn")) - arg0, err = ec.unmarshalNGlobalVPNIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐGlobalVPN(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_updateGlobalVPN_argsGvpn(ctx, rawArgs) + if err != nil { + return nil, err } args["gvpn"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_updateGlobalVPN_argsGvpn( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.GlobalVPN, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["gvpn"] + if !ok { + var zeroVal entities.GlobalVPN + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpn")) + if tmp, ok := rawArgs["gvpn"]; ok { + return ec.unmarshalNGlobalVPNIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐGlobalVPN(ctx, tmp) + } + + var zeroVal entities.GlobalVPN + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_updateHelmRelease_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_updateHelmRelease_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 entities.HelmRelease - if tmp, ok := rawArgs["release"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("release")) - arg1, err = ec.unmarshalNHelmReleaseIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐHelmRelease(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_infra_updateHelmRelease_argsRelease(ctx, rawArgs) + if err != nil { + return nil, err } args["release"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_infra_updateHelmRelease_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_updateHelmRelease_argsRelease( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.HelmRelease, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["release"] + if !ok { + var zeroVal entities.HelmRelease + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("release")) + if tmp, ok := rawArgs["release"]; ok { + return ec.unmarshalNHelmReleaseIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐHelmRelease(ctx, tmp) + } + + var zeroVal entities.HelmRelease + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_updateNodePool_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_updateNodePool_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 entities.NodePool - if tmp, ok := rawArgs["pool"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pool")) - arg1, err = ec.unmarshalNNodePoolIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐNodePool(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_infra_updateNodePool_argsPool(ctx, rawArgs) + if err != nil { + return nil, err } args["pool"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_infra_updateNodePool_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_updateNodePool_argsPool( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.NodePool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pool"] + if !ok { + var zeroVal entities.NodePool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pool")) + if tmp, ok := rawArgs["pool"]; ok { + return ec.unmarshalNNodePoolIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐNodePool(ctx, tmp) + } + + var zeroVal entities.NodePool + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_updateProviderSecret_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.CloudProviderSecret - if tmp, ok := rawArgs["secret"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("secret")) - arg0, err = ec.unmarshalNCloudProviderSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCloudProviderSecret(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_updateProviderSecret_argsSecret(ctx, rawArgs) + if err != nil { + return nil, err } args["secret"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_updateProviderSecret_argsSecret( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.CloudProviderSecret, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["secret"] + if !ok { + var zeroVal entities.CloudProviderSecret + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("secret")) + if tmp, ok := rawArgs["secret"]; ok { + return ec.unmarshalNCloudProviderSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCloudProviderSecret(ctx, tmp) + } + + var zeroVal entities.CloudProviderSecret + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_upgradeHelmKloudliteAgent_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_upgradeHelmKloudliteAgent_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_upgradeHelmKloudliteAgent_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query___type_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query___type_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_checkAwsAccess_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["cloudproviderName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cloudproviderName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_checkAwsAccess_argsCloudproviderName(ctx, rawArgs) + if err != nil { + return nil, err } args["cloudproviderName"] = arg0 return args, nil } +func (ec *executionContext) field_Query_infra_checkAwsAccess_argsCloudproviderName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["cloudproviderName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("cloudproviderName")) + if tmp, ok := rawArgs["cloudproviderName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_checkNameAvailability_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 domain.ResType - if tmp, ok := rawArgs["resType"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resType")) - arg0, err = ec.unmarshalNResType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋdomainᚐResType(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_checkNameAvailability_argsResType(ctx, rawArgs) + if err != nil { + return nil, err } args["resType"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_checkNameAvailability_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg1 - var arg2 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg2, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_infra_checkNameAvailability_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg2 return args, nil } +func (ec *executionContext) field_Query_infra_checkNameAvailability_argsResType( + ctx context.Context, + rawArgs map[string]interface{}, +) (domain.ResType, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["resType"] + if !ok { + var zeroVal domain.ResType + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("resType")) + if tmp, ok := rawArgs["resType"]; ok { + return ec.unmarshalNResType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋdomainᚐResType(ctx, tmp) + } + + var zeroVal domain.ResType + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_checkNameAvailability_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_checkNameAvailability_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getBYOKCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getBYOKCluster_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query_infra_getBYOKCluster_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getCluster_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getCluster_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query_infra_getCluster_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getDomainEntry_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["domainName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("domainName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getDomainEntry_argsDomainName(ctx, rawArgs) + if err != nil { + return nil, err } args["domainName"] = arg0 return args, nil } +func (ec *executionContext) field_Query_infra_getDomainEntry_argsDomainName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["domainName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("domainName")) + if tmp, ok := rawArgs["domainName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getGlobalVPNDevice_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["gvpn"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpn")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getGlobalVPNDevice_argsGvpn(ctx, rawArgs) + if err != nil { + return nil, err } args["gvpn"] = arg0 - var arg1 string - if tmp, ok := rawArgs["deviceName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_getGlobalVPNDevice_argsDeviceName(ctx, rawArgs) + if err != nil { + return nil, err } args["deviceName"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_getGlobalVPNDevice_argsGvpn( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["gvpn"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpn")) + if tmp, ok := rawArgs["gvpn"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_getGlobalVPNDevice_argsDeviceName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["deviceName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) + if tmp, ok := rawArgs["deviceName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getGlobalVPN_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getGlobalVPN_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query_infra_getGlobalVPN_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getHelmRelease_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getHelmRelease_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_getHelmRelease_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_getHelmRelease_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_getHelmRelease_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getManagedServiceTemplate_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["category"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("category")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getManagedServiceTemplate_argsCategory(ctx, rawArgs) + if err != nil { + return nil, err } args["category"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_getManagedServiceTemplate_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_getManagedServiceTemplate_argsCategory( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["category"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("category")) + if tmp, ok := rawArgs["category"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_getManagedServiceTemplate_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getNamespace_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getNamespace_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_getNamespace_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_getNamespace_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_getNamespace_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getNodePool_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getNodePool_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["poolName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("poolName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_getNodePool_argsPoolName(ctx, rawArgs) + if err != nil { + return nil, err } args["poolName"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_getNodePool_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_getNodePool_argsPoolName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["poolName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("poolName")) + if tmp, ok := rawArgs["poolName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getPVC_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getPVC_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 string + arg1, err := ec.field_Query_infra_getPVC_argsName(ctx, rawArgs) + if err != nil { + return nil, err + } + args["name"] = arg1 + return args, nil +} +func (ec *executionContext) field_Query_infra_getPVC_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_getPVC_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_getPV_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + arg0, err := ec.field_Query_infra_getPV_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err + } + args["clusterName"] = arg0 + arg1, err := ec.field_Query_infra_getPV_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_getPV_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } -func (ec *executionContext) field_Query_infra_getPV_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { - var err error - args := map[string]interface{}{} - var arg0 string + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) if tmp, ok := rawArgs["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalNString2string(ctx, tmp) } - args["clusterName"] = arg0 - var arg1 string + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_getPV_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalNString2string(ctx, tmp) } - args["name"] = arg1 - return args, nil + + var zeroVal string + return zeroVal, nil } func (ec *executionContext) field_Query_infra_getProviderSecret_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getProviderSecret_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query_infra_getProviderSecret_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getVolumeAttachment_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getVolumeAttachment_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_getVolumeAttachment_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_getVolumeAttachment_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_getVolumeAttachment_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listBYOKClusters_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *model.SearchCluster - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg0, err = ec.unmarshalOSearchCluster2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchCluster(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listBYOKClusters_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg0 - var arg1 *repos.CursorPagination - if tmp, ok := rawArgs["pagination"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) - arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listBYOKClusters_argsPagination(ctx, rawArgs) + if err != nil { + return nil, err } args["pagination"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_listBYOKClusters_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchCluster, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchCluster + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchCluster2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchCluster(ctx, tmp) + } + + var zeroVal *model.SearchCluster + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listBYOKClusters_argsPagination( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pagination"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + if tmp, ok := rawArgs["pagination"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listClusters_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *model.SearchCluster - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg0, err = ec.unmarshalOSearchCluster2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchCluster(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listClusters_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg0 - var arg1 *repos.CursorPagination - if tmp, ok := rawArgs["pagination"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) - arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listClusters_argsPagination(ctx, rawArgs) + if err != nil { + return nil, err } args["pagination"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_listClusters_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchCluster, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchCluster + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchCluster2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchCluster(ctx, tmp) + } + + var zeroVal *model.SearchCluster + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listClusters_argsPagination( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pagination"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + if tmp, ok := rawArgs["pagination"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listDomainEntries_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *model.SearchDomainEntry - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg0, err = ec.unmarshalOSearchDomainEntry2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchDomainEntry(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listDomainEntries_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg0 - var arg1 *repos.CursorPagination - if tmp, ok := rawArgs["pagination"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) - arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listDomainEntries_argsPagination(ctx, rawArgs) + if err != nil { + return nil, err } args["pagination"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_listDomainEntries_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchDomainEntry, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchDomainEntry + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchDomainEntry2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchDomainEntry(ctx, tmp) + } + + var zeroVal *model.SearchDomainEntry + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listDomainEntries_argsPagination( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pagination"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + if tmp, ok := rawArgs["pagination"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listGlobalVPNDevices_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["gvpn"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpn")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listGlobalVPNDevices_argsGvpn(ctx, rawArgs) + if err != nil { + return nil, err } args["gvpn"] = arg0 - var arg1 *model.SearchGlobalVPNDevices - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchGlobalVPNDevices2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchGlobalVPNDevices(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listGlobalVPNDevices_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pagination"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_infra_listGlobalVPNDevices_argsPagination(ctx, rawArgs) + if err != nil { + return nil, err } args["pagination"] = arg2 return args, nil } +func (ec *executionContext) field_Query_infra_listGlobalVPNDevices_argsGvpn( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["gvpn"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("gvpn")) + if tmp, ok := rawArgs["gvpn"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listGlobalVPNDevices_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchGlobalVPNDevices, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchGlobalVPNDevices + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchGlobalVPNDevices2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchGlobalVPNDevices(ctx, tmp) + } + + var zeroVal *model.SearchGlobalVPNDevices + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listGlobalVPNDevices_argsPagination( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pagination"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + if tmp, ok := rawArgs["pagination"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listGlobalVPNs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *model.SearchGlobalVPNs - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg0, err = ec.unmarshalOSearchGlobalVPNs2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchGlobalVPNs(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listGlobalVPNs_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg0 - var arg1 *repos.CursorPagination - if tmp, ok := rawArgs["pagination"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) - arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listGlobalVPNs_argsPagination(ctx, rawArgs) + if err != nil { + return nil, err } args["pagination"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_listGlobalVPNs_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchGlobalVPNs, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchGlobalVPNs + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchGlobalVPNs2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchGlobalVPNs(ctx, tmp) + } + + var zeroVal *model.SearchGlobalVPNs + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listGlobalVPNs_argsPagination( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pagination"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + if tmp, ok := rawArgs["pagination"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listHelmReleases_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listHelmReleases_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 *model.SearchHelmRelease - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchHelmRelease2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchHelmRelease(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listHelmReleases_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pagination"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_infra_listHelmReleases_argsPagination(ctx, rawArgs) + if err != nil { + return nil, err } args["pagination"] = arg2 return args, nil } +func (ec *executionContext) field_Query_infra_listHelmReleases_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listHelmReleases_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchHelmRelease, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchHelmRelease + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchHelmRelease2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchHelmRelease(ctx, tmp) + } + + var zeroVal *model.SearchHelmRelease + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listHelmReleases_argsPagination( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pagination"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + if tmp, ok := rawArgs["pagination"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listNamespaces_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listNamespaces_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 *model.SearchNamespaces - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchNamespaces2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchNamespaces(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listNamespaces_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_infra_listNamespaces_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg2 return args, nil } +func (ec *executionContext) field_Query_infra_listNamespaces_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listNamespaces_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchNamespaces, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchNamespaces + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchNamespaces2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchNamespaces(ctx, tmp) + } + + var zeroVal *model.SearchNamespaces + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listNamespaces_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listNodePools_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listNodePools_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 *model.SearchNodepool - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchNodepool2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchNodepool(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listNodePools_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pagination"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_infra_listNodePools_argsPagination(ctx, rawArgs) + if err != nil { + return nil, err } args["pagination"] = arg2 return args, nil } +func (ec *executionContext) field_Query_infra_listNodePools_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listNodePools_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchNodepool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchNodepool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchNodepool2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchNodepool(ctx, tmp) + } + + var zeroVal *model.SearchNodepool + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listNodePools_argsPagination( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pagination"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + if tmp, ok := rawArgs["pagination"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listPVCs_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listPVCs_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 *model.SearchPersistentVolumeClaims - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchPersistentVolumeClaims2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchPersistentVolumeClaims(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listPVCs_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_infra_listPVCs_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg2 return args, nil } +func (ec *executionContext) field_Query_infra_listPVCs_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listPVCs_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchPersistentVolumeClaims, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchPersistentVolumeClaims + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchPersistentVolumeClaims2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchPersistentVolumeClaims(ctx, tmp) + } + + var zeroVal *model.SearchPersistentVolumeClaims + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listPVCs_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listPVs_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listPVs_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 *model.SearchPersistentVolumes - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchPersistentVolumes2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchPersistentVolumes(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listPVs_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_infra_listPVs_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg2 return args, nil } +func (ec *executionContext) field_Query_infra_listPVs_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listPVs_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchPersistentVolumes, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchPersistentVolumes + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchPersistentVolumes2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchPersistentVolumes(ctx, tmp) + } + + var zeroVal *model.SearchPersistentVolumes + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listPVs_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listProviderSecrets_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *model.SearchProviderSecret - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg0, err = ec.unmarshalOSearchProviderSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchProviderSecret(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listProviderSecrets_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg0 - var arg1 *repos.CursorPagination - if tmp, ok := rawArgs["pagination"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) - arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listProviderSecrets_argsPagination(ctx, rawArgs) + if err != nil { + return nil, err } args["pagination"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_listProviderSecrets_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchProviderSecret, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchProviderSecret + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchProviderSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchProviderSecret(ctx, tmp) + } + + var zeroVal *model.SearchProviderSecret + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listProviderSecrets_argsPagination( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pagination"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + if tmp, ok := rawArgs["pagination"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listVolumeAttachments_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listVolumeAttachments_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 *model.SearchVolumeAttachments - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchVolumeAttachments2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchVolumeAttachments(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listVolumeAttachments_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_infra_listVolumeAttachments_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg2 return args, nil } +func (ec *executionContext) field_Query_infra_listVolumeAttachments_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listVolumeAttachments_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchVolumeAttachments, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchVolumeAttachments + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchVolumeAttachments2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐSearchVolumeAttachments(ctx, tmp) + } + + var zeroVal *model.SearchVolumeAttachments + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listVolumeAttachments_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_infrat_getBYOKClusterSetupInstructions_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infrat_getBYOKClusterSetupInstructions_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 - var arg1 *bool - if tmp, ok := rawArgs["onlyHelmValues"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("onlyHelmValues")) - arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infrat_getBYOKClusterSetupInstructions_argsOnlyHelmValues(ctx, rawArgs) + if err != nil { + return nil, err } args["onlyHelmValues"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infrat_getBYOKClusterSetupInstructions_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infrat_getBYOKClusterSetupInstructions_argsOnlyHelmValues( + ctx context.Context, + rawArgs map[string]interface{}, +) (*bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["onlyHelmValues"] + if !ok { + var zeroVal *bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("onlyHelmValues")) + if tmp, ok := rawArgs["onlyHelmValues"]; ok { + return ec.unmarshalOBoolean2ᚖbool(ctx, tmp) + } + + var zeroVal *bool + return zeroVal, nil +} func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 bool - if tmp, ok := rawArgs["includeDeprecated"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field___Type_enumValues_argsIncludeDeprecated(ctx, rawArgs) + if err != nil { + return nil, err } args["includeDeprecated"] = arg0 return args, nil } +func (ec *executionContext) field___Type_enumValues_argsIncludeDeprecated( + ctx context.Context, + rawArgs map[string]interface{}, +) (bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["includeDeprecated"] + if !ok { + var zeroVal bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + if tmp, ok := rawArgs["includeDeprecated"]; ok { + return ec.unmarshalOBoolean2bool(ctx, tmp) + } + + var zeroVal bool + return zeroVal, nil +} func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 bool - if tmp, ok := rawArgs["includeDeprecated"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field___Type_fields_argsIncludeDeprecated(ctx, rawArgs) + if err != nil { + return nil, err } args["includeDeprecated"] = arg0 return args, nil } +func (ec *executionContext) field___Type_fields_argsIncludeDeprecated( + ctx context.Context, + rawArgs map[string]interface{}, +) (bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["includeDeprecated"] + if !ok { + var zeroVal bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + if tmp, ok := rawArgs["includeDeprecated"]; ok { + return ec.unmarshalOBoolean2bool(ctx, tmp) + } + + var zeroVal bool + return zeroVal, nil +} // endregion ***************************** args.gotpl ***************************** @@ -12714,7 +14385,7 @@ func (ec *executionContext) fieldContext_BYOKSetupInstruction_title(_ context.Co return fc, nil } -func (ec *executionContext) _CheckAwsAccessOutput_result(ctx context.Context, field graphql.CollectedField, obj *model.CheckAwsAccessOutput) (ret graphql.Marshaler) { +func (ec *executionContext) _CheckAwsAccessOutput_result(ctx context.Context, field graphql.CollectedField, obj *model.CheckAWSAccessOutput) (ret graphql.Marshaler) { fc, err := ec.fieldContext_CheckAwsAccessOutput_result(ctx, field) if err != nil { return graphql.Null @@ -12758,7 +14429,7 @@ func (ec *executionContext) fieldContext_CheckAwsAccessOutput_result(_ context.C return fc, nil } -func (ec *executionContext) _CheckAwsAccessOutput_installationUrl(ctx context.Context, field graphql.CollectedField, obj *model.CheckAwsAccessOutput) (ret graphql.Marshaler) { +func (ec *executionContext) _CheckAwsAccessOutput_installationUrl(ctx context.Context, field graphql.CollectedField, obj *model.CheckAWSAccessOutput) (ret graphql.Marshaler) { fc, err := ec.fieldContext_CheckAwsAccessOutput_installationUrl(ctx, field) if err != nil { return graphql.Null @@ -12945,7 +14616,7 @@ func (ec *executionContext) _CloudProviderSecret_aws(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.CloudProviderSecret().Aws(rctx, obj) + return ec.resolvers.CloudProviderSecret().AWS(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -13184,7 +14855,7 @@ func (ec *executionContext) _CloudProviderSecret_gcp(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.CloudProviderSecret().Gcp(rctx, obj) + return ec.resolvers.CloudProviderSecret().GCP(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -16105,7 +17776,7 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AwsAccountID, nil + return obj.AWSAccountID, nil }) if err != nil { ec.Error(ctx, err) @@ -16476,9 +18147,9 @@ func (ec *executionContext) _Github__com___kloudlite___api___apps___infra___inte } return graphql.Null } - res := resTmp.(model.GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism) + res := resTmp.(model.GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism) fc.Result = res - return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsAuthMechanism(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSAuthMechanism(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___infra___internal___entities__AWSSecretCredentials_authMechanism(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -18659,9 +20330,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster } return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AwsCredentials) + res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AWSCredentials) fc.Result = res - return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsCredentials(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSCredentials(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_credentials(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -18887,9 +20558,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster if resTmp == nil { return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AwsVPCParams) + res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AWSVPCParams) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsVPCParams(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSVPCParams(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_vpc(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -19236,9 +20907,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster if resTmp == nil { return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfig) + res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfig) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfig(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfig(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_ec2Pool(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -19544,9 +21215,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster if resTmp == nil { return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig) + res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfig) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfig(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_spotPool(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -19660,7 +21331,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials_authMechanism(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsCredentials) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials_authMechanism(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSCredentials) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials_authMechanism(ctx, field) if err != nil { return graphql.Null @@ -19686,9 +21357,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster } return graphql.Null } - res := resTmp.(model.GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism) + res := resTmp.(model.GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism) fc.Result = res - return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsAuthMechanism(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSAuthMechanism(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials_authMechanism(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -19704,7 +21375,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials_secretRef(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsCredentials) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials_secretRef(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSCredentials) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials_secretRef(ctx, field) if err != nil { return graphql.Null @@ -19754,7 +21425,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig_instanceType(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfig) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig_instanceType(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfig) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig_instanceType(ctx, field) if err != nil { return graphql.Null @@ -19798,7 +21469,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig_nodes(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfig) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig_nodes(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfig) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig_nodes(ctx, field) if err != nil { return graphql.Null @@ -19839,7 +21510,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode_memoryPerVcpu(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNode) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode_memoryPerVcpu(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNode) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode_memoryPerVcpu(ctx, field) if err != nil { return graphql.Null @@ -19886,7 +21557,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode_vcpu(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNode) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode_vcpu(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNode) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode_vcpu(ctx, field) if err != nil { return graphql.Null @@ -19936,7 +21607,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode_instanceTypes(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSpotGpuNode) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode_instanceTypes(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSpotGpuNode) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode_instanceTypes(ctx, field) if err != nil { return graphql.Null @@ -19980,7 +21651,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_cpuNode(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_cpuNode(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfig) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_cpuNode(ctx, field) if err != nil { return graphql.Null @@ -20003,9 +21674,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster if resTmp == nil { return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNode) + res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNode) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotCPUNode(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotCPUNode(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_cpuNode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -20027,7 +21698,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_gpuNode(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_gpuNode(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfig) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_gpuNode(ctx, field) if err != nil { return graphql.Null @@ -20050,9 +21721,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster if resTmp == nil { return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AwsSpotGpuNode) + res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AWSSpotGpuNode) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotGpuNode(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotGpuNode(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_gpuNode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -20072,7 +21743,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_nodes(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_nodes(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfig) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_nodes(ctx, field) if err != nil { return graphql.Null @@ -20113,7 +21784,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_spotFleetTaggingRoleName(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_spotFleetTaggingRoleName(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfig) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_spotFleetTaggingRoleName(ctx, field) if err != nil { return graphql.Null @@ -20157,7 +21828,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_availabilityZone(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_availabilityZone(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSubnetWithID) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_availabilityZone(ctx, field) if err != nil { return graphql.Null @@ -20201,7 +21872,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_id(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_id(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSubnetWithID) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_id(ctx, field) if err != nil { return graphql.Null @@ -20245,7 +21916,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_id(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsVPCParams) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_id(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSVPCParams) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_id(ctx, field) if err != nil { return graphql.Null @@ -20289,7 +21960,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_publicSubnets(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsVPCParams) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_publicSubnets(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSVPCParams) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_publicSubnets(ctx, field) if err != nil { return graphql.Null @@ -20315,9 +21986,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster } return graphql.Null } - res := resTmp.([]*model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) + res := resTmp.([]*model.GithubComKloudliteOperatorApisClustersV1AWSSubnetWithID) fc.Result = res - return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSubnetWithIDᚄ(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSubnetWithIDᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_publicSubnets(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -20831,7 +22502,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Aws, nil + return obj.AWS, nil }) if err != nil { ec.Error(ctx, err) @@ -21146,7 +22817,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Gcp, nil + return obj.GCP, nil }) if err != nil { ec.Error(ctx, err) @@ -21486,7 +23157,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.GcpProjectID, nil + return obj.GCPProjectID, nil }) if err != nil { ec.Error(ctx, err) @@ -21684,9 +23355,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster if resTmp == nil { return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1GcpVPCParams) + res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1GCPVPCParams) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GcpVPCParams(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GCPVPCParams(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPClusterConfig_vpc(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -22031,7 +23702,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.GcpProjectID, nil + return obj.GCPProjectID, nil }) if err != nil { ec.Error(ctx, err) @@ -22309,9 +23980,9 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster if resTmp == nil { return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1GcpVPCParams) + res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1GCPVPCParams) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GcpVPCParams(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GCPVPCParams(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GCPNodePoolConfig_vpc(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -22457,7 +24128,7 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams_name(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1GcpVPCParams) (ret graphql.Marshaler) { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams_name(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1GCPVPCParams) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams_name(ctx, field) if err != nil { return graphql.Null @@ -22688,7 +24359,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Aws, nil + return obj.AWS, nil }) if err != nil { ec.Error(ctx, err) @@ -22797,7 +24468,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Gcp, nil + return obj.GCP, nil }) if err != nil { ec.Error(ctx, err) @@ -34326,7 +35997,7 @@ func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeSpec_aws }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AwsElasticBlockStore, nil + return obj.AWSElasticBlockStore, nil }) if err != nil { ec.Error(ctx, err) @@ -40630,15 +42301,18 @@ func (ec *executionContext) _Mutation_infra_createCluster(ctx context.Context, f ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraCreateCluster(rctx, fc.Args["cluster"].(entities.Cluster)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Cluster + return zeroVal, 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") + var zeroVal *entities.Cluster + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -40750,15 +42424,18 @@ func (ec *executionContext) _Mutation_infra_updateCluster(ctx context.Context, f ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraUpdateCluster(rctx, fc.Args["cluster"].(entities.Cluster)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Cluster + return zeroVal, 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") + var zeroVal *entities.Cluster + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -40870,15 +42547,18 @@ func (ec *executionContext) _Mutation_infra_deleteCluster(ctx context.Context, f ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraDeleteCluster(rctx, 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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -40951,15 +42631,18 @@ func (ec *executionContext) _Mutation_infra_createGlobalVPN(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraCreateGlobalVpn(rctx, fc.Args["gvpn"].(entities.GlobalVPN)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.GlobalVPN + return zeroVal, 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") + var zeroVal *entities.GlobalVPN + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -41069,15 +42752,18 @@ func (ec *executionContext) _Mutation_infra_updateGlobalVPN(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraUpdateGlobalVpn(rctx, fc.Args["gvpn"].(entities.GlobalVPN)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.GlobalVPN + return zeroVal, 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") + var zeroVal *entities.GlobalVPN + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -41187,15 +42873,18 @@ func (ec *executionContext) _Mutation_infra_deleteGlobalVPN(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraDeleteGlobalVpn(rctx, 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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -41268,15 +42957,18 @@ func (ec *executionContext) _Mutation_infra_createGlobalVPNDevice(ctx context.Co ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraCreateGlobalVPNDevice(rctx, fc.Args["gvpnDevice"].(entities.GlobalVPNDevice)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.GlobalVPNDevice + return zeroVal, 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") + var zeroVal *entities.GlobalVPNDevice + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -41382,15 +43074,18 @@ func (ec *executionContext) _Mutation_infra_updateGlobalVPNDevice(ctx context.Co ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraUpdateGlobalVPNDevice(rctx, fc.Args["gvpnDevice"].(entities.GlobalVPNDevice)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.GlobalVPNDevice + return zeroVal, 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") + var zeroVal *entities.GlobalVPNDevice + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -41496,15 +43191,18 @@ func (ec *executionContext) _Mutation_infra_deleteGlobalVPNDevice(ctx context.Co ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraDeleteGlobalVPNDevice(rctx, fc.Args["gvpn"].(string), fc.Args["deviceName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -41577,15 +43275,18 @@ func (ec *executionContext) _Mutation_infra_createBYOKCluster(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraCreateBYOKCluster(rctx, fc.Args["cluster"].(entities.BYOKCluster)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.BYOKCluster + return zeroVal, 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") + var zeroVal *entities.BYOKCluster + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -41695,15 +43396,18 @@ func (ec *executionContext) _Mutation_infra_updateBYOKCluster(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraUpdateBYOKCluster(rctx, fc.Args["clusterName"].(string), fc.Args["displayName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.BYOKCluster + return zeroVal, 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") + var zeroVal *entities.BYOKCluster + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -41813,15 +43517,18 @@ func (ec *executionContext) _Mutation_infra_deleteBYOKCluster(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraDeleteBYOKCluster(rctx, 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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -41894,15 +43601,18 @@ func (ec *executionContext) _Mutation_infra_upgradeHelmKloudliteAgent(ctx contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraUpgradeHelmKloudliteAgent(rctx, fc.Args["clusterName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -41975,15 +43685,18 @@ func (ec *executionContext) _Mutation_infra_createProviderSecret(ctx context.Con ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraCreateProviderSecret(rctx, fc.Args["secret"].(entities.CloudProviderSecret)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.CloudProviderSecret + return zeroVal, 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") + var zeroVal *entities.CloudProviderSecret + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -42081,15 +43794,18 @@ func (ec *executionContext) _Mutation_infra_updateProviderSecret(ctx context.Con ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraUpdateProviderSecret(rctx, fc.Args["secret"].(entities.CloudProviderSecret)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.CloudProviderSecret + return zeroVal, 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") + var zeroVal *entities.CloudProviderSecret + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -42187,15 +43903,18 @@ func (ec *executionContext) _Mutation_infra_deleteProviderSecret(ctx context.Con ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraDeleteProviderSecret(rctx, fc.Args["secretName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -42268,15 +43987,18 @@ func (ec *executionContext) _Mutation_infra_createDomainEntry(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraCreateDomainEntry(rctx, fc.Args["domainEntry"].(entities.DomainEntry)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.DomainEntry + return zeroVal, 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") + var zeroVal *entities.DomainEntry + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -42370,15 +44092,18 @@ func (ec *executionContext) _Mutation_infra_updateDomainEntry(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraUpdateDomainEntry(rctx, fc.Args["domainEntry"].(entities.DomainEntry)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.DomainEntry + return zeroVal, 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") + var zeroVal *entities.DomainEntry + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -42472,15 +44197,18 @@ func (ec *executionContext) _Mutation_infra_deleteDomainEntry(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraDeleteDomainEntry(rctx, fc.Args["domainName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -42553,15 +44281,18 @@ func (ec *executionContext) _Mutation_infra_createNodePool(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraCreateNodePool(rctx, fc.Args["clusterName"].(string), fc.Args["pool"].(entities.NodePool)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.NodePool + return zeroVal, 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") + var zeroVal *entities.NodePool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -42667,15 +44398,18 @@ func (ec *executionContext) _Mutation_infra_updateNodePool(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraUpdateNodePool(rctx, fc.Args["clusterName"].(string), fc.Args["pool"].(entities.NodePool)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.NodePool + return zeroVal, 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") + var zeroVal *entities.NodePool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -42781,15 +44515,18 @@ func (ec *executionContext) _Mutation_infra_deleteNodePool(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraDeleteNodePool(rctx, fc.Args["clusterName"].(string), fc.Args["poolName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -42862,15 +44599,18 @@ func (ec *executionContext) _Mutation_infra_createHelmRelease(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraCreateHelmRelease(rctx, fc.Args["clusterName"].(string), fc.Args["release"].(entities.HelmRelease)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.HelmRelease + return zeroVal, 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") + var zeroVal *entities.HelmRelease + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -42976,15 +44716,18 @@ func (ec *executionContext) _Mutation_infra_updateHelmRelease(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraUpdateHelmRelease(rctx, fc.Args["clusterName"].(string), fc.Args["release"].(entities.HelmRelease)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.HelmRelease + return zeroVal, 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") + var zeroVal *entities.HelmRelease + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -43090,15 +44833,18 @@ func (ec *executionContext) _Mutation_infra_deleteHelmRelease(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraDeleteHelmRelease(rctx, fc.Args["clusterName"].(string), fc.Args["releaseName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -43171,15 +44917,18 @@ func (ec *executionContext) _Mutation_infra_deletePV(ctx context.Context, field ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraDeletePv(rctx, fc.Args["clusterName"].(string), fc.Args["pvName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -48501,15 +50250,18 @@ func (ec *executionContext) _Query_infra_checkNameAvailability(ctx context.Conte ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraCheckNameAvailability(rctx, fc.Args["resType"].(domain.ResType), fc.Args["clusterName"].(*string), fc.Args["name"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedIn == nil { - return nil, errors.New("directive isLoggedIn is not implemented") + var zeroVal *domain.CheckNameAvailabilityOutput + return zeroVal, errors.New("directive isLoggedIn is not implemented") } return ec.directives.IsLoggedIn(ctx, nil, directive0) } directive2 := func(ctx context.Context) (interface{}, error) { if ec.directives.HasAccount == nil { - return nil, errors.New("directive hasAccount is not implemented") + var zeroVal *domain.CheckNameAvailabilityOutput + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -48588,15 +50340,18 @@ func (ec *executionContext) _Query_infra_listClusters(ctx context.Context, field ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListClusters(rctx, fc.Args["search"].(*model.SearchCluster), fc.Args["pagination"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.ClusterPaginatedRecords + return zeroVal, 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") + var zeroVal *model.ClusterPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -48674,15 +50429,18 @@ func (ec *executionContext) _Query_infra_getCluster(ctx context.Context, field g ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetCluster(rctx, 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") + var zeroVal *entities.Cluster + return zeroVal, 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") + var zeroVal *entities.Cluster + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -48794,15 +50552,18 @@ func (ec *executionContext) _Query_infra_listBYOKClusters(ctx context.Context, f ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListBYOKClusters(rctx, fc.Args["search"].(*model.SearchCluster), fc.Args["pagination"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.BYOKClusterPaginatedRecords + return zeroVal, 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") + var zeroVal *model.BYOKClusterPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -48880,15 +50641,18 @@ func (ec *executionContext) _Query_infra_getBYOKCluster(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetBYOKCluster(rctx, 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") + var zeroVal *entities.BYOKCluster + return zeroVal, 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") + var zeroVal *entities.BYOKCluster + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -48998,15 +50762,18 @@ func (ec *executionContext) _Query_infrat_getBYOKClusterSetupInstructions(ctx co ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfratGetBYOKClusterSetupInstructions(rctx, fc.Args["name"].(string), fc.Args["onlyHelmValues"].(*bool)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal []*model.BYOKSetupInstruction + return zeroVal, 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") + var zeroVal []*model.BYOKSetupInstruction + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -49082,15 +50849,18 @@ func (ec *executionContext) _Query_infra_listGlobalVPNs(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListGlobalVPNs(rctx, fc.Args["search"].(*model.SearchGlobalVPNs), fc.Args["pagination"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.GlobalVPNPaginatedRecords + return zeroVal, 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") + var zeroVal *model.GlobalVPNPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -49168,15 +50938,18 @@ func (ec *executionContext) _Query_infra_getGlobalVPN(ctx context.Context, field ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetGlobalVpn(rctx, 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") + var zeroVal *entities.GlobalVPN + return zeroVal, 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") + var zeroVal *entities.GlobalVPN + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -49286,15 +51059,18 @@ func (ec *executionContext) _Query_infra_listGlobalVPNDevices(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListGlobalVPNDevices(rctx, fc.Args["gvpn"].(string), fc.Args["search"].(*model.SearchGlobalVPNDevices), fc.Args["pagination"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.GlobalVPNDevicePaginatedRecords + return zeroVal, 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") + var zeroVal *model.GlobalVPNDevicePaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -49372,15 +51148,18 @@ func (ec *executionContext) _Query_infra_getGlobalVPNDevice(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetGlobalVPNDevice(rctx, fc.Args["gvpn"].(string), fc.Args["deviceName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.GlobalVPNDevice + return zeroVal, 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") + var zeroVal *entities.GlobalVPNDevice + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -49486,15 +51265,18 @@ func (ec *executionContext) _Query_infra_listNodePools(ctx context.Context, fiel ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListNodePools(rctx, fc.Args["clusterName"].(string), fc.Args["search"].(*model.SearchNodepool), fc.Args["pagination"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.NodePoolPaginatedRecords + return zeroVal, 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") + var zeroVal *model.NodePoolPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -49572,15 +51354,18 @@ func (ec *executionContext) _Query_infra_getNodePool(ctx context.Context, field ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetNodePool(rctx, fc.Args["clusterName"].(string), fc.Args["poolName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.NodePool + return zeroVal, 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") + var zeroVal *entities.NodePool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -49686,15 +51471,18 @@ func (ec *executionContext) _Query_infra_listProviderSecrets(ctx context.Context ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListProviderSecrets(rctx, fc.Args["search"].(*model.SearchProviderSecret), fc.Args["pagination"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.CloudProviderSecretPaginatedRecords + return zeroVal, 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") + var zeroVal *model.CloudProviderSecretPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -49772,15 +51560,18 @@ func (ec *executionContext) _Query_infra_getProviderSecret(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetProviderSecret(rctx, 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") + var zeroVal *entities.CloudProviderSecret + return zeroVal, 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") + var zeroVal *entities.CloudProviderSecret + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -49878,15 +51669,18 @@ func (ec *executionContext) _Query_infra_listDomainEntries(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListDomainEntries(rctx, fc.Args["search"].(*model.SearchDomainEntry), fc.Args["pagination"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.DomainEntryPaginatedRecords + return zeroVal, 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") + var zeroVal *model.DomainEntryPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -49964,15 +51758,18 @@ func (ec *executionContext) _Query_infra_getDomainEntry(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetDomainEntry(rctx, fc.Args["domainName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.DomainEntry + return zeroVal, 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") + var zeroVal *entities.DomainEntry + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -50064,17 +51861,20 @@ func (ec *executionContext) _Query_infra_checkAwsAccess(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().InfraCheckAwsAccess(rctx, fc.Args["cloudproviderName"].(string)) + return ec.resolvers.Query().InfraCheckAWSAccess(rctx, fc.Args["cloudproviderName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.CheckAWSAccessOutput + return zeroVal, 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") + var zeroVal *model.CheckAWSAccessOutput + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -50086,10 +51886,10 @@ func (ec *executionContext) _Query_infra_checkAwsAccess(ctx context.Context, fie if tmp == nil { return nil, nil } - if data, ok := tmp.(*model.CheckAwsAccessOutput); ok { + if data, ok := tmp.(*model.CheckAWSAccessOutput); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/app/graph/model.CheckAwsAccessOutput`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/infra/internal/app/graph/model.CheckAWSAccessOutput`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -50101,9 +51901,9 @@ func (ec *executionContext) _Query_infra_checkAwsAccess(ctx context.Context, fie } return graphql.Null } - res := resTmp.(*model.CheckAwsAccessOutput) + res := resTmp.(*model.CheckAWSAccessOutput) fc.Result = res - return ec.marshalNCheckAwsAccessOutput2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐCheckAwsAccessOutput(ctx, field.Selections, res) + return ec.marshalNCheckAwsAccessOutput2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐCheckAWSAccessOutput(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_infra_checkAwsAccess(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -50153,15 +51953,18 @@ func (ec *executionContext) _Query_infra_listHelmReleases(ctx context.Context, f ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListHelmReleases(rctx, fc.Args["clusterName"].(string), fc.Args["search"].(*model.SearchHelmRelease), fc.Args["pagination"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.HelmReleasePaginatedRecords + return zeroVal, 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") + var zeroVal *model.HelmReleasePaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -50239,15 +52042,18 @@ func (ec *executionContext) _Query_infra_getHelmRelease(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetHelmRelease(rctx, fc.Args["clusterName"].(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") + var zeroVal *entities.HelmRelease + return zeroVal, 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") + var zeroVal *entities.HelmRelease + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -50476,15 +52282,18 @@ func (ec *executionContext) _Query_infra_listPVCs(ctx context.Context, field gra ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListPVCs(rctx, fc.Args["clusterName"].(string), fc.Args["search"].(*model.SearchPersistentVolumeClaims), fc.Args["pq"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.PersistentVolumeClaimPaginatedRecords + return zeroVal, 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") + var zeroVal *model.PersistentVolumeClaimPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -50562,15 +52371,18 @@ func (ec *executionContext) _Query_infra_getPVC(ctx context.Context, field graph ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetPvc(rctx, fc.Args["clusterName"].(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") + var zeroVal *entities.PersistentVolumeClaim + return zeroVal, 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") + var zeroVal *entities.PersistentVolumeClaim + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -50674,15 +52486,18 @@ func (ec *executionContext) _Query_infra_listNamespaces(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListNamespaces(rctx, fc.Args["clusterName"].(string), fc.Args["search"].(*model.SearchNamespaces), fc.Args["pq"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.NamespacePaginatedRecords + return zeroVal, 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") + var zeroVal *model.NamespacePaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -50760,15 +52575,18 @@ func (ec *executionContext) _Query_infra_getNamespace(ctx context.Context, field ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetNamespace(rctx, fc.Args["clusterName"].(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") + var zeroVal *entities.Namespace + return zeroVal, 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") + var zeroVal *entities.Namespace + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -50872,15 +52690,18 @@ func (ec *executionContext) _Query_infra_listPVs(ctx context.Context, field grap ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListPVs(rctx, fc.Args["clusterName"].(string), fc.Args["search"].(*model.SearchPersistentVolumes), fc.Args["pq"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.PersistentVolumePaginatedRecords + return zeroVal, 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") + var zeroVal *model.PersistentVolumePaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -50958,15 +52779,18 @@ func (ec *executionContext) _Query_infra_getPV(ctx context.Context, field graphq ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetPv(rctx, fc.Args["clusterName"].(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") + var zeroVal *entities.PersistentVolume + return zeroVal, 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") + var zeroVal *entities.PersistentVolume + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -51070,15 +52894,18 @@ func (ec *executionContext) _Query_infra_listVolumeAttachments(ctx context.Conte ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraListVolumeAttachments(rctx, fc.Args["clusterName"].(string), fc.Args["search"].(*model.SearchVolumeAttachments), fc.Args["pq"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.VolumeAttachmentPaginatedRecords + return zeroVal, 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") + var zeroVal *model.VolumeAttachmentPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -51156,15 +52983,18 @@ func (ec *executionContext) _Query_infra_getVolumeAttachment(ctx context.Context ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetVolumeAttachment(rctx, fc.Args["clusterName"].(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") + var zeroVal *entities.VolumeAttachment + return zeroVal, 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") + var zeroVal *entities.VolumeAttachment + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -54371,7 +56201,7 @@ func (ec *executionContext) unmarshalInputCloudProviderSecretIn(ctx context.Cont if err != nil { return it, err } - if err = ec.resolvers.CloudProviderSecretIn().Aws(ctx, &it, data); err != nil { + if err = ec.resolvers.CloudProviderSecretIn().AWS(ctx, &it, data); err != nil { return it, err } case "cloudProviderName": @@ -54396,7 +56226,7 @@ func (ec *executionContext) unmarshalInputCloudProviderSecretIn(ctx context.Cont if err != nil { return it, err } - if err = ec.resolvers.CloudProviderSecretIn().Gcp(ctx, &it, data); err != nil { + if err = ec.resolvers.CloudProviderSecretIn().GCP(ctx, &it, data); err != nil { return it, err } case "metadata": @@ -54617,7 +56447,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ if err != nil { return it, err } - it.AwsAccountID = data + it.AWSAccountID = data } } @@ -54681,7 +56511,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps__ it.AssumeRoleParams = data case "authMechanism": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("authMechanism")) - data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsAuthMechanism(ctx, v) + data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSAuthMechanism(ctx, v) if err != nil { return it, err } @@ -54769,7 +56599,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a switch k { case "credentials": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("credentials")) - data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentialsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsCredentialsIn(ctx, v) + data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentialsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSCredentialsIn(ctx, v) if err != nil { return it, err } @@ -54851,7 +56681,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a it.AvailabilityZone = data case "ec2Pool": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ec2Pool")) - data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfigIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfigIn(ctx, v) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfigIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfigIn(ctx, v) if err != nil { return it, err } @@ -54872,7 +56702,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a it.PoolType = data case "spotPool": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spotPool")) - data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfigIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfigIn(ctx, v) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfigIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfigIn(ctx, v) if err != nil { return it, err } @@ -54883,8 +56713,8 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, nil } -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentialsIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisClustersV1AwsCredentialsIn, error) { - var it model.GithubComKloudliteOperatorApisClustersV1AwsCredentialsIn +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentialsIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisClustersV1AWSCredentialsIn, error) { + var it model.GithubComKloudliteOperatorApisClustersV1AWSCredentialsIn asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v @@ -54899,7 +56729,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a switch k { case "authMechanism": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("authMechanism")) - data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsAuthMechanism(ctx, v) + data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSAuthMechanism(ctx, v) if err != nil { return it, err } @@ -54917,8 +56747,8 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, nil } -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfigIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfigIn, error) { - var it model.GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfigIn +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfigIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfigIn, error) { + var it model.GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfigIn asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v @@ -54951,8 +56781,8 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, nil } -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNodeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNodeIn, error) { - var it model.GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNodeIn +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNodeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNodeIn, error) { + var it model.GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNodeIn asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v @@ -54985,8 +56815,8 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, nil } -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNodeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisClustersV1AwsSpotGpuNodeIn, error) { - var it model.GithubComKloudliteOperatorApisClustersV1AwsSpotGpuNodeIn +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNodeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisClustersV1AWSSpotGpuNodeIn, error) { + var it model.GithubComKloudliteOperatorApisClustersV1AWSSpotGpuNodeIn asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v @@ -55012,8 +56842,8 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a return it, nil } -func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfigIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfigIn, error) { - var it model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfigIn +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfigIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfigIn, error) { + var it model.GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfigIn asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v @@ -55028,14 +56858,14 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a switch k { case "cpuNode": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cpuNode")) - data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNodeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotCPUNodeIn(ctx, v) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNodeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotCPUNodeIn(ctx, v) if err != nil { return it, err } it.CPUNode = data case "gpuNode": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gpuNode")) - data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNodeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotGpuNodeIn(ctx, v) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNodeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotGpuNodeIn(ctx, v) if err != nil { return it, err } @@ -55080,7 +56910,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a if err != nil { return it, err } - it.Aws = data + it.AWS = data case "cloudflareEnabled": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cloudflareEnabled")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) @@ -55101,7 +56931,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a if err != nil { return it, err } - it.Gcp = data + it.GCP = data } } @@ -55203,7 +57033,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a if err != nil { return it, err } - it.Aws = data + it.AWS = data case "cloudProvider": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cloudProvider")) data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___common____types__CloudProvider2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCommonTypesCloudProvider(ctx, v) @@ -55217,7 +57047,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a if err != nil { return it, err } - it.Gcp = data + it.GCP = data case "maxCount": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("maxCount")) data, err := ec.unmarshalNInt2int(ctx, v) @@ -57147,7 +58977,7 @@ func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__PersistentV if err != nil { return it, err } - it.AwsElasticBlockStore = data + it.AWSElasticBlockStore = data case "azureDisk": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("azureDisk")) data, err := ec.unmarshalOK8s__io___api___core___v1__AzureDiskVolumeSourceIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1AzureDiskVolumeSourceIn(ctx, v) @@ -59758,7 +61588,7 @@ func (ec *executionContext) _BYOKSetupInstruction(ctx context.Context, sel ast.S var checkAwsAccessOutputImplementors = []string{"CheckAwsAccessOutput"} -func (ec *executionContext) _CheckAwsAccessOutput(ctx context.Context, sel ast.SelectionSet, obj *model.CheckAwsAccessOutput) graphql.Marshaler { +func (ec *executionContext) _CheckAwsAccessOutput(ctx context.Context, sel ast.SelectionSet, obj *model.CheckAWSAccessOutput) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, checkAwsAccessOutputImplementors) out := graphql.NewFieldSet(fields) @@ -62003,7 +63833,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster var github__com___kloudlite___operator___apis___clusters___v1__AwsCredentialsImplementors = []string{"Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AwsCredentials) graphql.Marshaler { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AWSCredentials) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___clusters___v1__AwsCredentialsImplementors) out := graphql.NewFieldSet(fields) @@ -62047,7 +63877,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster var github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfigImplementors = []string{"Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfig) graphql.Marshaler { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfig) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfigImplementors) out := graphql.NewFieldSet(fields) @@ -62088,7 +63918,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster var github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNodeImplementors = []string{"Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNode) graphql.Marshaler { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNode) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNodeImplementors) out := graphql.NewFieldSet(fields) @@ -62129,7 +63959,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster var github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNodeImplementors = []string{"Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSpotGpuNode) graphql.Marshaler { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSpotGpuNode) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNodeImplementors) out := graphql.NewFieldSet(fields) @@ -62168,7 +63998,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster var github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfigImplementors = []string{"Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig) graphql.Marshaler { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfig) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfigImplementors) out := graphql.NewFieldSet(fields) @@ -62213,7 +64043,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster var github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithIDImplementors = []string{"Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) graphql.Marshaler { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AWSSubnetWithID) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithIDImplementors) out := graphql.NewFieldSet(fields) @@ -62257,7 +64087,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster var github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParamsImplementors = []string{"Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AwsVPCParams) graphql.Marshaler { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AWSVPCParams) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParamsImplementors) out := graphql.NewFieldSet(fields) @@ -62692,7 +64522,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster var github__com___kloudlite___operator___apis___clusters___v1__GcpVPCParamsImplementors = []string{"Github__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams"} -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1GcpVPCParams) graphql.Marshaler { +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1GCPVPCParams) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___clusters___v1__GcpVPCParamsImplementors) out := graphql.NewFieldSet(fields) @@ -71000,11 +72830,11 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se return res } -func (ec *executionContext) marshalNCheckAwsAccessOutput2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐCheckAwsAccessOutput(ctx context.Context, sel ast.SelectionSet, v model.CheckAwsAccessOutput) graphql.Marshaler { +func (ec *executionContext) marshalNCheckAwsAccessOutput2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐCheckAWSAccessOutput(ctx context.Context, sel ast.SelectionSet, v model.CheckAWSAccessOutput) graphql.Marshaler { return ec._CheckAwsAccessOutput(ctx, sel, &v) } -func (ec *executionContext) marshalNCheckAwsAccessOutput2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐCheckAwsAccessOutput(ctx context.Context, sel ast.SelectionSet, v *model.CheckAwsAccessOutput) graphql.Marshaler { +func (ec *executionContext) marshalNCheckAwsAccessOutput2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐCheckAWSAccessOutput(ctx context.Context, sel ast.SelectionSet, v *model.CheckAWSAccessOutput) 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") @@ -71575,17 +73405,17 @@ func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___ return v } -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsAuthMechanism(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism, error) { - var res model.GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSAuthMechanism(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism, error) { + var res model.GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsAuthMechanism(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSAuthMechanism(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism) graphql.Marshaler { return v } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsCredentials(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AwsCredentials) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSCredentials(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AWSCredentials) 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") @@ -71595,12 +73425,12 @@ func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___ return ec._Github__com___kloudlite___operator___apis___clusters___v1__AwsCredentials(ctx, sel, v) } -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentialsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsCredentialsIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisClustersV1AwsCredentialsIn, error) { +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentialsIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSCredentialsIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisClustersV1AWSCredentialsIn, error) { res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___clusters___v1__AwsCredentialsIn(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSubnetWithIDᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSubnetWithIDᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorApisClustersV1AWSSubnetWithID) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -71624,7 +73454,7 @@ func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSubnetWithID(ctx, sel, v[i]) + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSubnetWithID(ctx, sel, v[i]) } if isLen1 { f(i) @@ -71644,7 +73474,7 @@ func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___ return ret } -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSubnetWithID(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSubnetWithID(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AWSSubnetWithID) 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") @@ -73708,14 +75538,14 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfig(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfig) graphql.Marshaler { +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfig(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfig) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig(ctx, sel, v) } -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfigIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfigIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfigIn, error) { +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfigIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfigIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfigIn, error) { if v == nil { return nil, nil } @@ -73723,14 +75553,14 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotCPUNode(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNode) graphql.Marshaler { +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotCPUNode(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNode) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNode(ctx, sel, v) } -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNodeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotCPUNodeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNodeIn, error) { +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotCpuNodeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotCPUNodeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNodeIn, error) { if v == nil { return nil, nil } @@ -73738,14 +75568,14 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotGpuNode(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AwsSpotGpuNode) graphql.Marshaler { +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotGpuNode(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AWSSpotGpuNode) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNode(ctx, sel, v) } -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNodeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotGpuNodeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisClustersV1AwsSpotGpuNodeIn, error) { +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotGpuNodeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotGpuNodeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisClustersV1AWSSpotGpuNodeIn, error) { if v == nil { return nil, nil } @@ -73753,14 +75583,14 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig) graphql.Marshaler { +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfig(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfig) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig(ctx, sel, v) } -func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfigIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfigIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfigIn, error) { +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfigIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfigIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfigIn, error) { if v == nil { return nil, nil } @@ -73768,7 +75598,7 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsVPCParams(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AwsVPCParams) graphql.Marshaler { +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSVPCParams(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AWSVPCParams) graphql.Marshaler { if v == nil { return graphql.Null } @@ -73819,7 +75649,7 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GcpVPCParams(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1GcpVPCParams) graphql.Marshaler { +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__GcpVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1GCPVPCParams(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1GCPVPCParams) graphql.Marshaler { if v == nil { return graphql.Null } diff --git a/apps/infra/internal/app/graph/globalvpn.resolvers.go b/apps/infra/internal/app/graph/globalvpn.resolvers.go index d125df308..c19362a86 100644 --- a/apps/infra/internal/app/graph/globalvpn.resolvers.go +++ b/apps/infra/internal/app/graph/globalvpn.resolvers.go @@ -2,13 +2,12 @@ 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 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" - "time" - "github.com/kloudlite/api/pkg/errors" + "time" "github.com/kloudlite/api/apps/infra/internal/app/graph/generated" "github.com/kloudlite/api/apps/infra/internal/app/graph/model" @@ -66,7 +65,5 @@ func (r *Resolver) GlobalVPN() generated.GlobalVPNResolver { return &globalVPNRe // GlobalVPNIn returns generated.GlobalVPNInResolver implementation. func (r *Resolver) GlobalVPNIn() generated.GlobalVPNInResolver { return &globalVPNInResolver{r} } -type ( - globalVPNResolver struct{ *Resolver } - globalVPNInResolver struct{ *Resolver } -) +type globalVPNResolver struct{ *Resolver } +type globalVPNInResolver struct{ *Resolver } diff --git a/apps/infra/internal/app/graph/globalvpndevice.resolvers.go b/apps/infra/internal/app/graph/globalvpndevice.resolvers.go index b9a6398b2..0cdf7c3bc 100644 --- a/apps/infra/internal/app/graph/globalvpndevice.resolvers.go +++ b/apps/infra/internal/app/graph/globalvpndevice.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/infra/internal/app/graph/helmrelease.resolvers.go b/apps/infra/internal/app/graph/helmrelease.resolvers.go index 63dff8140..b24a1e008 100644 --- a/apps/infra/internal/app/graph/helmrelease.resolvers.go +++ b/apps/infra/internal/app/graph/helmrelease.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/infra/internal/app/graph/model/models_gen.go b/apps/infra/internal/app/graph/model/models_gen.go index 0bddb7e7a..5db386d09 100644 --- a/apps/infra/internal/app/graph/model/models_gen.go +++ b/apps/infra/internal/app/graph/model/models_gen.go @@ -34,7 +34,7 @@ type BYOKSetupInstructionIn struct { Title string `json:"title"` } -type CheckAwsAccessOutput struct { +type CheckAWSAccessOutput struct { Result bool `json:"result"` InstallationURL *string `json:"installationUrl,omitempty"` } @@ -78,14 +78,14 @@ type EncodedValue struct { } type GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAssumeRoleParams struct { - AwsAccountID string `json:"awsAccountId"` + AWSAccountID string `json:"awsAccountId"` CfParamTrustedArn string `json:"cfParamTrustedARN"` ExternalID string `json:"externalID"` RoleArn string `json:"roleARN"` } type GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAssumeRoleParamsIn struct { - AwsAccountID string `json:"awsAccountId"` + AWSAccountID string `json:"awsAccountId"` } type GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAuthSecretKeys struct { @@ -101,7 +101,7 @@ type GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAuthSecretKeysIn struct { type GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials struct { AssumeRoleParams *GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAssumeRoleParams `json:"assumeRoleParams,omitempty"` - AuthMechanism GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism `json:"authMechanism"` + AuthMechanism GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism `json:"authMechanism"` AuthSecretKeys *GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAuthSecretKeys `json:"authSecretKeys,omitempty"` CfParamInstanceProfileName *string `json:"cfParamInstanceProfileName,omitempty"` CfParamRoleName *string `json:"cfParamRoleName,omitempty"` @@ -110,7 +110,7 @@ type GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials struct { type GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentialsIn struct { AssumeRoleParams *GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAssumeRoleParamsIn `json:"assumeRoleParams,omitempty"` - AuthMechanism GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism `json:"authMechanism"` + AuthMechanism GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism `json:"authMechanism"` AuthSecretKeys *GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAuthSecretKeysIn `json:"authSecretKeys,omitempty"` } @@ -166,16 +166,16 @@ type GithubComKloudliteAPIAppsInfraInternalEntitiesOutputField struct { } type GithubComKloudliteOperatorApisClustersV1AWSClusterConfig struct { - Credentials *GithubComKloudliteOperatorApisClustersV1AwsCredentials `json:"credentials"` + Credentials *GithubComKloudliteOperatorApisClustersV1AWSCredentials `json:"credentials"` K3sMasters *GithubComKloudliteOperatorApisClustersV1AWSK3sMastersConfig `json:"k3sMasters,omitempty"` NodePools map[string]interface{} `json:"nodePools,omitempty"` Region string `json:"region"` SpotNodePools map[string]interface{} `json:"spotNodePools,omitempty"` - Vpc *GithubComKloudliteOperatorApisClustersV1AwsVPCParams `json:"vpc,omitempty"` + Vpc *GithubComKloudliteOperatorApisClustersV1AWSVPCParams `json:"vpc,omitempty"` } type GithubComKloudliteOperatorApisClustersV1AWSClusterConfigIn struct { - Credentials *GithubComKloudliteOperatorApisClustersV1AwsCredentialsIn `json:"credentials"` + Credentials *GithubComKloudliteOperatorApisClustersV1AWSCredentialsIn `json:"credentials"` K3sMasters *GithubComKloudliteOperatorApisClustersV1AWSK3sMastersConfigIn `json:"k3sMasters,omitempty"` Region string `json:"region"` } @@ -196,85 +196,85 @@ type GithubComKloudliteOperatorApisClustersV1AWSK3sMastersConfigIn struct { type GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig struct { AvailabilityZone string `json:"availabilityZone"` - Ec2Pool *GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfig `json:"ec2Pool,omitempty"` + Ec2Pool *GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfig `json:"ec2Pool,omitempty"` IamInstanceProfileRole *string `json:"iamInstanceProfileRole,omitempty"` NvidiaGpuEnabled bool `json:"nvidiaGpuEnabled"` PoolType GithubComKloudliteOperatorApisClustersV1AWSPoolType `json:"poolType"` Region string `json:"region"` RootVolumeSize int `json:"rootVolumeSize"` RootVolumeType string `json:"rootVolumeType"` - SpotPool *GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig `json:"spotPool,omitempty"` + SpotPool *GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfig `json:"spotPool,omitempty"` VpcID string `json:"vpcId"` VpcSubnetID string `json:"vpcSubnetId"` } type GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfigIn struct { AvailabilityZone string `json:"availabilityZone"` - Ec2Pool *GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfigIn `json:"ec2Pool,omitempty"` + Ec2Pool *GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfigIn `json:"ec2Pool,omitempty"` NvidiaGpuEnabled bool `json:"nvidiaGpuEnabled"` PoolType GithubComKloudliteOperatorApisClustersV1AWSPoolType `json:"poolType"` - SpotPool *GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfigIn `json:"spotPool,omitempty"` + SpotPool *GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfigIn `json:"spotPool,omitempty"` } -type GithubComKloudliteOperatorApisClustersV1AwsCredentials struct { - AuthMechanism GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism `json:"authMechanism"` +type GithubComKloudliteOperatorApisClustersV1AWSCredentials struct { + AuthMechanism GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism `json:"authMechanism"` SecretRef *GithubComKloudliteOperatorApisCommonTypesSecretRef `json:"secretRef"` } -type GithubComKloudliteOperatorApisClustersV1AwsCredentialsIn struct { - AuthMechanism GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism `json:"authMechanism"` +type GithubComKloudliteOperatorApisClustersV1AWSCredentialsIn struct { + AuthMechanism GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism `json:"authMechanism"` SecretRef *GithubComKloudliteOperatorApisCommonTypesSecretRefIn `json:"secretRef"` } -type GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfig struct { +type GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfig struct { InstanceType string `json:"instanceType"` Nodes map[string]interface{} `json:"nodes,omitempty"` } -type GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfigIn struct { +type GithubComKloudliteOperatorApisClustersV1AWSEC2PoolConfigIn struct { InstanceType string `json:"instanceType"` Nodes map[string]interface{} `json:"nodes,omitempty"` } -type GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNode struct { +type GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNode struct { MemoryPerVcpu *GithubComKloudliteOperatorApisCommonTypesMinMaxFloat `json:"memoryPerVcpu,omitempty"` Vcpu *GithubComKloudliteOperatorApisCommonTypesMinMaxFloat `json:"vcpu"` } -type GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNodeIn struct { +type GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNodeIn struct { MemoryPerVcpu *GithubComKloudliteOperatorApisCommonTypesMinMaxFloatIn `json:"memoryPerVcpu,omitempty"` Vcpu *GithubComKloudliteOperatorApisCommonTypesMinMaxFloatIn `json:"vcpu"` } -type GithubComKloudliteOperatorApisClustersV1AwsSpotGpuNode struct { +type GithubComKloudliteOperatorApisClustersV1AWSSpotGpuNode struct { InstanceTypes []string `json:"instanceTypes"` } -type GithubComKloudliteOperatorApisClustersV1AwsSpotGpuNodeIn struct { +type GithubComKloudliteOperatorApisClustersV1AWSSpotGpuNodeIn struct { InstanceTypes []string `json:"instanceTypes"` } -type GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig struct { - CPUNode *GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNode `json:"cpuNode,omitempty"` - GpuNode *GithubComKloudliteOperatorApisClustersV1AwsSpotGpuNode `json:"gpuNode,omitempty"` +type GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfig struct { + CPUNode *GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNode `json:"cpuNode,omitempty"` + GpuNode *GithubComKloudliteOperatorApisClustersV1AWSSpotGpuNode `json:"gpuNode,omitempty"` Nodes map[string]interface{} `json:"nodes,omitempty"` SpotFleetTaggingRoleName string `json:"spotFleetTaggingRoleName"` } -type GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfigIn struct { - CPUNode *GithubComKloudliteOperatorApisClustersV1AwsSpotCPUNodeIn `json:"cpuNode,omitempty"` - GpuNode *GithubComKloudliteOperatorApisClustersV1AwsSpotGpuNodeIn `json:"gpuNode,omitempty"` +type GithubComKloudliteOperatorApisClustersV1AWSSpotPoolConfigIn struct { + CPUNode *GithubComKloudliteOperatorApisClustersV1AWSSpotCPUNodeIn `json:"cpuNode,omitempty"` + GpuNode *GithubComKloudliteOperatorApisClustersV1AWSSpotGpuNodeIn `json:"gpuNode,omitempty"` Nodes map[string]interface{} `json:"nodes,omitempty"` } -type GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID struct { +type GithubComKloudliteOperatorApisClustersV1AWSSubnetWithID struct { AvailabilityZone string `json:"availabilityZone"` ID string `json:"id"` } -type GithubComKloudliteOperatorApisClustersV1AwsVPCParams struct { +type GithubComKloudliteOperatorApisClustersV1AWSVPCParams struct { ID string `json:"id"` - PublicSubnets []*GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID `json:"publicSubnets"` + PublicSubnets []*GithubComKloudliteOperatorApisClustersV1AWSSubnetWithID `json:"publicSubnets"` } type GithubComKloudliteOperatorApisClustersV1ClusterOutput struct { @@ -292,14 +292,14 @@ type GithubComKloudliteOperatorApisClustersV1ClusterSpec struct { AccountID string `json:"accountId"` AccountName string `json:"accountName"` AvailabilityMode GithubComKloudliteOperatorApisClustersV1ClusterSpecAvailabilityMode `json:"availabilityMode"` - Aws *GithubComKloudliteOperatorApisClustersV1AWSClusterConfig `json:"aws,omitempty"` + AWS *GithubComKloudliteOperatorApisClustersV1AWSClusterConfig `json:"aws,omitempty"` BackupToS3Enabled bool `json:"backupToS3Enabled"` CloudflareEnabled *bool `json:"cloudflareEnabled,omitempty"` CloudProvider GithubComKloudliteOperatorApisCommonTypesCloudProvider `json:"cloudProvider"` ClusterInternalDNSHost *string `json:"clusterInternalDnsHost,omitempty"` ClusterServiceCidr *string `json:"clusterServiceCIDR,omitempty"` ClusterTokenRef *GithubComKloudliteOperatorApisCommonTypesSecretKeyRef `json:"clusterTokenRef,omitempty"` - Gcp *GithubComKloudliteOperatorApisClustersV1GCPClusterConfig `json:"gcp,omitempty"` + GCP *GithubComKloudliteOperatorApisClustersV1GCPClusterConfig `json:"gcp,omitempty"` KloudliteRelease string `json:"kloudliteRelease"` MessageQueueTopicName string `json:"messageQueueTopicName"` Output *GithubComKloudliteOperatorApisClustersV1ClusterOutput `json:"output,omitempty"` @@ -309,19 +309,19 @@ type GithubComKloudliteOperatorApisClustersV1ClusterSpec struct { type GithubComKloudliteOperatorApisClustersV1ClusterSpecIn struct { AvailabilityMode GithubComKloudliteOperatorApisClustersV1ClusterSpecAvailabilityMode `json:"availabilityMode"` - Aws *GithubComKloudliteOperatorApisClustersV1AWSClusterConfigIn `json:"aws,omitempty"` + AWS *GithubComKloudliteOperatorApisClustersV1AWSClusterConfigIn `json:"aws,omitempty"` CloudflareEnabled *bool `json:"cloudflareEnabled,omitempty"` CloudProvider GithubComKloudliteOperatorApisCommonTypesCloudProvider `json:"cloudProvider"` - Gcp *GithubComKloudliteOperatorApisClustersV1GCPClusterConfigIn `json:"gcp,omitempty"` + GCP *GithubComKloudliteOperatorApisClustersV1GCPClusterConfigIn `json:"gcp,omitempty"` } type GithubComKloudliteOperatorApisClustersV1GCPClusterConfig struct { CredentialsRef *GithubComKloudliteOperatorApisCommonTypesSecretRef `json:"credentialsRef"` - GcpProjectID string `json:"gcpProjectID"` + GCPProjectID string `json:"gcpProjectID"` MasterNodes *GithubComKloudliteOperatorApisClustersV1GCPMasterNodesConfig `json:"masterNodes,omitempty"` Region string `json:"region"` ServiceAccount *GithubComKloudliteOperatorApisClustersV1GCPServiceAccount `json:"serviceAccount"` - Vpc *GithubComKloudliteOperatorApisClustersV1GcpVPCParams `json:"vpc,omitempty"` + Vpc *GithubComKloudliteOperatorApisClustersV1GCPVPCParams `json:"vpc,omitempty"` } type GithubComKloudliteOperatorApisClustersV1GCPClusterConfigIn struct { @@ -340,13 +340,13 @@ type GithubComKloudliteOperatorApisClustersV1GCPNodePoolConfig struct { BootVolumeSize int `json:"bootVolumeSize"` BootVolumeType string `json:"bootVolumeType"` Credentials *GithubComKloudliteOperatorApisCommonTypesSecretRef `json:"credentials"` - GcpProjectID string `json:"gcpProjectID"` + GCPProjectID string `json:"gcpProjectID"` MachineType string `json:"machineType"` Nodes map[string]interface{} `json:"nodes,omitempty"` PoolType GithubComKloudliteOperatorApisClustersV1GCPPoolType `json:"poolType"` Region string `json:"region"` ServiceAccount *GithubComKloudliteOperatorApisClustersV1GCPServiceAccount `json:"serviceAccount"` - Vpc *GithubComKloudliteOperatorApisClustersV1GcpVPCParams `json:"vpc,omitempty"` + Vpc *GithubComKloudliteOperatorApisClustersV1GCPVPCParams `json:"vpc,omitempty"` } type GithubComKloudliteOperatorApisClustersV1GCPNodePoolConfigIn struct { @@ -361,7 +361,7 @@ type GithubComKloudliteOperatorApisClustersV1GCPServiceAccount struct { Scopes []string `json:"scopes,omitempty"` } -type GithubComKloudliteOperatorApisClustersV1GcpVPCParams struct { +type GithubComKloudliteOperatorApisClustersV1GCPVPCParams struct { Name string `json:"name"` } @@ -373,9 +373,9 @@ type GithubComKloudliteOperatorApisClustersV1MasterNodeProps struct { } type GithubComKloudliteOperatorApisClustersV1NodePoolSpec struct { - Aws *GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig `json:"aws,omitempty"` + AWS *GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig `json:"aws,omitempty"` CloudProvider GithubComKloudliteOperatorApisCommonTypesCloudProvider `json:"cloudProvider"` - Gcp *GithubComKloudliteOperatorApisClustersV1GCPNodePoolConfig `json:"gcp,omitempty"` + GCP *GithubComKloudliteOperatorApisClustersV1GCPNodePoolConfig `json:"gcp,omitempty"` MaxCount int `json:"maxCount"` MinCount int `json:"minCount"` NodeLabels map[string]interface{} `json:"nodeLabels,omitempty"` @@ -383,9 +383,9 @@ type GithubComKloudliteOperatorApisClustersV1NodePoolSpec struct { } type GithubComKloudliteOperatorApisClustersV1NodePoolSpecIn struct { - Aws *GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfigIn `json:"aws,omitempty"` + AWS *GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfigIn `json:"aws,omitempty"` CloudProvider GithubComKloudliteOperatorApisCommonTypesCloudProvider `json:"cloudProvider"` - Gcp *GithubComKloudliteOperatorApisClustersV1GCPNodePoolConfigIn `json:"gcp,omitempty"` + GCP *GithubComKloudliteOperatorApisClustersV1GCPNodePoolConfigIn `json:"gcp,omitempty"` MaxCount int `json:"maxCount"` MinCount int `json:"minCount"` NodeLabels map[string]interface{} `json:"nodeLabels,omitempty"` @@ -956,7 +956,7 @@ type K8sIoAPICoreV1PersistentVolumeClaimStatusIn struct { type K8sIoAPICoreV1PersistentVolumeSpec struct { AccessModes []string `json:"accessModes,omitempty"` - AwsElasticBlockStore *K8sIoAPICoreV1AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty"` + AWSElasticBlockStore *K8sIoAPICoreV1AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty"` AzureDisk *K8sIoAPICoreV1AzureDiskVolumeSource `json:"azureDisk,omitempty"` AzureFile *K8sIoAPICoreV1AzureFilePersistentVolumeSource `json:"azureFile,omitempty"` Capacity map[string]interface{} `json:"capacity,omitempty"` @@ -990,7 +990,7 @@ type K8sIoAPICoreV1PersistentVolumeSpec struct { type K8sIoAPICoreV1PersistentVolumeSpecIn struct { AccessModes []string `json:"accessModes,omitempty"` - AwsElasticBlockStore *K8sIoAPICoreV1AWSElasticBlockStoreVolumeSourceIn `json:"awsElasticBlockStore,omitempty"` + AWSElasticBlockStore *K8sIoAPICoreV1AWSElasticBlockStoreVolumeSourceIn `json:"awsElasticBlockStore,omitempty"` AzureDisk *K8sIoAPICoreV1AzureDiskVolumeSourceIn `json:"azureDisk,omitempty"` AzureFile *K8sIoAPICoreV1AzureFilePersistentVolumeSourceIn `json:"azureFile,omitempty"` Capacity map[string]interface{} `json:"capacity,omitempty"` @@ -1592,44 +1592,44 @@ func (e GithubComKloudliteOperatorApisClustersV1AWSPoolType) MarshalGQL(w io.Wri fmt.Fprint(w, strconv.Quote(e.String())) } -type GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism string +type GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism string const ( - GithubComKloudliteOperatorApisClustersV1AwsAuthMechanismAssumeRole GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism = "assume_role" - GithubComKloudliteOperatorApisClustersV1AwsAuthMechanismSecretKeys GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism = "secret_keys" + GithubComKloudliteOperatorApisClustersV1AWSAuthMechanismAssumeRole GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism = "assume_role" + GithubComKloudliteOperatorApisClustersV1AWSAuthMechanismSecretKeys GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism = "secret_keys" ) -var AllGithubComKloudliteOperatorApisClustersV1AwsAuthMechanism = []GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism{ - GithubComKloudliteOperatorApisClustersV1AwsAuthMechanismAssumeRole, - GithubComKloudliteOperatorApisClustersV1AwsAuthMechanismSecretKeys, +var AllGithubComKloudliteOperatorApisClustersV1AWSAuthMechanism = []GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism{ + GithubComKloudliteOperatorApisClustersV1AWSAuthMechanismAssumeRole, + GithubComKloudliteOperatorApisClustersV1AWSAuthMechanismSecretKeys, } -func (e GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism) IsValid() bool { +func (e GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism) IsValid() bool { switch e { - case GithubComKloudliteOperatorApisClustersV1AwsAuthMechanismAssumeRole, GithubComKloudliteOperatorApisClustersV1AwsAuthMechanismSecretKeys: + case GithubComKloudliteOperatorApisClustersV1AWSAuthMechanismAssumeRole, GithubComKloudliteOperatorApisClustersV1AWSAuthMechanismSecretKeys: return true } return false } -func (e GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism) String() string { +func (e GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism) String() string { return string(e) } -func (e *GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism) UnmarshalGQL(v interface{}) error { +func (e *GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism) UnmarshalGQL(v interface{}) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") } - *e = GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism(str) + *e = GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism(str) if !e.IsValid() { return fmt.Errorf("%s is not a valid Github__com___kloudlite___operator___apis___clusters___v1__AwsAuthMechanism", str) } return nil } -func (e GithubComKloudliteOperatorApisClustersV1AwsAuthMechanism) MarshalGQL(w io.Writer) { +func (e GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } @@ -1718,22 +1718,22 @@ func (e GithubComKloudliteOperatorApisClustersV1GCPPoolType) MarshalGQL(w io.Wri type GithubComKloudliteOperatorApisCommonTypesCloudProvider string const ( - GithubComKloudliteOperatorApisCommonTypesCloudProviderAws GithubComKloudliteOperatorApisCommonTypesCloudProvider = "aws" + GithubComKloudliteOperatorApisCommonTypesCloudProviderAWS GithubComKloudliteOperatorApisCommonTypesCloudProvider = "aws" GithubComKloudliteOperatorApisCommonTypesCloudProviderAzure GithubComKloudliteOperatorApisCommonTypesCloudProvider = "azure" GithubComKloudliteOperatorApisCommonTypesCloudProviderDigitalocean GithubComKloudliteOperatorApisCommonTypesCloudProvider = "digitalocean" - GithubComKloudliteOperatorApisCommonTypesCloudProviderGcp GithubComKloudliteOperatorApisCommonTypesCloudProvider = "gcp" + GithubComKloudliteOperatorApisCommonTypesCloudProviderGCP GithubComKloudliteOperatorApisCommonTypesCloudProvider = "gcp" ) var AllGithubComKloudliteOperatorApisCommonTypesCloudProvider = []GithubComKloudliteOperatorApisCommonTypesCloudProvider{ - GithubComKloudliteOperatorApisCommonTypesCloudProviderAws, + GithubComKloudliteOperatorApisCommonTypesCloudProviderAWS, GithubComKloudliteOperatorApisCommonTypesCloudProviderAzure, GithubComKloudliteOperatorApisCommonTypesCloudProviderDigitalocean, - GithubComKloudliteOperatorApisCommonTypesCloudProviderGcp, + GithubComKloudliteOperatorApisCommonTypesCloudProviderGCP, } func (e GithubComKloudliteOperatorApisCommonTypesCloudProvider) IsValid() bool { switch e { - case GithubComKloudliteOperatorApisCommonTypesCloudProviderAws, GithubComKloudliteOperatorApisCommonTypesCloudProviderAzure, GithubComKloudliteOperatorApisCommonTypesCloudProviderDigitalocean, GithubComKloudliteOperatorApisCommonTypesCloudProviderGcp: + case GithubComKloudliteOperatorApisCommonTypesCloudProviderAWS, GithubComKloudliteOperatorApisCommonTypesCloudProviderAzure, GithubComKloudliteOperatorApisCommonTypesCloudProviderDigitalocean, GithubComKloudliteOperatorApisCommonTypesCloudProviderGCP: return true } return false diff --git a/apps/infra/internal/app/graph/namespace.resolvers.go b/apps/infra/internal/app/graph/namespace.resolvers.go index d10469bec..28572f385 100644 --- a/apps/infra/internal/app/graph/namespace.resolvers.go +++ b/apps/infra/internal/app/graph/namespace.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/infra/internal/app/graph/node.resolvers.go b/apps/infra/internal/app/graph/node.resolvers.go index aec8a02eb..d8d5db86e 100644 --- a/apps/infra/internal/app/graph/node.resolvers.go +++ b/apps/infra/internal/app/graph/node.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/infra/internal/app/graph/nodepool.resolvers.go b/apps/infra/internal/app/graph/nodepool.resolvers.go index eb55c2ff2..29d1c75d9 100644 --- a/apps/infra/internal/app/graph/nodepool.resolvers.go +++ b/apps/infra/internal/app/graph/nodepool.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/infra/internal/app/graph/persistentvolume.resolvers.go b/apps/infra/internal/app/graph/persistentvolume.resolvers.go index 625f4718e..be95d0717 100644 --- a/apps/infra/internal/app/graph/persistentvolume.resolvers.go +++ b/apps/infra/internal/app/graph/persistentvolume.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/infra/internal/app/graph/persistentvolumeclaim.resolvers.go b/apps/infra/internal/app/graph/persistentvolumeclaim.resolvers.go index 0490b6acc..47a17f606 100644 --- a/apps/infra/internal/app/graph/persistentvolumeclaim.resolvers.go +++ b/apps/infra/internal/app/graph/persistentvolumeclaim.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/infra/internal/app/graph/schema.resolvers.go b/apps/infra/internal/app/graph/schema.resolvers.go index 382751dbe..13c75da32 100644 --- a/apps/infra/internal/app/graph/schema.resolvers.go +++ b/apps/infra/internal/app/graph/schema.resolvers.go @@ -2,19 +2,19 @@ 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 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" "encoding/base64" "fmt" - fc "github.com/kloudlite/api/apps/infra/internal/entities/field-constants" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/apps/infra/internal/app/graph/generated" "github.com/kloudlite/api/apps/infra/internal/app/graph/model" "github.com/kloudlite/api/apps/infra/internal/domain" "github.com/kloudlite/api/apps/infra/internal/entities" + fc "github.com/kloudlite/api/apps/infra/internal/entities/field-constants" "github.com/kloudlite/api/common/fields" fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/repos" @@ -675,22 +675,9 @@ func (r *queryResolver) InfraGetDomainEntry(ctx context.Context, domainName stri return r.Domain.GetDomainEntry(ictx, domainName) } -// InfraCheckAwsAccess is the resolver for the infra_checkAwsAccess field. -func (r *queryResolver) InfraCheckAwsAccess(ctx context.Context, cloudproviderName string) (*model.CheckAwsAccessOutput, error) { - ictx, err := toInfraContext(ctx) - if err != nil { - return nil, errors.NewE(err) - } - - output, err := r.Domain.ValidateProviderSecretAWSAccess(ictx, cloudproviderName) - if err != nil { - return nil, errors.NewE(err) - } - - return &model.CheckAwsAccessOutput{ - Result: output.Result, - InstallationURL: output.InstallationURL, - }, nil +// InfraCheckAWSAccess is the resolver for the infra_checkAwsAccess field. +func (r *queryResolver) InfraCheckAWSAccess(ctx context.Context, cloudproviderName string) (*model.CheckAWSAccessOutput, error) { + panic(fmt.Errorf("not implemented: InfraCheckAWSAccess - infra_checkAwsAccess")) } // InfraListHelmReleases is the resolver for the infra_listHelmReleases field. @@ -877,3 +864,28 @@ func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } type mutationResolver struct{ *Resolver } type queryResolver struct{ *Resolver } + +// !!! WARNING !!! +// The code below was going to be deleted when updating resolvers. It has been copied here so you have +// one last chance to move it out of harms way if you want. There are two reasons this happens: +// - When renaming or deleting a resolver the old code will be put in here. You can safely delete +// it when you're done. +// - You have helper methods in this file. Move them out to keep these resolver files clean. +/* + func (r *queryResolver) InfraCheckAwsAccess(ctx context.Context, cloudproviderName string) (*model.CheckAwsAccessOutput, error) { + ictx, err := toInfraContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + + output, err := r.Domain.ValidateProviderSecretAWSAccess(ictx, cloudproviderName) + if err != nil { + return nil, errors.NewE(err) + } + + return &model.CheckAwsAccessOutput{ + Result: output.Result, + InstallationURL: output.InstallationURL, + }, nil +} +*/ diff --git a/apps/infra/internal/app/graph/volumeattachment.resolvers.go b/apps/infra/internal/app/graph/volumeattachment.resolvers.go index 8bbb10345..dc488f04d 100644 --- a/apps/infra/internal/app/graph/volumeattachment.resolvers.go +++ b/apps/infra/internal/app/graph/volumeattachment.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/go.mod b/go.mod index 327c73dd9..81af3d5af 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.23 toolchain go1.23.1 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/Masterminds/sprig/v3 v3.3.0 github.com/aws/aws-sdk-go v1.50.10 github.com/bradleyfalzon/ghinstallation/v2 v2.0.4 @@ -21,7 +21,7 @@ require ( github.com/matoous/go-nanoid/v2 v2.0.0 github.com/pkg/errors v0.9.1 github.com/sendgrid/sendgrid-go v3.11.1+incompatible - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.17 github.com/xanzy/go-gitlab v0.63.0 github.com/xeipuuv/gojsonschema v1.2.0 github.com/yext/yerrors v0.0.0-20230716030415-7ebf68e23868 // indirect @@ -169,11 +169,11 @@ require ( cloud.google.com/go/compute/metadata v0.3.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.3.0 // indirect - github.com/agnivade/levenshtein v1.1.1 // indirect + github.com/agnivade/levenshtein v1.2.0 // indirect github.com/andybalholm/brotli v1.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect @@ -222,7 +222,7 @@ require ( github.com/shopspring/decimal v1.4.0 // indirect github.com/spf13/cast v1.7.0 // indirect github.com/spf13/pflag v1.0.5 - github.com/urfave/cli/v2 v2.27.3 // indirect + github.com/urfave/cli/v2 v2.27.4 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.55.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect diff --git a/go.sum b/go.sum index a26e8b5d7..517d4ec19 100644 --- a/go.sum +++ b/go.sum @@ -7,8 +7,8 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= @@ -37,12 +37,12 @@ github.com/PaesslerAG/gval v1.0.0/go.mod h1:y/nm5yEyTeX6av0OfKJNp9rBNj2XrGhAf5+v github.com/PaesslerAG/jsonpath v0.1.0/go.mod h1:4BzmtoM/PI8fPO4aQGIusjGxGir2BzcV0grWtFzq1Y8= github.com/PaesslerAG/jsonpath v0.1.1 h1:c1/AToHQMVsduPAa4Vh6xp2U0evy4t8SWp8imEsylIk= github.com/PaesslerAG/jsonpath v0.1.1/go.mod h1:lVboNxFGal/VwW6d9JzIy56bUsYAP6tH/x80vjnCseY= -github.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4yPeE= -github.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk= +github.com/PuerkitoBio/goquery v1.9.3 h1:mpJr/ikUA9/GNJB/DBZcGeFDXUtosHRyRrwh7KGdTG0= +github.com/PuerkitoBio/goquery v1.9.3/go.mod h1:1ndLHPdTz+DyQPICCWYlYQMPl0oXZj0G6D4LCYA6u4U= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= -github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= -github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/agnivade/levenshtein v1.2.0 h1:U9L4IOT0Y3i0TIlUIDJ7rVUziKi/zPbrJGaFrtYH3SY= +github.com/agnivade/levenshtein v1.2.0/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -101,8 +101,9 @@ github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.3.1 h1:1V7cHiaW+C+39wEfpH6XlLBQo3j/PciWFrgfCLS8XrE= @@ -114,8 +115,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= -github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= +github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7cNTs5R6Hk4V2lcmLz2NsG2VnInyNo= +github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= @@ -136,8 +137,6 @@ github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQ github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/emicklei/go-restful/v3 v3.11.1 h1:S+9bSbua1z3FgCnV0KKOSSZ3mDthb5NyEPL5gEpCvyk= -github.com/emicklei/go-restful/v3 v3.11.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -146,8 +145,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= -github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= @@ -184,16 +181,10 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= -github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= -github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= -github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= -github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= @@ -270,8 +261,6 @@ github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= @@ -337,8 +326,6 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0= github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 h1:YnZh3TL6AG4EfoInx1/L5zcPHd2QxgLKseJB1KtHjdQ= @@ -351,6 +338,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= @@ -451,8 +440,6 @@ github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjz github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -462,8 +449,6 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -527,8 +512,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/urfave/cli/v2 v2.27.3 h1:/POWahRmdh7uztQ3CYnaDddk0Rm90PyOgIxgW2rr41M= -github.com/urfave/cli/v2 v2.27.3/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= +github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8= +github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.33.0/go.mod h1:KJRK/MXx0J+yd0c5hlR+s1tIHD72sniU8ZJjl97LIw4= @@ -537,8 +522,8 @@ github.com/valyala/fasthttp v1.55.0 h1:Zkefzgt6a7+bVKHnu/YaYSOPfNYNisSVBo/unVCf8 github.com/valyala/fasthttp v1.55.0/go.mod h1:NkY9JtkrpPKmgwV3HTaS2HWaJss9RSIsRVfcxxoHiOM= github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xanzy/go-gitlab v0.63.0 h1:a9fXpKWykUS6dowapFej/2Wjf4aOAEFC1q2ZIcz4IpI= @@ -612,13 +597,9 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 h1:1wqE9dj9NpSm04INVsJhhEUzhuDVjbcyKH91sVyPATw= golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -627,8 +608,6 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -648,13 +627,9 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -685,14 +660,10 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -702,12 +673,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -719,8 +686,6 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= -golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -803,20 +768,14 @@ k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= k8s.io/kubectl v0.31.0 h1:kANwAAPVY02r4U4jARP/C+Q1sssCcN/1p9Nk+7BQKVg= k8s.io/kubectl v0.31.0/go.mod h1:pB47hhFypGsaHAPjlwrNbvhXgmuAr01ZBvAIIUaI8d4= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= oras.land/oras-go v1.2.5 h1:XpYuAwAb0DfQsunIyMfeET92emK8km3W4yEzZvUbsTo= oras.land/oras-go v1.2.5/go.mod h1:PuAwRShRZCsZb7g8Ar3jKKQR/2A/qN+pkYxIOd/FAoo= -sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= -sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= From 1cbf089d4db62a6bb5561e6e51aa090d2ab1a407 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 8 Oct 2024 12:38:59 +0530 Subject: [PATCH 82/89] feat: adds gateway configurations, to helm setup instructions --- apps/infra/internal/domain/byok-clusters.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/infra/internal/domain/byok-clusters.go b/apps/infra/internal/domain/byok-clusters.go index fe67c7df0..ec1327229 100644 --- a/apps/infra/internal/domain/byok-clusters.go +++ b/apps/infra/internal/domain/byok-clusters.go @@ -203,6 +203,11 @@ func (d *domain) GetBYOKClusterSetupInstructions(ctx InfraContext, name string, return nil, err } + gvpnConn, err := d.findGlobalVPNConnection(ctx, ctx.AccountName, cluster.Name, cluster.GlobalVPN) + if err != nil { + return nil, err + } + if onlyHelmValues { b, err := json.Marshal(map[string]any{ "crds-url": fmt.Sprintf("https://github.com/kloudlite/helm-charts/releases/download/%s/crds-all.yml", d.env.KloudliteRelease), @@ -217,6 +222,11 @@ func (d *domain) GetBYOKClusterSetupInstructions(ctx InfraContext, name string, "messageOfficeGRPCAddr": d.env.MessageOfficeExternalGrpcAddr, "kloudliteDNSSuffix": fmt.Sprintf("%s.%s", ctx.AccountName, d.env.KloudliteDNSSuffix), }, + + "gateway": map[string]any{ + "IP": gvpnConn.Spec.GlobalIP, + "clusterCIDR": gvpnConn.Spec.ClusterCIDR, + }, }) if err != nil { return nil, err From 7ce913f126afd28baa684dd3df89a2a3b798a44f Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 8 Oct 2024 12:40:18 +0530 Subject: [PATCH 83/89] fix: ignores not-found while deleting RoleBinding --- apps/accounts/internal/domain/memberships.go | 4 ++-- apps/iam/internal/app/grpc-server.go | 8 +++++++- apps/iam/internal/app/main.go | 3 ++- apps/iam/internal/env/env.go | 2 ++ apps/iam/internal/framework/main.go | 4 ++-- apps/iam/main.go | 7 ++++++- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/apps/accounts/internal/domain/memberships.go b/apps/accounts/internal/domain/memberships.go index cbc0b0ba2..47d782bf5 100644 --- a/apps/accounts/internal/domain/memberships.go +++ b/apps/accounts/internal/domain/memberships.go @@ -2,9 +2,10 @@ package domain import ( "context" - "github.com/kloudlite/api/apps/accounts/internal/entities" "strings" + "github.com/kloudlite/api/apps/accounts/internal/entities" + iamT "github.com/kloudlite/api/apps/iam/types" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" "github.com/kloudlite/api/pkg/errors" @@ -69,7 +70,6 @@ func (d *domain) UpdateAccountMembership(ctx UserContext, accountName string, me ResourceRef: iamT.NewResourceRef(accountName, iamT.ResourceAccount, accountName), Role: string(role), }) - if err != nil { return false, errors.NewE(err) } diff --git a/apps/iam/internal/app/grpc-server.go b/apps/iam/internal/app/grpc-server.go index 8858443d6..2377b8467 100644 --- a/apps/iam/internal/app/grpc-server.go +++ b/apps/iam/internal/app/grpc-server.go @@ -52,6 +52,8 @@ func (s *GrpcService) UpdateMembership(ctx context.Context, in *iam.UpdateMember }, nil } +var ErrRoleBindingNotFound error = fmt.Errorf("role binding not found") + func (s *GrpcService) findRoleBinding(ctx context.Context, userId repos.ID, resourceRef string) (*entities.RoleBinding, error) { rb, err := s.rbRepo.FindOne( ctx, repos.Filter{ @@ -63,7 +65,7 @@ func (s *GrpcService) findRoleBinding(ctx context.Context, userId repos.ID, reso return nil, errors.NewE(err) } if rb == nil { - return nil, errors.Newf("role binding for (userId=%s, ResourceRef=%s) not found", userId, resourceRef) + return nil, ErrRoleBindingNotFound } return rb, nil } @@ -236,6 +238,10 @@ func (s *GrpcService) RemoveMembership(ctx context.Context, in *iam.RemoveMember rb, err := s.findRoleBinding(ctx, repos.ID(in.UserId), in.ResourceRef) if err != nil { + if errors.Is(err, ErrRoleBindingNotFound) { + s.logger.WithKV("userID", in.UserId, "resourceRef", in.ResourceRef).Infof("role binding might already have been deleted") + return &iam.RemoveMembershipOut{Result: true}, nil + } return nil, errors.NewE(err) } diff --git a/apps/iam/internal/app/main.go b/apps/iam/internal/app/main.go index eb9a2105a..827a4b061 100644 --- a/apps/iam/internal/app/main.go +++ b/apps/iam/internal/app/main.go @@ -2,10 +2,11 @@ package app import ( "encoding/json" + "os" + "github.com/kloudlite/api/apps/iam/internal/entities" "github.com/kloudlite/api/pkg/errors" "github.com/kloudlite/api/pkg/logging" - "os" "github.com/kloudlite/api/apps/iam/internal/env" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" diff --git a/apps/iam/internal/env/env.go b/apps/iam/internal/env/env.go index b4be0651e..4c6271b9c 100644 --- a/apps/iam/internal/env/env.go +++ b/apps/iam/internal/env/env.go @@ -11,6 +11,8 @@ type Env struct { MongoDbName string `env:"MONGO_DB_NAME" required:"true"` ActionRoleMapFile string `env:"ACTION_ROLE_MAP_FILE" required:"false"` + + ShowGRPCLogs bool `env:"SHOW_GRPC_LOGS" default:"false"` } func LoadEnv() (*Env, error) { diff --git a/apps/iam/internal/framework/main.go b/apps/iam/internal/framework/main.go index cb60565e3..5a3460964 100644 --- a/apps/iam/internal/framework/main.go +++ b/apps/iam/internal/framework/main.go @@ -33,8 +33,8 @@ var Module fx.Option = fx.Module( }), repos.NewMongoClientFx[*fm](), - fx.Provide(func(logger *slog.Logger) (app.IAMGrpcServer, error) { - return grpc.NewGrpcServer(grpc.ServerOpts{Logger: logger}) + fx.Provide(func(logger *slog.Logger, ev *env.Env) (app.IAMGrpcServer, error) { + return grpc.NewGrpcServer(grpc.ServerOpts{Logger: logger, ShowLogs: ev.ShowGRPCLogs}) }), app.Module, diff --git a/apps/iam/main.go b/apps/iam/main.go index 564607137..275c9209b 100644 --- a/apps/iam/main.go +++ b/apps/iam/main.go @@ -37,7 +37,12 @@ func main() { }), fx.Provide(func() (*env.Env, error) { - return env.LoadEnv() + e, err := env.LoadEnv() + if err != nil { + return nil, err + } + e.ShowGRPCLogs = debug + return e, nil }), framework.Module, From 274e18583ff9d6f0f10bf8dc4c47f1155040537d Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 8 Oct 2024 13:13:26 +0530 Subject: [PATCH 84/89] fix: deletes invitation after accept/reject. Lingering invitations led to failure to invite user, who was invited before, but removed after that --- apps/accounts/internal/domain/invitations.go | 7 ++-- apps/accounts/main.go | 42 +++++++++++--------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/apps/accounts/internal/domain/invitations.go b/apps/accounts/internal/domain/invitations.go index 0fc01fa5f..16647fec0 100644 --- a/apps/accounts/internal/domain/invitations.go +++ b/apps/accounts/internal/domain/invitations.go @@ -2,6 +2,7 @@ package domain import ( "context" + "github.com/kloudlite/api/apps/accounts/internal/entities" fc "github.com/kloudlite/api/apps/accounts/internal/entities/field-constants" iamT "github.com/kloudlite/api/apps/iam/types" @@ -180,12 +181,12 @@ func (d *domain) AcceptInvitation(ctx UserContext, accountName string, inviteTok return false, errors.Newf("invitation already accepted or rejected, won't process further") } - inv.Accepted = fn.New(true) - if _, err := d.invitationRepo.UpdateById(ctx, inv.Id, inv); err != nil { + if err := d.addMembership(ctx, accountName, ctx.UserId, inv.UserRole); err != nil { return false, errors.NewE(err) } - if err := d.addMembership(ctx, accountName, ctx.UserId, inv.UserRole); err != nil { + // INFO: invitation accepted, removing invite + if err := d.invitationRepo.DeleteById(ctx, inv.Id); err != nil { return false, errors.NewE(err) } diff --git a/apps/accounts/main.go b/apps/accounts/main.go index 9014f4bba..cc1a19068 100644 --- a/apps/accounts/main.go +++ b/apps/accounts/main.go @@ -3,7 +3,6 @@ package main import ( "context" "flag" - "log/slog" "os" "time" @@ -20,37 +19,42 @@ import ( ) func main() { + start := time.Now() + var isDev bool flag.BoolVar(&isDev, "dev", false, "--dev") + + var debug bool + flag.BoolVar(&debug, "debug", false, "--debug") + flag.Parse() - logger, err := logging.New(&logging.Options{Name: "accounts", Dev: isDev}) - if err != nil { - panic(err) + if isDev { + debug = true } + logger := logging.NewSlogLogger(logging.SlogOptions{ + ShowCaller: true, + ShowDebugLogs: debug, + SetAsDefaultLogger: true, + }) + app := fx.New( fx.NopLogger, - fx.Provide(func() logging.Logger { - return logger + fx.Provide(func() (logging.Logger, error) { + return logging.New(&logging.Options{Name: "accounts-api", Dev: isDev, ShowDebugLog: debug}) }), - fx.Provide(func() *slog.Logger { - return logging.NewSlogLogger(logging.SlogOptions{ - ShowCaller: true, - ShowDebugLogs: isDev, - SetAsDefaultLogger: true, - }) - }), + fx.Supply(logger), fx.Provide(func() (*env.Env, error) { - if e, err := env.LoadEnv(); err != nil { + e, err := env.LoadEnv() + if err != nil { return nil, errors.NewE(err) - } else { - e.IsDev = isDev - return e, nil } + e.IsDev = isDev + return e, nil }), fx.Provide(func(e *env.Env) (*rest.Config, error) { @@ -79,10 +83,10 @@ func main() { defer cancelFunc() if err := app.Start(ctx); err != nil { - logger.Errorf(err, "error starting accounts app") + logger.Error("failed to start accounts api, got", "err", err) os.Exit(1) } - common.PrintReadyBanner() + common.PrintReadyBanner2(time.Since(start)) <-app.Done() } From e6334681740ad5a260550e967859195d7ffc9d6c Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Tue, 8 Oct 2024 13:14:42 +0530 Subject: [PATCH 85/89] fix: while deleting an environment, also deletes it's resource mapping --- apps/console/internal/domain/environment.go | 31 ++++++++++----------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/apps/console/internal/domain/environment.go b/apps/console/internal/domain/environment.go index 741b6a539..fa9287848 100644 --- a/apps/console/internal/domain/environment.go +++ b/apps/console/internal/domain/environment.go @@ -666,13 +666,17 @@ func (d *domain) OnEnvironmentDeleteMessage(ctx ConsoleContext, env entities.Env return errors.NewE(err) } - if err := d.environmentRepo.DeleteOne( - ctx, - repos.Filter{ - fields.AccountName: ctx.AccountName, - fields.MetadataName: env.Name, - }, - ); err != nil { + if err := d.environmentRepo.DeleteOne(ctx, repos.Filter{ + fields.AccountName: ctx.AccountName, + fields.MetadataName: env.Name, + }); err != nil { + return errors.NewE(err) + } + + if err := d.resourceMappingRepo.DeleteMany(ctx, repos.Filter{ + fc.ResourceMappingResourceHeirarchy: entities.ResourceHeirarchyEnvironment, + fc.EnvironmentName: env.Name, + }); err != nil { return errors.NewE(err) } @@ -701,16 +705,9 @@ func (d *domain) OnEnvironmentUpdateMessage(ctx ConsoleContext, env entities.Env return d.resyncK8sResource(ctx, xenv.Name, xenv.SyncStatus.Action, &xenv.Environment, xenv.RecordVersion) } - uenv, err := d.environmentRepo.PatchById( - ctx, - xenv.Id, - common.PatchForSyncFromAgent( - &env, - recordVersion, - status, - common.PatchOpts{ - MessageTimestamp: opts.MessageTimestamp, - })) + uenv, err := d.environmentRepo.PatchById(ctx, xenv.Id, common.PatchForSyncFromAgent( + &env, recordVersion, status, common.PatchOpts{MessageTimestamp: opts.MessageTimestamp}), + ) if err != nil { return err } From 12a5968cd5e7997300451516024867d80110f77b Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Wed, 9 Oct 2024 16:42:08 +0530 Subject: [PATCH 86/89] feat(iam): fixes Access Control check for account member --- apps/iam/internal/app/grpc-server.go | 145 +++++++++++++++++++-------- 1 file changed, 101 insertions(+), 44 deletions(-) diff --git a/apps/iam/internal/app/grpc-server.go b/apps/iam/internal/app/grpc-server.go index 2377b8467..72585d3a3 100644 --- a/apps/iam/internal/app/grpc-server.go +++ b/apps/iam/internal/app/grpc-server.go @@ -11,7 +11,6 @@ import ( t "github.com/kloudlite/api/apps/iam/types" "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam" "github.com/kloudlite/api/pkg/errors" - fn "github.com/kloudlite/api/pkg/functions" "github.com/kloudlite/api/pkg/logging" "github.com/kloudlite/api/pkg/repos" ) @@ -123,45 +122,99 @@ func (s *GrpcService) Can(ctx context.Context, in *iam.CanIn) (*iam.CanOut, erro return &iam.CanOut{Status: false}, nil } - var hasAccountMemberRole bool - - canFilter := repos.Filter{ - "resource_ref": map[string]any{"$in": in.ResourceRefs}, - "user_id": in.UserId, + arb := make([]any, len(rb)) + for i := range rb { + arb = append(arb, rb[i]) } - for i := range rb { - if rb[i] == t.RoleAccountMember { - hasAccountMemberRole = true - - rr := make([]map[string]any, 0, len(in.ResourceRefs)) - - for i := range in.ResourceRefs { - accountName, _, _, err := t.ParseResourceRef(in.ResourceRefs[i]) - if err != nil { - return nil, err - } - - if strings.TrimSpace(accountName) == "" { - return nil, fmt.Errorf("accountName must be provided") - } - - nf := s.rbRepo.MergeMatchFilters(repos.Filter{}, map[string]repos.MatchFilter{ - "resource_ref": { - MatchType: repos.MatchTypeRegex, - Regex: fn.New(t.NewResourceRef(accountName, "*", "*")), - }, - }) - rr = append(rr, map[string]any{"resource_ref": nf["resource_ref"]}) - } - - delete(canFilter, "resource_ref") - canFilter["$or"] = rr + accountName := "" + for i := range in.ResourceRefs { + acc, _, _, err := t.ParseResourceRef(in.ResourceRefs[i]) + if err != nil { + return nil, err } + accountName = acc } - rbs, err := s.rbRepo.Find( - ctx, repos.Query{Filter: canFilter}, + // var hasAccountMemberRole bool + + // resourceFilter := repos.Filter{ + // "resource_ref": map[string]any{"$in": in.ResourceRefs}, + // "user_id": in.UserId, + // } + + // resourceFilter = s.rbRepo.MergeMatchFilters(resourceFilter, map[string]repos.MatchFilter{ + // "role": { + // MatchType: repos.MatchTypeArray, + // Array: arb, + // }, + // }) + + accountLevelFilter := s.rbRepo.MergeMatchFilters(repos.Filter{}, map[string]repos.MatchFilter{ + "user_id": { + MatchType: repos.MatchTypeExact, + Exact: in.UserId, + }, + "resource_ref": { + MatchType: repos.MatchTypeExact, + Exact: fmt.Sprintf("%s/account/%s", accountName, accountName), + }, + "role": { + MatchType: repos.MatchTypeArray, + Array: []any{t.RoleAccountOwner, t.RoleAccountAdmin, t.RoleAccountMember}, + }, + }) + + // for i := range rb { + // if rb[i] == t.RoleAccountMember { + // hasAccountMemberRole = true + // + // rr := make([]map[string]any, 0, len(in.ResourceRefs)) + // + // for i := range in.ResourceRefs { + // accountName, _, _, err := t.ParseResourceRef(in.ResourceRefs[i]) + // if err != nil { + // return nil, err + // } + // + // if strings.TrimSpace(accountName) == "" { + // return nil, fmt.Errorf("accountName must be provided") + // } + // + // nf := s.rbRepo.MergeMatchFilters(repos.Filter{}, map[string]repos.MatchFilter{ + // "resource_ref": { + // MatchType: repos.MatchTypeRegex, + // // FIXME: HERE + // Regex: fn.New(t.NewResourceRef(accountName, "*", "*")), + // }, + // }) + // rr = append(rr, map[string]any{ + // "resource_ref": nf["resource_ref"], + // }) + // } + // + // // FIXME: error HERE + // delete(canFilter, "resource_ref") + // canFilter["$or"] = rr + // } + // } + + // accountMemberFilter := repos.Filter{ + // "resource_ref": + // } + // + // resourceFilter = s.rbRepo.MergeMatchFilters(resourceFilter, map[string]repos.MatchFilter{ + // "role": { + // MatchType: repos.MatchTypeArray, + // Array: []any{t.RoleAccountOwner, t.RoleAccountAdmin, t.RoleAccountMember}, + // }, + // }) + + rbs, err := s.rbRepo.Find(ctx, repos.Query{Filter: repos.Filter{ + "$and": []map[string]any{ + accountLevelFilter, + }, + }}, ) if err != nil { return nil, errors.NewEf(err, "could not find rolebindings for (resourceRefs=%s)", strings.Join(in.ResourceRefs, ",")) @@ -171,18 +224,22 @@ func (s *GrpcService) Can(ctx context.Context, in *iam.CanIn) (*iam.CanOut, erro return nil, errors.Newf("no rolebinding found for (userId=%s, resourceRefs=%s)", in.UserId, strings.Join(in.ResourceRefs, ",")) } - if hasAccountMemberRole && len(rbs) > 0 { + if len(rbs) > 0 { return &iam.CanOut{Status: true}, nil } - for i := range rbs { - // 2nd loop, but very small length (always < #roles), so it's not exactly O(n^2), much like XO(n) - for _, role := range s.roleBindingMap[t.Action(in.Action)] { - if role == rbs[i].Role { - return &iam.CanOut{Status: true}, nil - } - } - } + // if hasAccountMemberRole && len(rbs) > 0 { + // return &iam.CanOut{Status: true}, nil + // } + // + // for i := range rbs { + // // 2nd loop, but very small length (always < #roles), so it's not exactly O(n^2), much like XO(n) + // for _, role := range s.roleBindingMap[t.Action(in.Action)] { + // if role == rbs[i].Role { + // return &iam.CanOut{Status: true}, nil + // } + // } + // } return &iam.CanOut{Status: false}, nil } From 9ee2ddf42df7ce574b3c3cb4b289ad11a062a0c8 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Wed, 9 Oct 2024 16:46:56 +0530 Subject: [PATCH 87/89] feat: retries on failing apply to edge, and ensures gateway namespace creation --- apps/infra/internal/domain/clusters.go | 28 ++++++++++++++++--- .../domain/global-vpn-cluster-connection.go | 12 ++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 82bd87dbe..b68c3493d 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -594,8 +594,18 @@ func (d *domain) syncKloudliteGatewayDevice(ctx InfraContext, gvpnName string) e } d.logger.Info("applying yaml", "yaml", string(deploymentBytes)) - if _, err := yc.ApplyYAML(ctx, deploymentBytes); err != nil { - return errors.NewE(err) + for i := 0; i < 5; i++ { + if _, err = yc.ApplyYAML(ctx, deploymentBytes); err != nil { + d.logger.Warn("syncing to kloudlite gateway device, failing with", "err", err, "retry.count", i, "retry.remaining", 5-i) + continue + // return errors.NewE(err) + } + err = nil + break + } + + if err != nil { + return err } return nil @@ -773,8 +783,18 @@ func (d *domain) syncKloudliteDeviceOnPlatform(ctx InfraContext, gvpnName string return err } - if err := d.k8sClient.ApplyYAML(ctx, deploymentBytes); err != nil { - return errors.NewE(err) + for i := 0; i < 5; i++ { + if err := d.k8sClient.ApplyYAML(ctx, deploymentBytes); err != nil { + d.logger.Warn("syncing to kloudlite platform device, failing with", "err", err, "retry.count", i, "retry.remaining", 5-i) + continue + // return errors.NewE(err) + } + err = nil + break + } + + if err != nil { + return err } return nil diff --git a/apps/infra/internal/domain/global-vpn-cluster-connection.go b/apps/infra/internal/domain/global-vpn-cluster-connection.go index 7b11f4ab0..a141e844c 100644 --- a/apps/infra/internal/domain/global-vpn-cluster-connection.go +++ b/apps/infra/internal/domain/global-vpn-cluster-connection.go @@ -369,6 +369,18 @@ func (d *domain) createGlobalVPNConnection(ctx InfraContext, gvpnConn entities.G return nil, err } + if err := d.resDispatcher.ApplyToTargetCluster(ctx, gvpnConn.DispatchAddr, &corev1.Namespace{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Namespace", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: gvpnConn.Spec.TargetNamespace, + }, + }, gvpn.RecordVersion); err != nil { + return nil, err + } + if err := d.resDispatcher.ApplyToTargetCluster(ctx, gvpnConn.DispatchAddr, &corev1.Secret{ TypeMeta: metav1.TypeMeta{ APIVersion: "v1", From 251eccf81eac3c9b22f608bbeb7912282d01e54d Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 10 Oct 2024 14:44:16 +0530 Subject: [PATCH 88/89] feat: registry image webhook URL, with examples - (webhooks): image hook scripts fix --- .../internal/app/graph/app.resolvers.go | 2 +- .../graph/clustermanagedservice.resolvers.go | 2 +- .../app/graph/common-types.resolvers.go | 2 +- .../internal/app/graph/config.resolvers.go | 2 +- .../internal/app/graph/entity.resolvers.go | 2 +- .../app/graph/environment.resolvers.go | 2 +- .../app/graph/externalapp.resolvers.go | 2 +- .../app/graph/generated/federation.go | 237 +- .../internal/app/graph/generated/generated.go | 6181 +++++++++++++---- .../app/graph/imagepullsecret.resolvers.go | 2 +- .../importedmanagedresource.resolvers.go | 2 +- .../app/graph/managedresource.resolvers.go | 2 +- .../internal/app/graph/model/models_gen.go | 22 +- .../app/graph/registryimage.resolvers.go | 2 +- .../internal/app/graph/router.resolvers.go | 2 +- .../internal/app/graph/schema.resolvers.go | 2 +- .../internal/app/graph/secret.resolvers.go | 2 +- .../struct-to-graphql/common-types.graphqls | 8 +- .../registryimageurl.graphqls | 14 +- .../console/internal/domain/registry-image.go | 32 +- .../field-constants/generated_constants.go | 7 +- .../internal/entities/registry-image.go | 9 +- apps/console/internal/env/env.go | 1 + apps/webhook/internal/app/image-hook.go | 33 +- .../internal/app/scripts/kl-image-hook.sh | 16 + 25 files changed, 4943 insertions(+), 1645 deletions(-) create mode 100755 apps/webhook/internal/app/scripts/kl-image-hook.sh diff --git a/apps/console/internal/app/graph/app.resolvers.go b/apps/console/internal/app/graph/app.resolvers.go index cf0b1403e..6a2e631c1 100644 --- a/apps/console/internal/app/graph/app.resolvers.go +++ b/apps/console/internal/app/graph/app.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/clustermanagedservice.resolvers.go b/apps/console/internal/app/graph/clustermanagedservice.resolvers.go index 996e62f2e..f36f8a96e 100644 --- a/apps/console/internal/app/graph/clustermanagedservice.resolvers.go +++ b/apps/console/internal/app/graph/clustermanagedservice.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/common-types.resolvers.go b/apps/console/internal/app/graph/common-types.resolvers.go index 354f6d418..56959ce5d 100644 --- a/apps/console/internal/app/graph/common-types.resolvers.go +++ b/apps/console/internal/app/graph/common-types.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/config.resolvers.go b/apps/console/internal/app/graph/config.resolvers.go index 169a03c63..3d8b4873a 100644 --- a/apps/console/internal/app/graph/config.resolvers.go +++ b/apps/console/internal/app/graph/config.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/entity.resolvers.go b/apps/console/internal/app/graph/entity.resolvers.go index 3d586beb9..12c08acdf 100644 --- a/apps/console/internal/app/graph/entity.resolvers.go +++ b/apps/console/internal/app/graph/entity.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/environment.resolvers.go b/apps/console/internal/app/graph/environment.resolvers.go index 87b483980..76d769972 100644 --- a/apps/console/internal/app/graph/environment.resolvers.go +++ b/apps/console/internal/app/graph/environment.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/externalapp.resolvers.go b/apps/console/internal/app/graph/externalapp.resolvers.go index 22b281900..d61733c32 100644 --- a/apps/console/internal/app/graph/externalapp.resolvers.go +++ b/apps/console/internal/app/graph/externalapp.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/generated/federation.go b/apps/console/internal/app/graph/generated/federation.go index 0758f308a..8141f2349 100644 --- a/apps/console/internal/app/graph/generated/federation.go +++ b/apps/console/internal/app/graph/generated/federation.go @@ -39,140 +39,169 @@ func (ec *executionContext) __resolve__service(ctx context.Context) (fedruntime. func (ec *executionContext) __resolve_entities(ctx context.Context, representations []map[string]interface{}) []fedruntime.Entity { list := make([]fedruntime.Entity, len(representations)) - repsMap := map[string]struct { - i []int - r []map[string]interface{} - }{} - - // We group entities by typename so that we can parallelize their resolution. - // This is particularly helpful when there are entity groups in multi mode. - buildRepresentationGroups := func(reps []map[string]interface{}) { - for i, rep := range reps { - typeName, ok := rep["__typename"].(string) - if !ok { - // If there is no __typename, we just skip the representation; - // we just won't be resolving these unknown types. - ec.Error(ctx, errors.New("__typename must be an existing string")) - continue - } + repsMap := ec.buildRepresentationGroups(ctx, representations) - _r := repsMap[typeName] - _r.i = append(_r.i, i) - _r.r = append(_r.r, rep) - repsMap[typeName] = _r + switch len(repsMap) { + case 0: + return list + case 1: + for typeName, reps := range repsMap { + ec.resolveEntityGroup(ctx, typeName, reps, list) } + return list + default: + var g sync.WaitGroup + g.Add(len(repsMap)) + for typeName, reps := range repsMap { + go func(typeName string, reps []EntityWithIndex) { + ec.resolveEntityGroup(ctx, typeName, reps, list) + g.Done() + }(typeName, reps) + } + g.Wait() + return list } +} + +type EntityWithIndex struct { + // The index in the original representation array + index int + entity EntityRepresentation +} - isMulti := func(typeName string) bool { - switch typeName { - default: - return false +// EntityRepresentation is the JSON representation of an entity sent by the Router +// used as the inputs for us to resolve. +// +// We make it a map because we know the top level JSON is always an object. +type EntityRepresentation map[string]any + +// We group entities by typename so that we can parallelize their resolution. +// This is particularly helpful when there are entity groups in multi mode. +func (ec *executionContext) buildRepresentationGroups( + ctx context.Context, + representations []map[string]any, +) map[string][]EntityWithIndex { + repsMap := make(map[string][]EntityWithIndex) + for i, rep := range representations { + typeName, ok := rep["__typename"].(string) + if !ok { + // If there is no __typename, we just skip the representation; + // we just won't be resolving these unknown types. + ec.Error(ctx, errors.New("__typename must be an existing string")) + continue } - } - resolveEntity := func(ctx context.Context, typeName string, rep map[string]interface{}, idx []int, i int) (err error) { - // we need to do our own panic handling, because we may be called in a - // goroutine, where the usual panic handling can't catch us - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - } - }() + repsMap[typeName] = append(repsMap[typeName], EntityWithIndex{ + index: i, + entity: rep, + }) + } - switch typeName { - case "Build": - resolverName, err := entityResolverNameForBuild(ctx, rep) - if err != nil { - return fmt.Errorf(`finding resolver for Entity "Build": %w`, err) - } - switch resolverName { + return repsMap +} - case "findBuildByID": - id0, err := ec.unmarshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, rep["id"]) - if err != nil { - return fmt.Errorf(`unmarshalling param 0 for findBuildByID(): %w`, err) - } - entity, err := ec.resolvers.Entity().FindBuildByID(ctx, id0) +func (ec *executionContext) resolveEntityGroup( + ctx context.Context, + typeName string, + reps []EntityWithIndex, + list []fedruntime.Entity, +) { + if isMulti(typeName) { + err := ec.resolveManyEntities(ctx, typeName, reps, list) + if err != nil { + ec.Error(ctx, err) + } + } else { + // if there are multiple entities to resolve, parallelize (similar to + // graphql.FieldSet.Dispatch) + var e sync.WaitGroup + e.Add(len(reps)) + for i, rep := range reps { + i, rep := i, rep + go func(i int, rep EntityWithIndex) { + entity, err := ec.resolveEntity(ctx, typeName, rep.entity) if err != nil { - return fmt.Errorf(`resolving Entity "Build": %w`, err) + ec.Error(ctx, err) + } else { + list[rep.index] = entity } - - list[idx[i]] = entity - return nil - } - + e.Done() + }(i, rep) } - return fmt.Errorf("%w: %s", ErrUnknownType, typeName) + e.Wait() } +} - resolveManyEntities := func(ctx context.Context, typeName string, reps []map[string]interface{}, idx []int) (err error) { - // we need to do our own panic handling, because we may be called in a - // goroutine, where the usual panic handling can't catch us - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - } - }() +func isMulti(typeName string) bool { + switch typeName { + default: + return false + } +} - switch typeName { +func (ec *executionContext) resolveEntity( + ctx context.Context, + typeName string, + rep EntityRepresentation, +) (e fedruntime.Entity, err error) { + // we need to do our own panic handling, because we may be called in a + // goroutine, where the usual panic handling can't catch us + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + } + }() - default: - return errors.New("unknown type: " + typeName) + switch typeName { + case "Build": + resolverName, err := entityResolverNameForBuild(ctx, rep) + if err != nil { + return nil, fmt.Errorf(`finding resolver for Entity "Build": %w`, err) } - } + switch resolverName { - resolveEntityGroup := func(typeName string, reps []map[string]interface{}, idx []int) { - if isMulti(typeName) { - err := resolveManyEntities(ctx, typeName, reps, idx) + case "findBuildByID": + id0, err := ec.unmarshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, rep["id"]) if err != nil { - ec.Error(ctx, err) + return nil, fmt.Errorf(`unmarshalling param 0 for findBuildByID(): %w`, err) } - } else { - // if there are multiple entities to resolve, parallelize (similar to - // graphql.FieldSet.Dispatch) - var e sync.WaitGroup - e.Add(len(reps)) - for i, rep := range reps { - i, rep := i, rep - go func(i int, rep map[string]interface{}) { - err := resolveEntity(ctx, typeName, rep, idx, i) - if err != nil { - ec.Error(ctx, err) - } - e.Done() - }(i, rep) + entity, err := ec.resolvers.Entity().FindBuildByID(ctx, id0) + if err != nil { + return nil, fmt.Errorf(`resolving Entity "Build": %w`, err) } - e.Wait() + + return entity, nil } + } - buildRepresentationGroups(representations) + return nil, fmt.Errorf("%w: %s", ErrUnknownType, typeName) +} - switch len(repsMap) { - case 0: - return list - case 1: - for typeName, reps := range repsMap { - resolveEntityGroup(typeName, reps.r, reps.i) +func (ec *executionContext) resolveManyEntities( + ctx context.Context, + typeName string, + reps []EntityWithIndex, + list []fedruntime.Entity, +) (err error) { + // we need to do our own panic handling, because we may be called in a + // goroutine, where the usual panic handling can't catch us + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) } - return list + }() + + switch typeName { + default: - var g sync.WaitGroup - g.Add(len(repsMap)) - for typeName, reps := range repsMap { - go func(typeName string, reps []map[string]interface{}, idx []int) { - resolveEntityGroup(typeName, reps, idx) - g.Done() - }(typeName, reps.r, reps.i) - } - g.Wait() - return list + return errors.New("unknown type: " + typeName) } } -func entityResolverNameForBuild(ctx context.Context, rep map[string]interface{}) (string, error) { +func entityResolverNameForBuild(ctx context.Context, rep EntityRepresentation) (string, error) { for { var ( - m map[string]interface{} + m EntityRepresentation val interface{} ok bool ) diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index bc2fb473f..4b5e3d871 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -887,8 +887,11 @@ type ComplexityRoot struct { } RegistryImageURL struct { - ScriptURL func(childComplexity int) int - URL func(childComplexity int) int + KlWebhookAuthToken func(childComplexity int) int + ScriptURL func(childComplexity int) int + ScriptURLExample func(childComplexity int) int + URL func(childComplexity int) int + URLExample func(childComplexity int) int } Router struct { @@ -5289,6 +5292,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.RegistryImagePaginatedRecords.TotalCount(childComplexity), true + case "RegistryImageURL.klWebhookAuthToken": + if e.complexity.RegistryImageURL.KlWebhookAuthToken == nil { + break + } + + return e.complexity.RegistryImageURL.KlWebhookAuthToken(childComplexity), true + case "RegistryImageURL.scriptUrl": if e.complexity.RegistryImageURL.ScriptURL == nil { break @@ -5296,6 +5306,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.RegistryImageURL.ScriptURL(childComplexity), true + case "RegistryImageURL.scriptUrlExample": + if e.complexity.RegistryImageURL.ScriptURLExample == nil { + break + } + + return e.complexity.RegistryImageURL.ScriptURLExample(childComplexity), true + case "RegistryImageURL.url": if e.complexity.RegistryImageURL.URL == nil { break @@ -5303,6 +5320,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.RegistryImageURL.URL(childComplexity), true + case "RegistryImageURL.urlExample": + if e.complexity.RegistryImageURL.URLExample == nil { + break + } + + return e.complexity.RegistryImageURL.URLExample(childComplexity), true + case "Router.apiVersion": if e.complexity.Router.APIVersion == nil { break @@ -6020,7 +6044,7 @@ type Query { } type Mutation { - core_setupDefaultEnvironment: Boolean! @isLoggedInAndVerified @hasAccount + core_setupDefaultEnvironment: Boolean! @isLoggedInAndVerified @hasAccount core_createEnvironment(env: EnvironmentIn!): Environment @isLoggedInAndVerified @hasAccount core_updateEnvironment(env: EnvironmentIn!): Environment @isLoggedInAndVerified @hasAccount core_deleteEnvironment(envName: String!): Boolean! @isLoggedInAndVerified @hasAccount @@ -6359,9 +6383,9 @@ type Github__com___kloudlite___operator___apis___crds___v1__Https @shareable { } type Github__com___kloudlite___operator___apis___crds___v1__Intercept @shareable { - enabled: Boolean! + enabled: Boolean portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings!] - toDevice: String! + toDevice: String toIPAddr: String } @@ -6694,9 +6718,9 @@ input Github__com___kloudlite___operator___apis___crds___v1__HttpsIn { } input Github__com___kloudlite___operator___apis___crds___v1__InterceptIn { - enabled: Boolean! + enabled: Boolean portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn!] - toDevice: String! + toDevice: String toIPAddr: String } @@ -7361,13 +7385,19 @@ input RegistryImageCredentialsIn { `, BuiltIn: false}, {Name: "../struct-to-graphql/registryimageurl.graphqls", Input: `type RegistryImageURL @shareable { - scriptUrl: String! - url: String! + klWebhookAuthToken: String! + scriptUrl: [String!]! + scriptUrlExample: [String!]! + url: [String!]! + urlExample: [String!]! } input RegistryImageURLIn { - scriptUrl: String! - url: String! + klWebhookAuthToken: String! + scriptUrl: [String!]! + scriptUrlExample: [String!]! + url: [String!]! + urlExample: [String!]! } `, BuiltIn: false}, @@ -7507,7 +7537,7 @@ input SecretKeyValueRefIn { directive @interfaceObject on OBJECT directive @link(import: [String!], url: String!) repeatable on SCHEMA directive @override(from: String!, label: String) on FIELD_DEFINITION - directive @policy(policies: [[federation__Policy!]!]!) on + directive @policy(policies: [[federation__Policy!]!]!) on | FIELD_DEFINITION | OBJECT | INTERFACE @@ -7515,7 +7545,7 @@ input SecretKeyValueRefIn { | ENUM directive @provides(fields: FieldSet!) on FIELD_DEFINITION directive @requires(fields: FieldSet!) on FIELD_DEFINITION - directive @requiresScopes(scopes: [[federation__Scope!]!]!) on + directive @requiresScopes(scopes: [[federation__Scope!]!]!) on | FIELD_DEFINITION | OBJECT | INTERFACE @@ -7544,8 +7574,7 @@ union _Entity = Build # fake type to build resolver interfaces for users to implement type Entity { - findBuildByID(id: ID!,): Build! - + findBuildByID(id: ID!,): Build! } type _Service { @@ -7567,1895 +7596,4680 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...) func (ec *executionContext) field_Entity_findBuildByID_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 repos.ID - if tmp, ok := rawArgs["id"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - arg0, err = ec.unmarshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Entity_findBuildByID_argsID(ctx, rawArgs) + if err != nil { + return nil, err } args["id"] = arg0 return args, nil } +func (ec *executionContext) field_Entity_findBuildByID_argsID( + ctx context.Context, + rawArgs map[string]interface{}, +) (repos.ID, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["id"] + if !ok { + var zeroVal repos.ID + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) + if tmp, ok := rawArgs["id"]; ok { + return ec.unmarshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, tmp) + } + + var zeroVal repos.ID + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_cloneEnvironment_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_cloneEnvironment_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["sourceEnvName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sourceEnvName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_cloneEnvironment_argsSourceEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["sourceEnvName"] = arg1 - var arg2 string - if tmp, ok := rawArgs["destinationEnvName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("destinationEnvName")) - arg2, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Mutation_core_cloneEnvironment_argsDestinationEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["destinationEnvName"] = arg2 - var arg3 string - if tmp, ok := rawArgs["displayName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - arg3, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg3, err := ec.field_Mutation_core_cloneEnvironment_argsDisplayName(ctx, rawArgs) + if err != nil { + return nil, err } args["displayName"] = arg3 - var arg4 v1.EnvironmentRoutingMode - if tmp, ok := rawArgs["environmentRoutingMode"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("environmentRoutingMode")) - arg4, err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode2githubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐEnvironmentRoutingMode(ctx, tmp) - if err != nil { - return nil, err - } + arg4, err := ec.field_Mutation_core_cloneEnvironment_argsEnvironmentRoutingMode(ctx, rawArgs) + if err != nil { + return nil, err } args["environmentRoutingMode"] = arg4 return args, nil } +func (ec *executionContext) field_Mutation_core_cloneEnvironment_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_cloneEnvironment_argsSourceEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["sourceEnvName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("sourceEnvName")) + if tmp, ok := rawArgs["sourceEnvName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_cloneEnvironment_argsDestinationEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["destinationEnvName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("destinationEnvName")) + if tmp, ok := rawArgs["destinationEnvName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_cloneEnvironment_argsDisplayName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["displayName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + if tmp, ok := rawArgs["displayName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_cloneEnvironment_argsEnvironmentRoutingMode( + ctx context.Context, + rawArgs map[string]interface{}, +) (v1.EnvironmentRoutingMode, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["environmentRoutingMode"] + if !ok { + var zeroVal v1.EnvironmentRoutingMode + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("environmentRoutingMode")) + if tmp, ok := rawArgs["environmentRoutingMode"]; ok { + return ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode2githubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐEnvironmentRoutingMode(ctx, tmp) + } + + var zeroVal v1.EnvironmentRoutingMode + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_createApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_createApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 entities.App - if tmp, ok := rawArgs["app"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("app")) - arg1, err = ec.unmarshalNAppIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐApp(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_createApp_argsApp(ctx, rawArgs) + if err != nil { + return nil, err } args["app"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_createApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_createApp_argsApp( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.App, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["app"] + if !ok { + var zeroVal entities.App + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("app")) + if tmp, ok := rawArgs["app"]; ok { + return ec.unmarshalNAppIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐApp(ctx, tmp) + } + + var zeroVal entities.App + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_createConfig_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_createConfig_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 entities.Config - if tmp, ok := rawArgs["config"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("config")) - arg1, err = ec.unmarshalNConfigIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_createConfig_argsConfig(ctx, rawArgs) + if err != nil { + return nil, err } args["config"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_createConfig_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_createConfig_argsConfig( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.Config, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["config"] + if !ok { + var zeroVal entities.Config + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("config")) + if tmp, ok := rawArgs["config"]; ok { + return ec.unmarshalNConfigIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx, tmp) + } + + var zeroVal entities.Config + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_createEnvironment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.Environment - if tmp, ok := rawArgs["env"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("env")) - arg0, err = ec.unmarshalNEnvironmentIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐEnvironment(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_createEnvironment_argsEnv(ctx, rawArgs) + if err != nil { + return nil, err } args["env"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_core_createEnvironment_argsEnv( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.Environment, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["env"] + if !ok { + var zeroVal entities.Environment + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("env")) + if tmp, ok := rawArgs["env"]; ok { + return ec.unmarshalNEnvironmentIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐEnvironment(ctx, tmp) + } + + var zeroVal entities.Environment + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_createExternalApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_createExternalApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 entities.ExternalApp - if tmp, ok := rawArgs["externalApp"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("externalApp")) - arg1, err = ec.unmarshalNExternalAppIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐExternalApp(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_createExternalApp_argsExternalApp(ctx, rawArgs) + if err != nil { + return nil, err } args["externalApp"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_createExternalApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_createExternalApp_argsExternalApp( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.ExternalApp, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["externalApp"] + if !ok { + var zeroVal entities.ExternalApp + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("externalApp")) + if tmp, ok := rawArgs["externalApp"]; ok { + return ec.unmarshalNExternalAppIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐExternalApp(ctx, tmp) + } + + var zeroVal entities.ExternalApp + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_createImagePullSecret_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.ImagePullSecret - if tmp, ok := rawArgs["pullSecret"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pullSecret")) - arg0, err = ec.unmarshalNImagePullSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImagePullSecret(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_createImagePullSecret_argsPullSecret(ctx, rawArgs) + if err != nil { + return nil, err } args["pullSecret"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_core_createImagePullSecret_argsPullSecret( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.ImagePullSecret, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pullSecret"] + if !ok { + var zeroVal entities.ImagePullSecret + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pullSecret")) + if tmp, ok := rawArgs["pullSecret"]; ok { + return ec.unmarshalNImagePullSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImagePullSecret(ctx, tmp) + } + + var zeroVal entities.ImagePullSecret + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_createManagedResource_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["msvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_createManagedResource_argsMsvcName(ctx, rawArgs) + if err != nil { + return nil, err } args["msvcName"] = arg0 - var arg1 entities.ManagedResource - if tmp, ok := rawArgs["mres"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("mres")) - arg1, err = ec.unmarshalNManagedResourceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_createManagedResource_argsMres(ctx, rawArgs) + if err != nil { + return nil, err } args["mres"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_createManagedResource_argsMsvcName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["msvcName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) + if tmp, ok := rawArgs["msvcName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_createManagedResource_argsMres( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.ManagedResource, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["mres"] + if !ok { + var zeroVal entities.ManagedResource + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("mres")) + if tmp, ok := rawArgs["mres"]; ok { + return ec.unmarshalNManagedResourceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, tmp) + } + + var zeroVal entities.ManagedResource + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_createRouter_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_createRouter_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 entities.Router - if tmp, ok := rawArgs["router"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("router")) - arg1, err = ec.unmarshalNRouterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_createRouter_argsRouter(ctx, rawArgs) + if err != nil { + return nil, err } args["router"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_createRouter_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_createRouter_argsRouter( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.Router, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["router"] + if !ok { + var zeroVal entities.Router + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("router")) + if tmp, ok := rawArgs["router"]; ok { + return ec.unmarshalNRouterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, tmp) + } + + var zeroVal entities.Router + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_createSecret_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_createSecret_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 entities.Secret - if tmp, ok := rawArgs["secret"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("secret")) - arg1, err = ec.unmarshalNSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐSecret(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_createSecret_argsSecret(ctx, rawArgs) + if err != nil { + return nil, err } args["secret"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_createSecret_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_createSecret_argsSecret( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.Secret, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["secret"] + if !ok { + var zeroVal entities.Secret + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("secret")) + if tmp, ok := rawArgs["secret"]; ok { + return ec.unmarshalNSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐSecret(ctx, tmp) + } + + var zeroVal entities.Secret + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_deleteApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_deleteApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["appName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("appName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_deleteApp_argsAppName(ctx, rawArgs) + if err != nil { + return nil, err } args["appName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_deleteApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_deleteApp_argsAppName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["appName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("appName")) + if tmp, ok := rawArgs["appName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_deleteConfig_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_deleteConfig_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["configName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("configName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_deleteConfig_argsConfigName(ctx, rawArgs) + if err != nil { + return nil, err } args["configName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_deleteConfig_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_deleteConfig_argsConfigName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["configName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("configName")) + if tmp, ok := rawArgs["configName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_deleteEnvironment_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_deleteEnvironment_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_core_deleteEnvironment_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_deleteExternalApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_deleteExternalApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["externalAppName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("externalAppName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_deleteExternalApp_argsExternalAppName(ctx, rawArgs) + if err != nil { + return nil, err } args["externalAppName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_deleteExternalApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_deleteExternalApp_argsExternalAppName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["externalAppName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("externalAppName")) + if tmp, ok := rawArgs["externalAppName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_deleteImagePullSecret_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_deleteImagePullSecret_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_core_deleteImagePullSecret_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_deleteImportedManagedResource_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_deleteImportedManagedResource_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["importName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("importName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_deleteImportedManagedResource_argsImportName(ctx, rawArgs) + if err != nil { + return nil, err } args["importName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_deleteImportedManagedResource_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_deleteImportedManagedResource_argsImportName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["importName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("importName")) + if tmp, ok := rawArgs["importName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_deleteManagedResource_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["msvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_deleteManagedResource_argsMsvcName(ctx, rawArgs) + if err != nil { + return nil, err } args["msvcName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["mresName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("mresName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_deleteManagedResource_argsMresName(ctx, rawArgs) + if err != nil { + return nil, err } args["mresName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_deleteManagedResource_argsMsvcName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["msvcName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) + if tmp, ok := rawArgs["msvcName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_deleteManagedResource_argsMresName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["mresName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("mresName")) + if tmp, ok := rawArgs["mresName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, 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 - } + arg0, err := ec.field_Mutation_core_deleteRegistryImage_argsImage(ctx, rawArgs) + if err != nil { + return nil, err } args["image"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_core_deleteRegistryImage_argsImage( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["image"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("image")) + if tmp, ok := rawArgs["image"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, 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{}{} - var arg0 string - if tmp, ok := rawArgs["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_deleteRouter_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["routerName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("routerName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_deleteRouter_argsRouterName(ctx, rawArgs) + if err != nil { + return nil, err } args["routerName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_deleteRouter_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_deleteRouter_argsRouterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["routerName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("routerName")) + if tmp, ok := rawArgs["routerName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_deleteSecret_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_deleteSecret_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["secretName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("secretName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_deleteSecret_argsSecretName(ctx, rawArgs) + if err != nil { + return nil, err } args["secretName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_deleteSecret_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_deleteSecret_argsSecretName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["secretName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("secretName")) + if tmp, ok := rawArgs["secretName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_importManagedResource_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_importManagedResource_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["msvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_importManagedResource_argsMsvcName(ctx, rawArgs) + if err != nil { + return nil, err } args["msvcName"] = arg1 - var arg2 string - if tmp, ok := rawArgs["mresName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("mresName")) - arg2, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Mutation_core_importManagedResource_argsMresName(ctx, rawArgs) + if err != nil { + return nil, err } args["mresName"] = arg2 - var arg3 string - if tmp, ok := rawArgs["importName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("importName")) - arg3, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg3, err := ec.field_Mutation_core_importManagedResource_argsImportName(ctx, rawArgs) + if err != nil { + return nil, err } args["importName"] = arg3 return args, nil } +func (ec *executionContext) field_Mutation_core_importManagedResource_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_importManagedResource_argsMsvcName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["msvcName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) + if tmp, ok := rawArgs["msvcName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_importManagedResource_argsMresName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["mresName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("mresName")) + if tmp, ok := rawArgs["mresName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_importManagedResource_argsImportName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["importName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("importName")) + if tmp, ok := rawArgs["importName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_interceptAppOnLocalCluster_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_interceptAppOnLocalCluster_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["appname"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("appname")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_interceptAppOnLocalCluster_argsAppname(ctx, rawArgs) + if err != nil { + return nil, err } args["appname"] = arg1 - var arg2 string - if tmp, ok := rawArgs["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg2, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Mutation_core_interceptAppOnLocalCluster_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg2 - var arg3 string - if tmp, ok := rawArgs["ipAddr"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ipAddr")) - arg3, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg3, err := ec.field_Mutation_core_interceptAppOnLocalCluster_argsIPAddr(ctx, rawArgs) + if err != nil { + return nil, err } args["ipAddr"] = arg3 - var arg4 bool - if tmp, ok := rawArgs["intercept"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("intercept")) - arg4, err = ec.unmarshalNBoolean2bool(ctx, tmp) - if err != nil { - return nil, err - } + arg4, err := ec.field_Mutation_core_interceptAppOnLocalCluster_argsIntercept(ctx, rawArgs) + if err != nil { + return nil, err } args["intercept"] = arg4 - var arg5 []*v1.AppInterceptPortMappings - if tmp, ok := rawArgs["portMappings"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("portMappings")) - arg5, err = ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn2ᚕᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐAppInterceptPortMappingsᚄ(ctx, tmp) - if err != nil { - return nil, err - } + arg5, err := ec.field_Mutation_core_interceptAppOnLocalCluster_argsPortMappings(ctx, rawArgs) + if err != nil { + return nil, err } args["portMappings"] = arg5 return args, nil } +func (ec *executionContext) field_Mutation_core_interceptAppOnLocalCluster_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptAppOnLocalCluster_argsAppname( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["appname"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("appname")) + if tmp, ok := rawArgs["appname"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptAppOnLocalCluster_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptAppOnLocalCluster_argsIPAddr( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["ipAddr"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("ipAddr")) + if tmp, ok := rawArgs["ipAddr"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptAppOnLocalCluster_argsIntercept( + ctx context.Context, + rawArgs map[string]interface{}, +) (bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["intercept"] + if !ok { + var zeroVal bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("intercept")) + if tmp, ok := rawArgs["intercept"]; ok { + return ec.unmarshalNBoolean2bool(ctx, tmp) + } + + var zeroVal bool + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptAppOnLocalCluster_argsPortMappings( + ctx context.Context, + rawArgs map[string]interface{}, +) ([]*v1.AppInterceptPortMappings, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["portMappings"] + if !ok { + var zeroVal []*v1.AppInterceptPortMappings + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("portMappings")) + if tmp, ok := rawArgs["portMappings"]; ok { + return ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn2ᚕᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐAppInterceptPortMappingsᚄ(ctx, tmp) + } + + var zeroVal []*v1.AppInterceptPortMappings + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_interceptApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_interceptApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["appname"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("appname")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_interceptApp_argsAppname(ctx, rawArgs) + if err != nil { + return nil, err } args["appname"] = arg1 - var arg2 string - if tmp, ok := rawArgs["deviceName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) - arg2, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Mutation_core_interceptApp_argsDeviceName(ctx, rawArgs) + if err != nil { + return nil, err } args["deviceName"] = arg2 - var arg3 bool - if tmp, ok := rawArgs["intercept"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("intercept")) - arg3, err = ec.unmarshalNBoolean2bool(ctx, tmp) - if err != nil { - return nil, err - } + arg3, err := ec.field_Mutation_core_interceptApp_argsIntercept(ctx, rawArgs) + if err != nil { + return nil, err } args["intercept"] = arg3 - var arg4 []*v1.AppInterceptPortMappings - if tmp, ok := rawArgs["portMappings"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("portMappings")) - arg4, err = ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn2ᚕᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐAppInterceptPortMappingsᚄ(ctx, tmp) - if err != nil { - return nil, err - } + arg4, err := ec.field_Mutation_core_interceptApp_argsPortMappings(ctx, rawArgs) + if err != nil { + return nil, err } args["portMappings"] = arg4 return args, nil } +func (ec *executionContext) field_Mutation_core_interceptApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptApp_argsAppname( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["appname"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("appname")) + if tmp, ok := rawArgs["appname"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptApp_argsDeviceName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["deviceName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) + if tmp, ok := rawArgs["deviceName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptApp_argsIntercept( + ctx context.Context, + rawArgs map[string]interface{}, +) (bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["intercept"] + if !ok { + var zeroVal bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("intercept")) + if tmp, ok := rawArgs["intercept"]; ok { + return ec.unmarshalNBoolean2bool(ctx, tmp) + } + + var zeroVal bool + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptApp_argsPortMappings( + ctx context.Context, + rawArgs map[string]interface{}, +) ([]*v1.AppInterceptPortMappings, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["portMappings"] + if !ok { + var zeroVal []*v1.AppInterceptPortMappings + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("portMappings")) + if tmp, ok := rawArgs["portMappings"]; ok { + return ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn2ᚕᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐAppInterceptPortMappingsᚄ(ctx, tmp) + } + + var zeroVal []*v1.AppInterceptPortMappings + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_interceptExternalApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_interceptExternalApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["externalAppName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("externalAppName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_interceptExternalApp_argsExternalAppName(ctx, rawArgs) + if err != nil { + return nil, err } args["externalAppName"] = arg1 - var arg2 string - if tmp, ok := rawArgs["deviceName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) - arg2, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Mutation_core_interceptExternalApp_argsDeviceName(ctx, rawArgs) + if err != nil { + return nil, err } args["deviceName"] = arg2 - var arg3 bool - if tmp, ok := rawArgs["intercept"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("intercept")) - arg3, err = ec.unmarshalNBoolean2bool(ctx, tmp) - if err != nil { - return nil, err - } + arg3, err := ec.field_Mutation_core_interceptExternalApp_argsIntercept(ctx, rawArgs) + if err != nil { + return nil, err } args["intercept"] = arg3 - var arg4 []*v1.AppInterceptPortMappings - if tmp, ok := rawArgs["portMappings"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("portMappings")) - arg4, err = ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn2ᚕᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐAppInterceptPortMappingsᚄ(ctx, tmp) - if err != nil { - return nil, err - } + arg4, err := ec.field_Mutation_core_interceptExternalApp_argsPortMappings(ctx, rawArgs) + if err != nil { + return nil, err } args["portMappings"] = arg4 return args, nil } +func (ec *executionContext) field_Mutation_core_interceptExternalApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptExternalApp_argsExternalAppName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["externalAppName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("externalAppName")) + if tmp, ok := rawArgs["externalAppName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptExternalApp_argsDeviceName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["deviceName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) + if tmp, ok := rawArgs["deviceName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptExternalApp_argsIntercept( + ctx context.Context, + rawArgs map[string]interface{}, +) (bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["intercept"] + if !ok { + var zeroVal bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("intercept")) + if tmp, ok := rawArgs["intercept"]; ok { + return ec.unmarshalNBoolean2bool(ctx, tmp) + } + + var zeroVal bool + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_interceptExternalApp_argsPortMappings( + ctx context.Context, + rawArgs map[string]interface{}, +) ([]*v1.AppInterceptPortMappings, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["portMappings"] + if !ok { + var zeroVal []*v1.AppInterceptPortMappings + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("portMappings")) + if tmp, ok := rawArgs["portMappings"]; ok { + return ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn2ᚕᚖgithubᚗcomᚋkloudliteᚋoperatorᚋapisᚋcrdsᚋv1ᚐAppInterceptPortMappingsᚄ(ctx, tmp) + } + + var zeroVal []*v1.AppInterceptPortMappings + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_removeDeviceIntercepts_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_removeDeviceIntercepts_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["deviceName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_removeDeviceIntercepts_argsDeviceName(ctx, rawArgs) + if err != nil { + return nil, err } args["deviceName"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_removeDeviceIntercepts_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_removeDeviceIntercepts_argsDeviceName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["deviceName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceName")) + if tmp, ok := rawArgs["deviceName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_updateApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_updateApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 entities.App - if tmp, ok := rawArgs["app"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("app")) - arg1, err = ec.unmarshalNAppIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐApp(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_updateApp_argsApp(ctx, rawArgs) + if err != nil { + return nil, err } args["app"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_updateApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_updateApp_argsApp( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.App, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["app"] + if !ok { + var zeroVal entities.App + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("app")) + if tmp, ok := rawArgs["app"]; ok { + return ec.unmarshalNAppIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐApp(ctx, tmp) + } + + var zeroVal entities.App + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_updateConfig_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_updateConfig_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 entities.Config - if tmp, ok := rawArgs["config"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("config")) - arg1, err = ec.unmarshalNConfigIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_updateConfig_argsConfig(ctx, rawArgs) + if err != nil { + return nil, err } args["config"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_updateConfig_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_updateConfig_argsConfig( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.Config, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["config"] + if !ok { + var zeroVal entities.Config + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("config")) + if tmp, ok := rawArgs["config"]; ok { + return ec.unmarshalNConfigIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐConfig(ctx, tmp) + } + + var zeroVal entities.Config + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_updateEnvironment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.Environment - if tmp, ok := rawArgs["env"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("env")) - arg0, err = ec.unmarshalNEnvironmentIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐEnvironment(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_updateEnvironment_argsEnv(ctx, rawArgs) + if err != nil { + return nil, err } args["env"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_core_updateEnvironment_argsEnv( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.Environment, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["env"] + if !ok { + var zeroVal entities.Environment + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("env")) + if tmp, ok := rawArgs["env"]; ok { + return ec.unmarshalNEnvironmentIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐEnvironment(ctx, tmp) + } + + var zeroVal entities.Environment + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_updateExternalApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_updateExternalApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 entities.ExternalApp - if tmp, ok := rawArgs["externalApp"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("externalApp")) - arg1, err = ec.unmarshalNExternalAppIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐExternalApp(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_updateExternalApp_argsExternalApp(ctx, rawArgs) + if err != nil { + return nil, err } args["externalApp"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_updateExternalApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_updateExternalApp_argsExternalApp( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.ExternalApp, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["externalApp"] + if !ok { + var zeroVal entities.ExternalApp + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("externalApp")) + if tmp, ok := rawArgs["externalApp"]; ok { + return ec.unmarshalNExternalAppIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐExternalApp(ctx, tmp) + } + + var zeroVal entities.ExternalApp + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_updateImagePullSecret_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.ImagePullSecret - if tmp, ok := rawArgs["pullSecret"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pullSecret")) - arg0, err = ec.unmarshalNImagePullSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImagePullSecret(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_updateImagePullSecret_argsPullSecret(ctx, rawArgs) + if err != nil { + return nil, err } args["pullSecret"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_core_updateImagePullSecret_argsPullSecret( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.ImagePullSecret, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pullSecret"] + if !ok { + var zeroVal entities.ImagePullSecret + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pullSecret")) + if tmp, ok := rawArgs["pullSecret"]; ok { + return ec.unmarshalNImagePullSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐImagePullSecret(ctx, tmp) + } + + var zeroVal entities.ImagePullSecret + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_updateManagedResource_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["msvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_updateManagedResource_argsMsvcName(ctx, rawArgs) + if err != nil { + return nil, err } args["msvcName"] = arg0 - var arg1 entities.ManagedResource - if tmp, ok := rawArgs["mres"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("mres")) - arg1, err = ec.unmarshalNManagedResourceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_updateManagedResource_argsMres(ctx, rawArgs) + if err != nil { + return nil, err } args["mres"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_updateManagedResource_argsMsvcName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["msvcName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) + if tmp, ok := rawArgs["msvcName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_updateManagedResource_argsMres( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.ManagedResource, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["mres"] + if !ok { + var zeroVal entities.ManagedResource + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("mres")) + if tmp, ok := rawArgs["mres"]; ok { + return ec.unmarshalNManagedResourceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐManagedResource(ctx, tmp) + } + + var zeroVal entities.ManagedResource + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_updateRouter_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_updateRouter_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 entities.Router - if tmp, ok := rawArgs["router"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("router")) - arg1, err = ec.unmarshalNRouterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_updateRouter_argsRouter(ctx, rawArgs) + if err != nil { + return nil, err } args["router"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_updateRouter_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_updateRouter_argsRouter( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.Router, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["router"] + if !ok { + var zeroVal entities.Router + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("router")) + if tmp, ok := rawArgs["router"]; ok { + return ec.unmarshalNRouterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRouter(ctx, tmp) + } + + var zeroVal entities.Router + return zeroVal, nil +} func (ec *executionContext) field_Mutation_core_updateSecret_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_core_updateSecret_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 entities.Secret - if tmp, ok := rawArgs["secret"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("secret")) - arg1, err = ec.unmarshalNSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐSecret(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_core_updateSecret_argsSecret(ctx, rawArgs) + if err != nil { + return nil, err } args["secret"] = arg1 return args, nil } +func (ec *executionContext) field_Mutation_core_updateSecret_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_core_updateSecret_argsSecret( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.Secret, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["secret"] + if !ok { + var zeroVal entities.Secret + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("secret")) + if tmp, ok := rawArgs["secret"]; ok { + return ec.unmarshalNSecretIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐSecret(ctx, tmp) + } + + var zeroVal entities.Secret + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_cloneClusterManagedService_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["clusterName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_cloneClusterManagedService_argsClusterName(ctx, rawArgs) + if err != nil { + return nil, err } args["clusterName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["sourceMsvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sourceMsvcName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Mutation_infra_cloneClusterManagedService_argsSourceMsvcName(ctx, rawArgs) + if err != nil { + return nil, err } args["sourceMsvcName"] = arg1 - var arg2 string - if tmp, ok := rawArgs["destinationMsvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("destinationMsvcName")) - arg2, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Mutation_infra_cloneClusterManagedService_argsDestinationMsvcName(ctx, rawArgs) + if err != nil { + return nil, err } args["destinationMsvcName"] = arg2 - var arg3 string - if tmp, ok := rawArgs["displayName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - arg3, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg3, err := ec.field_Mutation_infra_cloneClusterManagedService_argsDisplayName(ctx, rawArgs) + if err != nil { + return nil, err } args["displayName"] = arg3 return args, nil } +func (ec *executionContext) field_Mutation_infra_cloneClusterManagedService_argsClusterName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["clusterName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("clusterName")) + if tmp, ok := rawArgs["clusterName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_cloneClusterManagedService_argsSourceMsvcName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["sourceMsvcName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("sourceMsvcName")) + if tmp, ok := rawArgs["sourceMsvcName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_cloneClusterManagedService_argsDestinationMsvcName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["destinationMsvcName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("destinationMsvcName")) + if tmp, ok := rawArgs["destinationMsvcName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Mutation_infra_cloneClusterManagedService_argsDisplayName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["displayName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + if tmp, ok := rawArgs["displayName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_createClusterManagedService_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.ClusterManagedService - if tmp, ok := rawArgs["service"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("service")) - arg0, err = ec.unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_createClusterManagedService_argsService(ctx, rawArgs) + if err != nil { + return nil, err } args["service"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_createClusterManagedService_argsService( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.ClusterManagedService, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["service"] + if !ok { + var zeroVal entities.ClusterManagedService + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("service")) + if tmp, ok := rawArgs["service"]; ok { + return ec.unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, tmp) + } + + var zeroVal entities.ClusterManagedService + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_deleteClusterManagedService_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_deleteClusterManagedService_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_deleteClusterManagedService_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Mutation_infra_updateClusterManagedService_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 entities.ClusterManagedService - if tmp, ok := rawArgs["service"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("service")) - arg0, err = ec.unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_infra_updateClusterManagedService_argsService(ctx, rawArgs) + if err != nil { + return nil, err } args["service"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_infra_updateClusterManagedService_argsService( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.ClusterManagedService, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["service"] + if !ok { + var zeroVal entities.ClusterManagedService + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("service")) + if tmp, ok := rawArgs["service"]; ok { + return ec.unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐClusterManagedService(ctx, tmp) + } + + var zeroVal entities.ClusterManagedService + return zeroVal, nil +} func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query___type_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query___type_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query__entities_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 []map[string]interface{} - if tmp, ok := rawArgs["representations"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("representations")) - arg0, err = ec.unmarshalN_Any2ᚕmapᚄ(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query__entities_argsRepresentations(ctx, rawArgs) + if err != nil { + return nil, err } args["representations"] = arg0 return args, nil } +func (ec *executionContext) field_Query__entities_argsRepresentations( + ctx context.Context, + rawArgs map[string]interface{}, +) ([]map[string]interface{}, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["representations"] + if !ok { + var zeroVal []map[string]interface{} + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("representations")) + if tmp, ok := rawArgs["representations"]; ok { + return ec.unmarshalN_Any2ᚕmapᚄ(ctx, tmp) + } + + var zeroVal []map[string]interface{} + return zeroVal, nil +} func (ec *executionContext) field_Query_core_checkNameAvailability_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_checkNameAvailability_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["msvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_checkNameAvailability_argsMsvcName(ctx, rawArgs) + if err != nil { + return nil, err } args["msvcName"] = arg1 - var arg2 entities.ResourceType - if tmp, ok := rawArgs["resType"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resType")) - arg2, err = ec.unmarshalNConsoleResType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐResourceType(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_core_checkNameAvailability_argsResType(ctx, rawArgs) + if err != nil { + return nil, err } args["resType"] = arg2 - var arg3 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg3, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg3, err := ec.field_Query_core_checkNameAvailability_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg3 return args, nil } +func (ec *executionContext) field_Query_core_checkNameAvailability_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_checkNameAvailability_argsMsvcName( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["msvcName"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) + if tmp, ok := rawArgs["msvcName"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_checkNameAvailability_argsResType( + ctx context.Context, + rawArgs map[string]interface{}, +) (entities.ResourceType, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["resType"] + if !ok { + var zeroVal entities.ResourceType + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("resType")) + if tmp, ok := rawArgs["resType"]; ok { + return ec.unmarshalNConsoleResType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐResourceType(ctx, tmp) + } + + var zeroVal entities.ResourceType + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_checkNameAvailability_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_getApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_getApp_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_getApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getApp_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_getConfigValues_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getConfigValues_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 []*domain.ConfigKeyRef - if tmp, ok := rawArgs["queries"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("queries")) - arg1, err = ec.unmarshalOConfigKeyRefIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐConfigKeyRef(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_getConfigValues_argsQueries(ctx, rawArgs) + if err != nil { + return nil, err } args["queries"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_getConfigValues_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getConfigValues_argsQueries( + ctx context.Context, + rawArgs map[string]interface{}, +) ([]*domain.ConfigKeyRef, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["queries"] + if !ok { + var zeroVal []*domain.ConfigKeyRef + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("queries")) + if tmp, ok := rawArgs["queries"]; ok { + return ec.unmarshalOConfigKeyRefIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐConfigKeyRef(ctx, tmp) + } + + var zeroVal []*domain.ConfigKeyRef + return zeroVal, nil +} func (ec *executionContext) field_Query_core_getConfig_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getConfig_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_getConfig_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_getConfig_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getConfig_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_getEnvironment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getEnvironment_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query_core_getEnvironment_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_getExternalApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getExternalApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_getExternalApp_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_getExternalApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getExternalApp_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_getImagePullSecret_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getImagePullSecret_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query_core_getImagePullSecret_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_getManagedResouceOutputKeyValues_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["msvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getManagedResouceOutputKeyValues_argsMsvcName(ctx, rawArgs) + if err != nil { + return nil, err } args["msvcName"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_getManagedResouceOutputKeyValues_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg1 - var arg2 []*domain.ManagedResourceKeyRef - if tmp, ok := rawArgs["keyrefs"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyrefs")) - arg2, err = ec.unmarshalOManagedResourceKeyRefIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐManagedResourceKeyRef(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_core_getManagedResouceOutputKeyValues_argsKeyrefs(ctx, rawArgs) + if err != nil { + return nil, err } args["keyrefs"] = arg2 return args, nil } +func (ec *executionContext) field_Query_core_getManagedResouceOutputKeyValues_argsMsvcName( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["msvcName"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) + if tmp, ok := rawArgs["msvcName"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getManagedResouceOutputKeyValues_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getManagedResouceOutputKeyValues_argsKeyrefs( + ctx context.Context, + rawArgs map[string]interface{}, +) ([]*domain.ManagedResourceKeyRef, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["keyrefs"] + if !ok { + var zeroVal []*domain.ManagedResourceKeyRef + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("keyrefs")) + if tmp, ok := rawArgs["keyrefs"]; ok { + return ec.unmarshalOManagedResourceKeyRefIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐManagedResourceKeyRef(ctx, tmp) + } + + var zeroVal []*domain.ManagedResourceKeyRef + return zeroVal, nil +} func (ec *executionContext) field_Query_core_getManagedResouceOutputKeys_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["msvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getManagedResouceOutputKeys_argsMsvcName(ctx, rawArgs) + if err != nil { + return nil, err } args["msvcName"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_getManagedResouceOutputKeys_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg1 - var arg2 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg2, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_core_getManagedResouceOutputKeys_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg2 return args, nil } +func (ec *executionContext) field_Query_core_getManagedResouceOutputKeys_argsMsvcName( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["msvcName"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) + if tmp, ok := rawArgs["msvcName"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getManagedResouceOutputKeys_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getManagedResouceOutputKeys_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_getManagedResource_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["msvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getManagedResource_argsMsvcName(ctx, rawArgs) + if err != nil { + return nil, err } args["msvcName"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_getManagedResource_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg1 - var arg2 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg2, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_core_getManagedResource_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg2 return args, nil } +func (ec *executionContext) field_Query_core_getManagedResource_argsMsvcName( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["msvcName"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) + if tmp, ok := rawArgs["msvcName"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getManagedResource_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getManagedResource_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_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 - } + arg0, err := ec.field_Query_core_getRegistryImage_argsImage(ctx, rawArgs) + if err != nil { + return nil, err } args["image"] = arg0 return args, nil } +func (ec *executionContext) field_Query_core_getRegistryImage_argsImage( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["image"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("image")) + if tmp, ok := rawArgs["image"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, 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{}{} - var arg0 string - if tmp, ok := rawArgs["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getRouter_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_getRouter_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_getRouter_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getRouter_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_getSecretValues_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getSecretValues_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 []*domain.SecretKeyRef - if tmp, ok := rawArgs["queries"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("queries")) - arg1, err = ec.unmarshalOSecretKeyRefIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐSecretKeyRefᚄ(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_getSecretValues_argsQueries(ctx, rawArgs) + if err != nil { + return nil, err } args["queries"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_getSecretValues_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getSecretValues_argsQueries( + ctx context.Context, + rawArgs map[string]interface{}, +) ([]*domain.SecretKeyRef, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["queries"] + if !ok { + var zeroVal []*domain.SecretKeyRef + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("queries")) + if tmp, ok := rawArgs["queries"]; ok { + return ec.unmarshalOSecretKeyRefIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋdomainᚐSecretKeyRefᚄ(ctx, tmp) + } + + var zeroVal []*domain.SecretKeyRef + return zeroVal, nil +} func (ec *executionContext) field_Query_core_getSecret_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_getSecret_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_getSecret_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_getSecret_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_getSecret_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_listApps_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_listApps_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 *model.SearchApps - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchApps2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchApps(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_listApps_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_core_listApps_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg2 return args, nil } +func (ec *executionContext) field_Query_core_listApps_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listApps_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchApps, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchApps + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchApps2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchApps(ctx, tmp) + } + + var zeroVal *model.SearchApps + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listApps_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_core_listConfigs_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_listConfigs_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 *model.SearchConfigs - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchConfigs2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchConfigs(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_listConfigs_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_core_listConfigs_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg2 return args, nil } +func (ec *executionContext) field_Query_core_listConfigs_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listConfigs_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchConfigs, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchConfigs + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchConfigs2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchConfigs(ctx, tmp) + } + + var zeroVal *model.SearchConfigs + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listConfigs_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_core_listEnvironments_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *model.SearchEnvironments - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg0, err = ec.unmarshalOSearchEnvironments2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchEnvironments(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_listEnvironments_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg0 - var arg1 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_listEnvironments_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_listEnvironments_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchEnvironments, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchEnvironments + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchEnvironments2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchEnvironments(ctx, tmp) + } + + var zeroVal *model.SearchEnvironments + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listEnvironments_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_core_listExternalApps_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_listExternalApps_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 *model.SearchExternalApps - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchExternalApps2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchExternalApps(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_listExternalApps_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err + } + args["search"] = arg1 + arg2, err := ec.field_Query_core_listExternalApps_argsPq(ctx, rawArgs) + if err != nil { + return nil, err + } + args["pq"] = arg2 + return args, nil +} +func (ec *executionContext) field_Query_core_listExternalApps_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listExternalApps_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchExternalApps, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchExternalApps + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchExternalApps2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchExternalApps(ctx, tmp) } - args["search"] = arg1 - var arg2 *repos.CursorPagination + + var zeroVal *model.SearchExternalApps + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listExternalApps_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) } - args["pq"] = arg2 - return args, nil + + var zeroVal *repos.CursorPagination + return zeroVal, nil } func (ec *executionContext) field_Query_core_listImagePullSecrets_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *model.SearchImagePullSecrets - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg0, err = ec.unmarshalOSearchImagePullSecrets2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchImagePullSecrets(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_listImagePullSecrets_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg0 - var arg1 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_listImagePullSecrets_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_listImagePullSecrets_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchImagePullSecrets, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchImagePullSecrets + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchImagePullSecrets2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchImagePullSecrets(ctx, tmp) + } + + var zeroVal *model.SearchImagePullSecrets + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listImagePullSecrets_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_core_listImportedManagedResources_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_listImportedManagedResources_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 *model.SearchImportedManagedResources - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchImportedManagedResources2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchImportedManagedResources(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_listImportedManagedResources_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_core_listImportedManagedResources_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg2 return args, nil } +func (ec *executionContext) field_Query_core_listImportedManagedResources_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listImportedManagedResources_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchImportedManagedResources, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchImportedManagedResources + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchImportedManagedResources2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchImportedManagedResources(ctx, tmp) + } + + var zeroVal *model.SearchImportedManagedResources + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listImportedManagedResources_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_core_listManagedResources_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *model.SearchManagedResources - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg0, err = ec.unmarshalOSearchManagedResources2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchManagedResources(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_listManagedResources_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg0 - var arg1 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_listManagedResources_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_listManagedResources_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchManagedResources, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchManagedResources + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchManagedResources2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchManagedResources(ctx, tmp) + } + + var zeroVal *model.SearchManagedResources + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listManagedResources_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, 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 - } + arg0, err := ec.field_Query_core_listRegistryImages_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg0 return args, nil } +func (ec *executionContext) field_Query_core_listRegistryImages_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, 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{}{} - var arg0 string - if tmp, ok := rawArgs["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_listRouters_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 *model.SearchRouters - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchRouters2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchRouters(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_listRouters_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_core_listRouters_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg2 return args, nil } +func (ec *executionContext) field_Query_core_listRouters_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listRouters_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchRouters, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchRouters + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchRouters2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchRouters(ctx, tmp) + } + + var zeroVal *model.SearchRouters + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listRouters_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_core_listSecrets_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_listSecrets_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 *model.SearchSecrets - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg1, err = ec.unmarshalOSearchSecrets2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchSecrets(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_listSecrets_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg1 - var arg2 *repos.CursorPagination - if tmp, ok := rawArgs["pq"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) - arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg2, err := ec.field_Query_core_listSecrets_argsPq(ctx, rawArgs) + if err != nil { + return nil, err } args["pq"] = arg2 return args, nil } +func (ec *executionContext) field_Query_core_listSecrets_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listSecrets_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchSecrets, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchSecrets + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchSecrets2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchSecrets(ctx, tmp) + } + + var zeroVal *model.SearchSecrets + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_listSecrets_argsPq( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pq"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + if tmp, ok := rawArgs["pq"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field_Query_core_restartApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_restartApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["appName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("appName")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_restartApp_argsAppName(ctx, rawArgs) + if err != nil { + return nil, err } args["appName"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_restartApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_restartApp_argsAppName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["appName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("appName")) + if tmp, ok := rawArgs["appName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_resyncApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_resyncApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_resyncApp_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_resyncApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_resyncApp_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_resyncConfig_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_resyncConfig_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_resyncConfig_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_resyncConfig_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_resyncConfig_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_resyncEnvironment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_resyncEnvironment_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query_core_resyncEnvironment_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_resyncExternalApp_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_resyncExternalApp_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_resyncExternalApp_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_resyncExternalApp_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_resyncExternalApp_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_resyncImagePullSecret_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_resyncImagePullSecret_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query_core_resyncImagePullSecret_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_resyncManagedResource_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["msvcName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_resyncManagedResource_argsMsvcName(ctx, rawArgs) + if err != nil { + return nil, err } args["msvcName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_resyncManagedResource_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_resyncManagedResource_argsMsvcName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["msvcName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("msvcName")) + if tmp, ok := rawArgs["msvcName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_resyncManagedResource_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_resyncRouter_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_resyncRouter_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_resyncRouter_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_resyncRouter_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_resyncRouter_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_resyncSecret_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["envName"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_resyncSecret_argsEnvName(ctx, rawArgs) + if err != nil { + return nil, err } args["envName"] = arg0 - var arg1 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg1, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_core_resyncSecret_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg1 return args, nil } +func (ec *executionContext) field_Query_core_resyncSecret_argsEnvName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["envName"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + if tmp, ok := rawArgs["envName"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_core_resyncSecret_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_core_searchRegistryImages_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["query"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("query")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_core_searchRegistryImages_argsQuery(ctx, rawArgs) + if err != nil { + return nil, err } args["query"] = arg0 return args, nil } +func (ec *executionContext) field_Query_core_searchRegistryImages_argsQuery( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["query"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("query")) + if tmp, ok := rawArgs["query"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_getClusterManagedService_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_getClusterManagedService_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query_infra_getClusterManagedService_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_infra_listClusterManagedServices_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *model.SearchClusterManagedService - if tmp, ok := rawArgs["search"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) - arg0, err = ec.unmarshalOSearchClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchClusterManagedService(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_infra_listClusterManagedServices_argsSearch(ctx, rawArgs) + if err != nil { + return nil, err } args["search"] = arg0 - var arg1 *repos.CursorPagination - if tmp, ok := rawArgs["pagination"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) - arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_infra_listClusterManagedServices_argsPagination(ctx, rawArgs) + if err != nil { + return nil, err } args["pagination"] = arg1 return args, nil } +func (ec *executionContext) field_Query_infra_listClusterManagedServices_argsSearch( + ctx context.Context, + rawArgs map[string]interface{}, +) (*model.SearchClusterManagedService, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["search"] + if !ok { + var zeroVal *model.SearchClusterManagedService + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + if tmp, ok := rawArgs["search"]; ok { + return ec.unmarshalOSearchClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchClusterManagedService(ctx, tmp) + } + + var zeroVal *model.SearchClusterManagedService + return zeroVal, nil +} + +func (ec *executionContext) field_Query_infra_listClusterManagedServices_argsPagination( + ctx context.Context, + rawArgs map[string]interface{}, +) (*repos.CursorPagination, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["pagination"] + if !ok { + var zeroVal *repos.CursorPagination + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + if tmp, ok := rawArgs["pagination"]; ok { + return ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + } + + var zeroVal *repos.CursorPagination + return zeroVal, nil +} func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 bool - if tmp, ok := rawArgs["includeDeprecated"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field___Type_enumValues_argsIncludeDeprecated(ctx, rawArgs) + if err != nil { + return nil, err } args["includeDeprecated"] = arg0 return args, nil } +func (ec *executionContext) field___Type_enumValues_argsIncludeDeprecated( + ctx context.Context, + rawArgs map[string]interface{}, +) (bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["includeDeprecated"] + if !ok { + var zeroVal bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + if tmp, ok := rawArgs["includeDeprecated"]; ok { + return ec.unmarshalOBoolean2bool(ctx, tmp) + } + + var zeroVal bool + return zeroVal, nil +} func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 bool - if tmp, ok := rawArgs["includeDeprecated"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field___Type_fields_argsIncludeDeprecated(ctx, rawArgs) + if err != nil { + return nil, err } args["includeDeprecated"] = arg0 return args, nil } +func (ec *executionContext) field___Type_fields_argsIncludeDeprecated( + ctx context.Context, + rawArgs map[string]interface{}, +) (bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["includeDeprecated"] + if !ok { + var zeroVal bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + if tmp, ok := rawArgs["includeDeprecated"]; ok { + return ec.unmarshalOBoolean2bool(ctx, tmp) + } + + var zeroVal bool + return zeroVal, nil +} // endregion ***************************** args.gotpl ***************************** @@ -10756,15 +13570,18 @@ func (ec *executionContext) _Build_id(ctx context.Context, field graphql.Collect ctx = rctx // use context from middleware stack in children return obj.ID, nil } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal repos.ID + return zeroVal, errors.New("directive isLoggedInAndVerified is not implemented") } return ec.directives.IsLoggedInAndVerified(ctx, obj, directive0) } directive2 := func(ctx context.Context) (interface{}, error) { if ec.directives.HasAccount == nil { - return nil, errors.New("directive hasAccount is not implemented") + var zeroVal repos.ID + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, obj, directive1) } @@ -20331,14 +23148,11 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ 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.(*bool) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -20422,14 +23236,11 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ 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.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toDevice(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -28491,15 +31302,18 @@ func (ec *executionContext) _Mutation_core_setupDefaultEnvironment(ctx context.C ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreSetupDefaultEnvironment(rctx) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -28561,15 +31375,18 @@ func (ec *executionContext) _Mutation_core_createEnvironment(ctx context.Context ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreCreateEnvironment(rctx, fc.Args["env"].(entities.Environment)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Environment + return zeroVal, 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") + var zeroVal *entities.Environment + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -28677,15 +31494,18 @@ func (ec *executionContext) _Mutation_core_updateEnvironment(ctx context.Context ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreUpdateEnvironment(rctx, fc.Args["env"].(entities.Environment)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Environment + return zeroVal, 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") + var zeroVal *entities.Environment + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -28793,15 +31613,18 @@ func (ec *executionContext) _Mutation_core_deleteEnvironment(ctx context.Context ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreDeleteEnvironment(rctx, fc.Args["envName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -28874,15 +31697,18 @@ func (ec *executionContext) _Mutation_core_cloneEnvironment(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreCloneEnvironment(rctx, fc.Args["clusterName"].(string), fc.Args["sourceEnvName"].(string), fc.Args["destinationEnvName"].(string), fc.Args["displayName"].(string), fc.Args["environmentRoutingMode"].(v1.EnvironmentRoutingMode)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Environment + return zeroVal, 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") + var zeroVal *entities.Environment + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -28990,15 +31816,18 @@ func (ec *executionContext) _Mutation_core_createImagePullSecret(ctx context.Con ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreCreateImagePullSecret(rctx, fc.Args["pullSecret"].(entities.ImagePullSecret)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.ImagePullSecret + return zeroVal, 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") + var zeroVal *entities.ImagePullSecret + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -29104,15 +31933,18 @@ func (ec *executionContext) _Mutation_core_updateImagePullSecret(ctx context.Con ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreUpdateImagePullSecret(rctx, fc.Args["pullSecret"].(entities.ImagePullSecret)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.ImagePullSecret + return zeroVal, 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") + var zeroVal *entities.ImagePullSecret + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -29218,15 +32050,18 @@ func (ec *executionContext) _Mutation_core_deleteImagePullSecret(ctx context.Con ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreDeleteImagePullSecret(rctx, 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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -29299,15 +32134,18 @@ func (ec *executionContext) _Mutation_core_deleteRegistryImage(ctx context.Conte 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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -29380,15 +32218,18 @@ func (ec *executionContext) _Mutation_core_createApp(ctx context.Context, field ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreCreateApp(rctx, fc.Args["envName"].(string), fc.Args["app"].(entities.App)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.App + return zeroVal, 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") + var zeroVal *entities.App + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -29502,15 +32343,18 @@ func (ec *executionContext) _Mutation_core_updateApp(ctx context.Context, field ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreUpdateApp(rctx, fc.Args["envName"].(string), fc.Args["app"].(entities.App)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.App + return zeroVal, 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") + var zeroVal *entities.App + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -29624,15 +32468,18 @@ func (ec *executionContext) _Mutation_core_deleteApp(ctx context.Context, field ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreDeleteApp(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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -29705,15 +32552,18 @@ func (ec *executionContext) _Mutation_core_interceptApp(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreInterceptApp(rctx, fc.Args["envName"].(string), fc.Args["appname"].(string), fc.Args["deviceName"].(string), fc.Args["intercept"].(bool), fc.Args["portMappings"].([]*v1.AppInterceptPortMappings)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -29786,15 +32636,18 @@ func (ec *executionContext) _Mutation_core_interceptAppOnLocalCluster(ctx contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreInterceptAppOnLocalCluster(rctx, fc.Args["envName"].(string), fc.Args["appname"].(string), fc.Args["clusterName"].(string), fc.Args["ipAddr"].(string), fc.Args["intercept"].(bool), fc.Args["portMappings"].([]*v1.AppInterceptPortMappings)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -29867,15 +32720,18 @@ func (ec *executionContext) _Mutation_core_removeDeviceIntercepts(ctx context.Co ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreRemoveDeviceIntercepts(rctx, fc.Args["envName"].(string), fc.Args["deviceName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -29948,15 +32804,18 @@ func (ec *executionContext) _Mutation_core_createExternalApp(ctx context.Context ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreCreateExternalApp(rctx, fc.Args["envName"].(string), fc.Args["externalApp"].(entities.ExternalApp)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.ExternalApp + return zeroVal, 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") + var zeroVal *entities.ExternalApp + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -30060,15 +32919,18 @@ func (ec *executionContext) _Mutation_core_updateExternalApp(ctx context.Context ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreUpdateExternalApp(rctx, fc.Args["envName"].(string), fc.Args["externalApp"].(entities.ExternalApp)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.ExternalApp + return zeroVal, 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") + var zeroVal *entities.ExternalApp + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -30172,15 +33034,18 @@ func (ec *executionContext) _Mutation_core_deleteExternalApp(ctx context.Context ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreDeleteExternalApp(rctx, fc.Args["envName"].(string), fc.Args["externalAppName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -30253,15 +33118,18 @@ func (ec *executionContext) _Mutation_core_interceptExternalApp(ctx context.Cont ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreInterceptExternalApp(rctx, fc.Args["envName"].(string), fc.Args["externalAppName"].(string), fc.Args["deviceName"].(string), fc.Args["intercept"].(bool), fc.Args["portMappings"].([]*v1.AppInterceptPortMappings)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -30334,15 +33202,18 @@ func (ec *executionContext) _Mutation_core_createConfig(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreCreateConfig(rctx, fc.Args["envName"].(string), fc.Args["config"].(entities.Config)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Config + return zeroVal, 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") + var zeroVal *entities.Config + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -30448,15 +33319,18 @@ func (ec *executionContext) _Mutation_core_updateConfig(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreUpdateConfig(rctx, fc.Args["envName"].(string), fc.Args["config"].(entities.Config)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Config + return zeroVal, 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") + var zeroVal *entities.Config + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -30562,15 +33436,18 @@ func (ec *executionContext) _Mutation_core_deleteConfig(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreDeleteConfig(rctx, fc.Args["envName"].(string), fc.Args["configName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -30643,15 +33520,18 @@ func (ec *executionContext) _Mutation_core_createSecret(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreCreateSecret(rctx, fc.Args["envName"].(string), fc.Args["secret"].(entities.Secret)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Secret + return zeroVal, 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") + var zeroVal *entities.Secret + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -30763,15 +33643,18 @@ func (ec *executionContext) _Mutation_core_updateSecret(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreUpdateSecret(rctx, fc.Args["envName"].(string), fc.Args["secret"].(entities.Secret)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Secret + return zeroVal, 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") + var zeroVal *entities.Secret + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -30883,15 +33766,18 @@ func (ec *executionContext) _Mutation_core_deleteSecret(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreDeleteSecret(rctx, fc.Args["envName"].(string), fc.Args["secretName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -30964,15 +33850,18 @@ func (ec *executionContext) _Mutation_core_createRouter(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreCreateRouter(rctx, fc.Args["envName"].(string), fc.Args["router"].(entities.Router)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Router + return zeroVal, 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") + var zeroVal *entities.Router + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -31078,15 +33967,18 @@ func (ec *executionContext) _Mutation_core_updateRouter(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreUpdateRouter(rctx, fc.Args["envName"].(string), fc.Args["router"].(entities.Router)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Router + return zeroVal, 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") + var zeroVal *entities.Router + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -31192,15 +34084,18 @@ func (ec *executionContext) _Mutation_core_deleteRouter(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreDeleteRouter(rctx, fc.Args["envName"].(string), fc.Args["routerName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -31273,15 +34168,18 @@ func (ec *executionContext) _Mutation_infra_createClusterManagedService(ctx cont ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraCreateClusterManagedService(rctx, fc.Args["service"].(entities.ClusterManagedService)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.ClusterManagedService + return zeroVal, 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") + var zeroVal *entities.ClusterManagedService + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -31387,15 +34285,18 @@ func (ec *executionContext) _Mutation_infra_updateClusterManagedService(ctx cont ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraUpdateClusterManagedService(rctx, fc.Args["service"].(entities.ClusterManagedService)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.ClusterManagedService + return zeroVal, 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") + var zeroVal *entities.ClusterManagedService + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -31501,15 +34402,18 @@ func (ec *executionContext) _Mutation_infra_deleteClusterManagedService(ctx cont ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraDeleteClusterManagedService(rctx, 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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -31582,15 +34486,18 @@ func (ec *executionContext) _Mutation_infra_cloneClusterManagedService(ctx conte ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InfraCloneClusterManagedService(rctx, fc.Args["clusterName"].(string), fc.Args["sourceMsvcName"].(string), fc.Args["destinationMsvcName"].(string), fc.Args["displayName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.ClusterManagedService + return zeroVal, 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") + var zeroVal *entities.ClusterManagedService + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -31696,15 +34603,18 @@ func (ec *executionContext) _Mutation_core_createManagedResource(ctx context.Con ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreCreateManagedResource(rctx, fc.Args["msvcName"].(string), fc.Args["mres"].(entities.ManagedResource)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.ManagedResource + return zeroVal, 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") + var zeroVal *entities.ManagedResource + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -31820,15 +34730,18 @@ func (ec *executionContext) _Mutation_core_updateManagedResource(ctx context.Con ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreUpdateManagedResource(rctx, fc.Args["msvcName"].(string), fc.Args["mres"].(entities.ManagedResource)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.ManagedResource + return zeroVal, 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") + var zeroVal *entities.ManagedResource + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -31944,15 +34857,18 @@ func (ec *executionContext) _Mutation_core_deleteManagedResource(ctx context.Con ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreDeleteManagedResource(rctx, fc.Args["msvcName"].(string), fc.Args["mresName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -32025,15 +34941,18 @@ func (ec *executionContext) _Mutation_core_importManagedResource(ctx context.Con ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreImportManagedResource(rctx, fc.Args["envName"].(string), fc.Args["msvcName"].(string), fc.Args["mresName"].(string), fc.Args["importName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.ImportedManagedResource + return zeroVal, 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") + var zeroVal *entities.ImportedManagedResource + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -32137,15 +35056,18 @@ func (ec *executionContext) _Mutation_core_deleteImportedManagedResource(ctx con ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CoreDeleteImportedManagedResource(rctx, fc.Args["envName"].(string), fc.Args["importName"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -32552,15 +35474,18 @@ func (ec *executionContext) _Query_core_checkNameAvailability(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreCheckNameAvailability(rctx, fc.Args["envName"].(*string), fc.Args["msvcName"].(*string), fc.Args["resType"].(entities.ResourceType), fc.Args["name"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedIn == nil { - return nil, errors.New("directive isLoggedIn is not implemented") + var zeroVal *domain.CheckNameAvailabilityOutput + return zeroVal, errors.New("directive isLoggedIn is not implemented") } return ec.directives.IsLoggedIn(ctx, nil, directive0) } directive2 := func(ctx context.Context) (interface{}, error) { if ec.directives.HasAccount == nil { - return nil, errors.New("directive hasAccount is not implemented") + var zeroVal *domain.CheckNameAvailabilityOutput + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -32683,15 +35608,18 @@ func (ec *executionContext) _Query_core_listEnvironments(ctx context.Context, fi ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreListEnvironments(rctx, fc.Args["search"].(*model.SearchEnvironments), fc.Args["pq"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.EnvironmentPaginatedRecords + return zeroVal, 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") + var zeroVal *model.EnvironmentPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -32769,15 +35697,18 @@ func (ec *executionContext) _Query_core_getEnvironment(ctx context.Context, fiel ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreGetEnvironment(rctx, 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") + var zeroVal *entities.Environment + return zeroVal, 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") + var zeroVal *entities.Environment + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -32885,15 +35816,18 @@ func (ec *executionContext) _Query_core_resyncEnvironment(ctx context.Context, f ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreResyncEnvironment(rctx, 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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -32966,15 +35900,18 @@ func (ec *executionContext) _Query_core_listImagePullSecrets(ctx context.Context ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreListImagePullSecrets(rctx, fc.Args["search"].(*model.SearchImagePullSecrets), fc.Args["pq"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.ImagePullSecretPaginatedRecords + return zeroVal, 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") + var zeroVal *model.ImagePullSecretPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -33052,15 +35989,18 @@ func (ec *executionContext) _Query_core_getImagePullSecret(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreGetImagePullSecret(rctx, 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") + var zeroVal *entities.ImagePullSecret + return zeroVal, 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") + var zeroVal *entities.ImagePullSecret + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -33166,15 +36106,18 @@ func (ec *executionContext) _Query_core_resyncImagePullSecret(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreResyncImagePullSecret(rctx, 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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -33247,15 +36190,18 @@ func (ec *executionContext) _Query_core_getRegistryImageURL(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreGetRegistryImageURL(rctx) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.RegistryImageURL + return zeroVal, 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") + var zeroVal *model.RegistryImageURL + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -33295,10 +36241,16 @@ func (ec *executionContext) fieldContext_Query_core_getRegistryImageURL(_ contex IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { + case "klWebhookAuthToken": + return ec.fieldContext_RegistryImageURL_klWebhookAuthToken(ctx, field) case "scriptUrl": return ec.fieldContext_RegistryImageURL_scriptUrl(ctx, field) + case "scriptUrlExample": + return ec.fieldContext_RegistryImageURL_scriptUrlExample(ctx, field) case "url": return ec.fieldContext_RegistryImageURL_url(ctx, field) + case "urlExample": + return ec.fieldContext_RegistryImageURL_urlExample(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type RegistryImageURL", field.Name) }, @@ -33323,15 +36275,18 @@ func (ec *executionContext) _Query_core_getRegistryImage(ctx context.Context, fi ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreGetRegistryImage(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") + var zeroVal *entities.RegistryImage + return zeroVal, 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") + var zeroVal *entities.RegistryImage + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -33421,15 +36376,18 @@ func (ec *executionContext) _Query_core_listRegistryImages(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreListRegistryImages(rctx, fc.Args["pq"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.RegistryImagePaginatedRecords + return zeroVal, 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") + var zeroVal *model.RegistryImagePaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -33507,15 +36465,18 @@ func (ec *executionContext) _Query_core_searchRegistryImages(ctx context.Context ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreSearchRegistryImages(rctx, fc.Args["query"].(string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal []*entities.RegistryImage + return zeroVal, 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") + var zeroVal []*entities.RegistryImage + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -33608,15 +36569,18 @@ func (ec *executionContext) _Query_core_listApps(ctx context.Context, field grap 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)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.AppPaginatedRecords + return zeroVal, 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") + var zeroVal *model.AppPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -33694,15 +36658,18 @@ func (ec *executionContext) _Query_core_getApp(ctx context.Context, field graphq ctx = rctx // use context from middleware stack in children 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 { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.App + return zeroVal, 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") + var zeroVal *entities.App + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -33816,15 +36783,18 @@ func (ec *executionContext) _Query_core_resyncApp(ctx context.Context, field gra ctx = rctx // use context from middleware stack in children 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 { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -33897,15 +36867,18 @@ func (ec *executionContext) _Query_core_restartApp(ctx context.Context, field gr 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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -33978,15 +36951,18 @@ func (ec *executionContext) _Query_core_listExternalApps(ctx context.Context, fi 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)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.ExternalAppPaginatedRecords + return zeroVal, 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") + var zeroVal *model.ExternalAppPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -34064,15 +37040,18 @@ func (ec *executionContext) _Query_core_getExternalApp(ctx context.Context, fiel ctx = rctx // use context from middleware stack in children 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 { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.ExternalApp + return zeroVal, 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") + var zeroVal *entities.ExternalApp + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -34176,15 +37155,18 @@ func (ec *executionContext) _Query_core_resyncExternalApp(ctx context.Context, f ctx = rctx // use context from middleware stack in children 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 { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -34257,15 +37239,18 @@ func (ec *executionContext) _Query_core_getConfigValues(ctx context.Context, fie ctx = rctx // use context from middleware stack in children 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 { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal []*domain.ConfigKeyValueRef + return zeroVal, 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") + var zeroVal []*domain.ConfigKeyValueRef + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -34343,15 +37328,18 @@ func (ec *executionContext) _Query_core_listConfigs(ctx context.Context, field g 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)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.ConfigPaginatedRecords + return zeroVal, 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") + var zeroVal *model.ConfigPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -34429,15 +37417,18 @@ func (ec *executionContext) _Query_core_getConfig(ctx context.Context, field gra ctx = rctx // use context from middleware stack in children 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 { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Config + return zeroVal, 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") + var zeroVal *entities.Config + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -34543,15 +37534,18 @@ func (ec *executionContext) _Query_core_resyncConfig(ctx context.Context, field ctx = rctx // use context from middleware stack in children 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 { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -34624,15 +37618,18 @@ func (ec *executionContext) _Query_core_getSecretValues(ctx context.Context, fie ctx = rctx // use context from middleware stack in children 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 { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal []*domain.SecretKeyValueRef + return zeroVal, 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") + var zeroVal []*domain.SecretKeyValueRef + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -34710,15 +37707,18 @@ func (ec *executionContext) _Query_core_listSecrets(ctx context.Context, field g 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)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.SecretPaginatedRecords + return zeroVal, 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") + var zeroVal *model.SecretPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -34796,15 +37796,18 @@ func (ec *executionContext) _Query_core_getSecret(ctx context.Context, field gra ctx = rctx // use context from middleware stack in children 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 { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *entities.Secret + return zeroVal, 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") + var zeroVal *entities.Secret + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -34916,15 +37919,18 @@ func (ec *executionContext) _Query_core_resyncSecret(ctx context.Context, field ctx = rctx // use context from middleware stack in children 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 { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -34997,15 +38003,18 @@ func (ec *executionContext) _Query_core_listRouters(ctx context.Context, field g 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)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.RouterPaginatedRecords + return zeroVal, 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") + var zeroVal *model.RouterPaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -35083,15 +38092,18 @@ func (ec *executionContext) _Query_core_getRouter(ctx context.Context, field gra ctx = rctx // use context from middleware stack in children 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") + var zeroVal *entities.Router + return zeroVal, 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") + var zeroVal *entities.Router + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -35197,15 +38209,18 @@ func (ec *executionContext) _Query_core_resyncRouter(ctx context.Context, field 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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -35278,15 +38293,18 @@ func (ec *executionContext) _Query_core_getManagedResouceOutputKeys(ctx context. 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") + var zeroVal []string + return zeroVal, 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") + var zeroVal []string + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -35359,15 +38377,18 @@ func (ec *executionContext) _Query_core_getManagedResouceOutputKeyValues(ctx con 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") + var zeroVal []*domain.ManagedResourceKeyValueRef + return zeroVal, 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") + var zeroVal []*domain.ManagedResourceKeyValueRef + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -35448,15 +38469,18 @@ func (ec *executionContext) _Query_infra_listClusterManagedServices(ctx context. 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 { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.ClusterManagedServicePaginatedRecords + return zeroVal, 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") + var zeroVal *model.ClusterManagedServicePaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -35534,15 +38558,18 @@ func (ec *executionContext) _Query_infra_getClusterManagedService(ctx context.Co ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InfraGetClusterManagedService(rctx, 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") + var zeroVal *entities.ClusterManagedService + return zeroVal, 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") + var zeroVal *entities.ClusterManagedService + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -35648,15 +38675,18 @@ func (ec *executionContext) _Query_core_listManagedResources(ctx context.Context ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreListManagedResources(rctx, fc.Args["search"].(*model.SearchManagedResources), fc.Args["pq"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.ManagedResourcePaginatedRecords + return zeroVal, 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") + var zeroVal *model.ManagedResourcePaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -35734,15 +38764,18 @@ func (ec *executionContext) _Query_core_getManagedResource(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreGetManagedResource(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") + var zeroVal *entities.ManagedResource + return zeroVal, 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") + var zeroVal *entities.ManagedResource + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -35858,15 +38891,18 @@ func (ec *executionContext) _Query_core_resyncManagedResource(ctx context.Contex ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreResyncManagedResource(rctx, fc.Args["msvcName"].(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") + var zeroVal bool + return zeroVal, 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") + var zeroVal bool + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -35939,15 +38975,18 @@ func (ec *executionContext) _Query_core_listImportedManagedResources(ctx context ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().CoreListImportedManagedResources(rctx, fc.Args["envName"].(string), fc.Args["search"].(*model.SearchImportedManagedResources), fc.Args["pq"].(*repos.CursorPagination)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.IsLoggedInAndVerified == nil { - return nil, errors.New("directive isLoggedInAndVerified is not implemented") + var zeroVal *model.ImportedManagedResourcePaginatedRecords + return zeroVal, 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") + var zeroVal *model.ImportedManagedResourcePaginatedRecords + return zeroVal, errors.New("directive hasAccount is not implemented") } return ec.directives.HasAccount(ctx, nil, directive1) } @@ -37060,44 +40099,300 @@ func (ec *executionContext) _RegistryImageCredentialsEdge_node(ctx context.Conte } return graphql.Null } - res := resTmp.(*model.RegistryImageCredentials) + 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 "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 RegistryImageCredentials", field.Name) + }, + } + return fc, nil +} + +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 + } + 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.RegistryImageCredentialsEdge) + fc.Result = res + return ec.marshalNRegistryImageCredentialsEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageCredentialsEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RegistryImageCredentialsPaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RegistryImageCredentialsPaginatedRecords", + 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_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 RegistryImageCredentialsEdge", field.Name) + }, + } + return fc, nil +} + +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 + } + 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_RegistryImageCredentialsPaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RegistryImageCredentialsPaginatedRecords", + 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) _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 + } + 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_RegistryImageCredentialsPaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RegistryImageCredentialsPaginatedRecords", + 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) _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 + } + 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_RegistryImageEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RegistryImageEdge", + 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) _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 + } + 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.RegistryImage) fc.Result = res - return ec.marshalNRegistryImageCredentials2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageCredentials(ctx, field.Selections, res) + return ec.marshalNRegistryImage2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRegistryImage(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RegistryImageCredentialsEdge_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: "RegistryImageCredentialsEdge", + 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_RegistryImageCredentials_accountName(ctx, field) - case "createdBy": - return ec.fieldContext_RegistryImageCredentials_createdBy(ctx, field) + return ec.fieldContext_RegistryImage_accountName(ctx, field) case "creationTime": - return ec.fieldContext_RegistryImageCredentials_creationTime(ctx, field) + return ec.fieldContext_RegistryImage_creationTime(ctx, field) case "id": - return ec.fieldContext_RegistryImageCredentials_id(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_RegistryImageCredentials_markedForDeletion(ctx, field) - case "password": - return ec.fieldContext_RegistryImageCredentials_password(ctx, field) + return ec.fieldContext_RegistryImage_markedForDeletion(ctx, field) + case "meta": + return ec.fieldContext_RegistryImage_meta(ctx, field) case "recordVersion": - return ec.fieldContext_RegistryImageCredentials_recordVersion(ctx, field) + return ec.fieldContext_RegistryImage_recordVersion(ctx, field) case "updateTime": - return ec.fieldContext_RegistryImageCredentials_updateTime(ctx, field) + return ec.fieldContext_RegistryImage_updateTime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type RegistryImageCredentials", field.Name) + return nil, fmt.Errorf("no field named %q was found under type RegistryImage", field.Name) }, } return fc, nil } -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) +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 } @@ -37122,32 +40417,32 @@ func (ec *executionContext) _RegistryImageCredentialsPaginatedRecords_edges(ctx } return graphql.Null } - res := resTmp.([]*model.RegistryImageCredentialsEdge) + res := resTmp.([]*model.RegistryImageEdge) fc.Result = res - return ec.marshalNRegistryImageCredentialsEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageCredentialsEdgeᚄ(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_RegistryImageCredentialsPaginatedRecords_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: "RegistryImageCredentialsPaginatedRecords", + 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_RegistryImageCredentialsEdge_cursor(ctx, field) + return ec.fieldContext_RegistryImageEdge_cursor(ctx, field) case "node": - return ec.fieldContext_RegistryImageCredentialsEdge_node(ctx, field) + return ec.fieldContext_RegistryImageEdge_node(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type RegistryImageCredentialsEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type RegistryImageEdge", field.Name) }, } return fc, nil } -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) +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 } @@ -37177,9 +40472,9 @@ func (ec *executionContext) _RegistryImageCredentialsPaginatedRecords_pageInfo(c return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RegistryImageCredentialsPaginatedRecords_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: "RegistryImageCredentialsPaginatedRecords", + Object: "RegistryImagePaginatedRecords", Field: field, IsMethod: false, IsResolver: false, @@ -37200,8 +40495,8 @@ func (ec *executionContext) fieldContext_RegistryImageCredentialsPaginatedRecord return fc, nil } -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) +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 } @@ -37231,9 +40526,9 @@ func (ec *executionContext) _RegistryImageCredentialsPaginatedRecords_totalCount return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RegistryImageCredentialsPaginatedRecords_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: "RegistryImageCredentialsPaginatedRecords", + Object: "RegistryImagePaginatedRecords", Field: field, IsMethod: false, IsResolver: false, @@ -37244,8 +40539,8 @@ func (ec *executionContext) fieldContext_RegistryImageCredentialsPaginatedRecord return fc, nil } -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) +func (ec *executionContext) _RegistryImageURL_klWebhookAuthToken(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageURL) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageURL_klWebhookAuthToken(ctx, field) if err != nil { return graphql.Null } @@ -37258,7 +40553,7 @@ func (ec *executionContext) _RegistryImageEdge_cursor(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.KlWebhookAuthToken, nil }) if err != nil { ec.Error(ctx, err) @@ -37275,9 +40570,9 @@ func (ec *executionContext) _RegistryImageEdge_cursor(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RegistryImageEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageURL_klWebhookAuthToken(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RegistryImageEdge", + Object: "RegistryImageURL", Field: field, IsMethod: false, IsResolver: false, @@ -37288,122 +40583,8 @@ func (ec *executionContext) fieldContext_RegistryImageEdge_cursor(_ context.Cont return fc, nil } -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 - } - 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.RegistryImage) - fc.Result = res - return ec.marshalNRegistryImage2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋentitiesᚐRegistryImage(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_RegistryImageEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - 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_RegistryImage_accountName(ctx, field) - case "creationTime": - return ec.fieldContext_RegistryImage_creationTime(ctx, field) - case "id": - 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_RegistryImage_markedForDeletion(ctx, field) - case "meta": - return ec.fieldContext_RegistryImage_meta(ctx, field) - case "recordVersion": - return ec.fieldContext_RegistryImage_recordVersion(ctx, field) - case "updateTime": - return ec.fieldContext_RegistryImage_updateTime(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type RegistryImage", field.Name) - }, - } - return fc, nil -} - -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 - } - 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.RegistryImageEdge) - fc.Result = res - return ec.marshalNRegistryImageEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐRegistryImageEdgeᚄ(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_RegistryImagePaginatedRecords_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - 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_RegistryImageEdge_cursor(ctx, field) - case "node": - return ec.fieldContext_RegistryImageEdge_node(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type RegistryImageEdge", field.Name) - }, - } - return fc, nil -} - -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) +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 } @@ -37416,7 +40597,7 @@ func (ec *executionContext) _RegistryImagePaginatedRecords_pageInfo(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.ScriptURL, nil }) if err != nil { ec.Error(ctx, err) @@ -37428,36 +40609,26 @@ func (ec *executionContext) _RegistryImagePaginatedRecords_pageInfo(ctx context. } return graphql.Null } - res := resTmp.(*model.PageInfo) + res := resTmp.([]string) fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RegistryImagePaginatedRecords_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageURL_scriptUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RegistryImagePaginatedRecords", + Object: "RegistryImageURL", 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 nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -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) +func (ec *executionContext) _RegistryImageURL_scriptUrlExample(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageURL) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageURL_scriptUrlExample(ctx, field) if err != nil { return graphql.Null } @@ -37470,7 +40641,7 @@ func (ec *executionContext) _RegistryImagePaginatedRecords_totalCount(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return obj.ScriptURLExample, nil }) if err != nil { ec.Error(ctx, err) @@ -37482,26 +40653,26 @@ func (ec *executionContext) _RegistryImagePaginatedRecords_totalCount(ctx contex } return graphql.Null } - res := resTmp.(int) + res := resTmp.([]string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RegistryImagePaginatedRecords_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageURL_scriptUrlExample(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RegistryImagePaginatedRecords", + 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 Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } 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) +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 } @@ -37514,7 +40685,7 @@ func (ec *executionContext) _RegistryImageURL_scriptUrl(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ScriptURL, nil + return obj.URL, nil }) if err != nil { ec.Error(ctx, err) @@ -37526,12 +40697,12 @@ func (ec *executionContext) _RegistryImageURL_scriptUrl(ctx context.Context, fie } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RegistryImageURL_scriptUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageURL_url(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "RegistryImageURL", Field: field, @@ -37544,8 +40715,8 @@ func (ec *executionContext) fieldContext_RegistryImageURL_scriptUrl(_ context.Co 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) +func (ec *executionContext) _RegistryImageURL_urlExample(ctx context.Context, field graphql.CollectedField, obj *model.RegistryImageURL) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RegistryImageURL_urlExample(ctx, field) if err != nil { return graphql.Null } @@ -37558,7 +40729,7 @@ func (ec *executionContext) _RegistryImageURL_url(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.URL, nil + return obj.URLExample, nil }) if err != nil { ec.Error(ctx, err) @@ -37570,12 +40741,12 @@ func (ec *executionContext) _RegistryImageURL_url(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RegistryImageURL_url(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RegistryImageURL_urlExample(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "RegistryImageURL", Field: field, @@ -43568,7 +46739,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a switch k { case "enabled": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) - data, err := ec.unmarshalNBoolean2bool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } @@ -43582,7 +46753,7 @@ func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___a it.PortMappings = data case "toDevice": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("toDevice")) - data, err := ec.unmarshalNString2string(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } @@ -45060,27 +48231,48 @@ func (ec *executionContext) unmarshalInputRegistryImageURLIn(ctx context.Context asMap[k] = v } - fieldsInOrder := [...]string{"scriptUrl", "url"} + fieldsInOrder := [...]string{"klWebhookAuthToken", "scriptUrl", "scriptUrlExample", "url", "urlExample"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { continue } switch k { + case "klWebhookAuthToken": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("klWebhookAuthToken")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.KlWebhookAuthToken = data case "scriptUrl": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("scriptUrl")) - data, err := ec.unmarshalNString2string(ctx, v) + data, err := ec.unmarshalNString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } it.ScriptURL = data + case "scriptUrlExample": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("scriptUrlExample")) + data, err := ec.unmarshalNString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.ScriptURLExample = data case "url": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("url")) - data, err := ec.unmarshalNString2string(ctx, v) + data, err := ec.unmarshalNString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } it.URL = data + case "urlExample": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlExample")) + data, err := ec.unmarshalNString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.URLExample = data } } @@ -49019,16 +52211,10 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___ out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__Intercept") case "enabled": out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Intercept_enabled(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } case "portMappings": out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Intercept_portMappings(ctx, field, obj) case "toDevice": out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Intercept_toDevice(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } case "toIPAddr": out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Intercept_toIPAddr(ctx, field, obj) default: @@ -53197,16 +56383,31 @@ func (ec *executionContext) _RegistryImageURL(ctx context.Context, sel ast.Selec switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("RegistryImageURL") + case "klWebhookAuthToken": + out.Values[i] = ec._RegistryImageURL_klWebhookAuthToken(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } case "scriptUrl": out.Values[i] = ec._RegistryImageURL_scriptUrl(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } + case "scriptUrlExample": + out.Values[i] = ec._RegistryImageURL_scriptUrlExample(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++ } + case "urlExample": + out.Values[i] = ec._RegistryImageURL_urlExample(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } diff --git a/apps/console/internal/app/graph/imagepullsecret.resolvers.go b/apps/console/internal/app/graph/imagepullsecret.resolvers.go index ecef7dcc3..082554b4c 100644 --- a/apps/console/internal/app/graph/imagepullsecret.resolvers.go +++ b/apps/console/internal/app/graph/imagepullsecret.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/importedmanagedresource.resolvers.go b/apps/console/internal/app/graph/importedmanagedresource.resolvers.go index 233bf165e..85106bd55 100644 --- a/apps/console/internal/app/graph/importedmanagedresource.resolvers.go +++ b/apps/console/internal/app/graph/importedmanagedresource.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/managedresource.resolvers.go b/apps/console/internal/app/graph/managedresource.resolvers.go index 3233969e4..c7ea53829 100644 --- a/apps/console/internal/app/graph/managedresource.resolvers.go +++ b/apps/console/internal/app/graph/managedresource.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/model/models_gen.go b/apps/console/internal/app/graph/model/models_gen.go index ad830d79e..befe0edd7 100644 --- a/apps/console/internal/app/graph/model/models_gen.go +++ b/apps/console/internal/app/graph/model/models_gen.go @@ -406,16 +406,16 @@ type GithubComKloudliteOperatorApisCrdsV1HTTPSIn struct { } type GithubComKloudliteOperatorApisCrdsV1Intercept struct { - Enabled bool `json:"enabled"` + Enabled *bool `json:"enabled,omitempty"` PortMappings []*GithubComKloudliteOperatorApisCrdsV1AppInterceptPortMappings `json:"portMappings,omitempty"` - ToDevice string `json:"toDevice"` + ToDevice *string `json:"toDevice,omitempty"` ToIPAddr *string `json:"toIPAddr,omitempty"` } type GithubComKloudliteOperatorApisCrdsV1InterceptIn struct { - Enabled bool `json:"enabled"` + Enabled *bool `json:"enabled,omitempty"` PortMappings []*v1.AppInterceptPortMappings `json:"portMappings,omitempty"` - ToDevice string `json:"toDevice"` + ToDevice *string `json:"toDevice,omitempty"` ToIPAddr *string `json:"toIPAddr,omitempty"` } @@ -800,13 +800,19 @@ type RegistryImagePaginatedRecords struct { } type RegistryImageURL struct { - ScriptURL string `json:"scriptUrl"` - URL string `json:"url"` + KlWebhookAuthToken string `json:"klWebhookAuthToken"` + ScriptURL []string `json:"scriptUrl"` + ScriptURLExample []string `json:"scriptUrlExample"` + URL []string `json:"url"` + URLExample []string `json:"urlExample"` } type RegistryImageURLIn struct { - ScriptURL string `json:"scriptUrl"` - URL string `json:"url"` + KlWebhookAuthToken string `json:"klWebhookAuthToken"` + ScriptURL []string `json:"scriptUrl"` + ScriptURLExample []string `json:"scriptUrlExample"` + URL []string `json:"url"` + URLExample []string `json:"urlExample"` } type RouterEdge struct { diff --git a/apps/console/internal/app/graph/registryimage.resolvers.go b/apps/console/internal/app/graph/registryimage.resolvers.go index 4a69a0c83..e1552f0ef 100644 --- a/apps/console/internal/app/graph/registryimage.resolvers.go +++ b/apps/console/internal/app/graph/registryimage.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/router.resolvers.go b/apps/console/internal/app/graph/router.resolvers.go index aee6b6f5a..5ab6b920d 100644 --- a/apps/console/internal/app/graph/router.resolvers.go +++ b/apps/console/internal/app/graph/router.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/schema.resolvers.go b/apps/console/internal/app/graph/schema.resolvers.go index 53619178b..6d1deb59b 100644 --- a/apps/console/internal/app/graph/schema.resolvers.go +++ b/apps/console/internal/app/graph/schema.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/secret.resolvers.go b/apps/console/internal/app/graph/secret.resolvers.go index 1091a42b7..e9e5a2d00 100644 --- a/apps/console/internal/app/graph/secret.resolvers.go +++ b/apps/console/internal/app/graph/secret.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.49 +// Code generated by github.com/99designs/gqlgen version v0.17.55 import ( "context" diff --git a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls index bd7f9f743..5fa7baf53 100644 --- a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -178,9 +178,9 @@ type Github__com___kloudlite___operator___apis___crds___v1__Https @shareable { } type Github__com___kloudlite___operator___apis___crds___v1__Intercept @shareable { - enabled: Boolean! + enabled: Boolean portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappings!] - toDevice: String! + toDevice: String toIPAddr: String } @@ -513,9 +513,9 @@ input Github__com___kloudlite___operator___apis___crds___v1__HttpsIn { } input Github__com___kloudlite___operator___apis___crds___v1__InterceptIn { - enabled: Boolean! + enabled: Boolean portMappings: [Github__com___kloudlite___operator___apis___crds___v1__AppInterceptPortMappingsIn!] - toDevice: String! + toDevice: String toIPAddr: String } diff --git a/apps/console/internal/app/graph/struct-to-graphql/registryimageurl.graphqls b/apps/console/internal/app/graph/struct-to-graphql/registryimageurl.graphqls index 3a5d15b17..1ebff412a 100644 --- a/apps/console/internal/app/graph/struct-to-graphql/registryimageurl.graphqls +++ b/apps/console/internal/app/graph/struct-to-graphql/registryimageurl.graphqls @@ -1,10 +1,16 @@ type RegistryImageURL @shareable { - scriptUrl: String! - url: String! + klWebhookAuthToken: String! + scriptUrl: [String!]! + scriptUrlExample: [String!]! + url: [String!]! + urlExample: [String!]! } input RegistryImageURLIn { - scriptUrl: String! - url: String! + klWebhookAuthToken: String! + scriptUrl: [String!]! + scriptUrlExample: [String!]! + url: [String!]! + urlExample: [String!]! } diff --git a/apps/console/internal/domain/registry-image.go b/apps/console/internal/domain/registry-image.go index 0d84cbc9c..cf08ae962 100644 --- a/apps/console/internal/domain/registry-image.go +++ b/apps/console/internal/domain/registry-image.go @@ -74,8 +74,36 @@ func (d *domain) GetRegistryImageURL(ctx ConsoleContext) (*entities.RegistryImag encodedToken := encodeAccessToken(ctx.AccountName, d.envVars.WebhookTokenHashingSecret) return &entities.RegistryImageURL{ - URL: fmt.Sprintf(`curl -X POST "%s/image-meta-push" -H "Authorization: %s" -H "Content-Type: application/json" -d '{"image": "imageName:imageTag", "meta": {"repository": "github", "registry": "docker", "author":"kloudlite"}}'`, d.envVars.WebhookURL, encodedToken), - ScriptURL: fmt.Sprintf(`curl "%s/image-meta-push" | authorization=%s image=imageName:imageTag meta="repository=github,registry=docker,author=kloudlite" sh`, d.envVars.WebhookURL, encodedToken), + URL: []string{ + `export KL_WEBHOOK_TOKEN="paste your token"`, + strings.TrimSpace(fmt.Sprintf(` +curl -X POST "%s/image/push" \ + -H "Authorization: $KL_WEBHOOK_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ "image": ":", "meta": { "": "" }}'`, d.envVars.WebhookURL)), + }, + + URLExample: []string{ + `export KL_WEBHOOK_TOKEN="super-secret-token"`, + fmt.Sprintf(` +curl -X POST "%s/image/push" \ + -H "Authorization: $KL_WEBHOOK_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ "image": "ghcr.io/kloudlite/api/sample:v1.2.3", "meta": { "repo": "kloudlite/sample", "branch": "testing-ci" }}' +`, d.envVars.WebhookURL), + }, + + ScriptURL: []string{ + `export KL_WEBHOOK_TOKEN="paste your token"`, + fmt.Sprintf(`curl "%s/image-hook.sh" | image=: meta="=,=" sh`, d.envVars.ImageHookScriptHostedURL), + }, + ScriptURLExample: []string{ + `export KL_WEBHOOK_TOKEN="super-secret-token"`, + fmt.Sprintf(` +curl "%s/image-hook.sh" | image=ghcr.io/kloudlite/api/sample:v1.2.3 meta="repo=kloudlite/sample,branch=testing-ci" sh + `, d.envVars.ImageHookScriptHostedURL), + }, + KlWebhookAuthToken: encodedToken, }, nil } diff --git a/apps/console/internal/entities/field-constants/generated_constants.go b/apps/console/internal/entities/field-constants/generated_constants.go index ba396a632..100dd5e2f 100644 --- a/apps/console/internal/entities/field-constants/generated_constants.go +++ b/apps/console/internal/entities/field-constants/generated_constants.go @@ -220,8 +220,11 @@ const ( // constant vars generated for struct RegistryImageURL const ( - RegistryImageURLScriptUrl = "scriptUrl" - RegistryImageURLUrl = "url" + RegistryImageURLKlWebhookAuthToken = "klWebhookAuthToken" + RegistryImageURLScriptUrl = "scriptUrl" + RegistryImageURLScriptUrlExample = "scriptUrlExample" + RegistryImageURLUrl = "url" + RegistryImageURLUrlExample = "urlExample" ) // constant vars generated for struct ResourceMapping diff --git a/apps/console/internal/entities/registry-image.go b/apps/console/internal/entities/registry-image.go index 8de87d27c..7a62ef2c5 100644 --- a/apps/console/internal/entities/registry-image.go +++ b/apps/console/internal/entities/registry-image.go @@ -16,8 +16,13 @@ type RegistryImage struct { } type RegistryImageURL struct { - URL string `json:"url"` - ScriptURL string `json:"scriptUrl"` + URL []string `json:"url"` + URLExample []string `json:"urlExample"` + + KlWebhookAuthToken string `json:"klWebhookAuthToken"` + + ScriptURL []string `json:"scriptUrl"` + ScriptURLExample []string `json:"scriptUrlExample"` } var RegistryImageIndexes = []repos.IndexField{ diff --git a/apps/console/internal/env/env.go b/apps/console/internal/env/env.go index c14d88b54..d51233843 100644 --- a/apps/console/internal/env/env.go +++ b/apps/console/internal/env/env.go @@ -22,6 +22,7 @@ type Env struct { EventsNatsStream string `env:"EVENTS_NATS_STREAM" required:"true"` WebhookTokenHashingSecret string `env:"WEBHOOK_TOKEN_HASHING_SECRET" required:"true"` WebhookURL string `env:"WEBHOOK_URL" required:"true"` + ImageHookScriptHostedURL string `env:"IMAGE_HOOK_SCRIPT_HOSTED_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 d13ed7d96..c9da8a3ab 100644 --- a/apps/webhook/internal/app/image-hook.go +++ b/apps/webhook/internal/app/image-hook.go @@ -5,12 +5,12 @@ import ( "encoding/base64" "encoding/json" "fmt" - "io" "net/http" - "os" "strings" "time" + _ "embed" + "github.com/gofiber/fiber/v2" "github.com/kloudlite/api/apps/webhook/internal/domain" "github.com/kloudlite/api/apps/webhook/internal/env" @@ -23,6 +23,9 @@ import ( "go.uber.org/fx" ) +//go:embed scripts/kl-image-hook.sh +var imageHookScript string + func validateAndDecodeAccessToken(accessToken string, tokenSecret string) (accountName string, err error) { b, err := base64.StdEncoding.DecodeString(accessToken) if err != nil { @@ -69,7 +72,7 @@ func LoadImageHook() fx.Option { func(server httpServer.Server, envVars *env.Env, producer messaging.Producer, logr logging.Logger, d domain.Domain) error { app := server.Raw() - app.Post("/image-meta-push", func(ctx *fiber.Ctx) error { + app.Post("/image/push", func(ctx *fiber.Ctx) error { logger := logr.WithName("image-hook") headers := ctx.GetReqHeaders() @@ -132,18 +135,18 @@ func LoadImageHook() fx.Option { return ctx.Status(http.StatusAccepted).JSON(map[string]string{"status": "ok"}) }) - app.Get("/image-meta-push", func(c *fiber.Ctx) error { - f, err := os.Open("kl-image-script.sh") - if err != nil { - return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("Error opening script: %s", err.Error())) - } - defer f.Close() - all, err := io.ReadAll(f) - if err != nil { - return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("Error reading script: %s", err.Error())) - } - script := string(all) - script = strings.ReplaceAll(script, "$WEBHOOK_URL", fmt.Sprintf("%s/image-meta-push", envVars.WebhookURL)) + app.Get("/image-hook.sh", func(c *fiber.Ctx) error { + // f, err := os.Open("kl-image-script.sh") + // if err != nil { + // return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("Error opening script: %s", err.Error())) + // } + // defer f.Close() + // all, err := io.ReadAll(f) + // if err != nil { + // return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("Error reading script: %s", err.Error())) + // } + // script := string(imageHookScript) + script := strings.ReplaceAll(imageHookScript, "$WEBHOOK_URL", fmt.Sprintf("%s/image/push", envVars.WebhookURL)) return c.SendString(script) }) diff --git a/apps/webhook/internal/app/scripts/kl-image-hook.sh b/apps/webhook/internal/app/scripts/kl-image-hook.sh new file mode 100755 index 000000000..aaef98cc8 --- /dev/null +++ b/apps/webhook/internal/app/scripts/kl-image-hook.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +meta=$(echo "$meta" | tr -d ' ') + +json_data='{"image": "'"$image"'", "meta": {' + +IFS=',' read -r -a array <<<"$meta" +for element in "${array[@]}"; do + key=$(echo "$element" | cut -d '=' -f 1) + value=$(echo "$element" | cut -d '=' -f 2) + json_data+='"'"$key"'":"'"$value"'",' +done + +json_data=${json_data%,}'}}' + +curl -X POST "$WEBHOOK_URL" -H "Authorization: $KL_WEBHOOK_TOKEN" -H "Content-Type: application/json" -d "$json_data" From 471ec2d7371ebb3b95958874b39c5b9159bfb553 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 10 Oct 2024 17:24:08 +0530 Subject: [PATCH 89/89] chore: go mod tidy --- apps/auth/internal/env/env.go | 3 +-- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/auth/internal/env/env.go b/apps/auth/internal/env/env.go index 86e5e1f20..8353e2cc1 100644 --- a/apps/auth/internal/env/env.go +++ b/apps/auth/internal/env/env.go @@ -40,7 +40,7 @@ type githubOAuthEnv struct { GithubAppId string `env:"GITHUB_APP_ID" required:"true"` GithubAppPKFile string `env:"GITHUB_APP_PK_FILE" required:"true"` GithubScopes string `env:"GITHUB_SCOPES" required:"true"` - GithubWebhookUrl string `env:"GITHUB_WEBHOOK_URL" required:"true"` + GithubWebhookUrl string `env:"GITHUB_WEBHOOK_URL" required:"false"` } type gitlabOAuthEnv struct { @@ -48,7 +48,6 @@ type gitlabOAuthEnv struct { GitlabClientSecret string `env:"GITLAB_CLIENT_SECRET" required:"true"` GitlabCallbackUrl string `env:"GITLAB_CALLBACK_URL" required:"true"` GitlabScopes string `env:"GITLAB_SCOPES" required:"true"` - GitlabWebhookUrl string `env:"GITLAB_WEBHOOK_URL" required:"true"` } type googleOAuthEnv struct { diff --git a/go.mod b/go.mod index 81af3d5af..76cc082f3 100644 --- a/go.mod +++ b/go.mod @@ -49,7 +49,7 @@ require ( github.com/go-chi/chi/v5 v5.0.10 github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 - github.com/kloudlite/operator v0.0.0-20241005072928-c6d682d438ed + github.com/kloudlite/operator v0.0.0-20241009112404-194113cddc17 github.com/miekg/dns v1.1.57 github.com/mittwald/go-helm-client v0.12.14 github.com/nats-io/nats.go v1.31.0 diff --git a/go.sum b/go.sum index 517d4ec19..3f4a68fc8 100644 --- a/go.sum +++ b/go.sum @@ -330,8 +330,8 @@ github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/N github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 h1:YnZh3TL6AG4EfoInx1/L5zcPHd2QxgLKseJB1KtHjdQ= github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55/go.mod h1:GZj3wZmIw/qCciclRhgQTgmGiqe8wxoVzMXQjbOfnbc= -github.com/kloudlite/operator v0.0.0-20241005072928-c6d682d438ed h1:6w8Tp02Im4xwBxX5ot1CTlgfSsbsIpgEn9NXn8vibyc= -github.com/kloudlite/operator v0.0.0-20241005072928-c6d682d438ed/go.mod h1:VkreINDW43qeTsDv9gfGH5M9c5OG/jPGYOGxj8otsGY= +github.com/kloudlite/operator v0.0.0-20241009112404-194113cddc17 h1:BeVmWJWfAy1dkClLTLa07cCmB+LPF75mYYaGs3tz4Qg= +github.com/kloudlite/operator v0.0.0-20241009112404-194113cddc17/go.mod h1:VkreINDW43qeTsDv9gfGH5M9c5OG/jPGYOGxj8otsGY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=