Documentation ¶
Overview ¶
Package carsrs realizes the cars resource, allowing the cars manipulation REST APIs to be accepted and delegated to the cars use cases respectively.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StrCoordinate ¶
type StrCoordinate struct { Lat string `form:"lat" binding:"required,latitude"` Lon string `form:"lon" binding:"required,longitude"` }
StrCoordinate is a string-based representation (instead of a numeric representation) of a geographical location.
func (StrCoordinate) ToModel ¶
func (sc StrCoordinate) ToModel() (c model.Coordinate, err error)
ToModel method converts a StrCoordinate to a model.Coordinate struct instance. Existence of this method allows all conversion codes to rely on exactly one implementation, so all fields should be listed here (and if some of them were missed after an update, fixing one place is enough to restore the whole project's sanity again).
Click to show internal directories.
Click to hide internal directories.