Documentation ¶
Overview ¶
Package config collects all configuration for the server with a single model which allows for easy viper-based configuration files.
Index ¶
- Constants
- Variables
- func AddConfigPath(path string)
- func SetConfigFile(path string)
- func SetConfigName(name string)
- type ActivityConfig
- type AssistantConfig
- type AssistantResponse
- type AuthConfig
- type Config
- type ContentDescription
- type DatabaseConfig
- type DateRecommend
- type MusicConfig
- type PodcastConfig
- type ProgressConfig
- type RadioStream
- type RecommendConfig
- type ServerConfig
- type SetlistAPIConfig
- type TMDBAPIConfig
- type TOTPConfig
- type Template
- type TokenConfig
- type VideoConfig
Constants ¶
View Source
const ( MediaMusic = "music" MediaVideo = "video" )
Variables ¶
View Source
var ( ErrTestConfig = errors.New("missing test config") ErrInvalidCache = errors.New("invalid cache entry") )
Functions ¶
func AddConfigPath ¶
func AddConfigPath(path string)
func SetConfigFile ¶
func SetConfigFile(path string)
func SetConfigName ¶
func SetConfigName(name string)
Types ¶
type ActivityConfig ¶
type AssistantConfig ¶
type AssistantConfig struct { ProjectID string TrackLimit int RecentLimit int Welcome AssistantResponse Play AssistantResponse Error AssistantResponse Link AssistantResponse Linked AssistantResponse Guest AssistantResponse Recent AssistantResponse Release AssistantResponse SuggestionAuth string SuggestionNew string MediaObjectName Template MediaObjectDesc Template }
type AssistantResponse ¶
type AuthConfig ¶
type AuthConfig struct { DB DatabaseConfig SessionAge time.Duration CodeAge time.Duration SecureCookies bool AccessToken TokenConfig MediaToken TokenConfig CodeToken TokenConfig FileToken TokenConfig TOTP TOTPConfig }
type Config ¶
type Config struct { Auth AuthConfig Buckets []bucket.Config Client client.Config Fanart fanart.Config LastFM lastfm.Config Music MusicConfig TMDB TMDBAPIConfig Search search.Config Server ServerConfig Video VideoConfig Assistant AssistantConfig Podcast PodcastConfig Progress ProgressConfig Activity ActivityConfig }
func LoadConfig ¶
LoadConfig uses viper to load a config file in the provided directory. The result is cached.
func TestingConfig ¶ added in v0.14.0
func (Config) NewCacheOnlyGetter ¶
func (Config) NewSearcher ¶ added in v0.14.0
type ContentDescription ¶ added in v0.12.1
type DatabaseConfig ¶
func (DatabaseConfig) GormConfig ¶
func (c DatabaseConfig) GormConfig() *gorm.Config
type DateRecommend ¶
type MusicConfig ¶
type MusicConfig struct { ArtistFile string ArtistRadioBreadth int ArtistRadioDepth int TrackRadioBreadth int TrackRadioDepth int DB DatabaseConfig DeepLimit int PopularLimit int RadioGenres []string RadioLimit int RadioOther map[string]string RadioSearchLimit int RadioSeries []string RadioStreams []RadioStream Recent time.Duration RecentLimit int ReleaseCountries []string SearchIndexName string SearchLimit int SimilarArtistsLimit int SimilarReleases time.Duration SimilarReleasesLimit int SinglesLimit int SyncInterval time.Duration PopularSyncInterval time.Duration SimilarSyncInterval time.Duration CoverSyncInterval time.Duration RelatedArtists time.Duration // contains filtered or unexported fields }
func (*MusicConfig) UserArtistID ¶
func (mc *MusicConfig) UserArtistID(name string) (string, bool)
type PodcastConfig ¶
type ProgressConfig ¶
type ProgressConfig struct {
DB DatabaseConfig
}
type RadioStream ¶
type RadioStream struct { Creator string Title string Image string Description string Source []ContentDescription }
type RecommendConfig ¶
type RecommendConfig struct {
When []DateRecommend
}
type ServerConfig ¶
type SetlistAPIConfig ¶
type SetlistAPIConfig struct {
ApiKey string
}
type TMDBAPIConfig ¶
type TOTPConfig ¶ added in v0.15.0
type TOTPConfig struct {
Issuer string
}
type TokenConfig ¶
type VideoConfig ¶
type VideoConfig struct { DB DatabaseConfig ReleaseCountries []string CastLimit int CrewJobs []string Recent time.Duration RecentLimit int SearchIndexName string SearchLimit int Recommend RecommendConfig SyncInterval time.Duration PosterSyncInterval time.Duration BackdropSyncInterval time.Duration DuplicateResolution string }
Click to show internal directories.
Click to hide internal directories.