rejson

package
v0.0.0-...-d879545 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*redis.Client
	// contains filtered or unexported fields
}

Client is an extended redis.Client, stores a pointer to the original redis.Client

func ExtendClient

func ExtendClient(client *redis.Client) *Client

func (Client) JSONDel

func (cl Client) JSONDel(ctx context.Context, key, path string) *redis.IntCmd

JsonDel returns intCmd -> deleted 1 or 0 read more: https://oss.redislabs.com/rejson/commands/#jsondel

func (Client) JSONGet

func (cl Client) JSONGet(ctx context.Context, key string, args ...interface{}) *redis.StringCmd

JSONGet

Possible args:

(Optional) INDENT + indent-string (Optional) NEWLINE + line-break-string (Optional) SPACE + space-string (Optional) NOESCAPE (Optional) path ...string

returns stringCmd -> the JSON string read more: https://oss.redislabs.com/rejson/commands/#jsonget

func (Client) JSONNUMINCRBy

func (cl Client) JSONNUMINCRBy(ctx context.Context, key, path string, num int) *redis.StringCmd

func (Client) JSONSet

func (cl Client) JSONSet(ctx context.Context, key, path, jsonData string, args ...interface{}) *redis.StatusCmd

jsonSet Possible args: (Optional)

func (*Client) JSONSetWithExpire

func (cl *Client) JSONSetWithExpire(ctx context.Context,
	key, path string, object interface{}, expiration time.Duration, args ...interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL