Documentation
¶
Index ¶
- type Cache
- type Redis
- func (r *Redis) DecrBy(ctx context.Context, key string, value int64) error
- func (r *Redis) Del(ctx context.Context, key string) error
- func (r *Redis) Get(ctx context.Context, key string) (string, error)
- func (r *Redis) IncrBy(ctx context.Context, key string, value int64) error
- func (r *Redis) Ping(ctx context.Context) error
- func (r *Redis) Set(ctx context.Context, key string, value interface{}, exp time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Ping(ctx context.Context) error Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error Get(ctx context.Context, key string) (string, error) Del(ctx context.Context, key string) error IncrBy(ctx context.Context, key string, value int64) error DecrBy(ctx context.Context, key string, value int64) error }
Cache represents cache contract
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis represents a concrete redis
Click to show internal directories.
Click to hide internal directories.