Documentation
¶
Index ¶
- type RedisClient
- func (s *RedisClient) Delete(ctx context.Context, key string) error
- func (s *RedisClient) Exists(ctx context.Context, key string) bool
- func (s *RedisClient) Get(ctx context.Context, key string) ([]byte, error)
- func (s *RedisClient) GetBool(ctx context.Context, key string) (bool, error)
- func (s *RedisClient) GetFloat(ctx context.Context, key string) (float64, error)
- func (s *RedisClient) GetInt(ctx context.Context, key string) (int64, error)
- func (s *RedisClient) GetObject(ctx context.Context, key string, obj interface{}) error
- func (s *RedisClient) GetString(ctx context.Context, key string) (string, error)
- func (s *RedisClient) RemainingTime(ctx context.Context, key string) time.Duration
- func (s *RedisClient) Set(ctx context.Context, key string, val interface{}, expiration time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisClient ¶
func NewRedisClient ¶
func NewRedisClient(host string, port int, password string, db int) *RedisClient
func (*RedisClient) GetObject ¶
func (s *RedisClient) GetObject( ctx context.Context, key string, obj interface{}, ) error
func (*RedisClient) RemainingTime ¶
Result: >= 0 remaining time -1 if the key exists but has no associated expire -2 if the key does not exist
Click to show internal directories.
Click to hide internal directories.