entitystoragefilesystem

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenDirectory

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

OpenDirectory opens the directory as filesystem entity storage

Types

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