Documentation
¶
Index ¶
- func DeleteEmpty(s []string) []string
- func ShortDate(date *time.Time) string
- type Command
- type IntCmd
- type IntCmdMock
- type RedisClient
- type RedisClientMock
- func (r *RedisClientMock) Erase(key string)
- func (c *RedisClientMock) Exists(key string) bool
- func (c *RedisClientMock) Get(key string) StringCmd
- func (r *RedisClientMock) Keys(pattern string) ([]string, error)
- func (c *RedisClientMock) Set(key string, value interface{}, expiration time.Duration) StatusCmd
- func (r *RedisClientMock) SetAdd(key string, val string) IntCmd
- func (r *RedisClientMock) SetCard(key string) IntCmd
- func (r *RedisClientMock) SetList(key string) ([]string, error)
- func (r *RedisClientMock) SetRemove(key string, val ...string) IntCmd
- func (r *RedisClientMock) SortedSetAdd(key string, score int, value string) bool
- func (r *RedisClientMock) SortedSetCard(key string) IntCmd
- func (r *RedisClientMock) SortedSetRange(key string, min int64, max int64) ([]string, error)
- func (r *RedisClientMock) SortedSetRank(key string, value string) IntCmd
- func (r *RedisClientMock) SortedSetRemove(key string, values ...string) IntCmd
- func (r *RedisClientMock) SortedSetRemoveRange(key string, min int64, max int64) IntCmd
- type RedisClientWrap
- func (r *RedisClientWrap) Erase(key string)
- func (r *RedisClientWrap) Exists(key string) bool
- func (r *RedisClientWrap) Get(key string) StringCmd
- func (r *RedisClientWrap) Keys(pattern string) ([]string, error)
- func (r *RedisClientWrap) Set(key string, value interface{}, expiration time.Duration) StatusCmd
- func (r *RedisClientWrap) SetAdd(key string, val string) IntCmd
- func (r *RedisClientWrap) SetCard(key string) IntCmd
- func (r *RedisClientWrap) SetList(key string) ([]string, error)
- func (r *RedisClientWrap) SetRemove(key string, val ...string) IntCmd
- func (r *RedisClientWrap) SortedSetAdd(key string, score int, value string) bool
- func (r *RedisClientWrap) SortedSetCard(key string) IntCmd
- func (r *RedisClientWrap) SortedSetRange(key string, min int64, max int64) ([]string, error)
- func (r *RedisClientWrap) SortedSetRank(key string, value string) IntCmd
- func (r *RedisClientWrap) SortedSetRemove(key string, values ...string) IntCmd
- func (r *RedisClientWrap) SortedSetRemoveRange(key string, min int64, max int64) IntCmd
- type StatusCmd
- type StringCmd
- type StringCmdMock
- func (cmd *StringCmdMock) Bytes() ([]byte, error)
- func (cmd *StringCmdMock) Float64() (float64, error)
- func (cmd *StringCmdMock) Int64() (int64, error)
- func (cmd *StringCmdMock) Result() (string, error)
- func (cmd *StringCmdMock) Scan(val interface{}) error
- func (cmd *StringCmdMock) String() string
- func (cmd *StringCmdMock) Uint64() (uint64, error)
- func (cmd *StringCmdMock) Val() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteEmpty ¶
Types ¶
type IntCmdMock ¶
type IntCmdMock struct {
// contains filtered or unexported fields
}
func (*IntCmdMock) Result ¶
func (c *IntCmdMock) Result() (int64, error)
func (*IntCmdMock) String ¶
func (c *IntCmdMock) String() string
func (*IntCmdMock) Val ¶
func (c *IntCmdMock) Val() int64
type RedisClient ¶
type RedisClient interface { Get(key string) StringCmd Set(key string, value interface{}, expiration time.Duration) StatusCmd Erase(key string) Exists(key string) bool SetAdd(key string, val string) IntCmd SetCard(key string) IntCmd SetList(key string) ([]string, error) SetRemove(key string, val ...string) IntCmd SortedSetAdd(key string, score int, value string) bool SortedSetRange(key string, min int64, max int64) ([]string, error) SortedSetRemoveRange(key string, min int64, max int64) IntCmd SortedSetRank(key string, value string) IntCmd SortedSetRemove(key string, values ...string) IntCmd SortedSetCard(key string) IntCmd Keys(pattern string) ([]string, error) }
func NewRedisMock ¶
func NewRedisMock() RedisClient
type RedisClientMock ¶
type RedisClientMock struct {
// contains filtered or unexported fields
}
func (*RedisClientMock) Erase ¶
func (r *RedisClientMock) Erase(key string)
func (*RedisClientMock) Exists ¶
func (c *RedisClientMock) Exists(key string) bool
func (*RedisClientMock) Get ¶
func (c *RedisClientMock) Get(key string) StringCmd
func (*RedisClientMock) Set ¶
func (c *RedisClientMock) Set(key string, value interface{}, expiration time.Duration) StatusCmd
func (*RedisClientMock) SetCard ¶
func (r *RedisClientMock) SetCard(key string) IntCmd
func (*RedisClientMock) SetRemove ¶
func (r *RedisClientMock) SetRemove(key string, val ...string) IntCmd
func (*RedisClientMock) SortedSetAdd ¶
func (r *RedisClientMock) SortedSetAdd(key string, score int, value string) bool
func (*RedisClientMock) SortedSetCard ¶
func (r *RedisClientMock) SortedSetCard(key string) IntCmd
func (*RedisClientMock) SortedSetRange ¶
func (*RedisClientMock) SortedSetRank ¶
func (r *RedisClientMock) SortedSetRank(key string, value string) IntCmd
func (*RedisClientMock) SortedSetRemove ¶
func (r *RedisClientMock) SortedSetRemove(key string, values ...string) IntCmd
func (*RedisClientMock) SortedSetRemoveRange ¶
func (r *RedisClientMock) SortedSetRemoveRange(key string, min int64, max int64) IntCmd
type RedisClientWrap ¶
func (*RedisClientWrap) Erase ¶
func (r *RedisClientWrap) Erase(key string)
func (*RedisClientWrap) Exists ¶
func (r *RedisClientWrap) Exists(key string) bool
func (*RedisClientWrap) Get ¶
func (r *RedisClientWrap) Get(key string) StringCmd
func (*RedisClientWrap) Set ¶
func (r *RedisClientWrap) Set(key string, value interface{}, expiration time.Duration) StatusCmd
func (*RedisClientWrap) SetCard ¶
func (r *RedisClientWrap) SetCard(key string) IntCmd
func (*RedisClientWrap) SetRemove ¶
func (r *RedisClientWrap) SetRemove(key string, val ...string) IntCmd
func (*RedisClientWrap) SortedSetAdd ¶
func (r *RedisClientWrap) SortedSetAdd(key string, score int, value string) bool
func (*RedisClientWrap) SortedSetCard ¶
func (r *RedisClientWrap) SortedSetCard(key string) IntCmd
func (*RedisClientWrap) SortedSetRange ¶
func (*RedisClientWrap) SortedSetRank ¶
func (r *RedisClientWrap) SortedSetRank(key string, value string) IntCmd
func (*RedisClientWrap) SortedSetRemove ¶
func (r *RedisClientWrap) SortedSetRemove(key string, values ...string) IntCmd
func (*RedisClientWrap) SortedSetRemoveRange ¶
func (r *RedisClientWrap) SortedSetRemoveRange(key string, min int64, max int64) IntCmd
type StringCmdMock ¶
func (*StringCmdMock) Bytes ¶
func (cmd *StringCmdMock) Bytes() ([]byte, error)
func (*StringCmdMock) Float64 ¶
func (cmd *StringCmdMock) Float64() (float64, error)
func (*StringCmdMock) Int64 ¶
func (cmd *StringCmdMock) Int64() (int64, error)
func (*StringCmdMock) Result ¶
func (cmd *StringCmdMock) Result() (string, error)
func (*StringCmdMock) Scan ¶
func (cmd *StringCmdMock) Scan(val interface{}) error
func (*StringCmdMock) String ¶
func (cmd *StringCmdMock) String() string
func (*StringCmdMock) Uint64 ¶
func (cmd *StringCmdMock) Uint64() (uint64, error)
func (*StringCmdMock) Val ¶
func (cmd *StringCmdMock) Val() string
Click to show internal directories.
Click to hide internal directories.