Documentation
¶
Overview ¶
Package hash implements a kiwi.Value which can store a string-string hashmap.
Index ¶
Constants ¶
View Source
const ( // Insert inserts the key-value pair in hash map. // Updates the value if key is already present. // // Returns the added key string Insert kiwi.Action = "INSERT" // Remove removes the string(s) from the set. // // Returns an array of removed key strings. Remove kiwi.Action = "REMOVE" // Has checks if hash-map has the key. // // Returns boolean value. Has kiwi.Action = "HAS" // Len gets the length of the hash map. // // Returns an integer. Len kiwi.Action = "LEN" // Get gets the value of the given key(s). // // Returns an array of values. Get kiwi.Action = "GET" // Keys gets all the keys from the hash-map. // // Returns an array of keys. Keys kiwi.Action = "KEYS" // Map gets a copy of hash-map. // // Returns a hash-map. Map kiwi.Action = "MAP" )
View Source
const Type kiwi.ValueType = "hash"
Type of set value.
Variables ¶
View Source
var ( ErrInvalidParamLen = fmt.Errorf("not enough parameters") ErrInvalidParamType = fmt.Errorf("invalid paramater type") )
Various errors for hash value type.
Functions ¶
This section is empty.
Types ¶
type Value ¶
Value can store a string-string hash map.
It implements the kiwi.Value interface.
func (*Value) FromJSON ¶
func (v *Value) FromJSON(rawmessage json.RawMessage) error
FromJSON populates the s with the data from RawMessage