Documentation ¶
Overview ¶
Package db implements persistent storage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { // EntityWithName returns the entity referenced by name EntityWithName(name string) (Entity, error) // SaveEntity saves a entity in the database SaveEntity(entity Entity) error // DeleteEntity deletes a entity from the database DeleteEntity(entity Entity) // Entities returns all entities Entities() ([]Entity, error) }
Database stores entities
func NewDatabase ¶
NewDatabase returns a database which stores data into the folder specified by the argument string.
func NewDatabaseWithStorage ¶
NewDatabaseWithStorage returns a database which uses the argument storage to store data.
func NewTempDatabase ¶
NewTempDatabase returns a temp database
Click to show internal directories.
Click to hide internal directories.