Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) AddInt(ctx context.Context, name string, add int64) (int64, error)
- func (c *Client) Close() error
- func (c *Client) DBSize(ctx context.Context) (int64, error)
- func (c *Client) Delete(ctx context.Context, name string) (bool, error)
- func (c *Client) Exists(ctx context.Context, name string) (bool, error)
- func (c *Client) Expire(ctx context.Context, name string, ttl time.Duration) error
- func (c *Client) FlushDB(ctx context.Context) error
- func (c *Client) Get(ctx context.Context, name string) (*string, error)
- func (c *Client) GetSet(ctx context.Context, name string, value string) (string, error)
- func (c *Client) Keys(ctx context.Context, glob string) ([]string, error)
- func (c *Client) ListAt(ctx context.Context, name string, index int64) (string, error)
- func (c *Client) ListLength(ctx context.Context, name string) (int64, error)
- func (c *Client) ListPop(ctx context.Context, name string, length int64) ([]string, error)
- func (c *Client) ListPush(ctx context.Context, name string, values ...string) (int64, error)
- func (c *Client) ListRange(ctx context.Context, name string, start int64, end int64) ([]string, error)
- func (c *Client) ListRemove(ctx context.Context, name string, count int64, element string) (int64, error)
- func (c *Client) ListSet(ctx context.Context, name string, index int64, element string) error
- func (c *Client) ListShift(ctx context.Context, name string, length int64) ([]string, error)
- func (c *Client) ListSort(ctx context.Context, name string) ([]string, error)
- func (c *Client) ListTrim(ctx context.Context, name string, start int64, end int64) error
- func (c *Client) ListUnshift(ctx context.Context, name string, values ...string) (int64, error)
- func (c *Client) MGet(ctx context.Context, names ...string) ([]*string, error)
- func (c *Client) MSet(ctx context.Context, pairs ...[2]string) error
- func (c *Client) RandomKey(ctx context.Context) (string, error)
- func (c *Client) Rename(ctx context.Context, current string, next string) error
- func (c *Client) RenameIfNotExists(ctx context.Context, current string, next string) error
- func (c *Client) Set(ctx context.Context, name string, value any, ttl time.Duration) error
- func (c *Client) SetAdd(ctx context.Context, name string, values ...string) (int64, error)
- func (c *Client) SetContains(ctx context.Context, name string, element string) (bool, error)
- func (c *Client) SetDiff(ctx context.Context, names ...string) ([]string, error)
- func (c *Client) SetDiffAndStore(ctx context.Context, name string, names ...string) (int64, error)
- func (c *Client) SetIfNotExists(ctx context.Context, name string, value any) error
- func (c *Client) SetIntersect(ctx context.Context, names ...string) ([]string, error)
- func (c *Client) SetIntersectAndStore(ctx context.Context, name string, names ...string) (int64, error)
- func (c *Client) SetLength(ctx context.Context, name string) (int64, error)
- func (c *Client) SetMembers(ctx context.Context, name string) ([]string, error)
- func (c *Client) SetMove(ctx context.Context, destination string, source string, element string) error
- func (c *Client) SetPop(ctx context.Context, name string, count int64) ([]string, error)
- func (c *Client) SetRandomMember(ctx context.Context, name string, length int64) ([]string, error)
- func (c *Client) SetRemove(ctx context.Context, name string, values ...string) (int64, error)
- func (c *Client) SetUnion(ctx context.Context, names ...string) ([]string, error)
- func (c *Client) SetUnionAndStore(ctx context.Context, name string, names ...string) (int64, error)
- func (c *Client) Substr(ctx context.Context, name string, start int64, end int64) (string, error)
- func (c *Client) TTL(ctx context.Context, name string) (*time.Duration, error)
- func (c *Client) Type(ctx context.Context, name string) (Type, error)
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyAlreadyExists = errors.New("key already exists") ErrKeyDoesNotExist = errors.New("key does not exist") )
View Source
var ( ErrElementNotInSource = errors.New("no element in source") ErrElementNotAddedInDestination = errors.New("could not add element to destination") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ListLength ¶
func (*Client) ListRemove ¶
func (*Client) ListUnshift ¶
func (*Client) RenameIfNotExists ¶
func (*Client) SetContains ¶
func (*Client) SetDiffAndStore ¶
func (*Client) SetIfNotExists ¶
func (*Client) SetIntersect ¶
func (*Client) SetIntersectAndStore ¶
func (*Client) SetMembers ¶
func (*Client) SetRandomMember ¶
func (*Client) SetUnionAndStore ¶
Source Files
¶
- add_int.go
- client.go
- dbsize.go
- delete.go
- exists.go
- expire.go
- flush.go
- get.go
- get_set.go
- keys.go
- list_at.go
- list_length.go
- list_pop.go
- list_push.go
- list_range.go
- list_remove.go
- list_set.go
- list_shift.go
- list_sort.go
- list_trim.go
- list_unshift.go
- random_key.go
- rename.go
- set.go
- set_add.go
- set_contains.go
- set_diff.go
- set_intersect.go
- set_length.go
- set_members.go
- set_move.go
- set_pop.go
- set_random_member.go
- set_remove.go
- set_union.go
- substr.go
- ttl.go
- types.go
Click to show internal directories.
Click to hide internal directories.