@@ -12,6 +12,7 @@ import (
1212type RedisClient interface {
1313 Set (ctx context.Context , key string , value interface {}, expiration time.Duration ) error
1414 Get (ctx context.Context , key string ) (string , error )
15+ Del (ctx context.Context , keys ... string ) * redis.IntCmd
1516 HSet (ctx context.Context , key string , values ... interface {}) * redis.IntCmd
1617 RPush (ctx context.Context , key string , value interface {}) * redis.IntCmd
1718 LRange (ctx context.Context , key string , start , stop int64 ) * redis.StringSliceCmd
@@ -50,6 +51,11 @@ func (r *redisClient) Get(ctx context.Context, key string) (string, error) {
5051 return r .client .Get (ctx , key ).Result ()
5152}
5253
54+ /* deletes a redis entry */
55+ func (r * redisClient ) Del (ctx context.Context , keys ... string ) * redis.IntCmd {
56+ return r .client .Del (ctx , keys ... )
57+ }
58+
5359/* for pushing multiple elements in Redis */
5460func (r * redisClient ) RPush (ctx context.Context , key string , value interface {}) * redis.IntCmd {
5561 return r .client .RPush (ctx , key , value )
0 commit comments