config

package
v0.0.0-...-eb47728 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 7 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 {
	DBFile   string        `required:"false" split_words:"true" default:"wupdedup.bolt.db"`
	LogLevel string        `required:"false" split_words:"true" default:"info"`
	Timeout  time.Duration `required:"false" split_words:"true" default:"1m"`
	// HomeDir  string `required:"false" split_words:"true" default:""`
	Profile profiler.ProfileConfig
	Local   LocalConfig
	Smugmug SmugMugConfig
}

func LoadConfig

func LoadConfig() Config

The struct returned is a singleton.

type LocalConfig

type LocalConfig struct {
	RootPath string `required:"true" split_words:"true" default:""`
}

func (*LocalConfig) Specified

func (c *LocalConfig) Specified() bool

func (*LocalConfig) Valid

func (c *LocalConfig) Valid() bool

type SmugMugConfig

type SmugMugConfig struct {
	URL                string `required:"true" split_words:"true" default:""`
	APIKey             string `required:"true" split_words:"true" default:""`
	APISecret          string `required:"true" split_words:"true" default:""`
	UserToken          string `required:"true" split_words:"true" default:""`
	UserSecret         string `required:"true" split_words:"true" default:""`
	Destination        string `required:"true" split_words:"true" default:""`
	FileNames          string `required:"true" split_words:"true" default:""`
	UseMetadataTimes   bool   `required:"true" split_words:"true" default:false`
	ForceMetadataTimes bool   `required:"true" split_words:"true" default:false`
}

func (*SmugMugConfig) Specified

func (c *SmugMugConfig) Specified() bool

func (*SmugMugConfig) Valid

func (c *SmugMugConfig) Valid() bool

Jump to

Keyboard shortcuts

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