Documentation
¶
Index ¶
Constants ¶
View Source
const ( ATTR_EXPIRE = "expr" //过期时间 ATTR_NX = "nx" // setnx ATTR_XX = "xx" // setxx )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OperationAttr ¶
type OperationAttr struct { Name string Value interface{} }
属性
func WithExpire ¶
func WithExpire(t time.Duration) *OperationAttr
func WithNX ¶
func WithNX() *OperationAttr
func WithXX ¶
func WithXX() *OperationAttr
type OperationAttrs ¶
type OperationAttrs []*OperationAttr
func (OperationAttrs) Find ¶
func (ain OperationAttrs) Find(name string) *InterfaceResult
type StringOperation ¶
type StringOperation struct {
// contains filtered or unexported fields
}
专门处理string类型的操作
func NewStringOperation ¶
func NewStringOperation() *StringOperation
func (*StringOperation) Get ¶
func (ain *StringOperation) Get(key string) *StringResult
func (*StringOperation) MGet ¶
func (ain *StringOperation) MGet(keys ...string) *SliceResult
func (*StringOperation) Set ¶
func (ain *StringOperation) Set(key string, value interface{}, attrs ...*OperationAttr) *InterfaceResult
Click to show internal directories.
Click to hide internal directories.