viper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2017 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*v.Viper
}

Config wraps Viper and implements ConfigProvider

func NewConfig

func NewConfig() *Config

NewConfig creates a Config based on viper.New()

func (*Config) ComponentEnabled

func (c *Config) ComponentEnabled(name string) bool

ComponentEnabled determines if a component is enabled by looking up a boolean value called "enabled" under the component namespace. If it's not set, it defaults to true.

func (*Config) GetBool

func (c *Config) GetBool(key string) (bool, bool)

func (*Config) GetInt

func (c *Config) GetInt(key string) (int, bool)

func (*Config) GetString

func (c *Config) GetString(key string) (string, bool)

Jump to

Keyboard shortcuts

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