package redis

import (
	"context"
	"time"
)

// redis接口
type RedisClient interface {
	GetString(key string) string
	GetStringWithContext(ctx context.Context, key string) string
	SetString(key string, val string, timeout time.Duration) error
	SetStringWithContext(ctx context.Context, key string, val string, timeout time.Duration) error
	GetHSet(key string) string
	GetHSetWithContext(ctx context.Context, key string) string
	SetHSet(key string, val string, timeout time.Duration) error
	SetHSetWithContext(ctx context.Context, key string, val string, timeout time.Duration) error
	Delete(key string) error
	DeleteWithContext(ctx context.Context, key string) error
	IsExist(key string) bool
	IsExistWithContext(ctx context.Context, key string) bool
	Do(commandName string, args ...interface{}) (reply interface{}, err error)
	DoWithContext(ctx context.Context, commandName string, args ...interface{}) (reply interface{}, err error)
}