config

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfigFile string
	DefaultOutputFile string
)

Functions

This section is empty.

Types

type AutoUpdate added in v1.4.0

type AutoUpdate struct {
	Interval time.Duration `yaml:"interval"`
	LastRun  time.Time     `yaml:"last_run"`
}

type Config

type Config struct {
	DevFolders map[string]*folders.FolderCollection `yaml:"dev_folders"`
	AutoSync   IntervalRunner                       `yaml:"auto_sync"`
	AutoUpdate IntervalRunner                       `yaml:"auto_update"`
}

func GetDefaultConfig

func GetDefaultConfig() *Config

func LoadConfigFile

func LoadConfigFile(filename string) (config *Config, err error)

func (*Config) Find added in v1.5.0

func (c *Config) Find(folderName string) (coll *folders.FolderCollection, folder *folders.Folder, err error)

func (*Config) Save

func (c *Config) Save(filename string) error

type IntervalRunner added in v1.4.0

type IntervalRunner struct {
	Interval time.Duration `yaml:"interval"`
	LastRun  time.Time     `yaml:"last_run"`
}

func (*IntervalRunner) Run added in v1.4.0

func (a *IntervalRunner) Run()

func (*IntervalRunner) ShouldRun added in v1.4.0

func (a *IntervalRunner) ShouldRun() bool

func (*IntervalRunner) String added in v1.4.0

func (a *IntervalRunner) String() string

Jump to

Keyboard shortcuts

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