config

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: GPL-3.0 Imports: 18 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 `fig:"download" yaml:"download"`
	Cut           cut.Config      `fig:"cut" yaml:"cut"`
	Convert       convert.Config  `fig:"convert" yaml:"convert"`
	Audio         audios.Config   `fig:"audio" yaml:"audio"`
	Merge         merge.Config    `fig:"merge" yaml:"merge"`
	Sources       sources.Sources `fig:"sources" yaml:"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