diff --git a/cmd/config/example.go b/cmd/config/example.go index ac9836c69..9f74bdad7 100644 --- a/cmd/config/example.go +++ b/cmd/config/example.go @@ -131,6 +131,9 @@ func commandExample(cCtx *cli.Context) error { //nolint:funlen,maintidx }, Auth: &model.ConfigAuth{ Version: ptr("0.25.0"), + Misc: &model.ConfigAuthMisc{ + ConcealErrors: ptr(false), + }, ElevatedPrivileges: &model.ConfigAuthElevatedPrivileges{ Mode: ptr("required"), }, diff --git a/cmd/config/validate_test.go b/cmd/config/validate_test.go index a9d0aa6b8..b490b3cb2 100644 --- a/cmd/config/validate_test.go +++ b/cmd/config/validate_test.go @@ -56,6 +56,9 @@ func expectedConfig() *model.ConfigConfig { Functions: &model.ConfigFunctions{Node: &model.ConfigFunctionsNode{Version: ptr(18)}}, Auth: &model.ConfigAuth{ Version: ptr("0.20.0"), + Misc: &model.ConfigAuthMisc{ + ConcealErrors: ptr(false), + }, ElevatedPrivileges: &model.ConfigAuthElevatedPrivileges{ Mode: ptr("disabled"), }, diff --git a/cmd/run/config_example.go b/cmd/run/config_example.go index 53142df34..0d2909145 100644 --- a/cmd/run/config_example.go +++ b/cmd/run/config_example.go @@ -32,6 +32,9 @@ func commandConfigExample(cCtx *cli.Context) error { //nolint:funlen Name: "my-run-service", Image: &model.ConfigRunServiceImage{ Image: "docker.io/org/img:latest", + PullCredentials: ptr( + `{"https://myregistry.com/v1": {"username": "myuser", "password": "mypassword"}}`, + ), }, Command: []string{ "start", diff --git a/dockercompose/ai.go b/dockercompose/ai.go index 9206783df..7bc1a3080 100644 --- a/dockercompose/ai.go +++ b/dockercompose/ai.go @@ -13,6 +13,7 @@ func ai( cfg, "http://graphql:8080/v1/graphql", "postgres://postgres@postgres:5432/local?sslmode=disable", + "http://storage:5000", "", ) diff --git a/dockercompose/ai_test.go b/dockercompose/ai_test.go index 3b50d9e72..caadcbc26 100644 --- a/dockercompose/ai_test.go +++ b/dockercompose/ai_test.go @@ -22,6 +22,7 @@ func expectedAI() *Service { "GRAPHITE_BASE_URL": "http://ai:8090", "GRAPHITE_WEBHOOK_SECRET": "webhookSecret", "HASURA_GRAPHQL_ADMIN_SECRET": "adminSecret", + "HASURA_STORAGE_URL": "http://storage:5000", "LICENSE": "", "NHOST_GRAPHQL_URL": "http://graphql:8080/v1/graphql", "OPENAI_API_KEY": "openaiApiKey", diff --git a/dockercompose/auth_test.go b/dockercompose/auth_test.go index 295585c57..0a59c761f 100644 --- a/dockercompose/auth_test.go +++ b/dockercompose/auth_test.go @@ -27,6 +27,7 @@ func expectedAuth() *Service { "AUTH_ANONYMOUS_USERS_ENABLED": "true", "AUTH_API_PREFIX": "/v1", "AUTH_CLIENT_URL": "http://localhost:3000", + "AUTH_CONCEAL_ERRORS": "true", "AUTH_DISABLE_NEW_USERS": "false", "AUTH_DISABLE_SIGNUP": "false", "AUTH_EMAIL_PASSWORDLESS_ENABLED": "true", diff --git a/dockercompose/main_test.go b/dockercompose/main_test.go index c8743c518..c49f3032b 100644 --- a/dockercompose/main_test.go +++ b/dockercompose/main_test.go @@ -25,6 +25,9 @@ func getConfig() *model.ConfigConfig { //nolint:maintidx WebhookSecret: "webhookSecret", }, Auth: &model.ConfigAuth{ + Misc: &model.ConfigAuthMisc{ + ConcealErrors: ptr(true), + }, ElevatedPrivileges: &model.ConfigAuthElevatedPrivileges{ Mode: ptr("required"), }, diff --git a/dockercompose/run_test.go b/dockercompose/run_test.go index 403e47a94..7d8f44293 100644 --- a/dockercompose/run_test.go +++ b/dockercompose/run_test.go @@ -22,7 +22,8 @@ func TestRun(t *testing.T) { return &model.ConfigRunServiceConfig{ Name: "service-name", Image: &model.ConfigRunServiceImage{ - Image: "image:tag", + Image: "image:tag", + PullCredentials: nil, }, Command: []string{"asd", "qwe"}, Environment: []*model.ConfigEnvironmentVariable{ diff --git a/go.mod b/go.mod index b6283f438..e2cb3c883 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 github.com/hashicorp/go-getter v1.7.5 - github.com/nhost/be v0.0.0-20240820101832-63c0798e013b + github.com/nhost/be v0.0.0-20240827074322-bfcccb6fe6f4 github.com/pelletier/go-toml/v2 v2.2.2 github.com/rs/cors/wrapper/gin v0.0.0-20240515105523-1562b1715b35 github.com/sirupsen/logrus v1.9.3 diff --git a/go.sum b/go.sum index 5479e1416..7e177f095 100644 --- a/go.sum +++ b/go.sum @@ -515,6 +515,8 @@ github.com/nhost/be v0.0.0-20240806070711-58ddcca3b692 h1:KtBE/qk42z4WUIpYb0jMKZ github.com/nhost/be v0.0.0-20240806070711-58ddcca3b692/go.mod h1:iNulO8zDQ+jslaNRAm5NKY0W7sJeQ4INvQdS0AEN06w= github.com/nhost/be v0.0.0-20240820101832-63c0798e013b h1:ZCrX/vGfhnhx5HvjUJUbmKG+6+1yj0FLLbJ+5N1/FYo= github.com/nhost/be v0.0.0-20240820101832-63c0798e013b/go.mod h1:iNulO8zDQ+jslaNRAm5NKY0W7sJeQ4INvQdS0AEN06w= +github.com/nhost/be v0.0.0-20240827074322-bfcccb6fe6f4 h1:z8r2N7iNM0ijmfQ0BTaPLHpJgaFyztUSpbAfP1gSsnc= +github.com/nhost/be v0.0.0-20240827074322-bfcccb6fe6f4/go.mod h1:iNulO8zDQ+jslaNRAm5NKY0W7sJeQ4INvQdS0AEN06w= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= diff --git a/vendor/github.com/nhost/be/services/mimir/graph/generated/generated.go b/vendor/github.com/nhost/be/services/mimir/graph/generated/generated.go index eb50952de..625017a84 100644 --- a/vendor/github.com/nhost/be/services/mimir/graph/generated/generated.go +++ b/vendor/github.com/nhost/be/services/mimir/graph/generated/generated.go @@ -88,6 +88,7 @@ type ComplexityRoot struct { ConfigAuth struct { ElevatedPrivileges func(childComplexity int) int Method func(childComplexity int) int + Misc func(childComplexity int) int RateLimit func(childComplexity int) int Redirections func(childComplexity int) int Resources func(childComplexity int) int @@ -193,6 +194,10 @@ type ComplexityRoot struct { Origins func(childComplexity int) int } + ConfigAuthMisc struct { + ConcealErrors func(childComplexity int) int + } + ConfigAuthRateLimit struct { BruteForce func(childComplexity int) int Emails func(childComplexity int) int @@ -496,7 +501,8 @@ type ComplexityRoot struct { } ConfigRunServiceImage struct { - Image func(childComplexity int) int + Image func(childComplexity int) int + PullCredentials func(childComplexity int) int } ConfigRunServicePort struct { @@ -803,6 +809,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.ConfigAuth.Method(childComplexity), true + case "ConfigAuth.misc": + if e.complexity.ConfigAuth.Misc == nil { + break + } + + return e.complexity.ConfigAuth.Misc(childComplexity), true + case "ConfigAuth.rateLimit": if e.complexity.ConfigAuth.RateLimit == nil { break @@ -1230,6 +1243,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.ConfigAuthMethodWebauthnRelyingParty.Origins(childComplexity), true + case "ConfigAuthMisc.concealErrors": + if e.complexity.ConfigAuthMisc.ConcealErrors == nil { + break + } + + return e.complexity.ConfigAuthMisc.ConcealErrors(childComplexity), true + case "ConfigAuthRateLimit.bruteForce": if e.complexity.ConfigAuthRateLimit.BruteForce == nil { break @@ -2343,6 +2363,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.ConfigRunServiceImage.Image(childComplexity), true + case "ConfigRunServiceImage.pullCredentials": + if e.complexity.ConfigRunServiceImage.PullCredentials == nil { + break + } + + return e.complexity.ConfigRunServiceImage.PullCredentials(childComplexity), true + case "ConfigRunServicePort.ingresses": if e.complexity.ConfigRunServicePort.Ingresses == nil { break @@ -3055,6 +3082,8 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputConfigAuthMethodWebauthnInsertInput, ec.unmarshalInputConfigAuthMethodWebauthnRelyingPartyComparisonExp, ec.unmarshalInputConfigAuthMethodWebauthnRelyingPartyInsertInput, + ec.unmarshalInputConfigAuthMiscComparisonExp, + ec.unmarshalInputConfigAuthMiscInsertInput, ec.unmarshalInputConfigAuthRateLimitComparisonExp, ec.unmarshalInputConfigAuthRateLimitInsertInput, ec.unmarshalInputConfigAuthRedirectionsComparisonExp, @@ -3743,6 +3772,10 @@ type ConfigAuth { totp: ConfigAuthTotp """ + """ + misc: ConfigAuthMisc + """ + """ rateLimit: ConfigAuthRateLimit } @@ -3757,6 +3790,7 @@ input ConfigAuthUpdateInput { session: ConfigAuthSessionUpdateInput method: ConfigAuthMethodUpdateInput totp: ConfigAuthTotpUpdateInput + misc: ConfigAuthMiscUpdateInput rateLimit: ConfigAuthRateLimitUpdateInput } @@ -3770,6 +3804,7 @@ input ConfigAuthInsertInput { session: ConfigAuthSessionInsertInput method: ConfigAuthMethodInsertInput totp: ConfigAuthTotpInsertInput + misc: ConfigAuthMiscInsertInput rateLimit: ConfigAuthRateLimitInsertInput } @@ -3786,6 +3821,7 @@ input ConfigAuthComparisonExp { session: ConfigAuthSessionComparisonExp method: ConfigAuthMethodComparisonExp totp: ConfigAuthTotpComparisonExp + misc: ConfigAuthMiscComparisonExp rateLimit: ConfigAuthRateLimitComparisonExp } @@ -4415,6 +4451,31 @@ input ConfigAuthMethodWebauthnRelyingPartyComparisonExp { """ +""" +type ConfigAuthMisc { + """ + + """ + concealErrors: Boolean +} + +input ConfigAuthMiscUpdateInput { + concealErrors: Boolean +} + +input ConfigAuthMiscInsertInput { + concealErrors: Boolean +} + +input ConfigAuthMiscComparisonExp { + _and: [ConfigAuthMiscComparisonExp!] + _not: ConfigAuthMiscComparisonExp + _or: [ConfigAuthMiscComparisonExp!] + concealErrors: ConfigBooleanComparisonExp +} + +""" + """ type ConfigAuthRateLimit { """ @@ -6360,14 +6421,20 @@ type ConfigRunServiceImage { """ image: String! + """ + content of "auths", i.e., { "auths": $THIS } + """ + pullCredentials: String } input ConfigRunServiceImageUpdateInput { image: String + pullCredentials: String } input ConfigRunServiceImageInsertInput { image: String! + pullCredentials: String } input ConfigRunServiceImageComparisonExp { @@ -6375,6 +6442,7 @@ input ConfigRunServiceImageComparisonExp { _not: ConfigRunServiceImageComparisonExp _or: [ConfigRunServiceImageComparisonExp!] image: ConfigStringComparisonExp + pullCredentials: ConfigStringComparisonExp } scalar ConfigRunServiceName @@ -9226,6 +9294,51 @@ func (ec *executionContext) fieldContext_ConfigAuth_totp(_ context.Context, fiel return fc, nil } +func (ec *executionContext) _ConfigAuth_misc(ctx context.Context, field graphql.CollectedField, obj *model.ConfigAuth) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigAuth_misc(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.Misc, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.ConfigAuthMisc) + fc.Result = res + return ec.marshalOConfigAuthMisc2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMisc(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_ConfigAuth_misc(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ConfigAuth", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "concealErrors": + return ec.fieldContext_ConfigAuthMisc_concealErrors(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ConfigAuthMisc", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _ConfigAuth_rateLimit(ctx context.Context, field graphql.CollectedField, obj *model.ConfigAuth) (ret graphql.Marshaler) { fc, err := ec.fieldContext_ConfigAuth_rateLimit(ctx, field) if err != nil { @@ -11676,6 +11789,47 @@ func (ec *executionContext) fieldContext_ConfigAuthMethodWebauthnRelyingParty_or return fc, nil } +func (ec *executionContext) _ConfigAuthMisc_concealErrors(ctx context.Context, field graphql.CollectedField, obj *model.ConfigAuthMisc) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigAuthMisc_concealErrors(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.ConcealErrors, 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_ConfigAuthMisc_concealErrors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ConfigAuthMisc", + 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) _ConfigAuthRateLimit_emails(ctx context.Context, field graphql.CollectedField, obj *model.ConfigAuthRateLimit) (ret graphql.Marshaler) { fc, err := ec.fieldContext_ConfigAuthRateLimit_emails(ctx, field) if err != nil { @@ -13712,6 +13866,8 @@ func (ec *executionContext) fieldContext_ConfigConfig_auth(_ context.Context, fi return ec.fieldContext_ConfigAuth_method(ctx, field) case "totp": return ec.fieldContext_ConfigAuth_totp(ctx, field) + case "misc": + return ec.fieldContext_ConfigAuth_misc(ctx, field) case "rateLimit": return ec.fieldContext_ConfigAuth_rateLimit(ctx, field) } @@ -18400,6 +18556,8 @@ func (ec *executionContext) fieldContext_ConfigRunServiceConfig_image(_ context. switch field.Name { case "image": return ec.fieldContext_ConfigRunServiceImage_image(ctx, field) + case "pullCredentials": + return ec.fieldContext_ConfigRunServiceImage_pullCredentials(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type ConfigRunServiceImage", field.Name) }, @@ -18799,6 +18957,47 @@ func (ec *executionContext) fieldContext_ConfigRunServiceImage_image(_ context.C return fc, nil } +func (ec *executionContext) _ConfigRunServiceImage_pullCredentials(ctx context.Context, field graphql.CollectedField, obj *model.ConfigRunServiceImage) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigRunServiceImage_pullCredentials(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.PullCredentials, 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_ConfigRunServiceImage_pullCredentials(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ConfigRunServiceImage", + 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) _ConfigRunServicePort_port(ctx context.Context, field graphql.CollectedField, obj *model.ConfigRunServicePort) (ret graphql.Marshaler) { fc, err := ec.fieldContext_ConfigRunServicePort_port(ctx, field) if err != nil { @@ -25004,7 +25203,7 @@ func (ec *executionContext) unmarshalInputConfigAuthComparisonExp(ctx context.Co asMap[k] = v } - fieldsInOrder := [...]string{"_and", "_not", "_or", "version", "resources", "elevatedPrivileges", "redirections", "signUp", "user", "session", "method", "totp", "rateLimit"} + fieldsInOrder := [...]string{"_and", "_not", "_or", "version", "resources", "elevatedPrivileges", "redirections", "signUp", "user", "session", "method", "totp", "misc", "rateLimit"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -25095,6 +25294,13 @@ func (ec *executionContext) unmarshalInputConfigAuthComparisonExp(ctx context.Co return it, err } it.Totp = data + case "misc": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("misc")) + data, err := ec.unmarshalOConfigAuthMiscComparisonExp2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMiscComparisonExp(ctx, v) + if err != nil { + return it, err + } + it.Misc = data case "rateLimit": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rateLimit")) data, err := ec.unmarshalOConfigAuthRateLimitComparisonExp2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthRateLimitComparisonExp(ctx, v) @@ -25190,7 +25396,7 @@ func (ec *executionContext) unmarshalInputConfigAuthInsertInput(ctx context.Cont asMap[k] = v } - fieldsInOrder := [...]string{"version", "resources", "elevatedPrivileges", "redirections", "signUp", "user", "session", "method", "totp", "rateLimit"} + fieldsInOrder := [...]string{"version", "resources", "elevatedPrivileges", "redirections", "signUp", "user", "session", "method", "totp", "misc", "rateLimit"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -25260,6 +25466,13 @@ func (ec *executionContext) unmarshalInputConfigAuthInsertInput(ctx context.Cont return it, err } it.Totp = data + case "misc": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("misc")) + data, err := ec.unmarshalOConfigAuthMiscInsertInput2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMiscInsertInput(ctx, v) + if err != nil { + return it, err + } + it.Misc = data case "rateLimit": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rateLimit")) data, err := ec.unmarshalOConfigAuthRateLimitInsertInput2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthRateLimitInsertInput(ctx, v) @@ -26794,6 +27007,81 @@ func (ec *executionContext) unmarshalInputConfigAuthMethodWebauthnRelyingPartyIn return it, nil } +func (ec *executionContext) unmarshalInputConfigAuthMiscComparisonExp(ctx context.Context, obj interface{}) (model.ConfigAuthMiscComparisonExp, error) { + var it model.ConfigAuthMiscComparisonExp + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"_and", "_not", "_or", "concealErrors"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "_and": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("_and")) + data, err := ec.unmarshalOConfigAuthMiscComparisonExp2ᚕᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMiscComparisonExpᚄ(ctx, v) + if err != nil { + return it, err + } + it.And = data + case "_not": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("_not")) + data, err := ec.unmarshalOConfigAuthMiscComparisonExp2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMiscComparisonExp(ctx, v) + if err != nil { + return it, err + } + it.Not = data + case "_or": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("_or")) + data, err := ec.unmarshalOConfigAuthMiscComparisonExp2ᚕᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMiscComparisonExpᚄ(ctx, v) + if err != nil { + return it, err + } + it.Or = data + case "concealErrors": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("concealErrors")) + data, err := ec.unmarshalOConfigBooleanComparisonExp2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐGenericComparisonExp(ctx, v) + if err != nil { + return it, err + } + it.ConcealErrors = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputConfigAuthMiscInsertInput(ctx context.Context, obj interface{}) (model.ConfigAuthMiscInsertInput, error) { + var it model.ConfigAuthMiscInsertInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"concealErrors"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "concealErrors": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("concealErrors")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.ConcealErrors = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputConfigAuthRateLimitComparisonExp(ctx context.Context, obj interface{}) (model.ConfigAuthRateLimitComparisonExp, error) { var it model.ConfigAuthRateLimitComparisonExp asMap := map[string]interface{}{} @@ -32277,7 +32565,7 @@ func (ec *executionContext) unmarshalInputConfigRunServiceImageComparisonExp(ctx asMap[k] = v } - fieldsInOrder := [...]string{"_and", "_not", "_or", "image"} + fieldsInOrder := [...]string{"_and", "_not", "_or", "image", "pullCredentials"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -32312,6 +32600,13 @@ func (ec *executionContext) unmarshalInputConfigRunServiceImageComparisonExp(ctx return it, err } it.Image = data + case "pullCredentials": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pullCredentials")) + data, err := ec.unmarshalOConfigStringComparisonExp2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐGenericComparisonExp(ctx, v) + if err != nil { + return it, err + } + it.PullCredentials = data } } @@ -32325,7 +32620,7 @@ func (ec *executionContext) unmarshalInputConfigRunServiceImageInsertInput(ctx c asMap[k] = v } - fieldsInOrder := [...]string{"image"} + fieldsInOrder := [...]string{"image", "pullCredentials"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -32339,6 +32634,13 @@ func (ec *executionContext) unmarshalInputConfigRunServiceImageInsertInput(ctx c return it, err } it.Image = data + case "pullCredentials": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pullCredentials")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.PullCredentials = data } } @@ -34894,6 +35196,8 @@ func (ec *executionContext) _ConfigAuth(ctx context.Context, sel ast.SelectionSe out.Values[i] = ec._ConfigAuth_method(ctx, field, obj) case "totp": out.Values[i] = ec._ConfigAuth_totp(ctx, field, obj) + case "misc": + out.Values[i] = ec._ConfigAuth_misc(ctx, field, obj) case "rateLimit": out.Values[i] = ec._ConfigAuth_rateLimit(ctx, field, obj) default: @@ -35501,6 +35805,42 @@ func (ec *executionContext) _ConfigAuthMethodWebauthnRelyingParty(ctx context.Co return out } +var configAuthMiscImplementors = []string{"ConfigAuthMisc"} + +func (ec *executionContext) _ConfigAuthMisc(ctx context.Context, sel ast.SelectionSet, obj *model.ConfigAuthMisc) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, configAuthMiscImplementors) + + 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("ConfigAuthMisc") + case "concealErrors": + out.Values[i] = ec._ConfigAuthMisc_concealErrors(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 configAuthRateLimitImplementors = []string{"ConfigAuthRateLimit"} func (ec *executionContext) _ConfigAuthRateLimit(ctx context.Context, sel ast.SelectionSet, obj *model.ConfigAuthRateLimit) graphql.Marshaler { @@ -37558,6 +37898,8 @@ func (ec *executionContext) _ConfigRunServiceImage(ctx context.Context, sel ast. if out.Values[i] == graphql.Null { out.Invalids++ } + case "pullCredentials": + out.Values[i] = ec._ConfigRunServiceImage_pullCredentials(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -39332,6 +39674,11 @@ func (ec *executionContext) unmarshalNConfigAuthMethodWebauthnRelyingPartyCompar return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalNConfigAuthMiscComparisonExp2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMiscComparisonExp(ctx context.Context, v interface{}) (*model.ConfigAuthMiscComparisonExp, error) { + res, err := ec.unmarshalInputConfigAuthMiscComparisonExp(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalNConfigAuthRateLimitComparisonExp2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthRateLimitComparisonExp(ctx context.Context, v interface{}) (*model.ConfigAuthRateLimitComparisonExp, error) { res, err := ec.unmarshalInputConfigAuthRateLimitComparisonExp(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) @@ -41749,6 +42096,58 @@ func (ec *executionContext) unmarshalOConfigAuthMethodWebauthnUpdateInput2ᚖgit return res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) marshalOConfigAuthMisc2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMisc(ctx context.Context, sel ast.SelectionSet, v *model.ConfigAuthMisc) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._ConfigAuthMisc(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOConfigAuthMiscComparisonExp2ᚕᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMiscComparisonExpᚄ(ctx context.Context, v interface{}) ([]*model.ConfigAuthMiscComparisonExp, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.ConfigAuthMiscComparisonExp, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNConfigAuthMiscComparisonExp2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMiscComparisonExp(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) unmarshalOConfigAuthMiscComparisonExp2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMiscComparisonExp(ctx context.Context, v interface{}) (*model.ConfigAuthMiscComparisonExp, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputConfigAuthMiscComparisonExp(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOConfigAuthMiscInsertInput2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMiscInsertInput(ctx context.Context, v interface{}) (*model.ConfigAuthMiscInsertInput, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputConfigAuthMiscInsertInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOConfigAuthMiscUpdateInput2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthMiscUpdateInput(ctx context.Context, v interface{}) (*model.ConfigAuthMiscUpdateInput, error) { + if v == nil { + return nil, nil + } + var res = new(model.ConfigAuthMiscUpdateInput) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalOConfigAuthRateLimit2ᚖgithubᚗcomᚋnhostᚋbeᚋservicesᚋmimirᚋmodelᚐConfigAuthRateLimit(ctx context.Context, sel ast.SelectionSet, v *model.ConfigAuthRateLimit) graphql.Marshaler { if v == nil { return graphql.Null diff --git a/vendor/github.com/nhost/be/services/mimir/model/cuegraph_gen.go b/vendor/github.com/nhost/be/services/mimir/model/cuegraph_gen.go index 0faed21ae..c8cc9607d 100644 --- a/vendor/github.com/nhost/be/services/mimir/model/cuegraph_gen.go +++ b/vendor/github.com/nhost/be/services/mimir/model/cuegraph_gen.go @@ -949,6 +949,8 @@ type ConfigAuth struct { Totp *ConfigAuthTotp `json:"totp,omitempty" toml:"totp,omitempty"` + Misc *ConfigAuthMisc `json:"misc,omitempty" toml:"misc,omitempty"` + RateLimit *ConfigAuthRateLimit `json:"rateLimit,omitempty" toml:"rateLimit,omitempty"` } @@ -981,6 +983,9 @@ func (o *ConfigAuth) MarshalJSON() ([]byte, error) { if o.Totp != nil { m["totp"] = o.Totp } + if o.Misc != nil { + m["misc"] = o.Misc + } if o.RateLimit != nil { m["rateLimit"] = o.RateLimit } @@ -1050,6 +1055,13 @@ func (o *ConfigAuth) GetTotp() *ConfigAuthTotp { return o.Totp } +func (o *ConfigAuth) GetMisc() *ConfigAuthMisc { + if o == nil { + return nil + } + return o.Misc +} + func (o *ConfigAuth) GetRateLimit() *ConfigAuthRateLimit { if o == nil { return nil @@ -1076,6 +1088,8 @@ type ConfigAuthUpdateInput struct { IsSetMethod bool `json:"-"` Totp *ConfigAuthTotpUpdateInput `json:"totp,omitempty" toml:"totp,omitempty"` IsSetTotp bool `json:"-"` + Misc *ConfigAuthMiscUpdateInput `json:"misc,omitempty" toml:"misc,omitempty"` + IsSetMisc bool `json:"-"` RateLimit *ConfigAuthRateLimitUpdateInput `json:"rateLimit,omitempty" toml:"rateLimit,omitempty"` IsSetRateLimit bool `json:"-"` } @@ -1182,6 +1196,16 @@ func (o *ConfigAuthUpdateInput) UnmarshalGQL(v interface{}) error { } o.IsSetTotp = true } + if x, ok := m["misc"]; ok { + if x != nil { + t := &ConfigAuthMiscUpdateInput{} + if err := t.UnmarshalGQL(x); err != nil { + return err + } + o.Misc = t + } + o.IsSetMisc = true + } if x, ok := m["rateLimit"]; ok { if x != nil { t := &ConfigAuthRateLimitUpdateInput{} @@ -1266,6 +1290,13 @@ func (o *ConfigAuthUpdateInput) GetTotp() *ConfigAuthTotpUpdateInput { return o.Totp } +func (o *ConfigAuthUpdateInput) GetMisc() *ConfigAuthMiscUpdateInput { + if o == nil { + return nil + } + return o.Misc +} + func (o *ConfigAuthUpdateInput) GetRateLimit() *ConfigAuthRateLimitUpdateInput { if o == nil { return nil @@ -1360,6 +1391,16 @@ func (s *ConfigAuth) Update(v *ConfigAuthUpdateInput) { s.Totp.Update(v.Totp) } } + if v.IsSetMisc || v.Misc != nil { + if v.Misc == nil { + s.Misc = nil + } else { + if s.Misc == nil { + s.Misc = &ConfigAuthMisc{} + } + s.Misc.Update(v.Misc) + } + } if v.IsSetRateLimit || v.RateLimit != nil { if v.RateLimit == nil { s.RateLimit = nil @@ -1382,6 +1423,7 @@ type ConfigAuthInsertInput struct { Session *ConfigAuthSessionInsertInput `json:"session,omitempty" toml:"session,omitempty"` Method *ConfigAuthMethodInsertInput `json:"method,omitempty" toml:"method,omitempty"` Totp *ConfigAuthTotpInsertInput `json:"totp,omitempty" toml:"totp,omitempty"` + Misc *ConfigAuthMiscInsertInput `json:"misc,omitempty" toml:"misc,omitempty"` RateLimit *ConfigAuthRateLimitInsertInput `json:"rateLimit,omitempty" toml:"rateLimit,omitempty"` } @@ -1448,6 +1490,13 @@ func (o *ConfigAuthInsertInput) GetTotp() *ConfigAuthTotpInsertInput { return o.Totp } +func (o *ConfigAuthInsertInput) GetMisc() *ConfigAuthMiscInsertInput { + if o == nil { + return nil + } + return o.Misc +} + func (o *ConfigAuthInsertInput) GetRateLimit() *ConfigAuthRateLimitInsertInput { if o == nil { return nil @@ -1505,6 +1554,12 @@ func (s *ConfigAuth) Insert(v *ConfigAuthInsertInput) { } s.Totp.Insert(v.Totp) } + if v.Misc != nil { + if s.Misc == nil { + s.Misc = &ConfigAuthMisc{} + } + s.Misc.Insert(v.Misc) + } if v.RateLimit != nil { if s.RateLimit == nil { s.RateLimit = &ConfigAuthRateLimit{} @@ -1528,6 +1583,7 @@ func (s *ConfigAuth) Clone() *ConfigAuth { v.Session = s.Session.Clone() v.Method = s.Method.Clone() v.Totp = s.Totp.Clone() + v.Misc = s.Misc.Clone() v.RateLimit = s.RateLimit.Clone() return v } @@ -1545,6 +1601,7 @@ type ConfigAuthComparisonExp struct { Session *ConfigAuthSessionComparisonExp `json:"session,omitempty"` Method *ConfigAuthMethodComparisonExp `json:"method,omitempty"` Totp *ConfigAuthTotpComparisonExp `json:"totp,omitempty"` + Misc *ConfigAuthMiscComparisonExp `json:"misc,omitempty"` RateLimit *ConfigAuthRateLimitComparisonExp `json:"rateLimit,omitempty"` } @@ -1563,6 +1620,7 @@ func (exp *ConfigAuthComparisonExp) Matches(o *ConfigAuth) bool { Session: &ConfigAuthSession{}, Method: &ConfigAuthMethod{}, Totp: &ConfigAuthTotp{}, + Misc: &ConfigAuthMisc{}, RateLimit: &ConfigAuthRateLimit{}, } } @@ -1593,6 +1651,9 @@ func (exp *ConfigAuthComparisonExp) Matches(o *ConfigAuth) bool { if !exp.Totp.Matches(o.Totp) { return false } + if !exp.Misc.Matches(o.Misc) { + return false + } if !exp.RateLimit.Matches(o.RateLimit) { return false } @@ -5796,6 +5857,138 @@ func (exp *ConfigAuthMethodWebauthnRelyingPartyComparisonExp) Matches(o *ConfigA return true } +type ConfigAuthMisc struct { + ConcealErrors *bool `json:"concealErrors" toml:"concealErrors"` +} + +func (o *ConfigAuthMisc) MarshalJSON() ([]byte, error) { + m := make(map[string]any) + if o.ConcealErrors != nil { + m["concealErrors"] = o.ConcealErrors + } + return json.Marshal(m) +} + +func (o *ConfigAuthMisc) GetConcealErrors() *bool { + if o == nil { + o = &ConfigAuthMisc{} + } + return o.ConcealErrors +} + +type ConfigAuthMiscUpdateInput struct { + ConcealErrors *bool `json:"concealErrors,omitempty" toml:"concealErrors,omitempty"` + IsSetConcealErrors bool `json:"-"` +} + +func (o *ConfigAuthMiscUpdateInput) UnmarshalGQL(v interface{}) error { + m, ok := v.(map[string]any) + if !ok { + return fmt.Errorf("must be map[string]interface{}, got %T", v) + } + if v, ok := m["concealErrors"]; ok { + if v == nil { + o.ConcealErrors = nil + } else { + // clearly a not very efficient shortcut + b, err := json.Marshal(v) + if err != nil { + return err + } + var x bool + if err := json.Unmarshal(b, &x); err != nil { + return err + } + o.ConcealErrors = &x + } + o.IsSetConcealErrors = true + } + + return nil +} + +func (o *ConfigAuthMiscUpdateInput) MarshalGQL(w io.Writer) { + enc := json.NewEncoder(w) + if err := enc.Encode(o); err != nil { + panic(err) + } +} + +func (o *ConfigAuthMiscUpdateInput) GetConcealErrors() *bool { + if o == nil { + o = &ConfigAuthMiscUpdateInput{} + } + return o.ConcealErrors +} + +func (s *ConfigAuthMisc) Update(v *ConfigAuthMiscUpdateInput) { + if v == nil { + return + } + if v.IsSetConcealErrors || v.ConcealErrors != nil { + s.ConcealErrors = v.ConcealErrors + } +} + +type ConfigAuthMiscInsertInput struct { + ConcealErrors *bool `json:"concealErrors,omitempty" toml:"concealErrors,omitempty"` +} + +func (o *ConfigAuthMiscInsertInput) GetConcealErrors() *bool { + if o == nil { + o = &ConfigAuthMiscInsertInput{} + } + return o.ConcealErrors +} + +func (s *ConfigAuthMisc) Insert(v *ConfigAuthMiscInsertInput) { + s.ConcealErrors = v.ConcealErrors +} + +func (s *ConfigAuthMisc) Clone() *ConfigAuthMisc { + if s == nil { + return nil + } + + v := &ConfigAuthMisc{} + v.ConcealErrors = s.ConcealErrors + return v +} + +type ConfigAuthMiscComparisonExp struct { + And []*ConfigAuthMiscComparisonExp `json:"_and,omitempty"` + Not *ConfigAuthMiscComparisonExp `json:"_not,omitempty"` + Or []*ConfigAuthMiscComparisonExp `json:"_or,omitempty"` + ConcealErrors *ConfigBooleanComparisonExp `json:"concealErrors,omitempty"` +} + +func (exp *ConfigAuthMiscComparisonExp) Matches(o *ConfigAuthMisc) bool { + if exp == nil { + return true + } + + if o == nil { + o = &ConfigAuthMisc{} + } + if o.ConcealErrors != nil && !exp.ConcealErrors.Matches(*o.ConcealErrors) { + return false + } + + if exp.And != nil && !all(exp.And, o) { + return false + } + + if exp.Or != nil && !or(exp.Or, o) { + return false + } + + if exp.Not != nil && exp.Not.Matches(o) { + return false + } + + return true +} + type ConfigAuthRateLimit struct { Emails *ConfigRateLimit `json:"emails,omitempty" toml:"emails,omitempty"` @@ -18710,11 +18903,16 @@ func (exp *ConfigRunServiceConfigComparisonExp) Matches(o *ConfigRunServiceConfi type ConfigRunServiceImage struct { Image string `json:"image" toml:"image"` + // content of "auths", i.e., { "auths": $THIS } + PullCredentials *string `json:"pullCredentials" toml:"pullCredentials"` } func (o *ConfigRunServiceImage) MarshalJSON() ([]byte, error) { m := make(map[string]any) m["image"] = o.Image + if o.PullCredentials != nil { + m["pullCredentials"] = o.PullCredentials + } return json.Marshal(m) } @@ -18725,9 +18923,18 @@ func (o *ConfigRunServiceImage) GetImage() string { return o.Image } +func (o *ConfigRunServiceImage) GetPullCredentials() *string { + if o == nil { + o = &ConfigRunServiceImage{} + } + return o.PullCredentials +} + type ConfigRunServiceImageUpdateInput struct { - Image *string `json:"image,omitempty" toml:"image,omitempty"` - IsSetImage bool `json:"-"` + Image *string `json:"image,omitempty" toml:"image,omitempty"` + IsSetImage bool `json:"-"` + PullCredentials *string `json:"pullCredentials,omitempty" toml:"pullCredentials,omitempty"` + IsSetPullCredentials bool `json:"-"` } func (o *ConfigRunServiceImageUpdateInput) UnmarshalGQL(v interface{}) error { @@ -18752,6 +18959,23 @@ func (o *ConfigRunServiceImageUpdateInput) UnmarshalGQL(v interface{}) error { } o.IsSetImage = true } + if v, ok := m["pullCredentials"]; ok { + if v == nil { + o.PullCredentials = nil + } else { + // clearly a not very efficient shortcut + b, err := json.Marshal(v) + if err != nil { + return err + } + var x string + if err := json.Unmarshal(b, &x); err != nil { + return err + } + o.PullCredentials = &x + } + o.IsSetPullCredentials = true + } return nil } @@ -18770,6 +18994,13 @@ func (o *ConfigRunServiceImageUpdateInput) GetImage() *string { return o.Image } +func (o *ConfigRunServiceImageUpdateInput) GetPullCredentials() *string { + if o == nil { + o = &ConfigRunServiceImageUpdateInput{} + } + return o.PullCredentials +} + func (s *ConfigRunServiceImage) Update(v *ConfigRunServiceImageUpdateInput) { if v == nil { return @@ -18779,10 +19010,14 @@ func (s *ConfigRunServiceImage) Update(v *ConfigRunServiceImageUpdateInput) { s.Image = *v.Image } } + if v.IsSetPullCredentials || v.PullCredentials != nil { + s.PullCredentials = v.PullCredentials + } } type ConfigRunServiceImageInsertInput struct { - Image string `json:"image,omitempty" toml:"image,omitempty"` + Image string `json:"image,omitempty" toml:"image,omitempty"` + PullCredentials *string `json:"pullCredentials,omitempty" toml:"pullCredentials,omitempty"` } func (o *ConfigRunServiceImageInsertInput) GetImage() string { @@ -18792,8 +19027,16 @@ func (o *ConfigRunServiceImageInsertInput) GetImage() string { return o.Image } +func (o *ConfigRunServiceImageInsertInput) GetPullCredentials() *string { + if o == nil { + o = &ConfigRunServiceImageInsertInput{} + } + return o.PullCredentials +} + func (s *ConfigRunServiceImage) Insert(v *ConfigRunServiceImageInsertInput) { s.Image = v.Image + s.PullCredentials = v.PullCredentials } func (s *ConfigRunServiceImage) Clone() *ConfigRunServiceImage { @@ -18803,14 +19046,16 @@ func (s *ConfigRunServiceImage) Clone() *ConfigRunServiceImage { v := &ConfigRunServiceImage{} v.Image = s.Image + v.PullCredentials = s.PullCredentials return v } type ConfigRunServiceImageComparisonExp struct { - And []*ConfigRunServiceImageComparisonExp `json:"_and,omitempty"` - Not *ConfigRunServiceImageComparisonExp `json:"_not,omitempty"` - Or []*ConfigRunServiceImageComparisonExp `json:"_or,omitempty"` - Image *ConfigStringComparisonExp `json:"image,omitempty"` + And []*ConfigRunServiceImageComparisonExp `json:"_and,omitempty"` + Not *ConfigRunServiceImageComparisonExp `json:"_not,omitempty"` + Or []*ConfigRunServiceImageComparisonExp `json:"_or,omitempty"` + Image *ConfigStringComparisonExp `json:"image,omitempty"` + PullCredentials *ConfigStringComparisonExp `json:"pullCredentials,omitempty"` } func (exp *ConfigRunServiceImageComparisonExp) Matches(o *ConfigRunServiceImage) bool { @@ -18824,6 +19069,9 @@ func (exp *ConfigRunServiceImageComparisonExp) Matches(o *ConfigRunServiceImage) if !exp.Image.Matches(o.Image) { return false } + if o.PullCredentials != nil && !exp.PullCredentials.Matches(*o.PullCredentials) { + return false + } if exp.And != nil && !all(exp.And, o) { return false diff --git a/vendor/github.com/nhost/be/services/mimir/schema/appconfig/ai.go b/vendor/github.com/nhost/be/services/mimir/schema/appconfig/ai.go index cde14cc3d..04ea42cec 100644 --- a/vendor/github.com/nhost/be/services/mimir/schema/appconfig/ai.go +++ b/vendor/github.com/nhost/be/services/mimir/schema/appconfig/ai.go @@ -10,6 +10,7 @@ func AIEnv( //nolint:funlen config *model.ConfigConfig, nhostGraphqlURL string, postgresConnection string, + storageURL string, license string, ) []EnvVar { env := []EnvVar{ @@ -63,6 +64,12 @@ func AIEnv( //nolint:funlen IsSecret: false, SecretName: "", }, + { + Name: "HASURA_STORAGE_URL", + Value: storageURL, + IsSecret: false, + SecretName: "", + }, { Name: "LICENSE", Value: license, diff --git a/vendor/github.com/nhost/be/services/mimir/schema/appconfig/hasura_auth.go b/vendor/github.com/nhost/be/services/mimir/schema/appconfig/hasura_auth.go index ab15cc271..48c8b14b6 100644 --- a/vendor/github.com/nhost/be/services/mimir/schema/appconfig/hasura_auth.go +++ b/vendor/github.com/nhost/be/services/mimir/schema/appconfig/hasura_auth.go @@ -317,6 +317,12 @@ func HasuraAuthEnv( //nolint:funlen,cyclop,maintidx IsSecret: false, SecretName: "", }, + { + Name: "AUTH_CONCEAL_ERRORS", + Value: Stringify(unptr(config.GetAuth().GetMisc().GetConcealErrors())), + IsSecret: false, + SecretName: "", + }, } env = append(env, []EnvVar{ diff --git a/vendor/github.com/nhost/be/services/mimir/schema/schema.cue b/vendor/github.com/nhost/be/services/mimir/schema/schema.cue index a28639009..94accc052 100644 --- a/vendor/github.com/nhost/be/services/mimir/schema/schema.cue +++ b/vendor/github.com/nhost/be/services/mimir/schema/schema.cue @@ -292,7 +292,7 @@ import ( // Releases: // // https://github.com/nhost/hasura-auth/releases - version: string | *"0.32.1" + version: string | *"0.33.0" // Resources for the service resources?: #Resources @@ -465,6 +465,10 @@ import ( } } + misc: { + concealErrors: bool | *false + } + rateLimit: #AuthRateLimit } @@ -686,6 +690,8 @@ import ( #RunServiceImage: { image: string + // content of "auths", i.e., { "auths": $THIS } + pullCredentials?: string } #HealthCheck: { diff --git a/vendor/github.com/nhost/be/services/mimir/schema/schema_gen.graphqls b/vendor/github.com/nhost/be/services/mimir/schema/schema_gen.graphqls index 08ad60fde..f2d63acb3 100644 --- a/vendor/github.com/nhost/be/services/mimir/schema/schema_gen.graphqls +++ b/vendor/github.com/nhost/be/services/mimir/schema/schema_gen.graphqls @@ -293,6 +293,10 @@ type ConfigAuth { totp: ConfigAuthTotp """ + """ + misc: ConfigAuthMisc + """ + """ rateLimit: ConfigAuthRateLimit } @@ -307,6 +311,7 @@ input ConfigAuthUpdateInput { session: ConfigAuthSessionUpdateInput method: ConfigAuthMethodUpdateInput totp: ConfigAuthTotpUpdateInput + misc: ConfigAuthMiscUpdateInput rateLimit: ConfigAuthRateLimitUpdateInput } @@ -320,6 +325,7 @@ input ConfigAuthInsertInput { session: ConfigAuthSessionInsertInput method: ConfigAuthMethodInsertInput totp: ConfigAuthTotpInsertInput + misc: ConfigAuthMiscInsertInput rateLimit: ConfigAuthRateLimitInsertInput } @@ -336,6 +342,7 @@ input ConfigAuthComparisonExp { session: ConfigAuthSessionComparisonExp method: ConfigAuthMethodComparisonExp totp: ConfigAuthTotpComparisonExp + misc: ConfigAuthMiscComparisonExp rateLimit: ConfigAuthRateLimitComparisonExp } @@ -965,6 +972,31 @@ input ConfigAuthMethodWebauthnRelyingPartyComparisonExp { """ +""" +type ConfigAuthMisc { + """ + + """ + concealErrors: Boolean +} + +input ConfigAuthMiscUpdateInput { + concealErrors: Boolean +} + +input ConfigAuthMiscInsertInput { + concealErrors: Boolean +} + +input ConfigAuthMiscComparisonExp { + _and: [ConfigAuthMiscComparisonExp!] + _not: ConfigAuthMiscComparisonExp + _or: [ConfigAuthMiscComparisonExp!] + concealErrors: ConfigBooleanComparisonExp +} + +""" + """ type ConfigAuthRateLimit { """ @@ -2910,14 +2942,20 @@ type ConfigRunServiceImage { """ image: String! + """ + content of "auths", i.e., { "auths": $THIS } + """ + pullCredentials: String } input ConfigRunServiceImageUpdateInput { image: String + pullCredentials: String } input ConfigRunServiceImageInsertInput { image: String! + pullCredentials: String } input ConfigRunServiceImageComparisonExp { @@ -2925,6 +2963,7 @@ input ConfigRunServiceImageComparisonExp { _not: ConfigRunServiceImageComparisonExp _or: [ConfigRunServiceImageComparisonExp!] image: ConfigStringComparisonExp + pullCredentials: ConfigStringComparisonExp } scalar ConfigRunServiceName diff --git a/vendor/modules.txt b/vendor/modules.txt index 84cff852e..245043cb1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -541,7 +541,7 @@ github.com/muesli/termenv # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 ## explicit github.com/munnerz/goautoneg -# github.com/nhost/be v0.0.0-20240820101832-63c0798e013b +# github.com/nhost/be v0.0.0-20240827074322-bfcccb6fe6f4 ## explicit; go 1.22.4 github.com/nhost/be/lib/graphql github.com/nhost/be/lib/graphql/context