Documentation ¶
Overview ¶
Package database provides an abstraction layer between the application and the underlying storage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyNotFound = errors.New("Unable to locate record with the given key")
ErrKeyNotFound is returned when the given key is not in the underlying database.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager maintains transactions and handles repository creation.
func (*Manager) NewServerRepository ¶
func (dbm *Manager) NewServerRepository() (*ServerRepository, error)
NewServerRepository allocates a fully-wired ServerRepository.
type ServerRepository ¶
type ServerRepository struct {
// contains filtered or unexported fields
}
ServerRepository handles persistence and hydration of Server models.
func (*ServerRepository) All ¶
func (repo *ServerRepository) All() ([]model.Server, error)
All returns a slice containing all Servers.
func (*ServerRepository) Delete ¶
func (repo *ServerRepository) Delete(key string) error
Delete attempts to remove a Server defined by the given key.
Click to show internal directories.
Click to hide internal directories.