client

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 9 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 {
	Addr string // db server address
}

Client is a grpc client

func (*Client) Append added in v1.0.9

func (c *Client) Append(key string, value string) error

func (*Client) Decr added in v1.0.9

func (c *Client) Decr(key string) error

func (*Client) DecrBy added in v1.0.9

func (c *Client) DecrBy(key string, amount int64) error

func (*Client) Del

func (c *Client) Del(key string) error

Del deletes a key-value pair from the db by client api

func (*Client) Exists added in v1.0.9

func (c *Client) Exists(key string) (bool, error)

func (*Client) Expire added in v1.0.9

func (c *Client) Expire(key string, ttl int64) error

func (*Client) Get

func (c *Client) Get(key string) (interface{}, error)

Get gets a value by key from the db by client api

func (*Client) GetSet added in v1.0.9

func (c *Client) GetSet(key string, value interface{}) (interface{}, error)

func (*Client) HDecrBy added in v1.0.9

func (c *Client) HDecrBy(key, field string, value int64) (int64, error)

func (*Client) HDel added in v1.0.9

func (c *Client) HDel(key, field string) error

HDel deletes a key-value pair from the db by client api

func (*Client) HExists added in v1.0.9

func (c *Client) HExists(key, field string) (bool, error)

func (*Client) HGet added in v1.0.9

func (c *Client) HGet(key, field string) (interface{}, error)

HGet gets a value by key from the db by client api

func (*Client) HIncrBy added in v1.0.9

func (c *Client) HIncrBy(key, field string, value int64) (int64, error)

func (*Client) HIncrByFloat added in v1.0.9

func (c *Client) HIncrByFloat(key, field string, value float64) (float64, error)

func (*Client) HLen added in v1.0.9

func (c *Client) HLen(key string) (int64, error)

func (*Client) HMove added in v1.0.9

func (c *Client) HMove(key, dest, field string) error

func (*Client) HSet added in v1.0.9

func (c *Client) HSet(key, field string, value interface{}) error

HSet puts a key-value pair into the db by client api

func (*Client) HSetNX added in v1.0.9

func (c *Client) HSetNX(key, field string, value interface{}) error

func (*Client) HStrLen added in v1.0.9

func (c *Client) HStrLen(key, field string) (int64, error)

func (*Client) HType added in v1.0.9

func (c *Client) HType(key, field string) (string, error)

func (*Client) HUpdate added in v1.0.9

func (c *Client) HUpdate(key, field string, value interface{}) error

func (*Client) Incr added in v1.0.9

func (c *Client) Incr(key string) error

func (*Client) IncrBy added in v1.0.9

func (c *Client) IncrBy(key string, amount int64) error

func (*Client) IncrByFloat added in v1.0.9

func (c *Client) IncrByFloat(key string, amount float64) error

func (*Client) LIndex added in v1.0.10

func (c *Client) LIndex(key string, index int) (interface{}, error)

func (*Client) LLen added in v1.0.10

func (c *Client) LLen(key string) (int32, error)

func (*Client) LPop added in v1.0.10

func (c *Client) LPop(key string) (interface{}, error)

func (*Client) LPush added in v1.0.10

func (c *Client) LPush(key string, value interface{}) error

func (*Client) LPushs added in v1.0.10

func (c *Client) LPushs(key string, values []interface{}) error

func (*Client) LRange added in v1.0.10

func (c *Client) LRange(key string, start, stop int) ([]interface{}, error)

func (*Client) LRem added in v1.0.10

func (c *Client) LRem(key string, count int32, value interface{}) error

func (*Client) LSet added in v1.0.10

func (c *Client) LSet(key string, index int, value interface{}) error

func (*Client) LTrim added in v1.0.10

func (c *Client) LTrim(key string, start, stop int) error

func (*Client) MGet added in v1.0.9

func (c *Client) MGet(keys []string) ([]interface{}, error)

func (*Client) MSet added in v1.0.11

func (c *Client) MSet(pairs ...interface{}) error

func (*Client) MSetNX added in v1.0.11

func (c *Client) MSetNX(pairs ...interface{}) error

func (*Client) Persist added in v1.0.9

func (c *Client) Persist(key string) error

func (*Client) Put

func (c *Client) Put(key string, value interface{}) error

Put puts a key-value pair into the db by client api

func (*Client) RPop added in v1.0.10

func (c *Client) RPop(key string) (interface{}, error)

func (*Client) RPush added in v1.0.10

func (c *Client) RPush(key string, value interface{}) error

func (*Client) RPushs added in v1.0.10

func (c *Client) RPushs(key string, values []interface{}) error

func (*Client) SAdd added in v1.0.13

func (c *Client) SAdd(key, member string) error

func (*Client) SAdds added in v1.0.13

func (c *Client) SAdds(key string, members []string) error

func (*Client) SCard added in v1.0.13

func (c *Client) SCard(key string) (int32, error)

func (*Client) SDiff added in v1.0.13

func (c *Client) SDiff(keys []string) ([]string, error)

func (*Client) SInter added in v1.0.13

func (c *Client) SInter(keys []string) ([]string, error)

func (*Client) SInterStore added in v1.0.13

func (c *Client) SInterStore(destinationKey string, keys []string) error

func (*Client) SIsMember added in v1.0.13

func (c *Client) SIsMember(key, member string) (bool, error)

func (*Client) SMembers added in v1.0.13

func (c *Client) SMembers(key string) ([]string, error)

func (*Client) SRem added in v1.0.13

func (c *Client) SRem(key, member string) error

func (*Client) SRems added in v1.0.13

func (c *Client) SRems(key string, members []string) error

func (*Client) SUnion added in v1.0.13

func (c *Client) SUnion(keys []string) ([]string, error)

func (*Client) SUnionStore added in v1.0.13

func (c *Client) SUnionStore(destination string, keys []string) error

func (*Client) StrLen added in v1.0.9

func (c *Client) StrLen(key string) (int32, error)

func (*Client) Type added in v1.0.8

func (c *Client) Type(key string) (string, error)

Jump to

Keyboard shortcuts

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