redis

package
v2.2.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: AGPL-3.0 Imports: 12 Imported by: 5

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) CreateTable

func (r *Redis) CreateTable() error

func (*Redis) DataType

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

func (*Redis) DatabaseList

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

DatabaseList 获取数据库列表

func (*Redis) DeleteKey

func (r *Redis) DeleteKey(key string) (int, error)

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) Flush

func (r *Redis) Flush(db string) (string, error)

func (*Redis) Info

func (r *Redis) Info() 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) ListDb

func (r *Redis) ListDb() error

func (*Redis) ListKeys

func (r *Redis) ListKeys(size int, offset int64, pattern ...string) (string, []string, error)

ListKeys 搜索key

func (*Redis) ListTable

func (r *Redis) ListTable() error

func (*Redis) Login

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

func (*Redis) Logout

func (r *Redis) Logout() error

func (*Redis) ModifyDb

func (r *Redis) ModifyDb() error

func (*Redis) ModifyTable

func (r *Redis) ModifyTable() error

func (*Redis) MoveKey

func (r *Redis) MoveKey(key string, destDB string) (string, error)

func (*Redis) Name

func (r *Redis) Name() string

func (*Redis) ObjectEncoding

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

ObjectEncoding 获取对象编码方式

func (*Redis) RenameKey

func (r *Redis) RenameKey(key string, newKey string) (string, error)

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) ViewElement

func (r *Redis) ViewElement(key string, hkey string, typ string, encoding string) (v string, err error)

func (*Redis) ViewTable

func (r *Redis) ViewTable() error

func (*Redis) ViewValue

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

func (*Redis) ViewValuePro

func (r *Redis) ViewValuePro(key string, typ string, encoding string, size int, offset int64, pattern ...string) (v *Value, err error)

type Value

type Value struct {
	TotalRows  int
	List       []echo.KV
	NextOffset string

	Text string
	// contains filtered or unexported fields
}

func NewValue

func NewValue(c echo.Context) *Value

func (*Value) Add

func (a *Value) Add(key, value string) *Value

func (*Value) CursorPaging

func (a *Value) CursorPaging(vkeys ...string) *pagination.Pagination

func (*Value) Paging

func (a *Value) Paging(vkeys ...string) *pagination.Pagination

func (*Value) SetPaging

func (a *Value) SetPaging(paging *pagination.Pagination) *Value

func (*Value) String

func (a *Value) String() string

Jump to

Keyboard shortcuts

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