Documentation ¶
Index ¶
- func Del(ctx context.Context, key ...string) bool
- func HashGet(ctx context.Context, key string, fields ...string) map[string]any
- func HashSetIfAbsent(ctx context.Context, key string, mv map[string]any, expiration time.Duration) bool
- func HashSetIfExists(ctx context.Context, key string, mv map[string]any) bool
- func InitRedis(addr, username, password, prefix string, db int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashSetIfAbsent ¶
func HashSetIfAbsent(ctx context.Context, key string, mv map[string]any, expiration time.Duration) bool
HashSetIfAbsent 设置Hash,如果指定的key不存在。 返回值 是否指定的key不存在且成功设置了值。
func HashSetIfExists ¶
HashSetIfExists 设置Hash,如果指定的key存在,同时保留ttl。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.