redis

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

pangu-redis

盘古Redis集成,在go-redis的基础上二次开发,方便使用者调用

功能

  • 用户友好的API接口
    • 分页
    • 间断
  • 支持各种格式
    • JSON
    • Msgpack
    • Proto
    • Xml
  • 多Redis
  • 标签

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Between

func Between(start int64, stop int64) *optionBetween

Between 配置起止段

func Bool

func Bool() *optionSerializer

Bool 布尔数据

func Bytes

func Bytes() *optionSerializer

Bytes 原始数据

func Close

func Close(value int64) *interval

Close 闭区间

func Count

func Count(count int) *optionCount

Count 配置个数

func CountWithScores

func CountWithScores(count int) *optionCount

CountWithScores 配置个数

func Default

func Default() *optionLabel

Default 配置使用默认客户端

func Expiration

func Expiration(expiration time.Duration) *optionExpiration

Expiration 配置过期时间

func Field

func Field(key string, value interface{}, opts ...option) *optionField

Field 配置字段

func Float32

func Float32() *optionSerializer

Float32 浮点数据

func Float64

func Float64() *optionSerializer

Float64 浮点数据

func Int

func Int() *optionSerializer

Int 整形数据

func Int64

func Int64() *optionSerializer

Int64 整形数据

func Interval

func Interval(min *interval, max *interval) *optionInterval

Interval 配置个数

func JSON

func JSON() *optionSerializer

JSON 使用JSON序列化

func KeepExpiration

func KeepExpiration() *optionExpiration

KeepExpiration 保持过期时间设置

func Label

func Label(label string) *optionLabel

Label 配置使用哪一个客户端

func Member

func Member(value interface{}) *optionValue

Member 配置值

func Msgpack

func Msgpack() *optionSerializer

Msgpack 使用Msgpack序列化

func Open

func Open(value int64) *interval

Open 开区间

func Paging

func Paging(page int64, size int64) *optionBetween

Paging 模拟分页

func Proto

func Proto() *optionSerializer

Proto 谷歌Protocol Buffer序列化

func String

func String() *optionSerializer

String 字符串数据

func Time

func Time() *optionSerializer

Time 时间数据

func Uint64

func Uint64() *optionSerializer

Uint64 整形数据

func Value

func Value(value interface{}) *optionValue

Value 配置值

func XML

func XML() *optionSerializer

XML 使用XML序列化

func Z

func Z(score int64, value interface{}) *optionZ

Z 配置成员

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client Redis客户端

func (*Client) Del added in v0.0.2

func (c *Client) Del(ctx context.Context, key string, opts ...option) (err error)

func (*Client) Expire added in v0.0.2

func (c *Client) Expire(ctx context.Context, key string, opts ...putOption) (err error)

func (*Client) Get

func (c *Client) Get(ctx context.Context, key string, value interface{}, opts ...option) (exist bool, err error)

func (*Client) HDel

func (c *Client) HDel(ctx context.Context, key string, field string, opts ...option) (int64, error)

func (*Client) HGet

func (c *Client) HGet(ctx context.Context, key string, field string, value interface{}, opts ...option) (exist bool, err error)

func (*Client) HIncrBy

func (c *Client) HIncrBy(ctx context.Context, key string, field string, value int64, opts ...option) (int64, error)

func (*Client) HKeys

func (c *Client) HKeys(ctx context.Context, key string, opts ...option) (keys []string, err error)

func (*Client) HSet

func (c *Client) HSet(ctx context.Context, key string, opts ...fieldOption) (affected int64, err error)

func (*Client) LLen

func (c *Client) LLen(ctx context.Context, key string, opts ...option) (total int64, err error)

func (*Client) LPush

func (c *Client) LPush(ctx context.Context, key string, opts ...valuesOption) (affected int64, err error)

func (*Client) LRange

func (c *Client) LRange(ctx context.Context, key string, values interface{}, opts ...rangeOption) (err error)

func (*Client) RPush

func (c *Client) RPush(ctx context.Context, key string, opts ...valuesOption) (affected int64, err error)

func (*Client) Redis

func (c *Client) Redis(opts ...option) *redis.Client

func (*Client) SAdd

func (c *Client) SAdd(ctx context.Context, key string, opts ...valuesOption) (affected int64, err error)

func (*Client) SCard

func (c *Client) SCard(ctx context.Context, key string, opts ...option) (total int64, err error)

func (*Client) SMembers

func (c *Client) SMembers(ctx context.Context, key string, values interface{}, opts ...option) (err error)

func (*Client) SRem

func (c *Client) SRem(ctx context.Context, key string, opts ...valuesOption) (affected int64, err error)

func (*Client) Set

func (c *Client) Set(ctx context.Context, key string, value interface{}, opts ...putOption) (err error)

func (*Client) ZAdd

func (c *Client) ZAdd(ctx context.Context, key string, opts ...membersOption) (affected int64, err error)

func (*Client) ZCard

func (c *Client) ZCard(ctx context.Context, key string, opts ...option) (total int64, err error)

func (*Client) ZCount

func (c *Client) ZCount(ctx context.Context, key string, opts ...intervalOption) (total int64, err error)

func (*Client) ZRandMember

func (c *Client) ZRandMember(ctx context.Context, key string, values interface{}, opts ...countOption) (err error)

func (*Client) ZRange

func (c *Client) ZRange(ctx context.Context, key string, values interface{}, opts ...rangeOption) (err error)

func (*Client) ZRangeWithScores

func (c *Client) ZRangeWithScores(ctx context.Context, key string, values []score, opts ...rangeOption) (err error)

func (*Client) ZRem

func (c *Client) ZRem(ctx context.Context, key string, opts ...valuesOption) (total int64, err error)

Jump to

Keyboard shortcuts

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