Documentation ¶
Index ¶
- type Caches
- type FallbackFn
- type Handler
- type Options
- type RedisCfg
- type Store
- func (r *Store) Del(ctx context.Context, key string) (int64, error)
- func (r *Store) Get(ctx context.Context, key string, typeDestination any, fallbackFn ...FallbackFn) error
- func (r *Store) HDel(ctx context.Context, key, field string) error
- func (r *Store) HGet(ctx context.Context, key, field string, typeDestination any, ...) error
- func (r *Store) HSet(ctx context.Context, key, field string, value any, expire ...int) error
- func (r *Store) Set(ctx context.Context, key string, value any, expire ...int) error
- func (r *Store) WrapToContext(ctx context.Context) context.Context
- func (r *Store) WrapToHandler(next http.Handler) http.Handler
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, typeDestination any, fallbackFn ...FallbackFn) error Del(ctx context.Context, key string) (int64, error) Set(ctx context.Context, key string, value any, expire ...int) error HSet(ctx context.Context, key, field string, value any, expire ...int) error HGet(ctx context.Context, key, field string, typeDestination any, fallbackFn ...FallbackFn) error HDel(ctx context.Context, key, field string) error }
func GetCacheFromContext ¶ added in v2.21.2
type FallbackFn ¶ added in v2.25.0
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 WithMaxRetry ¶ added in v2.25.0
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) Get ¶
func (r *Store) Get(ctx context.Context, key string, typeDestination any, fallbackFn ...FallbackFn) error
Get string value
func (*Store) HGet ¶ added in v2.26.0
func (r *Store) HGet(ctx context.Context, key, field string, typeDestination any, fallbackFn ...FallbackFn) error
HGet set has map
func (*Store) WrapToContext ¶ added in v2.21.2
Click to show internal directories.
Click to hide internal directories.