Documentation ¶
Index ¶
- 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) ([]string, error)
- func (d *Driver) Write(collection, resource string, v interface{}) error
- type Logger
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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
func (*Driver) List ¶ added in v1.1.0
List all records from a collection; this is returned as a slice of strings because there is no way of knowing what type the record is.
type Logger ¶
type Logger interface { Fatal(string, ...interface{}) Error(string, ...interface{}) Warn(string, ...interface{}) Info(string, ...interface{}) Debug(string, ...interface{}) Trace(string, ...interface{}) }
Logger is a generic logger interface
type Options ¶
type Options struct { Codec codec.MarshalUnmarshaler Logger // the logger scribble will use (configurable) }
Options uses for specification of working golang-scribble
Directories ¶
Path | Synopsis |
---|---|
Package codec contains sub-packages with different codecs that can be used to encode and decode entities in Scribble.
|
Package codec contains sub-packages with different codecs that can be used to encode and decode entities in Scribble. |
binary
Package binary contains a codec to encode and decode entities in binary format
|
Package binary contains a codec to encode and decode entities in binary format |
json
Package json contains a codec to encode and decode entities in JSON format
|
Package json contains a codec to encode and decode entities in JSON format |
Click to show internal directories.
Click to hide internal directories.