Documentation
¶
Index ¶
- Constants
- type Comp
- type Core
- func (c *Core) GetEmployeeID() contract.ID
- func (c *Core) GetRouteID() contract.ID
- func (c *Core) GetTimestamp() date.Date
- func (c *Core) GetVehicleID() contract.ID
- func (c *Core) SetEmployeeID(x contract.ID)
- func (c *Core) SetRouteID(x contract.ID)
- func (c *Core) SetTimestamp(x date.Date)
- func (c *Core) SetVehicleID(x contract.ID)
- type CoreOption
- type Meta
- type MetaOption
- type Tracking
Constants ¶
View Source
const ( RouteIDKey = "route_id" VehicleIDKey = "vehicle_id" EmployeeIDKey = "employee_id" TimestampKey = "timestamp" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct {
// INFO: The owner is the employer.
owner.Owner `bson:",inline" validate:"recurse"`
latlon.LatLon `bson:",inline" validate:"recurse"`
RouteID *contract.ID `json:"route_id" validate:"nnpt,nz"`
VehicleID *contract.ID `json:"vehicle_id" validate:"nnpt,nz"`
EmployeeID *contract.ID `json:"employee_id" validate:"nnpt,nz"`
Timestamp *date.Date `json:"timestamp" validate:"nnpt,nz"`
}
func ApplyCore ¶
func ApplyCore(c *Core, modifiers ...CoreOption) Core
func (*Core) GetEmployeeID ¶
func (*Core) GetRouteID ¶
func (*Core) GetTimestamp ¶
func (*Core) GetVehicleID ¶
func (*Core) SetEmployeeID ¶
func (*Core) SetRouteID ¶
func (*Core) SetTimestamp ¶
func (*Core) SetVehicleID ¶
type CoreOption ¶
type CoreOption = contracti.CoreOption[Core]
func WithEmployeeID ¶
func WithEmployeeID(x contract.ID) CoreOption
func WithLatLon ¶
func WithLatLon(x latlon.LatLon) CoreOption
func WithOwner ¶
func WithOwner(x owner.Owner) CoreOption
func WithRouteID ¶
func WithRouteID(x contract.ID) CoreOption
func WithTimestamp ¶
func WithTimestamp(x date.Date) CoreOption
func WithVehicleID ¶
func WithVehicleID(x contract.ID) CoreOption
type MetaOption ¶
type MetaOption = contract.MetaOption[Meta]
func WithCommon ¶
func WithCommon(x common.Common) MetaOption
Click to show internal directories.
Click to hide internal directories.