Documentation ¶
Index ¶
- func CommandBuilder(commandNameIn string, argsIn ...interface{}) (commandNameOut string, argsOut []interface{}, err error)
- func JSONArrAppend(conn redis.Conn, key string, path string, values ...interface{}) (res interface{}, err error)
- func JSONArrIndex(conn redis.Conn, key string, path string, scalar interface{}, start int, ...) (res interface{}, err error)
- func JSONArrLen(conn redis.Conn, key string, path string) (res interface{}, err error)
- func JSONArrPop(conn redis.Conn, key string, path string, index int) (res interface{}, err error)
- func JSONArrTrim(conn redis.Conn, key string, path string, start int, stop int) (res interface{}, err error)
- func JSONDebug(conn redis.Conn, subCommand string, arguments ...string) (res interface{}, err error)
- func JSONDel(conn redis.Conn, key string, path string) (res interface{}, err error)
- func JSONForget(conn redis.Conn, key string, path string) (res interface{}, err error)
- func JSONGet(conn redis.Conn, key string, path string, options ...string) (res interface{}, err error)
- func JSONMGet(conn redis.Conn, path string, keys ...string) (res interface{}, err error)
- func JSONNumIncrBy(conn redis.Conn, key string, path string, number int) (res interface{}, err error)
- func JSONNumMultBy(conn redis.Conn, key string, path string, number int) (res interface{}, err error)
- func JSONObjKeys(conn redis.Conn, key string, path string) (res interface{}, err error)
- func JSONObjLen(conn redis.Conn, key string, path string) (res interface{}, err error)
- func JSONResp(conn redis.Conn, key string, path string) (res interface{}, err error)
- func JSONSet(conn redis.Conn, key string, path string, obj interface{}, NX bool, XX bool) (res interface{}, err error)
- func JSONStrAppend(conn redis.Conn, key string, path string, jsonstring string) (res interface{}, err error)
- func JSONStrLen(conn redis.Conn, key string, path string) (res interface{}, err error)
- func JSONType(conn redis.Conn, key string, path string) (res interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandBuilder ¶
func CommandBuilder(commandNameIn string, argsIn ...interface{}) (commandNameOut string, argsOut []interface{}, err error)
CommandBuilder is used to build a command that can be used directly with redigo's conn.Do() This is especially useful if you do not need to conn.Do() and instead need to use the JSON.* commands in a MUTLI/EXEC scenario along with some other operations like GET/SET/HGET/HSET/...
func JSONArrAppend ¶
func JSONArrAppend(conn redis.Conn, key string, path string, values ...interface{}) (res interface{}, err error)
JSONArrAppend to append json value into array at path JSON.ARRAPPEND <key> <path> <json> [json ...]
func JSONArrIndex ¶
func JSONArrIndex(conn redis.Conn, key string, path string, scalar interface{}, start int, stop int) (res interface{}, err error)
JSON.ARRINDEX return the position of the scalar value in the array, or -1 if unfound. JSON.ARRINDEX <key> <path> <json-scalar> [start [stop]] The optional inclusive start (default 0) and exclusive stop (default 0, meaning that the last element is included) specify a slice of the array to search.
func JSONArrLen ¶
// JSONArrLen returns the length of the json array at path // JSON.ARRLEN <key> path
func JSONArrPop ¶
JSON.ARRPOP Remove and return element from the index in the array. JSON.ARRPOP <key> [path [index]] index is the position in the array to start popping from (defaults to -1, meaning the last element).
func JSONArrTrim ¶
func JSONArrTrim(conn redis.Conn, key string, path string, start int, stop int) (res interface{}, err error)
JSON.ARRTRIM Trim an array so that it contains only the specified inclusive range of elements. JSON.ARRTRIM <key> <path> <start> <stop>
func JSONDebug ¶
func JSONDebug(conn redis.Conn, subCommand string, arguments ...string) (res interface{}, err error)
JSON.DEBUG Supported subcommands are: MEMORY <key> path - report the memory usage in bytes of a value. path defaults to root if not provided. returns an integer, specifically the size in bytes of the value HELP - reply with a helpful message.returns an array, specifically with the help message JSON.DEBUG <subcommand & arguments>
func JSONForget ¶
JSON.FORGET An alias for JSON.DEL.
func JSONGet ¶
func JSONGet(conn redis.Conn, key string, path string, options ...string) (res interface{}, err error)
JSONGet used to get a json object JSON.GET <key>
[INDENT indentation-string] [NEWLINE line-break-string] [SPACE space-string] [NOESCAPE] [path ...]
func JSONMGet ¶
JSONMGet used to get path values from multiple keys JSON.MGET <key> [key ...] <path>
func JSONNumIncrBy ¶
func JSONNumIncrBy(conn redis.Conn, key string, path string, number int) (res interface{}, err error)
JSONNumIncrBy to increment a number by provided amount JSON.NUMINCRBY <key> <path> <number>
func JSONNumMultBy ¶
func JSONNumMultBy(conn redis.Conn, key string, path string, number int) (res interface{}, err error)
JSONNumMultBy to increment a number by provided amount JSON.NUMMULTBY <key> <path> <number>
func JSONObjKeys ¶
JSON.OBJKEYS Return the keys in the object that's referenced by path. JSON.OBJKEYS <key> path
func JSONObjLen ¶
JSON.OBJLEN Report the number of keys in the JSON Object at path in key. JSON.OBJLEN <key> path
func JSONResp ¶
JSON.RESP Return the JSON in key in Redis Serialization Protocol (RESP). JSON.RESP <key> path
func JSONSet ¶
func JSONSet(conn redis.Conn, key string, path string, obj interface{}, NX bool, XX bool) (res interface{}, err error)
JSONSet used to set a json object JSON.SET <key> <path> <json>
[NX | XX]
func JSONStrAppend ¶
func JSONStrAppend(conn redis.Conn, key string, path string, jsonstring string) (res interface{}, err error)
JSONStrAppend to append a jsonstring to an existing member JSON.STRAPPEND <key> path <json-string>
func JSONStrLen ¶
JSONStrLen to return the length of a string member JSON.STRLEN <key> path
Types ¶
This section is empty.