Skip to main content

Module settings

Module settings 

Source
Expand description

The server behavior is fully driven by a YAML configuration file. This file defines network settings, security providers, data sources, and observability integrations used at runtime.

The configuration is loaded during application startup and applied automatically by the framework.

§Server

Defines how the HTTP service is exposed and how it interacts with the runtime environment.

FieldDescription
hostNetwork interface where the server binds.
portMain HTTP port used by the API.
health-check-portDedicated port exposing the health endpoint.
use-docker-composeEnables orchestration of dependencies via Docker Compose.
docker-compose-filePath to the Docker Compose definition used when orchestration is enabled.

§CORS

Controls cross-origin access policies.

FieldDescription
max-ageDuration (seconds) browsers cache preflight responses.
allow-credentialsAllows cookies and authorization headers in cross-origin requests.
allowed-methodsHTTP methods allowed for cross-origin calls.
allowed-headersHeaders accepted from clients.
allowed-origins_patternComma-separated list of allowed origin patterns.

§Security — OAuth2 / OpenID Connect

Enables authentication and token validation using an OAuth2 provider.

FieldDescription
enabledActivates OAuth2 protection for secured endpoints.
load-from-discovery-urlAutomatically loads provider metadata from the discovery endpoint.
discovery-urlOpenID Provider discovery document.
issuer-uriExpected token issuer identifier.
jwks-uriJSON Web Key Set endpoint used to validate tokens.
token-uriEndpoint for obtaining access tokens.
authorization-uriAuthorization endpoint for login flows.
introspection-uriEndpoint for validating opaque tokens.
user_info-uriEndpoint returning authenticated user claims.
end_session-uriLogout endpoint for session termination.

§OAuth2 Client

Credentials used by the server when interacting with the identity provider.

FieldDescription
idOAuth2 client identifier.
secretOAuth2 client secret.
scopeRequested scopes during authentication.

§JWKS

Defines local JSON Web Keys used for token signing or validation.

Each key entry contains:

  • kid — Key identifier
  • kty — Key type
  • alg — Signing algorithm
  • use — Key usage
  • e — Public exponent
  • n — RSA modulus
  • x5c — X.509 certificate chain

This section is typically used when keys are managed internally or cached locally.

§Data Sources

§Redis

Configuration for distributed cache and key-value storage.

FieldDescription
enabledEnables Redis integration.
host / portConnection settings.
client-typeRedis client implementation.
lettuce.poolConnection pool configuration.
repositories.enabledEnables repository abstraction backed by Redis.

§Relational Databases

Defines a list of database connections used by the application.

Each database entry supports:

  • Connection pooling configuration
  • Timeouts and lifecycle settings
  • SQL logging control
  • Independent enable/disable toggle

This allows multiple data sources (e.g., API DB, job processing DB) to coexist in the same runtime.

FieldDescription
nameLogical name of the database connection used by the server.
enabledEnables or disables this database configuration. When false, the connection is not initialized.
urlDatabase connection string used to establish the connection.
min-pool-sizeMinimum number of connections maintained in the pool.
max-pool-sizeMaximum number of connections allowed in the pool.
loggingEnables query and connection logging for this database.
aquire-timeoutMaximum time (in seconds) to wait when acquiring a connection from the pool.
max-lifetimeMaximum lifetime (in minutes) of

Important: The framework currently supports only SQLite, PostgreSQL, MySQL, MariaDB, and Microsoft SQL Server databases.

§BigQuery Database Connection

This section defines the configuration parameters required to establish a secure connection to Google BigQuery, the fully managed data warehouse provided by Google. These settings allow the server to authenticate, select the target project and dataset, and control execution behavior for queries. .

FieldDescription
enabledEnables BigQuery access.
print-tablesLogs available tables during startup.
regionDataset region.
projectGoogle Cloud project identifier.
credentialBase64-encoded service account credentials.
datasetList of datasets used by the application.

§Metrics

Controls application observability and monitoring integration.

FieldDescription
enabledEnables metrics collection.
app-nameIdentifier used when exporting metrics.

§Runtime Notes

  • Disabled components remain configured but inactive.
  • Secrets should be externalized in production environments.
  • Configuration values can be overridden via environment variables or CLI parameters.
  • The configuration is validated during server startup.

Structs§

BigQuery
Google BigQuery configuration.
Cors
CORS (Cross-Origin Resource Sharing) configuration.
Data
Data layer configuration.
Database
Relational database configuration.
Lettuce
Lettuce client configuration.
Metrics
Metrics configuration.
OAuth2Client
OAuth2 client configuration.
OAuth2Configuration
OAuth2 configuration.
Pool
Connection pool configuration.
Redis
Redis configuration.
Repositories
Configuration for enabling or disabling data repositories.
Security
Server security configuration.
Server
Server configuration.
Settings
Global application settings.

Type Aliases§

Result
A type alias for a Result with the ConfigError error type.