Documentation ¶
Index ¶
- type GoRedis
- func (r *GoRedis) JSONArrAppend(key, path string, values ...interface{}) (res interface{}, err error)
- func (r *GoRedis) JSONArrIndex(key, path string, jsonValue interface{}, optionalRange ...int) (res interface{}, err error)
- func (r *GoRedis) JSONArrInsert(key, path string, index int, values ...interface{}) (res interface{}, err error)
- func (r *GoRedis) JSONArrLen(key, path string) (res interface{}, err error)
- func (r *GoRedis) JSONArrPop(key, path string, index int) (res interface{}, err error)
- func (r *GoRedis) JSONArrTrim(key, path string, start, end int) (res interface{}, err error)
- func (r *GoRedis) JSONDebug(subcommand rjs.DebugSubCommand, key, path string) (res interface{}, err error)
- func (r *GoRedis) JSONDel(key string, path string) (res interface{}, err error)
- func (r *GoRedis) JSONForget(key, path string) (res interface{}, err error)
- func (r *GoRedis) JSONGet(key, path string, opts ...rjs.GetOption) (res interface{}, err error)
- func (r *GoRedis) JSONMGet(path string, keys ...string) (res interface{}, err error)
- func (r *GoRedis) JSONNumIncrBy(key, path string, number int) (res interface{}, err error)
- func (r *GoRedis) JSONNumMultBy(key, path string, number int) (res interface{}, err error)
- func (r *GoRedis) JSONObjKeys(key, path string) (res interface{}, err error)
- func (r *GoRedis) JSONObjLen(key, path string) (res interface{}, err error)
- func (r *GoRedis) JSONResp(key, path string) (res interface{}, err error)
- func (r *GoRedis) JSONSet(key string, path string, obj interface{}, opts ...rjs.SetOption) (res interface{}, err error)
- func (r *GoRedis) JSONStrAppend(key, path, jsonstring string) (res interface{}, err error)
- func (r *GoRedis) JSONStrLen(key, path string) (res interface{}, err error)
- func (r *GoRedis) JSONType(key, path string) (res interface{}, err error)
- type Redigo
- func (r *Redigo) JSONArrAppend(key, path string, values ...interface{}) (res interface{}, err error)
- func (r *Redigo) JSONArrIndex(key, path string, jsonValue interface{}, optionalRange ...int) (res interface{}, err error)
- func (r *Redigo) JSONArrInsert(key, path string, index int, values ...interface{}) (res interface{}, err error)
- func (r *Redigo) JSONArrLen(key, path string) (res interface{}, err error)
- func (r *Redigo) JSONArrPop(key, path string, index int) (res interface{}, err error)
- func (r *Redigo) JSONArrTrim(key, path string, start, end int) (res interface{}, err error)
- func (r *Redigo) JSONDebug(subcommand rjs.DebugSubCommand, key, path string) (res interface{}, err error)
- func (r *Redigo) JSONDel(key string, path string) (res interface{}, err error)
- func (r *Redigo) JSONForget(key, path string) (res interface{}, err error)
- func (r *Redigo) JSONGet(key, path string, opts ...rjs.GetOption) (res interface{}, err error)
- func (r *Redigo) JSONMGet(path string, keys ...string) (res interface{}, err error)
- func (r *Redigo) JSONNumIncrBy(key, path string, number int) (res interface{}, err error)
- func (r *Redigo) JSONNumMultBy(key, path string, number int) (res interface{}, err error)
- func (r *Redigo) JSONObjKeys(key, path string) (res interface{}, err error)
- func (r *Redigo) JSONObjLen(key, path string) (res interface{}, err error)
- func (r *Redigo) JSONResp(key, path string) (res interface{}, err error)
- func (r *Redigo) JSONSet(key string, path string, obj interface{}, opts ...rjs.SetOption) (res interface{}, err error)
- func (r *Redigo) JSONStrAppend(key, path, jsonstring string) (res interface{}, err error)
- func (r *Redigo) JSONStrLen(key, path string) (res interface{}, err error)
- func (r *Redigo) JSONType(key, path string) (res interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoRedis ¶
GoRedis implements ReJSON interface for Go-Redis/Redis Redis client Link: https://github.com/go-redis/redis
func (*GoRedis) JSONArrAppend ¶
func (r *GoRedis) JSONArrAppend(key, path string, values ...interface{}) (res interface{}, err error)
JSONArrAppend to append json value into array at path
ReJSON syntax:
JSON.ARRAPPEND <key> <path> <json> [json ...]
func (*GoRedis) JSONArrIndex ¶
func (r *GoRedis) JSONArrIndex(key, path string, jsonValue interface{}, optionalRange ...int) (res interface{}, err error)
JSONArrIndex returns the index of the json element provided and return -1 if element is not present
ReJSON syntax:
JSON.ARRINDEX <key> <path> <json-scalar> [start [stop]]
func (*GoRedis) JSONArrInsert ¶
func (r *GoRedis) JSONArrInsert(key, path string, index int, values ...interface{}) (res interface{}, err error)
JSONArrInsert inserts the json value(s) into the array at path before the index (shifts to the right).
ReJSON syntax:
JSON.ARRINSERT <key> <path> <index> <json> [json ...]
func (*GoRedis) JSONArrLen ¶
JSONArrLen returns the length of the json array at path
ReJSON syntax:
JSON.ARRLEN <key> [path]
func (*GoRedis) JSONArrPop ¶
JSONArrPop removes and returns element from the index in the array to pop last element use rejson.PopArrLast
ReJSON syntax:
JSON.ARRPOP <key> [path [index]]
func (*GoRedis) JSONArrTrim ¶
JSONArrTrim trims an array so that it contains only the specified inclusive range of elements
ReJSON syntax:
JSON.ARRTRIM <key> <path> <start> <stop>
func (*GoRedis) JSONDebug ¶
func (r *GoRedis) JSONDebug(subcommand rjs.DebugSubCommand, key, path string) (res interface{}, err error)
JSONDebug reports information
ReJSON syntax:
JSON.DEBUG <subcommand & arguments> JSON.DEBUG MEMORY <key> [path] - report the memory usage in bytes of a value. path defaults to root if not provided. JSON.DEBUG HELP - reply with a helpful message
func (*GoRedis) JSONForget ¶
JSONForget is an alias for JSONDel
ReJSON syntax:
JSON.FORGET <key> [path]
func (*GoRedis) JSONGet ¶
JSONGet used to get a json object
ReJSON syntax:
JSON.GET <key> [INDENT indentation-string] [NEWLINE line-break-string] [SPACE space-string] [NOESCAPE] [path ...]
func (*GoRedis) JSONMGet ¶
JSONMGet used to get path values from multiple keys
ReJSON syntax:
JSON.MGET <key> [key ...] <path>
func (*GoRedis) JSONNumIncrBy ¶
JSONNumIncrBy to increment a number by provided amount
ReJSON syntax:
JSON.NUMINCRBY <key> <path> <number>
func (*GoRedis) JSONNumMultBy ¶
JSONNumMultBy to increment a number by provided amount
ReJSON syntax:
JSON.NUMMULTBY <key> <path> <number>
func (*GoRedis) JSONObjKeys ¶
JSONObjKeys returns the keys in the object that's referenced by path
ReJSON syntax:
JSON.OBJKEYS <key> [path]
func (*GoRedis) JSONObjLen ¶
JSONObjLen report the number of keys in the JSON Object at path in key
ReJSON syntax:
JSON.OBJLEN <key> [path]
func (*GoRedis) JSONResp ¶
JSONResp returns the JSON in key in Redis Serialization Protocol (RESP).
ReJSON syntax:
JSON.RESP <key> [path]
func (*GoRedis) JSONSet ¶
func (r *GoRedis) JSONSet(key string, path string, obj interface{}, opts ...rjs.SetOption) (res interface{}, err error)
JSONSet used to set a json object
ReJSON syntax:
JSON.SET <key> <path> <json> [NX | XX]
func (*GoRedis) JSONStrAppend ¶
JSONStrAppend to append a jsonstring to an existing member
ReJSON syntax:
JSON.STRAPPEND <key> [path] <json-string>
func (*GoRedis) JSONStrLen ¶
JSONStrLen to return the length of a string member
ReJSON syntax:
JSON.STRLEN <key> [path]
type Redigo ¶
Redigo implements ReJSON interface for GoModule/Redigo Redis client Link: https://github.com/gomodule/redigo
func (*Redigo) JSONArrAppend ¶
func (r *Redigo) JSONArrAppend(key, path string, values ...interface{}) (res interface{}, err error)
JSONArrAppend used to append json value into array at path
ReJSON syntax:
JSON.ARRAPPEND <key> <path> <json> [json ...]
func (*Redigo) JSONArrIndex ¶
func (r *Redigo) JSONArrIndex(key, path string, jsonValue interface{}, optionalRange ...int) (res interface{}, err error)
JSONArrIndex returns the index of the json element provided and return -1 if element is not present
ReJSON syntax:
JSON.ARRINDEX <key> <path> <json-scalar> [start [stop]]
func (*Redigo) JSONArrInsert ¶
func (r *Redigo) JSONArrInsert(key, path string, index int, values ...interface{}) (res interface{}, err error)
JSONArrInsert inserts the json value(s) into the array at path before the index (shifts to the right).
ReJSON syntax:
JSON.ARRINSERT <key> <path> <index> <json> [json ...]
func (*Redigo) JSONArrLen ¶
JSONArrLen returns the length of the json array at path
ReJSON syntax:
JSON.ARRLEN <key> [path]
func (*Redigo) JSONArrPop ¶
JSONArrPop removes and returns element from the index in the array to pop last element use rejson.PopArrLast
ReJSON syntax:
JSON.ARRPOP <key> [path [index]]
func (*Redigo) JSONArrTrim ¶
JSONArrTrim trims an array so that it contains only the specified inclusive range of elements
ReJSON syntax:
JSON.ARRTRIM <key> <path> <start> <stop>
func (*Redigo) JSONDebug ¶
func (r *Redigo) JSONDebug(subcommand rjs.DebugSubCommand, key, path string) (res interface{}, err error)
JSONDebug reports information
ReJSON syntax:
JSON.DEBUG <subcommand & arguments> JSON.DEBUG MEMORY <key> [path] - report the memory usage in bytes of a value. path defaults to root if not provided. JSON.DEBUG HELP - reply with a helpful message
func (*Redigo) JSONForget ¶
JSONForget is an alias for JSONDel
ReJSON syntax:
JSON.FORGET <key> [path]
func (*Redigo) JSONGet ¶
JSONGet used to get a json object
ReJSON syntax:
JSON.GET <key> [INDENT indentation-string] [NEWLINE line-break-string] [SPACE space-string] [NOESCAPE] [path ...]
func (*Redigo) JSONMGet ¶
JSONMGet used to get path values from multiple keys
ReJSON syntax:
JSON.MGET <key> [key ...] <path>
func (*Redigo) JSONNumIncrBy ¶
JSONNumIncrBy used to increment a number by provided amount
ReJSON syntax:
JSON.NUMINCRBY <key> <path> <number>
func (*Redigo) JSONNumMultBy ¶
JSONNumMultBy to multiply a number by provided amount
ReJSON syntax:
JSON.NUMMULTBY <key> <path> <number>
func (*Redigo) JSONObjKeys ¶
JSONObjKeys returns the keys in the object that's referenced by path
ReJSON syntax:
JSON.OBJKEYS <key> [path]
func (*Redigo) JSONObjLen ¶
JSONObjLen report the number of keys in the JSON Object at path in key
ReJSON syntax:
JSON.OBJLEN <key> [path]
func (*Redigo) JSONResp ¶
JSONResp returns the JSON in key in Redis Serialization Protocol (RESP).
ReJSON syntax:
JSON.RESP <key> [path]
func (*Redigo) JSONSet ¶
func (r *Redigo) JSONSet(key string, path string, obj interface{}, opts ...rjs.SetOption) (res interface{}, err error)
JSONSet used to set a json object
ReJSON syntax:
JSON.SET <key> <path> <json> [NX | XX]
func (*Redigo) JSONStrAppend ¶
JSONStrAppend used to append a jsonstring to an existing member
ReJSON syntax:
JSON.STRAPPEND <key> [path] <json-string>
func (*Redigo) JSONStrLen ¶
JSONStrLen used to return the length of a string member
ReJSON syntax:
JSON.STRLEN <key> [path]