Documentation
¶
Index ¶
- func Get[T Model](db *Database, key string) (T, error)
- func Values[T Model](db *Database, prefixes ...string) ([]T, error)
- type Database
- func (db *Database) Close() error
- func (db *Database) Get(key string, val Model) error
- func (db *Database) Put(models ...Model) error
- func (db *Database) RawGet(collection, key string) ([]byte, error)
- func (db *Database) RawValues(w io.Writer, prefixes ...string) error
- func (db *Database) Values(forModel Model, prefixes ...string) ([]Model, error)
- type Entry
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) Get ¶
Get retrieves a model from the database. If the model is not found, a bader.ErrKeyNotFound error is returned.
Click to show internal directories.
Click to hide internal directories.