config

package
v0.7.1-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailToLoadConfig  = errors.System(nil, "fail to load config", "DCONF:001")
	ErrFailEnsureConfig  = errors.System(nil, "fail to ensure config", "DCONF:002")
	ConfigFileWasCreated = errors.Business("a new config file was created (%s)", "DCONF:003")
)

Functions

func BuildDate

func BuildDate() string

func Commit

func Commit() string

func Hostname

func Hostname() string

func Version

func Version() string

func VersionVerbose

func VersionVerbose() string

Types

type AppConfig

type AppConfig struct {
	BaseOutputDir string `fig:"base_output_dir" yaml:"base_output_dir" default:"outputs"`
	Download      download.Config
	Cut           cut.Config
	Audio         audios.Config
	Merge         merge.Config
	Sources       sources.Sources
}

func Ctx

func Ctx(ctx context.Context) *AppConfig

func Load

func Load(file string) (AppConfig, error)

func (*AppConfig) WithContext

func (c *AppConfig) WithContext(ctx context.Context) context.Context

func (AppConfig) WithOutput added in v0.8.0

func (c AppConfig) WithOutput(dir string) AppConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL