Documentation
¶
Index ¶
- func MustToMap(st interface{}) map[string]interface{}
- func ParseReflectTags(rt reflect.Type, tagNames []string) (map[string]maputil.SMap, error)
- func ParseTagValueINI(field, tagStr string) (mp maputil.SMap, err error)
- func ParseTags(v interface{}, tagNames []string) (map[string]maputil.SMap, error)
- func ToMap(st interface{}) map[string]interface{}
- func TryToMap(st interface{}) (map[string]interface{}, error)
- type Aliases
- func (as *Aliases) AddAlias(real, alias string)
- func (as *Aliases) AddAliasMap(alias2real map[string]string)
- func (as *Aliases) AddAliases(real string, aliases []string)
- func (as *Aliases) HasAlias(alias string) bool
- func (as *Aliases) Mapping() map[string]string
- func (as *Aliases) ResolveAlias(alias string) string
- type DataStore
- func (d *DataStore) BoolVal(key string) bool
- func (d *DataStore) Data() map[string]interface{}
- func (d *DataStore) EnableLock() *DataStore
- func (d *DataStore) Get(key string) interface{}
- func (d *DataStore) GetVal(key string) interface{}
- func (d *DataStore) IntVal(key string) int
- func (d *DataStore) Len() int
- func (d *DataStore) Reset()
- func (d *DataStore) Set(key string, val interface{})
- func (d *DataStore) SetData(data map[string]interface{})
- func (d *DataStore) SetValue(key string, val interface{})
- func (d *DataStore) StrVal(key string) string
- func (d *DataStore) String() string
- func (d *DataStore) Value(key string) (val interface{}, ok bool)
- type TagParser
- type Value
- func (v Value) Bool() bool
- func (v Value) Float64() float64
- func (v Value) Int() int
- func (v Value) Int64() int64
- func (v Value) IsEmpty() bool
- func (v *Value) Reset()
- func (v *Value) Set(val interface{})
- func (v Value) SplitToInts(sep ...string) (ss []int)
- func (v Value) SplitToStrings(sep ...string) (ss []string)
- func (v Value) String() string
- func (v Value) Strings() (ss []string)
- func (v Value) Val() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustToMap ¶ added in v0.4.2
func MustToMap(st interface{}) map[string]interface{}
MustToMap alis of TryToMap, but will panic on error
func ParseReflectTags ¶ added in v0.3.10
ParseReflectTags parse struct tags info.
func ParseTagValueINI ¶ added in v0.3.13
ParseTagValueINI tag value string. is like INI format data
eg: "name=int0;shorts=i;required=true;desc=int option message"
Types ¶
type Aliases ¶
type Aliases struct { // Checker custom add alias name checker func Checker func(alias string) // should return bool OR error ?? // contains filtered or unexported fields }
Aliases implemented a simple string alias map.
func (*Aliases) AddAliasMap ¶
AddAliasMap to the Aliases
func (*Aliases) AddAliases ¶
AddAliases to the Aliases
func (*Aliases) ResolveAlias ¶
ResolveAlias by given name.
type DataStore ¶ added in v0.5.9
DataStore struct TODO
func (*DataStore) EnableLock ¶ added in v0.5.9
EnableLock for operate data
type Value ¶ added in v0.5.5
type Value struct {
// V value
V interface{}
}
Value data store
func (Value) SplitToInts ¶ added in v0.5.6
SplitToInts split string value to []int
func (Value) SplitToStrings ¶ added in v0.5.6
SplitToStrings split string value to strings
Click to show internal directories.
Click to hide internal directories.