Skip to content

Commit

Permalink
feat(redis): Add delete method to redis (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
Renato Almeida authored Nov 30, 2023
1 parent 6b6b5c0 commit 363888f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/redis/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
type RedisClient interface {
Get(ctx context.Context, key string) *redis.StringCmd
Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd
Del(ctx context.Context, keys ...string) *redis.IntCmd
Publish(ctx context.Context, channel string, message interface{}) *redis.IntCmd
Subscribe(ctx context.Context, channels ...string) *redis.PubSub
Ping(ctx context.Context) *redis.StatusCmd
Expand Down Expand Up @@ -103,6 +104,10 @@ func (c redisClientImpl) Set(ctx context.Context, key string, value interface{},
return c.get().Set(ctx, key, value, expiration)
}

func (c redisClientImpl) Del(ctx context.Context, keys ...string) *redis.IntCmd {
return c.get().Del(ctx, keys...)
}

func (c redisClientImpl) Publish(ctx context.Context, channel string, message interface{}) *redis.IntCmd {
return c.get().Publish(ctx, channel, message)
}
Expand Down

0 comments on commit 363888f

Please sign in to comment.