inspection

package
Version: v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2019 License: MIT Imports: 1 Imported by: 0

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(*cargo.Cargo)
	CargoHasArrived(*cargo.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 cargo.TrackingID)
}

Service provides cargo inspection operations.

func NewService

func NewService(cargos cargo.Repository, events cargo.HandlingEventRepository, handler EventHandler) Service

NewService creates a inspection service with necessary dependencies.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL