Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnknownEntity is returned for requests to load an entity // that does not exist. ErrUnknownEntity = errors.New("The specified entity does not exist") // ErrUnknownGroup is returned for requests to load a group // that does not exist. ErrUnknownGroup = errors.New("The specified group does not exist") // ErrUnknownDatabase is returned for an attempt to create a // new database that hasn't been registered. ErrUnknownDatabase = errors.New("The specified database does not exist") // ErrInternalError is used for all other errors that occur // within a database implementation. ErrInternalError = errors.New("The database has encountered an internal error") )
Functions ¶
func GetBackendList ¶
func GetBackendList() []string
GetBackendList returns a string list of the backends that are available
Types ¶
type DB ¶
type DB interface {
// Entity handling
DiscoverEntityIDs() ([]string, error)
LoadEntity(string) (*pb.Entity, error)
SaveEntity(*pb.Entity) error
DeleteEntity(string) error
// Group handling
DiscoverGroupNames() ([]string, error)
LoadGroup(string) (*pb.Group, error)
SaveGroup(*pb.Group) error
DeleteGroup(string) error
}
DB specifies the methods that a DB engine must provide.
Click to show internal directories.
Click to hide internal directories.