Documentation
¶
Index ¶
- func ToStringMapSlice(i interface{}) ([]map[string]interface{}, error)
- type Entity
- func (entity *Entity) Get(key string) interface{}
- func (entity *Entity) GetBool(key string) bool
- func (entity *Entity) GetData() map[string]interface{}
- func (entity *Entity) GetDuration(key string) time.Duration
- func (entity *Entity) GetFloat64(key string) float64
- func (entity *Entity) GetInt(key string) int
- func (entity *Entity) GetInt32(key string) int32
- func (entity *Entity) GetInt64(key string) int64
- func (entity *Entity) GetIntSlice(key string) []int
- func (entity *Entity) GetSizeInBytes(key string) uint
- func (entity *Entity) GetSlice(key string) []interface{}
- func (entity *Entity) GetString(key string) string
- func (entity *Entity) GetStringMap(key string) map[string]interface{}
- func (entity *Entity) GetStringMapSlice(key string) []map[string]interface{}
- func (entity *Entity) GetStringMapString(key string) map[string]string
- func (entity *Entity) GetStringMapStringSlice(key string) map[string][]string
- func (entity *Entity) GetStringSlice(key string) []string
- func (entity *Entity) GetTime(key string) time.Time
- func (entity *Entity) GetUint(key string) uint
- func (entity *Entity) GetUint32(key string) uint32
- func (entity *Entity) GetUint64(key string) uint64
- func (entity *Entity) Set(key string, value interface{}) *Entity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToStringMapSlice ¶
ToStringMapSlice casts an interface to a []map[string]interface{} type.
Types ¶
type Entity ¶
type Entity struct {
// contains filtered or unexported fields
}
Entity is json access type like github.com/spf13/viper
func (*Entity) Get ¶
Get can retrieve any value given the key to use. Get returns an interface. For a specific value use one of the Get____ methods.
func (*Entity) GetDuration ¶
GetDuration returns the value associated with the key as a duration.
func (*Entity) GetFloat64 ¶
GetFloat64 returns the value associated with the key as a float64.
func (*Entity) GetIntSlice ¶
GetIntSlice returns the value associated with the key as a slice of int values.
func (*Entity) GetSizeInBytes ¶
GetSizeInBytes returns the size of the value associated with the given key in bytes.
func (*Entity) GetStringMap ¶
GetStringMap returns the value associated with the key as a map of interfaces.
func (*Entity) GetStringMapSlice ¶
GetStringMapSlice returns the value associated with the key as a []map[string]interface{} slice.
func (*Entity) GetStringMapString ¶
GetStringMapString returns the value associated with the key as a map of strings.
func (*Entity) GetStringMapStringSlice ¶
GetStringMapStringSlice returns the value associated with the key as a map to a slice of strings.
func (*Entity) GetStringSlice ¶
GetStringSlice returns the value associated with the key as a slice of strings.
func (*Entity) GetUint32 ¶
GetUint32 returns the value associated with the key as an unsigned integer.