config

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: MIT Imports: 3 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 {
	// contains filtered or unexported fields
}

Config is a wrapper around a viper config

func NewConfig

func NewConfig(cfgs ...*viper.Viper) *Config

NewConfig creates a new config with a given viper config if given

func (*Config) Get

func (c *Config) Get(s string) interface{}

Get returns an interface from the inner config

func (*Config) GetBool

func (c *Config) GetBool(s string) bool

GetBool returns an boolean from the inner config

func (*Config) GetDuration

func (c *Config) GetDuration(s string) time.Duration

GetDuration returns a duration from the inner config

func (*Config) GetInt

func (c *Config) GetInt(s string) int

GetInt returns an int from the inner config

func (*Config) GetString

func (c *Config) GetString(s string) string

GetString returns a string from the inner config

func (*Config) GetStringMapString

func (c *Config) GetStringMapString(s string) map[string]string

GetStringMapString returns a string map string from the inner config

func (*Config) GetStringSlice

func (c *Config) GetStringSlice(s string) []string

GetStringSlice returns a string slice from the inner config

func (*Config) UnmarshalKey added in v0.7.6

func (c *Config) UnmarshalKey(s string, v interface{}) error

UnmarshalKey unmarshals key into v

Jump to

Keyboard shortcuts

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