setting

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func DefaultConfigPath

func DefaultConfigPath() string

func DefaultUpdateInterval

func DefaultUpdateInterval() time.Duration

func Logger

func Logger() logger.Logger

Types

type Config

type Config struct {
	Dirs []Directory `validate:"required"`
}

type Directory

type Directory struct {
	Src         []string `validate:"required"`
	Dest        string   `validate:"required_if=MoveToTrash false"`
	Recursive   bool
	MoveToTrash bool `validate:"required_without=Dest"`
	After       uint
	Exceptions  []string
}

func (Directory) RealPaths

func (d Directory) RealPaths() (paths []string, err error)

func (Directory) TrashDir

func (d Directory) TrashDir() (trashDir string, err error)

type Flag

type Flag struct {
	ConfigPath     string        `validation:"required,filepath"`
	UpdateInterval time.Duration `validation:"required,min=1m"`
	LogFilePath    string        `validation:"filepath"`
	LogLevelName   string        `validation:"required_with=LogFilePath"`
}

func (Flag) Config

func (f Flag) Config() *Config

func (Flag) LogLevel

func (f Flag) LogLevel() logger.LogLevel

Jump to

Keyboard shortcuts

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