cfg

package
v0.0.0-...-9e76345 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package cfg handles s3downloader app config load logic

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUndefinedBucket = errors.New("bucket is not defined")
)

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	AWSAccessKeyID string `json:"aws_access_key_id"`
	AWSSecretKey   string `json:"aws_secret_key"`
	Region         string `json:"region"`
}

Cfg contains deserialized app config data

func GetCfg

func GetCfg() (*Cfg, error)

GetCfg loads app config from disc into singletone and returns loaded value

type InArgs

type InArgs struct {
	Bucket      string
	Prefix      string
	LocalDir    string
	Regexp      string
	DryRun      bool
	PrependName bool
}

InArgs contains input flag argument values

func (*InArgs) Validate

func (in *InArgs) Validate() error

Validate returns an error if InArgs contain an invalid value

Jump to

Keyboard shortcuts

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