Skip to content

Commit

Permalink
feat: udpate schema (#902)
Browse files Browse the repository at this point in the history
* feat: udpate schema

* asd
  • Loading branch information
dbarrosop committed Aug 27, 2024
1 parent 3feec1b commit d637519
Show file tree
Hide file tree
Showing 17 changed files with 739 additions and 16 deletions.
3 changes: 3 additions & 0 deletions cmd/config/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
},
Expand Down
3 changes: 3 additions & 0 deletions cmd/config/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
},
Expand Down
3 changes: 3 additions & 0 deletions cmd/run/config_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions dockercompose/ai.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func ai(
cfg,
"http://graphql:8080/v1/graphql",
"postgres://postgres@postgres:5432/local?sslmode=disable",
"http://storage:5000",
"",
)

Expand Down
1 change: 1 addition & 0 deletions dockercompose/ai_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions dockercompose/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions dockercompose/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
},
Expand Down
3 changes: 2 additions & 1 deletion dockercompose/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
Loading

0 comments on commit d637519

Please sign in to comment.