Documentation ¶
Index ¶
- Variables
- func NewService() query.Service
- type Conn
- type HashObject
- type Key
- type Message
- type Service
- func (service *Service) Del(conn *Conn, keys []string) (*Message, error)
- func (service *Service) Exists(conn *Conn, keys []string) (*Message, error)
- func (service *Service) Expire(conn *Conn, key string, opt redis.ExpireOption) (*Message, error)
- func (service *Service) Get(conn *Conn, key string) (*Message, error)
- func (service *Service) HDel(conn *Conn, key string, fields []string) (*Message, error)
- func (service *Service) HGet(conn *Conn, key string, field string) (*Message, error)
- func (service *Service) HGetAll(conn *Conn, key string) (*Message, error)
- func (service *Service) HSet(conn *Conn, key string, field string, val string, opt redis.HSetOption) (*Message, error)
- func (service *Service) Keys(conn *Conn, pattern string) (*Message, error)
- func (service *Service) LIndex(conn *Conn, key string, index int) (*Message, error)
- func (service *Service) LLen(conn *Conn, key string) (*Message, error)
- func (service *Service) LPop(conn *Conn, key string, count int) (*Message, error)
- func (service *Service) LPush(conn *Conn, key string, elements []string, opt redis.PushOption) (*Message, error)
- func (service *Service) LRange(conn *Conn, key string, start int, stop int) (*Message, error)
- func (service *Service) LookupDatabase(ctx context.Context, dbid redis.DatabaseID) (store.Database, error)
- func (service *Service) LookupServiceConfigRequirepass() (string, error)
- func (service *Service) LookupServiceConfigTLSPort() (int, error)
- func (service *Service) RPop(conn *Conn, key string, count int) (*Message, error)
- func (service *Service) RPush(conn *Conn, key string, elements []string, opt redis.PushOption) (*Message, error)
- func (service *Service) Rename(conn *Conn, key string, newkey string, opt redis.RenameOption) (*Message, error)
- func (service *Service) SAdd(conn *Conn, key string, members []string) (*Message, error)
- func (service *Service) SMembers(conn *Conn, key string) (*Message, error)
- func (service *Service) SRem(conn *Conn, key string, members []string) (*Message, error)
- func (service *Service) Scan(conn *redis.Conn, cursor int, opt redis.ScanOption) (*redis.Message, error)
- func (service *Service) ServiceName() string
- func (service *Service) Set(conn *Conn, key string, val string, opt redis.SetOption) (*Message, error)
- func (service *Service) SetConfig(conf config.Config)
- func (service *Service) Start() error
- func (service *Service) Stop() error
- func (service *Service) TTL(conn *Conn, key string) (*Message, error)
- func (service *Service) TransactDatabase(ctx context.Context, conn *Conn, write bool) (*Transaction, error)
- func (service *Service) Type(conn *Conn, key string) (*Message, error)
- func (service *Service) ZAdd(conn *Conn, key string, members []*redis.ZSetMember, opt redis.ZAddOption) (*Message, error)
- func (service *Service) ZIncBy(conn *Conn, key string, inc float64, member string) (*Message, error)
- func (service *Service) ZRange(conn *Conn, key string, start int, stop int, opt redis.ZRangeOption) (*Message, error)
- func (service *Service) ZRangeByScore(conn *Conn, key string, zmin float64, zmax float64, opt redis.ZRangeOption) (*Message, error)
- func (service *Service) ZRem(conn *Conn, key string, members []string) (*Message, error)
- func (service *Service) ZScore(conn *Conn, key string, member string) (*Message, error)
- type Transaction
- func (txn *Transaction) CancelWithError(ctx context.Context, err error) error
- func (txn *Transaction) GetKeyHashObject(ctx context.Context, key string) (HashObject, error)
- func (txn *Transaction) GetKeyObject(ctx context.Context, key string) (any, error)
- func (txn *Transaction) GetKeyObjects(ctx context.Context, key string) ([]any, error)
- func (txn *Transaction) GetKeyString(ctx context.Context, key string) (string, error)
- func (txn *Transaction) SetKeyHashObject(ctx context.Context, key string, val HashObject) error
- func (txn *Transaction) SetKeyObject(ctx context.Context, key string, val any) error
Constants ¶
This section is empty.
Variables ¶
var ErrInvalid = document.ErrInvalid
var ErrNotExist = document.ErrNotExist
var ErrNotSupported = document.ErrNotSupported
Functions ¶
Types ¶
type HashObject ¶ added in v1.3.0
HashObject represents a hash object.
func (HashObject) Del ¶ added in v1.3.0
func (obj HashObject) Del(fields []string) int
func (HashObject) Set ¶ added in v1.3.0
func (obj HashObject) Set(field string, val string, opt redis.HSetOption) int
nolint: ifshort
type Key ¶ added in v1.3.0
func NewDocumentKeyWith ¶ added in v1.3.0
func NewDocumentKeyWith(dbid redis.DatabaseID, key string) Key
NewDocumentKeyWith returns a new document key.
type Service ¶
type Service struct { redis.Server *query.BaseService }
Service represents a new Redis service instance.
func (*Service) LookupDatabase ¶ added in v1.3.5
func (service *Service) LookupDatabase(ctx context.Context, dbid redis.DatabaseID) (store.Database, error)
GetDatabase returns the database with the specified ID.
func (*Service) LookupServiceConfigRequirepass ¶ added in v1.3.5
LookupServiceConfigRequirepass returns the requirepass value of the service.
func (*Service) LookupServiceConfigTLSPort ¶ added in v1.3.5
LookupServiceConfigTLSPort returns the TLS port value of the service.
func (*Service) ServiceName ¶
ServiceName returns the plug-in service name.
func (*Service) SetConfig ¶ added in v1.0.0
SetConfig overrides redis.Server::SetConfig() to sets the specified plug-in configuration.
func (*Service) TransactDatabase ¶ added in v1.3.0
func (service *Service) TransactDatabase(ctx context.Context, conn *Conn, write bool) (*Transaction, error)
TransactDatabase returns a transaction for the database with the specified ID.
func (*Service) ZAdd ¶
func (service *Service) ZAdd(conn *Conn, key string, members []*redis.ZSetMember, opt redis.ZAddOption) (*Message, error)
func (*Service) ZRangeByScore ¶
type Transaction ¶ added in v1.3.0
type Transaction struct { store.Transaction redis.DatabaseID }
func (*Transaction) CancelWithError ¶ added in v1.3.0
func (txn *Transaction) CancelWithError(ctx context.Context, err error) error
CancelWithError cancels the transaction with an error.
func (*Transaction) GetKeyHashObject ¶ added in v1.3.0
func (txn *Transaction) GetKeyHashObject(ctx context.Context, key string) (HashObject, error)
GetKeyHashObject returns the hash objects with the specified key.
func (*Transaction) GetKeyObject ¶ added in v1.3.0
GetKeyObject returns the object with the specified key.
func (*Transaction) GetKeyObjects ¶ added in v1.3.0
GetKeyObjects returns the objects with the specified key.
func (*Transaction) GetKeyString ¶ added in v1.3.0
GetKeyString returns the string with the specified key.
func (*Transaction) SetKeyHashObject ¶ added in v1.3.0
func (txn *Transaction) SetKeyHashObject(ctx context.Context, key string, val HashObject) error
SetKeyHashObject sets the objects with the specified key.
func (*Transaction) SetKeyObject ¶ added in v1.3.0
SetKeyObject sets the objects with the specified key.