Documentation
¶
Index ¶
Constants ¶
View Source
const (
EnvConfigPath = "DASHBRR__CONFIG_PATH"
)
Variables ¶
This section is empty.
Functions ¶
func HasRequiredEnvVars ¶
func HasRequiredEnvVars() bool
HasRequiredEnvVars checks if all required environment variables are set
func LoadEnvOverrides ¶
LoadEnvOverrides loads configuration from environment variables
Types ¶
type AuthConfig ¶
type AuthConfig struct {
OIDC OIDCConfig `toml:"oidc"`
}
AuthConfig holds authentication-related configuration
type CacheConfig ¶
type CacheConfig struct {
Type string `toml:"type" env:"CACHE_TYPE"`
Redis RedisConfig `toml:"redis"`
}
CacheConfig holds cache-related configuration
type Config ¶
type Config struct {
Server ServerConfig `toml:"server"`
Cache CacheConfig `toml:"cache"`
Database DatabaseConfig `toml:"database"`
Auth AuthConfig `toml:"auth"`
}
Config represents the main configuration structure
func LoadConfig ¶
LoadConfig loads the configuration from environment variables or TOML file
type DatabaseConfig ¶
type DatabaseConfig struct {
Type string `toml:"type" env:"DASHBRR__DB_TYPE"`
Path string `toml:"path" env:"DASHBRR__DB_PATH"`
Host string `toml:"host" env:"DASHBRR__DB_HOST"`
Port int `toml:"port" env:"DASHBRR__DB_PORT"`
User string `toml:"user" env:"DASHBRR__DB_USER"`
Password string `toml:"password" env:"DASHBRR__DB_PASSWORD"`
Name string `toml:"name" env:"DASHBRR__DB_NAME"`
}
DatabaseConfig holds database-related configuration
type OIDCConfig ¶
type OIDCConfig struct {
Issuer string `toml:"issuer" env:"OIDC_ISSUER"`
ClientID string `toml:"client_id" env:"OIDC_CLIENT_ID"`
ClientSecret string `toml:"client_secret" env:"OIDC_CLIENT_SECRET"`
RedirectURL string `toml:"redirect_url" env:"OIDC_REDIRECT_URL"`
}
OIDCConfig holds OIDC-specific configuration
type RedisConfig ¶
type RedisConfig struct {
Host string `toml:"host" env:"REDIS_HOST"`
Port int `toml:"port" env:"REDIS_PORT"`
}
RedisConfig holds Redis-specific configuration
type ServerConfig ¶
type ServerConfig struct {
ListenAddr string `toml:"listen_addr" env:"DASHBRR__LISTEN_ADDR"`
}
ServerConfig holds server-related configuration
Click to show internal directories.
Click to hide internal directories.