Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,23 @@ becomes the release notes of the next tag.
that decides `has_next` reads only the root. Applies to `SETOF <table>`
RPCs too.

### Fixes
### Changed

- `@behavior -filterBy` / `-orderBy` (PostGraphile V5) are honoured; `-filter`
/ `-order` still work with a deprecation warning. Unknown `@omit` actions
and `@behavior` tokens are reported at build time, with pdbq's vocabulary
shared through pdbcore ([upgrading](docs/upgrading.md#smart-tags-config-messages-and-embedding-api-pdbcore-api-hygiene)).
- Removed config keys name the reason they were removed; `PDBR_*` variables
that double the underscore after a section are errors with a did-you-mean
hint; `transactions.isolation` errors name the accepted values;
`database.connect_timeout`, `database.max_conns`,
`database.statement_timeout`, `auth.jwt.jwks_cache_ttl` (with a JWKS URL)
and `watch.poll_interval` (with the watch on) are validated.
- `pdbr.LoadConfig` takes command-line values as `map[string]any` instead of
a `*pflag.FlagSet`.
- Built against pdbcore's API hygiene changes (see its changelog).

### Fixed

- CSV output keeps carriage returns and line feeds inside values byte for
byte (quoted, RFC 4180); a bare `\r` was dropped and `\n` became `\r\n`.
Expand All @@ -33,6 +49,9 @@ becomes the release notes of the next tag.
forms. `select=*` still returns it and a JSON body still writes it.
- `401`/`403` answers from authentication carry `Vary: Accept` like every
other API response.
- A live boot no longer alphabetises `schema.schemas`: the bare
`/{table}` and `/rpc/{fn}` aliases come from the first configured schema,
as on a schema-cache boot.

### Breaking

Expand Down
5 changes: 3 additions & 2 deletions cmd/pdbr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (

"github.com/suprbdev/pdbcore/cache"
"github.com/suprbdev/pdbcore/confx"
"github.com/suprbdev/pdbcore/confx/cliflags"
"github.com/suprbdev/pdbcore/contrib"
"github.com/suprbdev/pdbcore/introspect"

Expand Down Expand Up @@ -108,14 +109,14 @@ func loadConfigRaw(cmd *cobra.Command) (config.Config, error) {
// the flags named after a config path (configFlags), leaving out --config
// and command options such as --cache or --print-sql, which strict loading
// would reject as unknown keys.
func changedConfigFlags(cmd *cobra.Command) *pflag.FlagSet {
func changedConfigFlags(cmd *cobra.Command) map[string]any {
var local []string
cmd.Flags().VisitAll(func(f *pflag.Flag) {
if !strings.Contains(f.Name, ".") {
local = append(local, f.Name)
}
})
return confx.ChangedFlags(cmd.Flags(), local...)
return cliflags.Changed(cmd.Flags(), local...)
}

// loadConnectionConfig loads the config of a command that serves no HTTP
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ See [cli.md](cli.md) for details.
| Key | Type | Default | Notes |
|---|---|---|---|
| `database.url` | string | — | required; standard `PG*` env vars are honoured when empty |
| `database.max_conns` | int | 10 | maximum pooled connections; each request uses at most one |
| `database.connect_timeout` | duration | `10s` | timeout for establishing a connection |
| `database.max_conns` | int | 10 | maximum pooled connections; each request uses at most one; `0` uses the pgx pool default, negative is an error |
| `database.connect_timeout` | duration | `10s` | timeout for establishing a connection; must be positive |
| `database.statement_timeout` | duration | `25s` | per-statement timeout on every request (`0` disables); expiry → `504 pg:57014`. Keep it below `server.request_timeout` (`30s`) so a slow statement fails with a database timeout the client can act on before the request itself is cut off |
| `server.addr` | string | `:8080` | listen address |
| `server.base_path` | string | `""` | prefix for every API route, e.g. `/api`; `""` (the default, as in PostgREST) mounts the API at the root. `/healthz` and `/readyz` are never prefixed |
Expand Down Expand Up @@ -126,7 +126,7 @@ See [cli.md](cli.md) for details.
| `transactions.partial.enabled` | bool | `false` | let a bulk `POST` or `PUT` opt in with `Prefer: partial=items` to running each element in its own savepoint: a failing element is reported without rolling back the others, answered as a per-element report (`207` when one failed). Not honoured for `PATCH`, `DELETE` or a single object. See [mutations.md](mutations.md#partial-success-for-bulk-writes) |
| `transactions.partial.max_items` | int | `1000` | most elements a bulk body may carry with `Prefer: partial=items` (each element is its own statement and savepoint); more answers `413 body_too_large` |
| `watch.enabled` | bool | `false` | dev only; refuses to combine with cache |
| `watch.poll_interval` | duration | `5s` | fallback polling when event triggers can't be installed |
| `watch.poll_interval` | duration | `5s` | fallback polling when event triggers can't be installed; must be positive when `watch.enabled` |
| `watch.channel` | string | `pdbr_ddl` | NOTIFY channel used by the DDL event trigger |
| `errors.detail` | string | `prod` | `dev` adds full PG detail + `pg` object to problems; `strict` hides even constraint-violation messages |
| `plugins.disabled` | []string | `[]` | built-in plugins to disable: `smart_comments`, `advanced_filters`, `postgis`, `nested_mutations` (other names are rejected); see [plugins.md](plugins.md) |
Expand Down
15 changes: 11 additions & 4 deletions docs/smart-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,17 @@ Parsing rules (`pdbcore/smarttags.Parse`):
- List-valued tags (`@omit`, `@primaryKey`, `@unique`, `@behavior`) split on
commas and whitespace: `@omit create, update` ≡ `@omit create update`.
`@omit` actions are lower-cased.
- `@behavior` (PostGraphile V5 style) contributes only its **negative**
tokens, mapped onto `@omit` actions: `-insert` → `create`, `-update` →
`update`, `-delete` → `delete`, `-select` → `read`, `-filter` → `filter`,
`-order` → `order`; other tokens are ignored.
- `@behavior` (PostGraphile V5 style) contributes its **negative** omit
tokens, mapped onto `@omit` actions (matched case-insensitively):
`-insert` → `create`, `-update` → `update`, `-delete` → `delete`,
`-select` → `read`, `-filterBy` → `filter`, `-orderBy` → `order`, and the
contract tokens (`±contract:<name>`, see [Contracts](#contracts)).
The older `-filter` and `-order` still work but are deprecated.
- Unknown `@omit` actions (`@omit reed`) and unknown `@behavior` tokens are
ignored with a build-time warning naming the object and the token, and a
deprecated `@behavior` token warns with its replacement
(`smart_comments: deprecated @behavior token column=app.users.email token=-filter use=-filterBy`).
pdbq reads and checks the same tokens.

Disable everything with `plugins.disabled: [smart_comments]` (see
[What survives without the plugin](#what-survives-without-the-plugin)).
Expand Down
17 changes: 17 additions & 0 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,3 +435,20 @@ below is breaking; the old spellings are `400` errors (`invalid_filter`,
| no `Vary` from the API | `Vary: Accept` | added to `Vary: Origin` / `Accept-Encoding` |
| `/{schema}/rpc/{pk}` = row of a table named `rpc` when no such function exists | always the function (`404` without one) | the table keeps its list and `/by/` routes |
| `pdbr request` runs as the connection role | same by default; `--role`, `--claims` | `--print-sql` output is unchanged by them |

### Smart tags, config messages and embedding API (pdbcore API hygiene)

| Before | Now | Notes |
|---|---|---|
| `@behavior -filterBy` / `-orderBy` were ignored | honoured as `@omit filter` / `@omit order` (PostGraphile V5 spellings, as in pdbq) | `-filter` / `-order` still work with a build-time deprecation warning naming `-filterBy` / `-orderBy` |
| unknown `@omit` actions and `@behavior` tokens were ignored silently | ignored with a build-time warning naming the object and the token | `@omit reed` no longer goes unnoticed; pdbq checks the same tokens |
| a live boot alphabetised `schema.schemas` (a cache boot did not), so the bare `/{table}` and `/rpc/{fn}` aliases could come from another schema than the first one listed | the bare aliases always come from `schema.schemas[0]` | check deployments that listed schemas out of alphabetical order: their bare paths change on a live boot |
| `PDBR_ROLES__ALLOWED` (doubled underscore after the section) was ignored | `unknown environment variable PDBR_ROLES__ALLOWED (roles_allowed): did you mean PDBR_ROLES_ALLOWED?` | any section |
| `transactions.mutations`: `unknown key transactions.mutations` | `unknown key transactions.mutations: removed: every write runs in a transaction` | also `plugins.settings.nested_mutations.force_transactions` |
| `transactions.isolation: "x" invalid` | `transactions.isolation: "x" is not 'read_committed', 'repeatable_read' or 'serializable'` | |
| `database.connect_timeout: 0` waited forever; negative `max_conns` / `statement_timeout`, `auth.jwt.jwks_cache_ttl: 0` with a JWKS URL (one hour) and `watch.poll_interval: 0` (a crash of the polling fallback) were accepted | config errors | `database.max_conns: 0` still means the pgx pool default |

**Embedding.** `pdbr.LoadConfig(path, flags)` takes command-line values as
`map[string]any` (koanf path to value) instead of a `*pflag.FlagSet`; build
it from a pflag set with `cliflags.Changed(fs, except...)` from
`github.com/suprbdev/pdbcore/confx/cliflags`.
6 changes: 3 additions & 3 deletions examples/pdbr.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
database:
# PostgreSQL connection URL, e.g. postgres://user:pass@host:5432/db. Also honours standard PG* env vars when empty.
url: ""
# Maximum pooled connections.
# Maximum pooled connections; 0 uses the pgx pool default (the larger of 4 and the number of CPUs).
max_conns: 10
# Timeout for establishing a connection.
# Timeout for establishing a connection (must be positive).
connect_timeout: "10s"
# Per-statement timeout applied to every request (0 disables). Keep it below the HTTP request timeout so a slow statement fails with SQLSTATE 57014 (a timeout error the client can act on) before the request is cut off.
statement_timeout: "25s"
Expand Down Expand Up @@ -148,7 +148,7 @@ transactions:
watch:
# Re-introspect and hot-swap the schema on DDL changes (dev only; refuses to combine with schema.cache_path).
enabled: false
# Poll interval used when event triggers cannot be installed.
# Poll interval used when event triggers cannot be installed (must be positive).
poll_interval: "5s"
# NOTIFY channel used by the DDL event trigger.
channel: "pdbr_ddl"
Expand Down
8 changes: 4 additions & 4 deletions facade.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
package pdbr

import (
flag "github.com/spf13/pflag"

"github.com/suprbdev/pdbcore/confx"
coreinflect "github.com/suprbdev/pdbcore/inflect"
"github.com/suprbdev/pdbcore/introspect"
Expand Down Expand Up @@ -48,8 +46,10 @@ type (
func DefaultConfig() Config { return config.DefaultConfig() }

// LoadConfig builds the effective config: defaults < YAML < PDBR_* env <
// flags (nil flags is fine) and validates it.
func LoadConfig(path string, flags *flag.FlagSet) (Config, error) {
// flags, given as koanf path to value (nil is fine; cliflags.Changed in
// github.com/suprbdev/pdbcore/confx/cliflags reads them from a pflag set),
// and validates it.
func LoadConfig(path string, flags map[string]any) (Config, error) {
return config.Load(path, flags)
}

Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
github.com/suprbdev/pdbcore v0.18.0
github.com/suprbdev/pdbcore v0.19.0
go.yaml.in/yaml/v3 v3.0.5
golang.org/x/sync v0.23.0
)
Expand All @@ -27,7 +27,6 @@ require (
github.com/knadh/koanf/parsers/yaml v1.1.0 // indirect
github.com/knadh/koanf/providers/env v1.1.0 // indirect
github.com/knadh/koanf/providers/file v1.2.1 // indirect
github.com/knadh/koanf/providers/posflag v1.0.1 // indirect
github.com/knadh/koanf/v2 v2.3.5 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ github.com/knadh/koanf/providers/env v1.1.0 h1:U2VXPY0f+CsNDkvdsG8GcsnK4ah85WwWy
github.com/knadh/koanf/providers/env v1.1.0/go.mod h1:QhHHHZ87h9JxJAn2czdEl6pdkNnDh/JS1Vtsyt65hTY=
github.com/knadh/koanf/providers/file v1.2.1 h1:bEWbtQwYrA+W2DtdBrQWyXqJaJSG3KrP3AESOJYp9wM=
github.com/knadh/koanf/providers/file v1.2.1/go.mod h1:bp1PM5f83Q+TOUu10J/0ApLBd9uIzg+n9UgthfY+nRA=
github.com/knadh/koanf/providers/posflag v1.0.1 h1:EnMxHSrPkYCFnKgBUl5KBgrjed8gVFrcXDzaW4l/C6Y=
github.com/knadh/koanf/providers/posflag v1.0.1/go.mod h1:3Wn3+YG3f4ljzRyCUgIwH7G0sZ1pMjCOsNBovrbKmAk=
github.com/knadh/koanf/v2 v2.3.5 h1:2dXJUYaKGm4SGYeoAtBviq9+02JZo/pxQ2ssOd60rJg=
github.com/knadh/koanf/v2 v2.3.5/go.mod h1:gRb40VRAbd4iJMYYD5IxZ6hfuopFcXBpc9bbQpZwo28=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
Expand Down Expand Up @@ -68,8 +66,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE=
github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg=
github.com/suprbdev/pdbcore v0.18.0 h1:3sptk5S+ffSLIQmvTVd74rL6NjUHQ2zql91lHnFkH1Q=
github.com/suprbdev/pdbcore v0.18.0/go.mod h1:FNV4SnduAkZoFDBZ7PRGXcSjELkHjA9mURORywAVHlc=
github.com/suprbdev/pdbcore v0.19.0 h1:0j+vkzyt1bKcREPh6OUT9vX69dzL5QMzAAJvd1Ck+KM=
github.com/suprbdev/pdbcore v0.19.0/go.mod h1:loM9g7/i1GhIY4CRmHeAiMucJ57nxTgxN0YNHc7tW7w=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=
Expand Down
2 changes: 1 addition & 1 deletion internal/compile/aggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func aggregateJSON(ref string, a *plan.Aggregate) string {
case a.OutputCast != nil:
return "to_json((" + ref + ")::" + typeRefSQL(a.OutputCast) + ")"
case a.Func.Spatial():
return postgis.OutputJSONSQL(ref)
return postgis.OutputSQL(ref, postgis.Output{JSON: true})
}
return "to_json(" + ref + ")"
}
Expand Down
2 changes: 1 addition & 1 deletion internal/compile/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ func spatialOpName(op plan.Op) (string, bool) {
return "", false
}
name = strings.ReplaceAll(strings.TrimPrefix(name, "st_"), "_", "")
for _, o := range postgis.Ops {
for _, o := range postgis.Ops() {
if o.Kind() != postgis.ArgBoolean && strings.ToLower(o.Name) == name {
return o.Name, true
}
Expand Down
4 changes: 2 additions & 2 deletions internal/compile/raster.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ func (s *stmt) rasterPseudoSQL(p *api.PseudoColumn, args map[string]any, alias s
case err != nil:
return "", err
case !ok:
return rv.Accessor.JSONSQL(ref), nil
return rv.Accessor.SQL(ref, postgis.Output{JSON: true}), nil
case rv.Accessor.Suffix != "Envelope":
return "", errUser(CodeInvalidSelect, "precision applies to GeoJSON values; %s is not one", p.Key)
}
return postgis.OutputJSONPrecisionSQL("ST_Envelope("+ref+")", digits), nil
return postgis.OutputSQL("ST_Envelope("+ref+")", postgis.Output{JSON: true, Precision: digits}), nil
case rv.Value:
if s.plan.Near == nil {
return "", errUser(CodeInvalidParameter, "%s requires ~near=", p.Key)
Expand Down
14 changes: 7 additions & 7 deletions internal/compile/rows.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (s *stmt) renderedRef(alias string, c *introspect.Column) string {
// verbatim.
func (s *stmt) exprJSON(ref string, c *introspect.Column) string {
if postgis.IsSpatial(c.PGType) {
return postgis.OutputJSONSQL(ref)
return postgis.OutputSQL(ref, postgis.Output{JSON: true})
}
if v, ok := api.DistanceOnly(s.catalog(), c); ok && v.Codec != nil {
return v.Codec.OutputJSONSQL(ref)
Expand All @@ -372,7 +372,7 @@ func (s *stmt) exprJSON(ref string, c *introspect.Column) string {
func (s *stmt) spatialArrayJSON(ref string) string {
elem := s.alias("g")
return fmt.Sprintf("CASE WHEN %s IS NULL THEN NULL ELSE (SELECT coalesce(json_agg(%s ORDER BY %s.o), '[]'::json) FROM (SELECT generate_subscripts(%s, 1) AS o) %s) END",
ref, postgis.OutputJSONSQL("("+ref+")["+elem+".o]"), elem, ref, elem)
ref, postgis.OutputSQL("("+ref+")["+elem+".o]", postgis.Output{JSON: true}), elem, ref, elem)
}

// spatialFieldSQL renders a selected spatial column, applying the optional
Expand All @@ -385,9 +385,9 @@ func (s *stmt) spatialFieldSQL(ref string, c *introspect.Column, args map[string
}
digits, ok, err := s.precisionArg(args)
if err != nil || !ok {
return postgis.OutputJSONSQL(expr), err
return postgis.OutputSQL(expr, postgis.Output{JSON: true}), err
}
return postgis.OutputJSONPrecisionSQL(expr, digits), nil
return postgis.OutputSQL(expr, postgis.Output{JSON: true, Precision: digits}), nil
}

// spatialArgs applies buffer=, then simplify=, then transform= to a spatial
Expand Down Expand Up @@ -473,16 +473,16 @@ func (s *stmt) pseudoJSON(f *plan.FieldSel, alias string) (string, error) {
return "", err
}
if ok {
return d.JSONPrecisionSQL(expr, flavour, digits), nil
return d.SQL(expr, flavour, postgis.Output{JSON: true, Precision: digits}), nil
}
return d.JSONSQL(expr, flavour), nil
return d.SQL(expr, flavour, postgis.Output{JSON: true}), nil
}

// derivedFor matches an accessor name ("area", "geometry_type",
// "GeometryType") against the pdbcore accessor table.
func derivedFor(accessor string) (postgis.Derived, bool) {
want := strings.ToLower(strings.ReplaceAll(accessor, "_", ""))
for _, d := range postgis.Deriveds {
for _, d := range postgis.Deriveds() {
if strings.ToLower(d.Suffix) == want {
return d, true
}
Expand Down
2 changes: 1 addition & 1 deletion internal/compile/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (s *stmt) valueJSON(ref string, fn *introspect.Function, depth int) (string
return "to_json(" + ref + ")", nil
}
if postgis.IsSpatial(ret.PGType) {
return postgis.OutputJSONSQL(ref), nil
return postgis.OutputSQL(ref, postgis.Output{JSON: true}), nil
}
return "to_json(" + s.exprJSON(ref, ret) + ")", nil
}
Expand Down
25 changes: 16 additions & 9 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
"strings"
"time"

flag "github.com/spf13/pflag"

"github.com/suprbdev/pdbcore/auth"
"github.com/suprbdev/pdbcore/confx"
"github.com/suprbdev/pdbcore/contrib"
Expand Down Expand Up @@ -206,13 +204,21 @@ func DefaultConfig() Config {
}
}

// RemovedKeys maps pdbr keys removed before 1.0 without a replacement to
// the reason, so loading an old config says why the key is unknown.
var RemovedKeys = map[string]string{
"transactions.mutations": "every write runs in a transaction",
"plugins.settings.nested_mutations.force_transactions": "nested writes always run in a transaction",
}

// Load builds the effective config: defaults, then the optional YAML file,
// then PDBR_* env vars, then flags (highest precedence), and validates it.
// Pass only the flags the user actually set (confx.ChangedFlags). Loading
// is strict: unknown keys in the file, and unknown PDBR_* variables inside
// a config section, are errors naming the key they moved to or the
// then PDBR_* env vars, then flags (highest precedence: koanf path to
// value, see confx.WithFlags), and validates it. Pass only the flags the
// user actually set (cliflags.Changed). Loading is strict: unknown keys in
// the file, and unknown PDBR_* variables inside a config section, are
// errors naming the key they moved to, why they were removed, or the
// closest valid one.
func Load(path string, flags *flag.FlagSet) (Config, error) {
func Load(path string, flags map[string]any) (Config, error) {
cfg, err := LoadUnvalidated(path, flags)
if err != nil {
return cfg, err
Expand All @@ -222,9 +228,9 @@ func Load(path string, flags *flag.FlagSet) (Config, error) {

// LoadUnvalidated is Load without the final Validate, for callers that
// adjust the config first (UseConnectionIdentity) and then validate it.
func LoadUnvalidated(path string, flags *flag.FlagSet) (Config, error) {
func LoadUnvalidated(path string, flags map[string]any) (Config, error) {
cfg := DefaultConfig()
err := confx.Load(EnvPrefix, path, flags, &cfg, confx.WithMoved(MovedKeys))
err := confx.Load(EnvPrefix, path, &cfg, confx.WithMoved(MovedKeys), confx.WithRemoved(RemovedKeys), confx.WithFlags(flags))
return cfg, err
}

Expand All @@ -241,6 +247,7 @@ func (c *Config) UseConnectionIdentity() {
// violations together.
func (c *Config) Validate() error {
var errs []string
errs = append(errs, confx.ValidateDatabase(c.Database)...)
errs = append(errs, confx.ValidateErrors(c.Errors)...)
errs = append(errs, confx.ValidateIdentity(c.Auth, c.Roles, c.Claims)...)
errs = append(errs, confx.ValidateTX(confx.TX{Isolation: c.TX.Isolation, MaxRetries: c.TX.MaxRetries})...)
Expand Down
Loading
Loading