Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SerializedErrorResponse ¶
Types ¶
type Coordinates ¶
type Coordinates []string
func (Coordinates) Latitude ¶
func (c Coordinates) Latitude() string
func (Coordinates) Longitude ¶
func (c Coordinates) Longitude() string
func (Coordinates) ToString ¶
func (c Coordinates) ToString() string
func (Coordinates) Valid ¶
func (c Coordinates) Valid() bool
TODO Can be improved to return more specific errors
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type Order ¶
type Order struct {
ID uint `gorm:"primary_key" json:"id"`
DistanceMeters int `json:"distance"`
Status OrderStatus `json:"status"`
}
type OrderDatabase ¶
func (OrderDatabase) Create ¶
func (o OrderDatabase) Create(order *Order)
func (OrderDatabase) Migrate ¶
func (o OrderDatabase) Migrate()
func (OrderDatabase) Take ¶
func (o OrderDatabase) Take(orderID uint) error
type OrderStatus ¶
type OrderStatus string
const ( OrderUnassigned OrderStatus = "UNASSIGNED" OrderTaken OrderStatus = "TAKEN" )
Click to show internal directories.
Click to hide internal directories.