Documentation ¶
Overview ¶
Package unit contains all code related to the unit domain.
Index ¶
- type Backend
- type Driver
- func (d Driver) Append(u Unit) error
- func (d Driver) Apply(u Unit) (updated bool, err error)
- func (d Driver) Create(u Unit) error
- func (d Driver) Delete(id string) error
- func (d Driver) Get(id string) (Unit, error)
- func (d Driver) List() (List, error)
- func (d Driver) Remove(u Unit) error
- func (d Driver) Update(u Unit) error
- func (d Driver) Upsert(u Unit) (updated bool, err error)
- func (d Driver) Use(id string)
- type List
- type Unit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { ListUnits() (List, error) GetUnit(id string) (Unit, error) CreateUnit(Unit) error UpdateUnit(Unit) error AppendUnit(Unit) error RemoveUnit(Unit) error DeleteUnit(id string) error UseUnit(id string) }
Backend interface.
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is the entry point of the domain that expose methods.
type List ¶
type List interface { All() []Unit Index(idx uint) Unit Len() uint String() string MarshalJSON() ([]byte, error) MarshalYAML() (interface{}, error) }
List of unit objects.
Click to show internal directories.
Click to hide internal directories.