storage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(typeName string, entityID common.EntityID, callback ExistsCallbackFunc)

Exists checks if entity of specified ID exists in storage

func Initialize

func Initialize()

Initialize is called by engine to initialize storage module

func ListEntityIDs

func ListEntityIDs(typeName string, callback ListCallbackFunc)

ListEntityIDs returns all entity IDs in storage

Return values can be large for common entity types

func Load

func Load(typeName string, entityID common.EntityID, callback LoadCallbackFunc)

Load loads entity data from storage

func Save

func Save(typeName string, entityID common.EntityID, data interface{}, callback SaveCallbackFunc)

Save saves entity data to storage

func Shutdown

func Shutdown()

Shutdown storage module

Types

type ExistsCallbackFunc

type ExistsCallbackFunc func(exists bool, err error)

ExistsCallbackFunc is the callback type of storage Exists

type ListCallbackFunc

type ListCallbackFunc func([]common.EntityID, error)

ListCallbackFunc is the callback type of storage List

type LoadCallbackFunc

type LoadCallbackFunc func(data interface{}, err error)

LoadCallbackFunc is the callback type of storage Load

type SaveCallbackFunc

type SaveCallbackFunc func()

SaveCallbackFunc is the callback type of storage Save

Directories

Path Synopsis
backend

Jump to

Keyboard shortcuts

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