config

package
v0.0.0-...-c187892 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2016 License: GPL-2.0, GPL-3.0, GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyConfig

func ApplyConfig(config Config)

func OnConfig

func OnConfig(conf func(Config))

Types

type Config

type Config 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
	IsSet(key string) bool
	Set(key string, value interface{})
}

type Configurable

type Configurable func(Config)

type MapConfig

type MapConfig map[string]interface{}

func (MapConfig) Get

func (cfg MapConfig) Get(key string) interface{}

func (MapConfig) GetBool

func (cfg MapConfig) GetBool(key string) bool

func (MapConfig) GetFloat64

func (cfg MapConfig) GetFloat64(key string) float64

func (MapConfig) GetInt

func (cfg MapConfig) GetInt(key string) int

func (MapConfig) GetString

func (cfg MapConfig) GetString(key string) string

func (MapConfig) GetStringMap

func (cfg MapConfig) GetStringMap(key string) map[string]interface{}

func (MapConfig) GetStringMapString

func (cfg MapConfig) GetStringMapString(key string) map[string]string

func (MapConfig) GetStringSlice

func (cfg MapConfig) GetStringSlice(key string) []string

func (MapConfig) GetTime

func (cfg MapConfig) GetTime(key string) time.Time

func (MapConfig) IsSet

func (cfg MapConfig) IsSet(key string) bool

func (MapConfig) Set

func (cfg MapConfig) Set(key string, value interface{})

func (MapConfig) SetDefault

func (cfg MapConfig) SetDefault(key string, value interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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