Documentation ¶
Overview ¶
spots' permanent storage
Index ¶
- Constants
- func CheckAreaName(name string) (allow bool)
- type HardStorage
- func (h *HardStorage) AreaDelete(area string) (err error)
- func (h *HardStorage) AreaExist(area string) (have bool)
- func (h *HardStorage) AreaInit(path string) (err error)
- func (h *HardStorage) AreaList() (list []string, err error)
- func (h *HardStorage) AreaReName(oldname, newname string) (err error)
- func (h *HardStorage) SpotDelete(area, spotid string) (err error)
- func (h *HardStorage) SpotExist(area, spotid string) (have bool)
- func (h *HardStorage) SpotRead(area, spotid string) (spot *spots.Spots, err error)
- func (h *HardStorage) SpotReadWithBody(area, spotid string, body spots.DataBodyer) (spot *spots.Spots, err error)
- func (h *HardStorage) SpotStore(area string, spot *spots.Spots) (err error)
Constants ¶
View Source
const ( HARDSTORAGE_FILE_NAME_DATA = "_data" HARDSTORAGE_FILE_NAME_RELATION = "_relation" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HardStorage ¶
type HardStorage struct {
// contains filtered or unexported fields
}
存储器类型
func NewHardStorage ¶
func NewHardStorage(path string, deep uint8) (hardstorage *HardStorage, err error)
新建一个存储实例,只需要一个存储路径和一个路径深度
func (*HardStorage) AreaReName ¶
func (h *HardStorage) AreaReName(oldname, newname string) (err error)
区域改名
func (*HardStorage) SpotDelete ¶
func (h *HardStorage) SpotDelete(area, spotid string) (err error)
func (*HardStorage) SpotExist ¶
func (h *HardStorage) SpotExist(area, spotid string) (have bool)
角色是否存在
func (*HardStorage) SpotRead ¶
func (h *HardStorage) SpotRead(area, spotid string) (spot *spots.Spots, err error)
func (*HardStorage) SpotReadWithBody ¶
func (h *HardStorage) SpotReadWithBody(area, spotid string, body spots.DataBodyer) (spot *spots.Spots, err error)
Click to show internal directories.
Click to hide internal directories.