Documentation
¶
Overview ¶
Package config provides configuration management for program-director.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Debug bool `mapstructure:"debug"`
Database DatabaseConfig `mapstructure:"database"`
Radarr RadarrConfig `mapstructure:"radarr"`
Sonarr SonarrConfig `mapstructure:"sonarr"`
Tunarr TunarrConfig `mapstructure:"tunarr"`
Trakt TraktConfig `mapstructure:"trakt"`
Ollama OllamaConfig `mapstructure:"ollama"`
Cooldown CooldownConfig `mapstructure:"cooldown"`
Server ServerConfig `mapstructure:"server"`
Themes []ThemeConfig `mapstructure:"themes"`
}
Config holds all application configuration
type CooldownConfig ¶
type CooldownConfig struct {
MovieDays int `mapstructure:"movie_days"`
SeriesDays int `mapstructure:"series_days"`
AnimeDays int `mapstructure:"anime_days"`
}
CooldownConfig holds media cooldown settings
type DatabaseConfig ¶
type DatabaseConfig struct {
Driver string `mapstructure:"driver"` // postgres or sqlite
Postgres PostgresConfig `mapstructure:"postgres"`
SQLite SQLiteConfig `mapstructure:"sqlite"`
}
DatabaseConfig configures the database connection
type OllamaConfig ¶
type OllamaConfig struct {
URL string `mapstructure:"url"`
Model string `mapstructure:"model"`
Temperature float64 `mapstructure:"temperature"`
NumCtx int `mapstructure:"num_ctx"`
}
OllamaConfig holds Ollama LLM settings
type PostgresConfig ¶
type PostgresConfig struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
Database string `mapstructure:"database"`
User string `mapstructure:"user"`
Password string `mapstructure:"password"`
SSLMode string `mapstructure:"sslmode"`
}
PostgresConfig holds PostgreSQL connection settings
func (*PostgresConfig) DSN ¶
func (c *PostgresConfig) DSN() string
DSN returns the database connection string for PostgreSQL
type RadarrConfig ¶
RadarrConfig holds Radarr API settings
type SQLiteConfig ¶
type SQLiteConfig struct {
Path string `mapstructure:"path"`
}
SQLiteConfig holds SQLite settings
type ServerConfig ¶
type ServerConfig struct {
Port int `mapstructure:"port"`
EnableScheduler bool `mapstructure:"enable_scheduler"`
MetricsEnabled bool `mapstructure:"metrics_enabled"`
ShutdownTimeout int `mapstructure:"shutdown_timeout"`
}
ServerConfig holds HTTP server settings
type SonarrConfig ¶
SonarrConfig holds Sonarr API settings
type ThemeConfig ¶
type ThemeConfig struct {
Name string `mapstructure:"name"`
Description string `mapstructure:"description"`
ChannelID string `mapstructure:"channel_id"`
Schedule string `mapstructure:"schedule"`
MediaTypes []string `mapstructure:"media_types"`
Genres []string `mapstructure:"genres"`
Keywords []string `mapstructure:"keywords"`
MinRating float64 `mapstructure:"min_rating"`
MaxItems int `mapstructure:"max_items"`
Duration int `mapstructure:"duration"` // Target duration in minutes
}
ThemeConfig defines a playlist theme
type TraktConfig ¶
type TraktConfig struct {
ClientID string `mapstructure:"client_id"`
ClientSecret string `mapstructure:"client_secret"`
}
TraktConfig holds Trakt.tv API settings
type TunarrConfig ¶
type TunarrConfig struct {
URL string `mapstructure:"url"`
}
TunarrConfig holds Tunarr API settings
Click to show internal directories.
Click to hide internal directories.