Documentation ¶
Index ¶
- type Dict
- func (d Dict) Bool(key string, def *bool) (r bool, err error)
- func (d Dict) BoolSlice(key string) (r []bool, err error)
- func (d Dict) Float(key string, def *float64) (r float64, err error)
- func (d Dict) FloatSlice(key string) (r []float64, err error)
- func (d Dict) Int(key string, def *int) (r int, err error)
- func (d Dict) IntSlice(key string) (r []int, err error)
- func (d Dict) Interface(key string) (r interface{}, ok bool)
- func (d Dict) Map(key string) (r Dicter, err error)
- func (d Dict) MapSlice(key string) (r []Dicter, err error)
- func (d Dict) String(key string, def *string) (r string, err error)
- func (d Dict) StringSlice(key string) (r []string, err error)
- func (d Dict) Uint(key string, def *uint) (r uint, err error)
- func (d Dict) UintSlice(key string) (r []uint, err error)
- type Dicter
- type ErrKeyRequired
- type ErrKeyType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dict ¶
type Dict map[string]interface{}
Dict is a pass-through implementation of the Dicter interface
type Dicter ¶
type Dicter interface { String(key string, Default *string) (string, error) StringSlice(key string) ([]string, error) Bool(key string, Default *bool) (bool, error) BoolSlice(key string) ([]bool, error) Int(key string, Default *int) (int, error) IntSlice(key string) ([]int, error) Uint(key string, Default *uint) (uint, error) UintSlice(key string) ([]uint, error) Float(key string, Default *float64) (float64, error) FloatSlice(key string) ([]float64, error) Map(key string) (Dicter, error) MapSlice(key string) ([]Dicter, error) Interface(key string) (v interface{}, ok bool) }
Dicter is an abstraction over map[string]interface{} with the intent of allowing manipulation between the underlying data and requests for that data.
type ErrKeyRequired ¶
type ErrKeyRequired string
ErrKeyRequired is used to communicate a map miss and Dicter implementations should set the value as the missed key
func (ErrKeyRequired) Error ¶
func (err ErrKeyRequired) Error() string
type ErrKeyType ¶
ErrKeyType is used to communicate the value requested cannot be converted/coerced/manipulated according to the method call. TODO: rename to ErrType
func (ErrKeyType) Error ¶
func (err ErrKeyType) Error() string
Click to show internal directories.
Click to hide internal directories.