redis

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotSupported = errors.New("not supported")

Functions

func NewService

func NewService() query.Service

NewService returns a new Redis service instance.

Types

type Conn

type Conn = redis.Conn

type Message

type Message = redis.Message

type Service

type Service struct {
	*redis.Server
	*query.BaseService
}

Service represents a new Redis service instance.

func (*Service) Del

func (service *Service) Del(conn *Conn, keys []string) (*Message, error)

func (*Service) Exists

func (service *Service) Exists(conn *Conn, keys []string) (*Message, error)

func (*Service) Expire

func (service *Service) Expire(conn *Conn, key string, opt redis.ExpireOption) (*Message, error)

func (*Service) Get

func (service *Service) Get(conn *Conn, key string) (*Message, error)

func (*Service) GetDatabase

func (service *Service) GetDatabase(ctx context.Context, id int) (store.Database, error)

GetDatabase returns the database with the specified ID.

func (*Service) HDel

func (service *Service) HDel(conn *Conn, key string, fields []string) (*Message, error)

func (*Service) HGet

func (service *Service) HGet(conn *Conn, key string, field string) (*Message, error)

func (*Service) HGetAll

func (service *Service) HGetAll(conn *Conn, key string) (*Message, error)

func (*Service) HMGet

func (service *Service) HMGet(conn *Conn, key string, fields []string) (*Message, error)

func (*Service) HMSet

func (service *Service) HMSet(conn *Conn, key string, dict map[string]string) (*Message, error)

func (*Service) HSet

func (service *Service) HSet(conn *Conn, key string, field string, val string, opt redis.HSetOption) (*Message, error)

func (*Service) Keys

func (service *Service) Keys(conn *Conn, pattern string) (*Message, error)

func (*Service) LIndex

func (service *Service) LIndex(conn *Conn, key string, index int) (*Message, error)

func (*Service) LLen

func (service *Service) LLen(conn *Conn, key string) (*Message, error)

func (*Service) LPop

func (service *Service) LPop(conn *Conn, key string, count int) (*Message, error)

func (*Service) LPush

func (service *Service) LPush(conn *Conn, key string, elements []string, opt redis.PushOption) (*Message, error)

func (*Service) LRange

func (service *Service) LRange(conn *Conn, key string, start int, stop int) (*Message, error)

func (*Service) MGet

func (service *Service) MGet(conn *Conn, keys []string) (*Message, error)

func (*Service) MSet

func (service *Service) MSet(conn *Conn, dict map[string]string, opt redis.MSetOption) (*Message, error)

func (*Service) RPop

func (service *Service) RPop(conn *Conn, key string, count int) (*Message, error)

func (*Service) RPush

func (service *Service) RPush(conn *Conn, key string, elements []string, opt redis.PushOption) (*Message, error)

func (*Service) Rename

func (service *Service) Rename(conn *Conn, key string, newkey string, opt redis.RenameOption) (*Message, error)

func (*Service) SAdd

func (service *Service) SAdd(conn *Conn, key string, members []string) (*Message, error)

func (*Service) SMembers

func (service *Service) SMembers(conn *Conn, key string) (*Message, error)

func (*Service) SRem

func (service *Service) SRem(conn *Conn, key string, members []string) (*Message, error)

func (*Service) ServiceName

func (service *Service) ServiceName() string

ServiceName returns the plug-in service name.

func (*Service) Set

func (service *Service) Set(conn *Conn, key string, val string, opt redis.SetOption) (*Message, error)

func (*Service) SetConfig added in v1.0.0

func (service *Service) SetConfig(conf config.Config)

SetConfig overrides redis.Server::SetConfig() to sets the specified plug-in configuration.

func (*Service) Start

func (service *Service) Start() error

Start starts the service.

func (*Service) Stop

func (service *Service) Stop() error

Stop stops the service.

func (*Service) TTL

func (service *Service) TTL(conn *Conn, key string) (*Message, error)

func (*Service) Type

func (service *Service) Type(conn *Conn, key string) (*Message, error)

func (*Service) ZAdd

func (service *Service) ZAdd(conn *Conn, key string, members []*redis.ZSetMember, opt redis.ZAddOption) (*Message, error)

func (*Service) ZIncBy

func (service *Service) ZIncBy(conn *Conn, key string, inc float64, member string) (*Message, error)

func (*Service) ZRange

func (service *Service) ZRange(conn *Conn, key string, start int, stop int, opt redis.ZRangeOption) (*Message, error)

func (*Service) ZRangeByScore

func (service *Service) ZRangeByScore(conn *Conn, key string, min float64, max float64, opt redis.ZRangeOption) (*Message, error)

func (*Service) ZRem

func (service *Service) ZRem(conn *Conn, key string, members []string) (*Message, error)

func (*Service) ZScore

func (service *Service) ZScore(conn *Conn, key string, member string) (*Message, error)

Jump to

Keyboard shortcuts

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