Versions in this module Expand all Collapse all v1 v1.0.0 Aug 6, 2026 Changes in this version + const TypeNone + const TypeString + const TypeZSet + var ErrNotInt = errors.New("ERR value is not an integer or out of range") + var ErrWrongType = errors.New("WRONGTYPE Operation against a key holding the wrong kind of value") + type KeyValue struct + Key string + Value []byte + type ScanResult struct + Cursor string + Keys []string + type ScoreBound struct + Exclusive bool + Infinite int + Value float64 + type SetOptions struct + Get bool + KeepTTL bool + NX bool + TTL time.Duration + XX bool + type Stats struct + Keys int64 + type Store interface + CleanupExpired func(ctx context.Context, limit int) (int64, error) + Close func() error + Delete func(ctx context.Context, db int, keys ...string) (int64, error) + Exists func(ctx context.Context, db int, keys ...string) (int64, error) + Expire func(ctx context.Context, db int, key string, ttl time.Duration) (bool, error) + Get func(ctx context.Context, db int, key string) (*Value, error) + GetDel func(ctx context.Context, db int, key string) (*Value, bool, error) + IncrBy func(ctx context.Context, db int, key string, delta int64) (int64, error) + MGet func(ctx context.Context, db int, keys ...string) ([]*Value, error) + MSet func(ctx context.Context, db int, pairs []KeyValue, opts SetOptions) error + Migrate func(ctx context.Context) error + Persist func(ctx context.Context, db int, key string) (bool, error) + Ping func(ctx context.Context) error + Scan func(ctx context.Context, db int, cursor string, pattern string, count int) (ScanResult, error) + Set func(ctx context.Context, db int, key string, value []byte, opts SetOptions) (*Value, bool, error) + Stats func(ctx context.Context, db int) (Stats, error) + TTL func(ctx context.Context, db int, key string) (time.Duration, bool, bool, error) + Type func(ctx context.Context, db int, key string) (string, error) + ZAdd func(ctx context.Context, db int, key string, score float64, member []byte) (int64, error) + ZCard func(ctx context.Context, db int, key string) (int64, error) + ZCount func(ctx context.Context, db int, key string, min, max ScoreBound) (int64, error) + ZRange func(ctx context.Context, db int, key string, start, stop int64) ([]ZMember, error) + ZRangeByScore func(ctx context.Context, db int, key string, min, max ScoreBound, ...) ([]ZMember, error) + ZRem func(ctx context.Context, db int, key string, members ...[]byte) (int64, error) + ZRemRangeByScore func(ctx context.Context, db int, key string, min, max ScoreBound) (int64, error) + ZScore func(ctx context.Context, db int, key string, member []byte) (float64, bool, error) + type Value struct + Data []byte + ExpiresAt *time.Time + Type string + Version int64 + type ZMember struct + Member []byte + Score float64