config

package
v7.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Schedule string          `yaml:"schedule,omitempty" json:"schedule,omitempty"`
	Db       *model.Db       `yaml:"db,omitempty" json:"db,omitempty" validate:"omitempty"`
	Server   *model.Server   `yaml:"server,omitempty" json:"server,omitempty" validate:"required"`
	Download *model.Download `yaml:"download,omitempty" json:"download,omitempty" validate:"required"`
	Notif    *model.Notif    `yaml:"notif,omitempty" json:"notif,omitempty"`
}

Config holds configuration details

func Load

func Load(cfgfile string, schedule string) (*Config, error)

Load returns Config struct

func (*Config) String

func (cfg *Config) String() string

String returns the string representation of configuration

type Finder

type Finder struct {
	BasePaths  []string
	Extensions []string
}

Finder holds a list of file paths.

func (Finder) Find

func (f Finder) Find(configFile string) (string, error)

Find returns the first valid existing file among configFile and the paths already registered with Finder.

Jump to

Keyboard shortcuts

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