Documentation ¶
Overview ¶
Package scribble is a tiny JSON database
Index ¶
- Constants
- Variables
- type Driver
- func (d *Driver) Delete(collection, resource string) error
- func (d *Driver) List(collection string) ([]string, error)
- func (d *Driver) Read(collection, resource string, v interface{}) error
- func (d *Driver) ReadAll(collection string) ([][]byte, error)
- func (d *Driver) Write(collection, resource string, v interface{}) error
- type Logger
- type Options
Constants ¶
View Source
const Version = "1.0.4"
Version is the current version of the project
Variables ¶
View Source
var ( ErrMissingResource = errors.New("missing resource - unable to save record") ErrMissingCollection = errors.New("missing collection - no place to save record") )
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is what is used to interact with the scribble database. It runs transactions, and provides log output
func New ¶
New creates a new scribble database at the desired directory location, and returns a *Driver to then use for interacting with the database
func (*Driver) Delete ¶
Delete locks that database and then attempts to remove the collection/resource specified by path
Click to show internal directories.
Click to hide internal directories.