config

package
v0.0.0-...-3262849 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration interface {
	Get(key string) interface{}
	GetBool(key string) bool
	GetFloat64(key string) float64
	GetInt(key string) int
	GetString(key string) string
	GetStringMap(key string) map[string]interface{}
	GetStringMapString(key string) map[string]string
	GetStringSlice(key string) []string
	GetTime(key string) time.Time
	GetDuration(key string) time.Duration
	IsSet(key string) bool
	AllSettings() map[string]interface{}
}

func New

func New(prefix string, keys KeyList, providers ProviderList) (Configuration, error)

type KeyList

type KeyList []KeyPair

func Keys

func Keys(keys ...KeyPair) KeyList

type KeyPair

type KeyPair struct {
	// contains filtered or unexported fields
}

func Key

func Key(key string, defaultValue interface{}) KeyPair

type Provider

type Provider interface {
	Install(keys []string, conf *viper.Viper) error
}

type ProviderList

type ProviderList []Provider

func Providers

func Providers(provs ...Provider) ProviderList

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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