Documentation ¶
Index ¶
- func AllNonExpiredCache(cache *gocache.Cache) map[string]gocache.Item
- func Flatten(input interface{}, delimiter string) (flat map[string]interface{}, err error)
- type TSafeMapBytes
- type TSafeMapCounter
- type TSafeMapString
- type TSafeMapStrings
- func (mp *TSafeMapStrings) All() map[string][]string
- func (mp *TSafeMapStrings) Append(key string, value string)
- func (mp *TSafeMapStrings) Exists(key string) bool
- func (mp *TSafeMapStrings) Get(key string) []string
- func (mp *TSafeMapStrings) Reset(key string)
- func (mp *TSafeMapStrings) Set(key string, value []string)
- func (mp *TSafeMapStrings) ToJson() ([]byte, error)
- type TSafeNestedMapInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TSafeMapBytes ¶
TSafeMapBytes is concurrency-safe map of bytes.
func NewTSafeMapBytes ¶
func NewTSafeMapBytes(data map[string][]byte) *TSafeMapBytes
NewTSafeMapBytes creates an instance of TSafeMapBytes
func (*TSafeMapBytes) All ¶
func (mp *TSafeMapBytes) All() map[string][]byte
All returns all values.
func (*TSafeMapBytes) ToJson ¶
func (mp *TSafeMapBytes) ToJson() ([]byte, error)
ToJson returns the JSON encoded map.
type TSafeMapCounter ¶
TSafeMapCounter is concurrency-safe map of counter.
func NewTSafeMapCounter ¶
func NewTSafeMapCounter(data map[string]int) *TSafeMapCounter
NewTSafeMapCounter creates an instance of TSafeMapCounter
func (*TSafeMapCounter) All ¶
func (mp *TSafeMapCounter) All() map[string]int
All returns all count values.
func (*TSafeMapCounter) Incr ¶
func (mp *TSafeMapCounter) Incr(key string, value int)
Incr increments value by X.
func (*TSafeMapCounter) Reset ¶
func (mp *TSafeMapCounter) Reset(key string)
Reset wipes count data to 0.
func (*TSafeMapCounter) ToJson ¶
func (mp *TSafeMapCounter) ToJson() ([]byte, error)
ToJson returns JSON encoded values.
type TSafeMapString ¶
TSafeMapString is concurrency-safe map of string.
func NewTSafeMapString ¶
func NewTSafeMapString(data map[string]string) *TSafeMapString
NewTSafeMapString creates an instance of TSafeMapString
func (*TSafeMapString) All ¶
func (mp *TSafeMapString) All() map[string]string
All returns all values in map.
func (*TSafeMapString) ToJson ¶
func (mp *TSafeMapString) ToJson() ([]byte, error)
ToJson returns the JSON encoded values.
type TSafeMapStrings ¶
TSafeMapStrings is concurrency-safe map of []string.
func NewTSafeMapStrings ¶
func NewTSafeMapStrings(data map[string][]string) *TSafeMapStrings
NewTSafeMapStrings returns instance of TSafeMapStrings
func (*TSafeMapStrings) All ¶
func (mp *TSafeMapStrings) All() map[string][]string
All returns all values.
func (*TSafeMapStrings) Append ¶
func (mp *TSafeMapStrings) Append(key string, value string)
Append to slice by key.
func (*TSafeMapStrings) Exists ¶
func (mp *TSafeMapStrings) Exists(key string) bool
Exists check existance of a key
func (*TSafeMapStrings) Get ¶
func (mp *TSafeMapStrings) Get(key string) []string
Get a slice of value.
func (*TSafeMapStrings) Reset ¶
func (mp *TSafeMapStrings) Reset(key string)
Reset wipes all values.
func (*TSafeMapStrings) ToJson ¶
func (mp *TSafeMapStrings) ToJson() ([]byte, error)
ToJson returns JSON encoded values.
type TSafeNestedMapInterface ¶
TSafeNestedMapInterface is concurrency-safe map of interface.
func NewTSafeNestedMapInterface ¶
func NewTSafeNestedMapInterface(data map[string]interface{}) *TSafeNestedMapInterface
NewTSafeNestedMapInterface creates an instance of TSafeNestedMapInterface
func (*TSafeNestedMapInterface) All ¶
func (mp *TSafeNestedMapInterface) All() map[string]interface{}
All returns all values.
func (*TSafeNestedMapInterface) Get ¶
func (mp *TSafeNestedMapInterface) Get(key string) interface{}
Get value.
func (*TSafeNestedMapInterface) Set ¶
func (mp *TSafeNestedMapInterface) Set(key string, value interface{})
Set value.
func (*TSafeNestedMapInterface) ToJson ¶
func (mp *TSafeNestedMapInterface) ToJson() ([]byte, error)
ToJson returns JSON encoded values.