redis

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Map map[string]*InfoSection
	Idx []string
}

func NewInfo

func NewInfo() *Info

func ParseInfo

func ParseInfo(infoText string) *Info

func (*Info) Add

func (a *Info) Add(sectionName string, sectionData *InfoSection) *Info

func (*Info) MustSection

func (a *Info) MustSection(sectionName string) *InfoSection

type InfoKV

type InfoKV struct {
	Name  string
	Value string
	// contains filtered or unexported fields
}

func (*InfoKV) ParseKeyspace

func (a *InfoKV) ParseKeyspace() map[string]int64

type InfoSection

type InfoSection struct {
	Map map[string]string
	Idx []string
}

func NewInfoSection

func NewInfoSection() *InfoSection

func (*InfoSection) Add

func (a *InfoSection) Add(key string, val string) *InfoSection

type Infos

type Infos struct {
	Name  string
	Attrs []*InfoKV
}

func NewInfos

func NewInfos(name string, attrs ...*InfoKV) *Infos

func ParseInfos

func ParseInfos(infoText string) []*Infos

type Redis

type Redis struct {
	*driver.BaseDriver
	// contains filtered or unexported fields
}

func (*Redis) Close

func (r *Redis) Close() error

func (*Redis) Codec

func (r *Redis) Codec(action string, key string, data string, encoding string) string

func (*Redis) DataType

func (r *Redis) DataType(key string) (string, error)

func (*Redis) DatabaseList

func (r *Redis) DatabaseList() ([]int64, error)

DatabaseList 获取数据库列表

func (*Redis) Exists

func (r *Redis) Exists(key string) (bool, error)

func (*Redis) FindKeys

func (r *Redis) FindKeys(pattern string) ([]string, error)

FindKeys 搜索key

func (*Redis) Info

func (r *Redis) Info() ([]*Infos, error)

Info 获取redis服务信息

func (*Redis) Init

func (r *Redis) Init(ctx echo.Context, auth *driver.DbAuth)

func (*Redis) IsSupported

func (r *Redis) IsSupported(operation string) bool

func (*Redis) Login

func (r *Redis) Login() (err error)

func (*Redis) Name

func (r *Redis) Name() string

func (*Redis) ObjectEncoding

func (r *Redis) ObjectEncoding(key string) (string, error)

ObjectEncoding 获取对象编码方式

func (*Redis) SetString

func (r *Redis) SetString(key string, value string) error

func (*Redis) TTL

func (r *Redis) TTL(key string) (int64, error)

TTL 获取数据有效期

func (*Redis) ViewValue

func (r *Redis) ViewValue(key string, typ string, encoding string) (ret string, siz int, err error)

Jump to

Keyboard shortcuts

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