Documentation ¶
Index ¶
- type Caches
- type Handler
- type Options
- type RedisCfg
- type Store
- func (r *Store) AddInSet(ctx context.Context, key, value string) (int, error)
- func (r *Store) Del(ctx context.Context, key string) (int64, error)
- func (r *Store) Get(ctx context.Context, key string) (string, error)
- func (r *Store) GetNElementOfSet(ctx context.Context, key string, n int) ([]string, error)
- func (r *Store) GetSetLength(ctx context.Context, key string) (int, error)
- func (r *Store) GetSetMembers(ctx context.Context, key string) ([]string, error)
- func (r *Store) HSet(ctx context.Context, key, field, value string) (string, error)
- func (r *Store) PushNElementToSet(ctx context.Context, values []interface{}) (int, error)
- func (r *Store) Set(ctx context.Context, key, value string, expire ...int) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Caches ¶
type Caches interface { Get(ctx context.Context, key string) (string, error) Del(ctx context.Context, key string) (int64, error) HSet(ctx context.Context, key, field, value string) (string, error) Set(ctx context.Context, key, value string, expire ...int) (string, error) AddInSet(ctx context.Context, key, value string) (int, error) GetSetMembers(ctx context.Context, key string) ([]string, error) GetSetLength(ctx context.Context, key string) (int, error) GetNElementOfSet(ctx context.Context, key string, n int) ([]string, error) PushNElementToSet(ctx context.Context, values []interface{}) (int, error) }
type Options ¶ added in v2.4.1
type Options func(*RedisCfg)
func WithAddress ¶ added in v2.4.1
func WithMaxActive ¶ added in v2.4.1
func WithMaxIdle ¶ added in v2.4.1
func WithPassword ¶ added in v2.4.4
func WithTimeout ¶ added in v2.4.1
func WithUsername ¶ added in v2.4.4
type Store ¶
type Store struct { Pool Handler // contains filtered or unexported fields }
Store object
func (*Store) GetNElementOfSet ¶
GetNElementOfSet to get the first N elements of set
func (*Store) GetSetLength ¶
GetSetLength will be used to get the set length
func (*Store) GetSetMembers ¶
GetSetMembers will be used to get the set memebers
func (*Store) PushNElementToSet ¶
PushNElementToSet will be used to push n elements to set
Click to show internal directories.
Click to hide internal directories.