Add admin password reset functionality for users and customers
This commit is contained in:
@@ -23,6 +23,8 @@ type Config struct {
|
||||
type Client interface {
|
||||
Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
|
||||
Get(ctx context.Context, key string) (string, error)
|
||||
Incr(ctx context.Context, key string) (int64, error)
|
||||
Expire(ctx context.Context, key string, expiration time.Duration) error
|
||||
Del(ctx context.Context, keys ...string) error
|
||||
Exists(ctx context.Context, keys ...string) (int64, error)
|
||||
Close() error
|
||||
@@ -80,6 +82,16 @@ func (c *client) Get(ctx context.Context, key string) (string, error) {
|
||||
return c.rdb.Get(ctx, key).Result()
|
||||
}
|
||||
|
||||
// Incr increments a key's integer value.
|
||||
func (c *client) Incr(ctx context.Context, key string) (int64, error) {
|
||||
return c.rdb.Incr(ctx, key).Result()
|
||||
}
|
||||
|
||||
// Expire sets a timeout on a key.
|
||||
func (c *client) Expire(ctx context.Context, key string, expiration time.Duration) error {
|
||||
return c.rdb.Expire(ctx, key, expiration).Err()
|
||||
}
|
||||
|
||||
// Del deletes one or more keys
|
||||
func (c *client) Del(ctx context.Context, keys ...string) error {
|
||||
return c.rdb.Del(ctx, keys...).Err()
|
||||
|
||||
Reference in New Issue
Block a user