Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDatabaseEngine ¶
RegisterDatabaseEngine registers a database engine.
Types ¶
type Config ¶
type Config interface{}
Config is a generic config type for database used essentially during YAML configuration parsing, so database engines are free to implement their own configuration requirements.
type Engine ¶
type Engine interface {
// NewConfig returns a config instance for the corresponding DB engine.
NewConfig() Config
// CheckConfig ensure proper configuration parameters and also handle
// configuration set by environment variables.
CheckConfig() error
// Connect initiates connection to the database.
Connect() error
// Disconnect initiates disconnection from the database.
Disconnect() error
// Add adds the provided keys into the database.
Add(e openpgp.EntityList) error
// Del removes the provided keys from the database.
Del(e openpgp.EntityList) error
// Get retrieves keys corresponding to the search pattern.
Get(s string, isFingerprint bool, exact bool, kt KeyType) (openpgp.EntityList, error)
}
Engine defines interface that database engines must implement.
func GetDatabaseEngine ¶
GetDatabaseEngine returns the database engine correspo
Click to show internal directories.
Click to hide internal directories.