redis_infra

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedisInfraName = "Redis" // Redis基础设施名称
)

常量相关定义

Variables

This section is empty.

Functions

func New

New 创建Redis基础设施

Types

type RedisInfra

type RedisInfra struct {
	base.BaseInfra // 基础设施基类
	// contains filtered or unexported fields
}

RedisInfra Redis基础设施类型定义

func (*RedisInfra) Delete

func (i *RedisInfra) Delete(key string) error

Delete 删除

func (*RedisInfra) Get

func (i *RedisInfra) Get(key string) (string, error)

Get 查询单个字符串数据

func (*RedisInfra) Name

func (i *RedisInfra) Name() string

Name 查询基础设施名称

func (*RedisInfra) ReadAllKeys

func (i *RedisInfra) ReadAllKeys(match string) ([]string, error)

ReadAllKeys 读取所有的key

func (*RedisInfra) Set

func (i *RedisInfra) Set(key string, value interface{}, expiration time.Duration) error

Set 设置单个字符串数据

func (*RedisInfra) SetNX

func (i *RedisInfra) SetNX(key string, value interface{}, expiration time.Duration) (bool, error)

SetNX 单个键值数据不存在时设置

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL