Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrSectionNotFound = errors.New("database not found in the config") ErrDriverNotFound = errors.New("database driver not found") )
Functions ¶
Types ¶
type Deleter ¶
Deleter defines an extension interface for KeyValue implementations that defines the Delete operation on the Database.
This interface is used in the "del" command.
type Driver ¶
type Driver interface {
New() KeyValue
}
Driver defines an interface for initializing new KeyValue implementation. The databases will have corresponding Driver implementations.
To use a Driver with this package, it must first be registered through the Register function.
type DriverFunc ¶
type DriverFunc func() KeyValue
DriverFunc defines a function type that implements the Driver interface.
func (DriverFunc) New ¶
func (df DriverFunc) New() KeyValue
type Initializer ¶
type Initializer interface {
Init() error
}
Initializer defines the interface that a KeyValue implementation can implement if explicit initialization is required.
This method will be called after the configuration is marshalled into the implementation struct.
type Lister ¶
Lister defines an extension inteface for KeyValue implementations that can list the keys in the Database.