Documentation ¶
Index ¶
- func Scan(b []byte, v interface{}) error
- func ScanSlice(data []string, slice interface{}) error
- func ValidProvider(v string) bool
- type Manager
- type Option
- func NewRedisOptions() []Option[redisManager]
- func NewValKeyOptions() []Option[valkeyManager]
- func RedisWithDB(v int) Option[redisManager]
- func RedisWithPassword(v string) Option[redisManager]
- func RedisWithPrefix(v string) Option[redisManager]
- func RedisWithScope(v string) Option[redisManager]
- func RedisWithTLSB64(v bool, certB64, keyB64, serverName string) Option[redisManager]
- func RedisWithTLSFile(v bool, certFile, keyFile, serverName string) Option[redisManager]
- func RedisWithTelemetry(tm telemetry.Manager) Option[redisManager]
- func ValKeyWithDB(v int) Option[valkeyManager]
- func ValKeyWithPassword(v string) Option[valkeyManager]
- func ValKeyWithPrefix(prefix string) Option[valkeyManager]
- func ValKeyWithScope(v string) Option[valkeyManager]
- func ValKeyWithTLSB64(v bool, certB64, keyB64, serverName string) Option[valkeyManager]
- func ValKeyWithTLSFile(v bool, certFile, keyFile, serverName string) Option[valkeyManager]
- func ValKeyWithTelemetry(v telemetry.Manager) Option[valkeyManager]
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidProvider ¶
Types ¶
type Manager ¶
type Manager interface { MustConnect(ctx context.Context) Manager Connect(ctx context.Context) error Set(ctx context.Context, key string, value interface{}) error SetWhenNotExist(ctx context.Context, key string, value interface{}) error SetWithExpire(ctx context.Context, key string, value interface{}, expire time.Duration) error SetWithExpireWhenNotExist(ctx context.Context, key string, value interface{}, expire time.Duration) error SetString(ctx context.Context, key, value string, expire time.Duration) error Get(ctx context.Context, key string, bindTo interface{}) error GetString(ctx context.Context, key string) string Del(ctx context.Context, keys ...string) error HSet(ctx context.Context, key string, value ...interface{}) error HSetWhenNotExist(ctx context.Context, key, field string, value interface{}) error HGet(ctx context.Context, key, field string, bindTo interface{}) error HDel(ctx context.Context, key string, fields ...string) error HGetAll(ctx context.Context, key string, bindTo interface{}) error HMSet(ctx context.Context, key string, values ...interface{}) error HMGet(ctx context.Context, key, field string, bindTo interface{}) error Ping() error }
type Option ¶
type Option[T any] interface { // contains filtered or unexported methods }
func NewRedisOptions ¶
func NewRedisOptions() []Option[redisManager]
func NewValKeyOptions ¶
func NewValKeyOptions() []Option[valkeyManager]
func RedisWithDB ¶
func RedisWithPassword ¶
func RedisWithPrefix ¶
func RedisWithScope ¶
func RedisWithTLSB64 ¶
func RedisWithTLSFile ¶
func RedisWithTelemetry ¶
func ValKeyWithDB ¶
func ValKeyWithPassword ¶
func ValKeyWithPrefix ¶
func ValKeyWithScope ¶
func ValKeyWithTLSB64 ¶
func ValKeyWithTLSFile ¶
func ValKeyWithTelemetry ¶
Click to show internal directories.
Click to hide internal directories.