config

package
v0.0.75 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: MIT Imports: 2 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 sdk for getting key values from settings file

func NewConfig

func NewConfig(defaults map[string]string) *Config

NewConfig initializes configuration from settings file

func (*Config) GetBool

func (config *Config) GetBool(key string) bool

GetBool returns boolean value set for a key passed to this function

func (*Config) GetInt

func (config *Config) GetInt(key string) int

GetInt return int value set for a key passed to this function

func (*Config) GetMap added in v0.0.54

func (config *Config) GetMap(key string) map[string]interface{}

GetMap returns the value associated with the key as a map of interfaces

func (*Config) GetMapString added in v0.0.52

func (config *Config) GetMapString(key string) map[string]string

GetMapString returns the value associated with the key as a map of strings

func (*Config) GetString

func (config *Config) GetString(key string) string

GetString return string value set for a key passed to this function

func (*Config) IsSet

func (config *Config) IsSet(key string) bool

IsSet checks if a key passed as a parameter has been set a value

Jump to

Keyboard shortcuts

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