Documentation ¶
Index ¶
- Variables
- type Database
- func (db *Database) Select(id uint) (record records.Record, err error)
- func (db *Database) SelectAll() (records []records.Record)
- func (db *Database) Start(_ context.Context) (_ <-chan error, err error)
- func (db *Database) Stop() (err error)
- func (db *Database) String() string
- func (db *Database) Update(id uint, record records.Record) (err error)
- type PersistentDatabase
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRecordNotFound = errors.New("record not found")
Functions ¶
This section is empty.
Types ¶
type Database ¶
func NewDatabase ¶
func NewDatabase(data []records.Record, persistentDB PersistentDatabase) *Database
NewDatabase creates a new in memory database.
Click to show internal directories.
Click to hide internal directories.