Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
Action is a helper type that groups all the info about one action in a batch that belongs together, i.e. uuid, action body and error state.
Consumers of a Action (i.e. database connector) should always check whether an error is already present by the time they receive a batch action. Errors can be introduced at all levels, e.g. validation.
However, error'd actions are not removed to make sure that the list in Actions matches the order and content of the incoming batch request
type Actions ¶
type Actions []Action
Actions groups many Action items together. The order matches the order from the original request. It can be turned into the expected response type using the .Response() method
func (Actions) Response ¶
func (b Actions) Response() []*models.ActionsGetResponse
Response uses the information contained in every Action (uuid, action body and error state) to form the expected response for the Batching request.
type Thing ¶
Thing is a helper type that groups all the info about one thing in a batch that belongs together, i.e. uuid, thing body and error state.
Consumers of a Thing (i.e. database connector) should always check whether an error is already present by the time they receive a batch thing. Errors can be introduced at all levels, e.g. validation.
However, error'd things are not removed to make sure that the list in Things matches the order and content of the incoming batch request
type Things ¶
type Things []Thing
Things groups many Thing items together. The order matches the order from the original request. It can be turned into the expected response type using the .Response() method
func (Things) Response ¶
func (b Things) Response() []*models.ThingsGetResponse
Response uses the information contained in every Thing (uuid, thing body and error state) to form the expected response for the Batching request.