Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRecordNotFound = errors.New("record not found")
)
Functions ¶
This section is empty.
Types ¶
type RevisionRepository ¶
type Store ¶
type Store interface { Revision() RevisionRepository Vehicle() VehicleRepository }
type Transport ¶
Transport is a wrapper for slice of WantedVehicle.
func (Transport) Less ¶
Less reports whether the element with index i should sort before the element with index j.
func (Transport) Search ¶
Search returns id of element, which has specified ID. Transport array should be pre-sorted.
Uses binary-search algorithm under the hood. More about algorithm: https://en.wikipedia.org/wiki/Binary_search_algorithm.
type VehicleRepository ¶
type VehicleRepository interface { Create(revision *model.Revision, vehicles ...model.Vehicle) error FindByNumber(number string) ([]model.Vehicle, error) FindByVIN(vin string) ([]model.Vehicle, error) FindByRevisionID(id string) ([]model.Vehicle, error) All() ([]model.Vehicle, error) AllWithLimit(limit int64) ([]model.Vehicle, error) }
Click to show internal directories.
Click to hide internal directories.