Documentation
¶
Index ¶
- Variables
- func GetAny(event_map *Dict, members string) (interface{}, bool)
- func GetInt(event_map *Dict, members string) (int, bool)
- func GetString(event_map *Dict, members string) (string, bool)
- type Dict
- func (self *Dict) AliasField(src, dest string) *Dict
- func (self *Dict) Clear()
- func (self *Dict) Copy() *Dict
- func (self *Dict) DebugString() string
- func (self *Dict) Delete(key string)
- func (self *Dict) Get(key string) (interface{}, bool)
- func (self *Dict) GetBool(key string) (bool, bool)
- func (self *Dict) GetDefault() interface{}
- func (self *Dict) GetInt64(key string) (int64, bool)
- func (self *Dict) GetString(key string) (string, bool)
- func (self *Dict) GetStrings(key string) ([]string, bool)
- func (self *Dict) GoString() string
- func (self *Dict) IsCaseInsensitive() bool
- func (self *Dict) Items() []Item
- func (self *Dict) Keys() (res []string)
- func (self *Dict) Len() int
- func (self *Dict) MarshalJSON() ([]byte, error)
- func (self *Dict) MarshalYAML() (interface{}, error)
- func (self *Dict) MergeFrom(other *Dict)
- func (self *Dict) Set(key string, value interface{}) *Dict
- func (self *Dict) SetCaseInsensitive() *Dict
- func (self *Dict) SetDefault(value interface{}) *Dict
- func (self *Dict) String() string
- func (self *Dict) ToMap() map[string]interface{}
- func (self *Dict) UnmarshalJSON(data []byte) error
- func (self *Dict) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (self *Dict) Update(key string, value interface{}) *Dict
- func (self *Dict) Values() []interface{}
- type Item
Constants ¶
This section is empty.
Variables ¶
var ( // Mark the item as deleted Deleted = 1 CompactionThreashold = 10 // Keep stats about compactions - mostly used for tests Compactions uint64 )
Functions ¶
Types ¶
type Dict ¶
A concerete implementation of a row - similar to Python's OrderedDict. Main difference is that delete is implemented by recording a deletion - this means it is slightly less memory efficient to delete as we expect deletes to be relatively rare.
func (*Dict) AliasField ¶
func (*Dict) DebugString ¶
func (*Dict) GetDefault ¶
func (self *Dict) GetDefault() interface{}
func (*Dict) IsCaseInsensitive ¶
func (*Dict) MarshalJSON ¶
Preserve key order when marshalling to JSON.
func (*Dict) MarshalYAML ¶
func (*Dict) Set ¶
Set inserts the value into the dict. This function also reorders the dict to make the new key the latest. If the key is already present, this is equivalent to a Delete() on the old key and an Update(). If the caller calls Set repeatadly on the same key this can result in a lot of compactions. In this case consider using Update() instead.
func (*Dict) SetCaseInsensitive ¶
func (*Dict) SetDefault ¶
func (*Dict) UnmarshalJSON ¶
this implements type json.Unmarshaler interface, so can be called in json.Unmarshal(data, om). We preserve key order when unmarshaling from JSON.