Version: v1.1.9 Latest Latest

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

Go to latest
Published: Aug 19, 2021 License: MIT Imports: 3 Imported by: 11




This section is empty.


This section is empty.


This section is empty.


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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL