config

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: Apache-2.0 Imports: 4 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Raw []byte
	// contains filtered or unexported fields
}

Config defines the struct of a configuration in general.

func LoadConfigFile

func LoadConfigFile(filename string) (*Config, error)

LoadConfigFile loads config information from a JSON file.

func LoadConfigString

func LoadConfigString(s string) *Config

LoadConfigString loads config information from a JSON string.

func (*Config) GetArray

func (c *Config) GetArray(key string) []interface{}

GetArray returns an array for the config key.

func (*Config) GetBool

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

GetBool returns a bool value for the config key.

func (*Config) GetFloat

func (c *Config) GetFloat(key string) float64

GetFloat returns a float value for the config key.

func (*Config) GetInt

func (c *Config) GetInt(key string) int64

GetBool returns a int value for the config key.

func (*Config) GetInt64

func (c *Config) GetInt64(key string) int64

GetBool returns a int64 value for the config key.

func (*Config) GetString

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

GetString returns a string for the config key.

Jump to

Keyboard shortcuts

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