Logging verbosity level, ordered from most critical to most verbose. $$\text{LogLevel} \in \{ \text{crit}, \text{error}, \text{warn}, \text{info}, \text{debug} \}$$
Instances For
Equations
Equations
- PostgREST.Config.instBEqLogLevel.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Parse a log level from a string (case-insensitive).
Equations
- One or more equations did not get rendered due to their size.
Instances For
OpenAPI specification generation mode. $$\text{OpenAPIMode} \in \{ \text{followPriv}, \text{ignorePriv}, \text{disabled}, \text{securityNone} \}$$
followPriv: respect database privileges in the specignorePriv: expose all endpoints regardless of privilegesdisabled: do not serve the OpenAPI specsecurityNone: serve spec with no security definitions
- followPriv : OpenAPIMode
- ignorePriv : OpenAPIMode
- disabled : OpenAPIMode
- securityNone : OpenAPIMode
Instances For
Equations
- PostgREST.Config.instBEqOpenAPIMode.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Parse an OpenAPI mode from a string.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A valid TCP/UDP port number: 1 through 65535. $$\text{Port} = \{ n : \mathbb{N} \mid 0 < n \land n \leq 65535 \}$$ The proof field is erased at runtime (zero cost).
- val : Nat
The numeric port value.
Proof that the port is in the valid range.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- PostgREST.Config.instBEqPort = { beq := fun (a b : PostgREST.Config.Port) => a.val == b.val }
Equations
- PostgREST.Config.instToStringPort = { toString := fun (p : PostgREST.Config.Port) => toString p.val }
The main PostgREST application configuration. $$\text{AppConfig} = \{ \text{dbUri} : \text{String},\; \text{dbSchemas} : [\text{Schema}],\; \text{anonRole} : \text{String},\; \ldots \}$$
Each field corresponds to a PostgREST configuration option
(e.g., PGRST_DB_URI, PGRST_DB_SCHEMAS).
Typing guarantees #
configServerPortis a valid TCP port (1-65535) by constructionconfigDbPoolSizeis positive by proof fieldconfigDbSchemasis non-empty by proof field
- configDbUri : String
PostgreSQL connection URI (e.g.,
postgresql://user:pass@host/db). - configDbSchemas : List SchemaCache.Identifiers.Schema
Schemas to expose via the API (e.g.,
["public"]). Proof that at least one schema is configured. A PostgREST instance with no schemas cannot serve any requests.
- configDbExtraSearchPath : List SchemaCache.Identifiers.Schema
Additional schemas to add to the search path.
- configDbAnonRole : String
The PostgreSQL role for unauthenticated requests.
- configDbPreparedStatements : Bool
Whether to use prepared statements for queries.
Maximum number of rows returned by any request (none = unlimited).
- configDbPreRequest : Option SchemaCache.Identifiers.QualifiedIdentifier
A function to call before every request (for row-level security setup).
- configDbRootSpec : Option SchemaCache.Identifiers.QualifiedIdentifier
Root spec: a function that serves as the API root (
/). - configDbTxAllowOverride : Bool
Whether clients can override the transaction mode via headers.
- configDbTxRollbackAll : Bool
Whether to rollback all transactions (useful for testing).
- configDbPoolSize : Nat
Connection pool size.
Proof that the pool size is positive (a zero-size pool is useless).
- configDbPoolMaxIdleTime : Nat
Maximum idle time (seconds) before a pooled connection is closed.
- configDbPoolMaxLifetime : Nat
Maximum lifetime (seconds) for a pooled connection.
JWT secret for token verification.
- configJwtSecretIsBase64 : Bool
Whether the JWT secret is base64-encoded.
Expected JWT audience claim.
- configJwtRoleClaimKey : String
JSON path to the role claim in the JWT (e.g.,
.role). - configOpenApiMode : OpenAPIMode
OpenAPI specification generation mode.
Proxy URI for the OpenAPI server URL.
- configServerHost : String
Server bind address (
!4= all IPv4,!6= all IPv6). - configServerPort : Port
Server listen port (valid TCP port: 1-65535).
Unix domain socket path (alternative to TCP).
- configServerUnixSocketMode : Nat
File mode for the Unix domain socket.
Admin server port (for health checks and metrics).
- configLogLevel : LogLevel
Logging verbosity level.
Allowed CORS origins (none = allow all).
Additional raw media types to accept.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
A default configuration suitable for local development and testing.
Uses postgresql://localhost/postgres with the public schema.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Whether JWT authentication is configured.
Equations
Instances For
Whether the admin server is enabled.
Equations
Instances For
Whether the API has a root spec function.
Equations
Instances For
Whether the API has a pre-request function.
Equations
Instances For
The first schema in the exposed schemas list (used as default).
Guaranteed to succeed because configDbSchemas is proven non-empty.
Equations
- c.mainSchema = match h : c.configDbSchemas with | s :: tail => s | [] => absurd ⋯ ⋯
Instances For
LogLevel.parse roundtrips toString for every log level.
$$\forall l,\; \text{LogLevel.parse}(\text{toString}(l)) = \text{some}\ l$$
OpenAPIMode.parse roundtrips toString for every mode.
$$\forall m,\; \text{OpenAPIMode.parse}(\text{toString}(m)) = \text{some}\ m$$