Documentation
¶
Overview ¶
Package setting implements config file settings for go-homebank-csv.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFileGlobPatternValid ¶
IsFileGlobPatternValid reports whether a file glob pattern is valid.
- pattern: the file glob pattern to be validated.
- bool: returns true if the pattern is valid, false otherwise.
Types ¶
type BatchConvertSet ¶
type BatchConvertSet struct { // Name of the batchconvert set, must be unique Name string `yaml:"name"` // Where to search for input files, must be non-empty InputDir string `yaml:"inputdir"` // Where to place output files, must be non-empty and not equal to InputDir OutputDir string `yaml:"outputdir"` // Source format, nil to use format autodetect Format *parser.SourceFormat `yaml:"format"` // Glob pattern to search for input files FileGlobPattern string `yaml:"fileglobpattern"` // Maximum age of input files in days FileMaxAgeDays int `yaml:"filemaxagedays"` }
func (BatchConvertSet) CheckValidity ¶
func (s BatchConvertSet) CheckValidity() error
CheckValidity reports whether a BatchConvertSet is valid
Possible errors:
- Name is empty
- InputDir is empty
- OutputDir is empty
- OutputDir == InputDir
- FileMaxAgeDays < 0
- FileGlobPattern is invalid
func (*BatchConvertSet) LoadFromString ¶
func (s *BatchConvertSet) LoadFromString(str string) error
type BatchConvertSets ¶
type BatchConvertSets []BatchConvertSet
func (BatchConvertSets) CheckValidity ¶
func (s BatchConvertSets) CheckValidity() error
CheckValidity reports whether a BatchConvertSets are valid
Possible errors:
- invalid CheckValidity() of entry
- duplicate Name
- duplicate InputDir / FileGlobPattern combination
type BatchConvertSettings ¶
type BatchConvertSettings struct {
Sets BatchConvertSets `yaml:"sets"`
}
type Settings ¶
type Settings struct {
BatchConvert BatchConvertSettings `yaml:"batchconvert"`
}
func (Settings) CheckValidity ¶
CheckValidity reports whether a the whole settings are valid
func (*Settings) LoadFromDefaultFile ¶
LoadFromDefaultFile loads settings from default config file.
func (*Settings) LoadFromFile ¶
func (*Settings) LoadFromString ¶
Click to show internal directories.
Click to hide internal directories.