internal

package
v0.12.5 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HDEL     = "HDEL"
	HEXISTS  = "HEXISTS"
	HGET     = "HGET"
	HGETALL  = "HGETALL"
	HINCERBY = "HINCRBY"
	HKEYS    = "HKEYS"
	HLEN     = "HLEN"
	HMGET    = "HMGET"
	HMSET    = "HMSET"
	HSET     = "HSET"
	HSETNX   = "HSETNX"
	HVALS    = "HVALS"
	HSCAN    = "HSCAN"
)
View Source
const (
	KEYS    = "KEYS"
	DEL     = "DEL"
	EXISTS  = "EXISTS"
	EXPIRE  = "EXPIRE"
	PERSIST = "PERSIST"
	SCAN    = "SCAN"
)
View Source
const (
	BLPOP      = "BLPOP"
	BRPOP      = "BRPOP"
	BRPOPLPUSH = "BRPOPLPUSH"
	LINDEX     = "LINDEX"
	LINSERT    = "LINSERT"
	LLEN       = "LLEN"
	LPOP       = "LPOP"
	LPUSH      = "LPUSH"
	LPUSHX     = "LPUSHX"
	LRANGE     = "LRANGE"
	LREM       = "LREM"
	LSET       = "LSET"
	LTRIM      = "LTRIM"
	RPOP       = "RPOP"
	RPOPLPUSH  = "RPOPLPUSH"
	RPUSH      = "RPUSH"
	RPUSHX     = "RPUSHX"
)
View Source
const (
	SADD        = "SADD"
	SCARD       = "SCARD"
	SDIFF       = "SDIFF"
	SDIFFSTORE  = "SDIFFSTORE"
	SINTER      = "SINTER"
	SINTERSTORE = "SINTERSTORE"
	SISMEMBER   = "SISMEMBER"
	SMEMBERS    = "SMEMBERS"
	SMOVE       = "SMOVE"
	SPOP        = "SPOP"
	SRANDMEMBER = "SRANDMEMBER"
	SREM        = "SREM"
	SUNION      = "SUNION"
	SUNIONSTORE = "SUNIONSTORE"
	SSCAN       = "SSCAN"
)
View Source
const (
	ZADD             = "ZADD"
	ZCARD            = "ZCARD"
	ZCOUNT           = "ZCOUNT"
	ZINCRBY          = "ZINCRBY"
	ZINTERSTORE      = "ZINTERSTORE"
	ZLEXCOUNT        = "ZLEXCOUNT"
	ZRANGE           = "ZRANGE"
	ZRANGEBYLEX      = "ZRANGEBYLEX"
	ZRANGEBYSCORE    = "ZRANGEBYSCORE"
	ZRANK            = "ZRANK"
	ZREM             = "ZREM"
	ZREMRANGEBYLEX   = "ZREMRANGEBYLEX"
	ZREMRANGEBYRANK  = "ZREMRANGEBYRANK"
	ZREMRANGEBYSCORE = "ZREMRANGEBYSCORE"
	ZREVRANGE        = "ZREVRANGE"
	ZREVRANGEBYSCORE = "ZREVRANGEBYSCORE"
	ZREVRANK         = "ZREVRANK"
	ZSCORE           = "ZSCORE"
	ZUNIONSTORE      = "ZUNIONSTORE"
	ZSCAN            = "ZSCAN"
)
View Source
const (
	SET    = "SET"
	SETNX  = "SETNX"
	GET    = "GET"
	GETSET = "GETSET"
	MGET   = "MGET"
	MSET   = "MSET"
	SETEX  = "SETEX"
	INCR   = "INCR"
	INCRBY = "INCRBY"
	DECR   = "DECR"
	DECRBY = "DECRBY"
	APPEND = "APPEND"
)
View Source
const (
	SORT = "SORT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Do(ctx context.Context, args ...interface{}) *rds.Cmd
	Writer() (cmd rds.Cmdable)
	Reader() (cmd rds.Cmdable)
	Close() (err error)
}

type Config

type Config struct {
	MasterSlaverMode   bool     `json:"masterSlaverMode"`
	Network            string   `json:"network"`
	Addr               []string `json:"addr"`
	Username           string   `json:"username"`
	Password           string   `json:"password"`
	DB                 int      `json:"db"`
	PoolSize           int      `json:"poolSize"`
	SSL                bool     `json:"ssl"`
	CaFilePath         string   `json:"caFilePath"`
	CertFilePath       string   `json:"certFilePath"`
	KeyFilePath        string   `json:"keyFilePath"`
	InsecureSkipVerify bool     `json:"insecureSkipVerify"`
}

func (*Config) CreateClient

func (config *Config) CreateClient() (client Client, err error)

func (*Config) LoadSSL

func (config *Config) LoadSSL() (ssl *tls.Config, err error)

type Database

type Database struct {
	// contains filtered or unexported fields
}

func NewDatabase added in v0.12.2

func NewDatabase(log logs.Logger, client Client) *Database

func (*Database) Close

func (db *Database) Close()

func (*Database) HandleCommand

func (db *Database) HandleCommand(ctx context.Context, name string, params []interface{}) (result []byte, err errors.CodeError)

Jump to

Keyboard shortcuts

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