1 // Package location provides the Location aggregate.
8 // UNLocode is the United Nations location code that uniquely identifies a
9 // particular location.
11 // http://www.unece.org/cefact/locode/
12 // http://www.unece.org/cefact/locode/DocColumnDescription.htm#LOCODE
15 // Location is a location is our model is stops on a journey, such as cargo
16 // origin or destination, or carrier movement endpoints.
17 type Location struct {
22 // ErrUnknown is used when a location could not be found.
23 var ErrUnknown = errors.New("unknown location")
25 // Repository provides access a location store.
26 type Repository interface {
27 Find(locode UNLocode) (*Location, error)