Documentation
¶
Index ¶
- type Redis
- type RedisService
- func (r *RedisService) Close() error
- func (r *RedisService) Del(key string) error
- func (r *RedisService) Exists(key string) bool
- func (r *RedisService) Get(key string) (string, error)
- func (r *RedisService) Ping(ctx context.Context) error
- func (r *RedisService) Set(key string, value string, expiration time.Duration) error
- func (r *RedisService) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redis ¶
type Redis interface {
Get(key string) (string, error)
Set(key string, value string, expiration time.Duration) error
Del(key string) error
Exists(key string) bool
Close() error
Ping(ctx context.Context) error
SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error)
}
type RedisService ¶
type RedisService struct {
// contains filtered or unexported fields
}
func NewRedisService ¶
func NewRedisService(config util.Config) *RedisService
func (*RedisService) Close ¶
func (r *RedisService) Close() error
func (*RedisService) Del ¶
func (r *RedisService) Del(key string) error
func (*RedisService) Exists ¶
func (r *RedisService) Exists(key string) bool
Click to show internal directories.
Click to hide internal directories.