Documentation
¶
Index ¶
- func AppendStringArg(args []interface{}, name, value string) []interface{}
- func ExtractJSONValue(val string) ([]interface{}, error)
- func Float64(arg interface{}) (float64, error)
- func Int64(arg interface{}) (int64, error)
- func SerializeCountedArgs(name string, incZero bool, args []string) []interface{}
- func StringToDurationHookFunc() mapstructure.DecodeHookFunc
- func StringToMapHookFunc() mapstructure.DecodeHookFunc
- func ToMap(i interface{}) map[interface{}]interface{}
- func ToStringMap(input []interface{}) map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendStringArg ¶
func AppendStringArg(args []interface{}, name, value string) []interface{}
AppendStringArg appends the name and value if value is not empty
func ExtractJSONValue ¶
func Float64 ¶
Float64 takes an interface value and tries to convert it to a float64. We only look at types Redis might return
func Int64 ¶
Int64 takes an interface value and tries to convert it to an int64. We only look at types Redis might return.
func SerializeCountedArgs ¶
SerializeCountedArgs is used to serialize a string array to NAME <count> values. If incZero is true then NAME 0 will be generated otherwise empty results will not be generated.
func StringToDurationHookFunc ¶
func StringToDurationHookFunc() mapstructure.DecodeHookFunc
StringToDurationHookFunc returns a function that decodes strings to time.Duration (given that the input is in milliseconds)
func StringToMapHookFunc ¶
func StringToMapHookFunc() mapstructure.DecodeHookFunc
SliceToMapHookFunc returns a function that converts a slice to a map[string]interface{} if and only if the output is struct
func ToMap ¶
func ToMap(i interface{}) map[interface{}]interface{}
ToMap converts an interface containing a slice of key/value pairs returned from redis into a map[interface{}]interface{}. If the interface passed in is already a map, return it. Otherwise returns an empty interface (buyer beware)
func ToStringMap ¶
func ToStringMap(input []interface{}) map[string]interface{}
ToStringMap simply converts a slice of key/value pairs returned from Redis into a map[string]interface{}
Types ¶
This section is empty.