Documentation ¶
Index ¶
- type IMemoryCard
- type MemoryCard
- func (mc *MemoryCard) Clear()
- func (mc *MemoryCard) Delete(key string)
- func (mc *MemoryCard) Destroy() error
- func (mc *MemoryCard) GetInt64(key string) int64
- func (mc *MemoryCard) GetString(key string) string
- func (mc *MemoryCard) Has(key string) bool
- func (mc *MemoryCard) Load() error
- func (mc *MemoryCard) Save() error
- func (mc *MemoryCard) Set(key string, value interface{})
- func (mc *MemoryCard) SetInt64(key string, value int64)
- func (mc *MemoryCard) SetString(key string, value string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMemoryCard ¶
type IMemoryCard interface { GetInt64(key string) int64 GetString(key string) string SetInt64(key string, value int64) Clear() Delete(key string) Has(key string) bool Load() error Save() error Destroy() error SetString(key string, value string) Set(key string, value interface{}) }
memory card interface
func NewMemoryCard ¶
func NewMemoryCard(name string) (IMemoryCard, error)
TODO: 我将这个地方调整为 把storage的初始化放内部,原实现者可根据情况调整一下
type MemoryCard ¶
type MemoryCard struct {
// contains filtered or unexported fields
}
memory card
func (*MemoryCard) Clear ¶
func (mc *MemoryCard) Clear()
func (*MemoryCard) Delete ¶
func (mc *MemoryCard) Delete(key string)
func (*MemoryCard) Destroy ¶
func (mc *MemoryCard) Destroy() error
func (*MemoryCard) GetInt64 ¶
func (mc *MemoryCard) GetInt64(key string) int64
func (*MemoryCard) GetString ¶
func (mc *MemoryCard) GetString(key string) string
func (*MemoryCard) Has ¶
func (mc *MemoryCard) Has(key string) bool
func (*MemoryCard) Load ¶
func (mc *MemoryCard) Load() error
func (*MemoryCard) Save ¶
func (mc *MemoryCard) Save() error
func (*MemoryCard) Set ¶
func (mc *MemoryCard) Set(key string, value interface{})
func (*MemoryCard) SetInt64 ¶
func (mc *MemoryCard) SetInt64(key string, value int64)
func (*MemoryCard) SetString ¶
func (mc *MemoryCard) SetString(key string, value string)
Click to show internal directories.
Click to hide internal directories.