Documentation ¶
Overview ¶
Package inspection provides means to inspect cargos.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler interface { CargoWasMisdirected(*shipping.Cargo) CargoHasArrived(*shipping.Cargo) }
EventHandler provides means of subscribing to inspection events.
type Service ¶
type Service interface { // InspectCargo inspects cargo and send relevant notifications to // interested parties, for example if a cargo has been misdirected, or // unloaded at the final destination. InspectCargo(id shipping.TrackingID) }
Service provides cargo inspection operations.
func NewService ¶
func NewService(cargos shipping.CargoRepository, events shipping.HandlingEventRepository, handler EventHandler) Service
NewService creates a inspection service with necessary dependencies.
Click to show internal directories.
Click to hide internal directories.