config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Config stores the global configuration
	Config config
)

Functions

func Load

func Load(file io.Reader) error

Load initializes the Config variable from file and the environment.

Environment variables take precedence over the file.

func StoragePath added in v0.7.0

func StoragePath(storageName string) (string, bool)

StoragePath looks up the base path for storageName. The second boolean return value indicates if anything was found.

func ValidateStorages added in v0.7.0

func ValidateStorages() error

ValidateStorages checks for pathological values in Config.Storages

Types

type Storage

type Storage struct {
	Name string
	Path string
}

Storage contains a single storage-shard

Jump to

Keyboard shortcuts

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