v0.1.6 Latest Latest

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

Go to latest
Published: Jul 30, 2018 License: Apache-2.0 Imports: 10 Imported by: 22




This section is empty.


This section is empty.


func OpenDirectory

func OpenDirectory(directory string) (storagecommon.EntityStorage, error)

OpenDirectory opens the directory as filesystem entity storage


type FileSystemEntityStorage

type FileSystemEntityStorage struct {
	// contains filtered or unexported fields

FileSystemEntityStorage is an implementation of Entity Storage using filesystem

func (*FileSystemEntityStorage) Close

func (es *FileSystemEntityStorage) Close()

Close the entity storage

func (*FileSystemEntityStorage) Exists

func (es *FileSystemEntityStorage) Exists(typeName string, entityID common.EntityID) (exists bool, err error)

Exists checks if entity is in entity storage

func (*FileSystemEntityStorage) IsEOF

func (es *FileSystemEntityStorage) IsEOF(err error) bool

IsEOF check if the error is an EOF error

func (*FileSystemEntityStorage) List

func (es *FileSystemEntityStorage) List(typeName string) ([]common.EntityID, error)

List retrives all entity IDs in entity storage of specified type

func (*FileSystemEntityStorage) Read

func (es *FileSystemEntityStorage) Read(typeName string, entityID common.EntityID) (interface{}, error)

Read reads entity data from entity storage

func (*FileSystemEntityStorage) Write

func (es *FileSystemEntityStorage) Write(typeName string, entityID common.EntityID, data interface{}) error

Write writes entity data to entity storage

Jump to

Keyboard shortcuts

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