config

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string) (interface{}, error)

Get returns the value of the key

func GetBool

func GetBool(key string) (bool, error)

GetBool returns the bool value of the key

func GetFloat64

func GetFloat64(key string) (float64, error)

GetFloat64 returns the float64 value of the key

func GetInt64

func GetInt64(key string) (int64, error)

GetInt64 returns the int64 value of the key

func GetString

func GetString(key string) (string, error)

GetString returns the string value of the key

func Set

func Set(key string, value interface{}) error

Set a key and a value to config

func Setup

func Setup(c Config) error

Setup set's up a new config to the global state

Types

type Config

type Config interface {
	Set(key string, value interface{}) error
	Get(key string) (interface{}, error)
	GetBool(key string) (bool, error)
	GetInt64(key string) (int64, error)
	GetString(key string) (string, error)
	GetFloat64(key string) (float64, error)
}

Config interface which has to be implemented in order to be used here

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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