Documentation ¶
Index ¶
- Constants
- func GetValueFromMapByType(optionMap map[string]interface{}, key string, valueType string) (value interface{}, err error)
- type Config
- func (c *Config) GetBool(key string) (b bool, err error)
- func (c *Config) GetInt64(key string) (i int64)
- func (c *Config) GetInt64SliceWithError(key string) (i int64, err error)
- func (c *Config) GetMap(key string) (keyMap map[string]interface{}, err error)
- func (c *Config) GetMapSlice(key string) (maps []map[string]interface{}, err error)
- func (c *Config) GetString(key string) (s string)
- func (c *Config) GetStringSlice(key string) (strings []string)
- func (c *Config) GetStringSliceWithError(key string) (strings []string, err error)
- func (c *Config) GetStringWithError(key string) (s string, err error)
Constants ¶
View Source
const ( // Int64Type represents int64 type Int64Type = "int64" // StringType represents string type StringType = "string" // BoolType represents bool type BoolType = "bool" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config contains a map loaded from t a json file
func (*Config) GetInt64 ¶
GetInt64 returns the value in the JSON cast to int64 (backward compatibility)
func (*Config) GetInt64SliceWithError ¶
GetInt64SliceWithError returns the value in the JSON cast to int64
func (*Config) GetMapSlice ¶
GetMapSlice returns map of strings and interface with error
func (*Config) GetString ¶
GetString returns the string value loaded from the JSON (backward compatibility)
func (*Config) GetStringSlice ¶
GetStringSlice returns the string value loaded from the JSON (backward compatibility)
func (*Config) GetStringSliceWithError ¶
GetStringSliceWithError returns the string value loaded from the JSON
Click to show internal directories.
Click to hide internal directories.