Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capability ¶
type Capability string
Capability is a capability ID.
const ( // CapabilityWatch is the filesystem watch capability ID. CapabilityWatch Capability = "watch" // CapabilityRemux is the remux capability ID. CapabilityRemux Capability = "remux" // CapabilityTranscode is the transcode capability ID. CapabilityTranscode Capability = "transcode" )
type Config ¶
type Config struct { // HTTP is the "http" configuration section. HTTP *HTTP `toml:"http"` // Repos is the collection of repository configuration, keyed by their ID. Repos map[string]*Repo `toml:"repos"` }
Config is a struct representation of the TOML configuration file.
func ParseWithDefaults ¶
ParseWithDefaults parses the configuration from a file and completes it with default values (Section.Defaults).
type HTTP ¶
type HTTP struct { // Host is the host string, used for http.ListenAndServe, defaults to ":8000". Host string `toml:"host"` }
HTTP is an HTTP configuration section of the configuration file.
type MetadataSource ¶
type MetadataSource string
MetadataSource is a metadata source ID.
const ( // MetadataSourceLiteral is the literal metadata source ID (meta.NewLiteralSource). MetadataSourceLiteral MetadataSource = "literal" // MetadataSourceAnalysis is the analysis metadata source ID (meta.NewFileAnalysisSource). MetadataSourceAnalysis MetadataSource = "analysis" // MetadataSourceTMDB is the TMDB (The Movie Database) metadata source ID (tmdb.NewSource). MetadataSourceTMDB MetadataSource = "tmdb" )
type Repo ¶
type Repo struct { // Name is the name of the repository, defaults to the repository ID. Name string `toml:"name"` // Path is the relative or absolute path of the repository's directory. Path string `toml:"path"` // Path is the relative or absolute path of the repository's index file, can be empty. IndexPath string `toml:"index_path"` // CachePath is the relative or absolute path of the repository's operation cache, defaults to <path>/.katana/cache. CachePath string `toml:"cache_path"` // Capabilities are the capability IDs of the repository. Capabilities []Capability `toml:"capabilities"` // Sources is a mapping of used metadata sources and their configuration, keyed by their name. Sources map[MetadataSource]map[string]interface{} `toml:"sources"` }
Repo is a base repository configuration.
func (*Repo) Capable ¶
func (r *Repo) Capable(c Capability) bool
Capable checks whether a Capability is contained in the configuration.
Click to show internal directories.
Click to hide internal directories.