define

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultKeyLen 键列表的默认查询长度
	DefaultKeyLen int64 = 100
	// MaxKeyLen 键列表的最大查询长度
	MaxKeyLen int64 = 2000
	// MaxHashLen hash列表的最大查询长度
	MaxHashLen int64 = 200
	// MaxListLen list列表的最大查询长度
	MaxListLen int64 = 200
	// MaxSetLen set的最大查询长度
	MaxSetLen int64 = 200
	// MaxZSetLen zset的最大查询长度
	MaxZSetLen int64 = 200
)
View Source
var ConfigName = "redis-client.conf"

Functions

This section is empty.

Types

type Config

type Config struct {
	Connections []*Connection `json:"connections"`
}

type Connection

type Connection struct {
	Identity string `json:"identity"`
	Name     string `json:"name"`
	Addr     string `json:"addr"`
	Port     string `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	Type     string `json:"type"` // 连接类型
	SSHConfig
}

type CreateKeyValueRequest

type CreateKeyValueRequest struct {
	KeyValueRequest
	Type string `json:"type"`
}

type DbItem

type DbItem struct {
	Key    string `json:"key"`    // db0 , db1
	Number int    `json:"number"` // 个数
}

type HashAddOrUpdateFieldRequest

type HashAddOrUpdateFieldRequest struct {
	KeyValueRequest
	Field string `json:"field"`
	Value string `json:"value"`
}

type HashFieldDeleteRequest

type HashFieldDeleteRequest struct {
	KeyValueRequest
	Field []string `json:"field"`
}

type KeyListRequest

type KeyListRequest struct {
	ConnIdentity string `json:"conn_identity"`
	Db           int    `json:"db"`
	Keyword      string `json:"keyword"`
}

type KeyValue

type KeyValue struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

type KeyValueReply

type KeyValueReply struct {
	Value interface{}   `json:"value"`
	TTL   time.Duration `json:"ttl"`
	Type  string        `json:"type"`
}

type KeyValueRequest

type KeyValueRequest struct {
	ConnIdentity string `json:"conn_identity"`
	Db           int    `json:"db"`
	Key          string `json:"key"`
}

type ListValueRequest added in v0.1.2

type ListValueRequest struct {
	KeyValueRequest
	Value string `json:"value"`
}

type SSHConfig added in v0.1.2

type SSHConfig struct {
	SSHAddr     string `json:"ssh_addr"`
	SSHPort     string `json:"ssh_port"`
	SSHUsername string `json:"ssh_username"`
	SSHPassword string `json:"ssh_password"`
}

type SetValueRequest added in v0.1.2

type SetValueRequest struct {
	KeyValueRequest
	Value string `json:"value"`
}

type UpdateKeyValueRequest

type UpdateKeyValueRequest struct {
	KeyValueRequest
	TTL   time.Duration `json:"ttl"`
	Value string        `json:"value"`
}

type ZSetValueRequest added in v0.1.2

type ZSetValueRequest struct {
	KeyValueRequest
	Score  float64     `json:"score"`
	Member interface{} `json:"member"`
}

Jump to

Keyboard shortcuts

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