Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIConfig ¶ added in v0.2.2
type AIConfig struct {
// OpenAI API key
APIKey string `koanf:"api_key"`
// Model to use for AI SQL generation (default: gpt-4o)
Model string `koanf:"model"`
// MaxTokens is the maximum number of tokens to generate (default: 1024)
MaxTokens int `koanf:"max_tokens"`
// Temperature controls randomness in generation (0.0-1.0, default: 0.1)
Temperature float32 `koanf:"temperature"`
// Enabled indicates whether AI features are enabled
Enabled bool `koanf:"enabled"`
// BaseURL for OpenAI API (default: "", which uses the standard OpenAI API endpoint)
BaseURL string `koanf:"base_url"`
}
AIConfig contains AI service (OpenAI) settings
type AuthConfig ¶
type AuthConfig struct {
AdminEmails []string `koanf:"admin_emails"`
SessionDuration time.Duration `koanf:"session_duration"`
MaxConcurrentSessions int `koanf:"max_concurrent_sessions"`
APITokenSecret string `koanf:"api_token_secret"`
DefaultTokenExpiry time.Duration `koanf:"default_token_expiry"`
}
AuthConfig contains authentication settings
type ClickhouseConfig ¶
type ClickhouseConfig struct {
Host string `koanf:"host"`
Port int `koanf:"port"`
Database string `koanf:"database"`
Username string `koanf:"username"`
Password string `koanf:"password"`
}
ClickhouseConfig contains Clickhouse database settings
type Config ¶
type Config struct {
Server ServerConfig `koanf:"server"`
SQLite SQLiteConfig `koanf:"sqlite"`
Clickhouse ClickhouseConfig `koanf:"clickhouse"`
OIDC OIDCConfig `koanf:"oidc"`
Auth AuthConfig `koanf:"auth"`
Logging LoggingConfig `koanf:"logging"`
AI AIConfig `koanf:"ai"`
}
Config represents the application configuration
type LoggingConfig ¶
type LoggingConfig struct {
// Level sets the minimum log level (debug, info, warn, error)
Level string `koanf:"level"`
}
LoggingConfig contains logging settings
type OIDCConfig ¶
type OIDCConfig struct {
// Provider URL for OIDC discovery
ProviderURL string `koanf:"provider_url"` // Base URL for OIDC provider discovery
// Different endpoints for OIDC flow
AuthURL string `koanf:"auth_url"` // URL for browser auth redirects
TokenURL string `koanf:"token_url"` // URL for token exchange (server-to-server)
ClientID string `koanf:"client_id"`
ClientSecret string `koanf:"client_secret"`
RedirectURL string `koanf:"redirect_url"`
Scopes []string `koanf:"scopes"`
}
OIDCConfig contains OpenID Connect settings
type SQLiteConfig ¶
type SQLiteConfig struct {
Path string `koanf:"path"`
}
SQLiteConfig contains SQLite database settings
Click to show internal directories.
Click to hide internal directories.