config

package
v0.0.0-...-73b106b Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TOMLConfig

type TOMLConfig struct{}

JSONConfig is a toml config parser and implements Config interface.

func (*TOMLConfig) Parse

func (js *TOMLConfig) Parse(filename string) (config.Configer, error)

func (*TOMLConfig) ParseData

func (js *TOMLConfig) ParseData(data []byte) (config.Configer, error)

type TOMLConfigContainer

type TOMLConfigContainer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*TOMLConfigContainer) Bool

func (c *TOMLConfigContainer) Bool(key string) (bool, error)

func (*TOMLConfigContainer) DIY

func (c *TOMLConfigContainer) DIY(key string) (interface{}, error)

func (*TOMLConfigContainer) DefaultBool

func (c *TOMLConfigContainer) DefaultBool(key string, defaultVal bool) bool

func (*TOMLConfigContainer) DefaultFloat

func (c *TOMLConfigContainer) DefaultFloat(key string, defaultVal float64) float64

func (*TOMLConfigContainer) DefaultInt

func (c *TOMLConfigContainer) DefaultInt(key string, defaultVal int) int

func (*TOMLConfigContainer) DefaultInt64

func (c *TOMLConfigContainer) DefaultInt64(key string, defaultVal int64) int64

func (*TOMLConfigContainer) DefaultString

func (c *TOMLConfigContainer) DefaultString(key string, defaultVal string) string

func (*TOMLConfigContainer) DefaultStrings

func (c *TOMLConfigContainer) DefaultStrings(key string, defaultVal []string) []string

func (*TOMLConfigContainer) Float

func (c *TOMLConfigContainer) Float(key string) (float64, error)

func (*TOMLConfigContainer) GetSection

func (c *TOMLConfigContainer) GetSection(section string) (map[string]string, error)

func (*TOMLConfigContainer) Int

func (c *TOMLConfigContainer) Int(key string) (int, error)

func (*TOMLConfigContainer) Int64

func (c *TOMLConfigContainer) Int64(key string) (int64, error)

func (*TOMLConfigContainer) SaveConfigFile

func (c *TOMLConfigContainer) SaveConfigFile(filename string) error

func (*TOMLConfigContainer) Set

func (c *TOMLConfigContainer) Set(key, val string) error

func (*TOMLConfigContainer) String

func (c *TOMLConfigContainer) String(key string) string

func (*TOMLConfigContainer) Strings

func (c *TOMLConfigContainer) Strings(key string) []string

Jump to

Keyboard shortcuts

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