Documentation
¶
Overview ¶
Package config assembles the application configuration. It sits at the edge of the dependency graph: every section's type is owned by the package that consumes it (cast, extractor, resolve) and composed here, so domain packages never import application-level state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Device DeviceConfig `yaml:"device" validate:"required"`
Network cast.NetworkConfig `yaml:"network" validate:"required"`
Browser extract.BrowserConfig `yaml:"browser" validate:"required"`
Capture extract.CaptureConfig `yaml:"capture" validate:"required"`
Actions extract.ActionConfig `yaml:"actions" validate:"required"`
Sources []Source `yaml:"sources" validate:"dive"`
Resolver resolve.Config `yaml:"resolver" validate:"required"`
Transcode cast.TranscodeConfig `yaml:"transcode" validate:"required"`
Whisper cast.WhisperConfig `yaml:"whisper"`
TMDB TMDB `yaml:"tmdb"`
}
func Load ¶
Load reads the YAML file at path plus a sibling *.local.yaml and CASTOR_* environment variables, decodes them over the typed defaults, and validates the result.
func (*Config) AllEpisodeURLs ¶ added in v1.3.0
func (*Config) AllMovieURLs ¶ added in v1.3.0
type DeviceConfig ¶ added in v1.8.0
type DeviceConfig struct {
// Name identifies the device to discovery. It is required only without Host:
// once Host pins the device, Name is just a display label and may be omitted.
Name string `yaml:"name" validate:"required_without=Host"`
Type device.Type `yaml:"type" validate:"required"`
// Host pins the device's address to skip discovery (see device.Config.Address):
// a bare IP/host for any family, or a DLNA description URL. Left empty, Castor
// discovers the device by Name over SSDP/mDNS.
Host string `yaml:"host"`
Roku device.RokuConfig `yaml:"roku"`
}
DeviceConfig is the composition-root device section: the generic cast target plus each device family's optional connect settings. This is the one place the application binds a family's typed config (device.RokuConfig) to its YAML, so the agnostic layers below never name a family; resolve() collapses it into the opaque device.Config they carry.
type Source ¶
type Source struct {
Proxies []string `yaml:"proxies" validate:"required,min=1"`
Templates Templates `yaml:"templates" validate:"required"`
}
Source defines a set of proxy hosts and the URL templates to reach a movie or episode page on them.