Documentation
¶
Overview ¶
Package config handles loading and validating Creel server configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyConfig ¶
type AuthConfig ¶
type AuthConfig struct {
Providers []OIDCProviderConfig `yaml:"providers"`
PrincipalClaim string `yaml:"principal_claim"`
GroupsClaim string `yaml:"groups_claim"`
APIKeys []APIKeyConfig `yaml:"api_keys"`
}
type CompactionConfig ¶
type CompactionConfig struct {
RetainCompactedChunks bool `yaml:"retain_compacted_chunks"`
}
type Config ¶
type Config struct {
Server ServerConfig `yaml:"server"`
Auth AuthConfig `yaml:"auth"`
Postgres PostgresConfig `yaml:"postgres"`
VectorBackend VectorBackendConfig `yaml:"vector_backend"`
Embedding EmbeddingConfig `yaml:"embedding"`
Links LinksConfig `yaml:"links"`
Compaction CompactionConfig `yaml:"compaction"`
EncryptionKey string `yaml:"encryption_key"`
Workers WorkersConfig `yaml:"workers"`
}
Config is the top-level server configuration.
type EmbeddingConfig ¶
type LinksConfig ¶
type OIDCProviderConfig ¶
OIDCProviderConfig defines a trusted OIDC identity provider. Multiple providers can be configured to support different IdPs simultaneously.
type PostgresConfig ¶ added in v0.1.4
type PostgresConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
User string `yaml:"user"`
Password string `yaml:"password"`
Name string `yaml:"name"`
Schema string `yaml:"schema"`
SSLMode string `yaml:"sslmode"`
}
PostgresConfig holds structured PostgreSQL connection parameters.
func PostgresConfigFromEnv ¶ added in v0.1.4
func PostgresConfigFromEnv() *PostgresConfig
PostgresConfigFromEnv builds a PostgresConfig from CREEL_POSTGRES_* environment variables. Returns nil if CREEL_POSTGRES_HOST is not set. Used by integration tests.
func (PostgresConfig) BaseURL ¶ added in v0.1.4
func (p PostgresConfig) BaseURL() string
BaseURL returns the connection string without search_path (for schema creation).
func (PostgresConfig) URL ¶ added in v0.1.4
func (p PostgresConfig) URL() string
URL returns the connection string with search_path set to the configured schema followed by public (so extensions installed in public are accessible).