Documentation ¶
Index ¶
- Constants
- type RdDockerTest
- func (in *RdDockerTest) ConnectCheck(res *dockertest.Resource) (rueidis.Client, error)
- func (in *RdDockerTest) ImageLatest(pool *D.DockerTest) *dockertest.RunOptions
- func (in *RdDockerTest) ImageVersion(pool *D.DockerTest, version string) *dockertest.RunOptions
- func (in *RdDockerTest) SetDefaults(img string)
- type RedisSession
- func (sess RedisSession) Dec(key string) int64
- func (sess RedisSession) Del(key string)
- func (sess RedisSession) Expiry(key string) int64
- func (sess RedisSession) FadeInt(key string, val int64, sec int64)
- func (sess RedisSession) FadeMSX(key string, val M.SX, sec int64)
- func (sess RedisSession) FadeStr(key, val string, sec int64)
- func (sess RedisSession) GetInt(key string) int64
- func (sess RedisSession) GetMSX(key string) M.SX
- func (sess RedisSession) GetStr(key string) string
- func (sess RedisSession) Inc(key string) int64
- func (sess RedisSession) Lpush(key string, val string)
- func (sess RedisSession) Lrange(key string, start, end int64) []string
- func (sess RedisSession) Product() string
- func (sess RedisSession) Rpush(key string, val string)
- func (sess RedisSession) SetInt(key string, val int64)
- func (sess RedisSession) SetMSS(key string, val M.SS)
- func (sess RedisSession) SetMSX(key string, val M.SX)
- func (sess RedisSession) SetStr(key, val string)
Constants ¶
View Source
const DEFAULT_HOST = `127.0.0.1:6379`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RdDockerTest ¶
type RdDockerTest struct { // username and password must use conf https://stackoverflow.com/a/70808430/1620210 Password string Database int Image string Port string // contains filtered or unexported fields }
func (*RdDockerTest) ConnectCheck ¶
func (in *RdDockerTest) ConnectCheck(res *dockertest.Resource) (rueidis.Client, error)
func (*RdDockerTest) ImageLatest ¶
func (in *RdDockerTest) ImageLatest(pool *D.DockerTest) *dockertest.RunOptions
func (*RdDockerTest) ImageVersion ¶
func (in *RdDockerTest) ImageVersion(pool *D.DockerTest, version string) *dockertest.RunOptions
func (*RdDockerTest) SetDefaults ¶
func (in *RdDockerTest) SetDefaults(img string)
type RedisSession ¶
func NewRedisSession ¶
func NewRedisSession(host, pass string, dbNum int, prefix string) *RedisSession
NewRedisSession panic version
func TryRedisSession ¶
func TryRedisSession(host, pass string, dbNum int, prefix string) (*RedisSession, error)
TryRedisSession non panic version, returns error if failed to connect
func (RedisSession) Dec ¶
func (sess RedisSession) Dec(key string) int64
func (RedisSession) Del ¶
func (sess RedisSession) Del(key string)
func (RedisSession) Expiry ¶
func (sess RedisSession) Expiry(key string) int64
Expiry check the expiry time in second
func (RedisSession) FadeStr ¶
func (sess RedisSession) FadeStr(key, val string, sec int64)
func (RedisSession) GetInt ¶
func (sess RedisSession) GetInt(key string) int64
func (RedisSession) GetStr ¶
func (sess RedisSession) GetStr(key string) string
func (RedisSession) Inc ¶
func (sess RedisSession) Inc(key string) int64
func (RedisSession) Lpush ¶
func (sess RedisSession) Lpush(key string, val string)
func (RedisSession) Product ¶
func (sess RedisSession) Product() string
func (RedisSession) Rpush ¶
func (sess RedisSession) Rpush(key string, val string)
func (RedisSession) SetInt ¶
func (sess RedisSession) SetInt(key string, val int64)
func (RedisSession) SetStr ¶
func (sess RedisSession) SetStr(key, val string)
Click to show internal directories.
Click to hide internal directories.