memory_card

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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