Documentation ¶
Overview ¶
Package config provides the configuration methods for the wavepipe media server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultConfig = []byte(`{
"port": 8080,
"mediaFolder": "",
"sqlite": {
"file": "~/.config/wavepipe/wavepipe.db"
}
}`)
DefaultConfig is the default JSON configuration for wavepipe
var TravisConfig = []byte(`{
"port": 8080,
"mediaFolder": "/mem/",
"sqlite": {
"file": "~/.config/wavepipe/wavepipe.db"
}
}`)
TravisConfig is the JSON configuration used for Travis builds
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Port int `json:"port"` MediaFolder string `json:"mediaFolder"` Sqlite *SqliteConfig `json:"sqlite"` }
Config represents the program configuration options
type ConfigSource ¶
ConfigSource represents the configuration source for the program
var C ConfigSource
C is the active configuration instance
type JSONFileConfig ¶
type JSONFileConfig struct {
// contains filtered or unexported fields
}
JSONFileConfig represents configuration from a JSON configuration file
func (*JSONFileConfig) Load ¶
func (c *JSONFileConfig) Load() (*Config, error)
Load returns the configuration from a JSON configuration file
func (*JSONFileConfig) Use ¶
func (c *JSONFileConfig) Use(configPath string) error
Use sets the configuration file location for a JSON configuration file, attempting to create it if it does not exist
type SqliteConfig ¶
type SqliteConfig struct {
File string `json:"file"`
}
SqliteConfig represents configuration for an sqlite backend