Documentation ¶
Index ¶
Constants ¶
View Source
const (
// TimeLayout represent time layout for parsing time.
TimeLayout = "2006-01-02T15:04:05"
)
Variables ¶
This section is empty.
Functions ¶
func ParseBrand ¶ added in v0.2.1
Types ¶
type Revision ¶
type Revision struct { ID string `json:"id" db:"id"` URL string `json:"url" db:"url"` FileHashSum *string `json:"file_hash_sum" db:"file_hash_sum"` Removed int `json:"removed" db:"removed"` Added int `json:"added" db:"added"` CreatedAt time.Time `json:"created_at" db:"created_at"` }
Revision represents storage model for revision entity.
func RevisionFromGov ¶
func TestRevision ¶
type RevisionStatMonth ¶
type RevisionStatMonth struct { Month time.Month `db:"month" json:"month"` Year int `db:"year" json:"year"` Added int `db:"added" json:"added"` Removed int `db:"removed" json:"removed"` }
RevisionStatMonth represents revisions aggregate by month.
type Status ¶
type Status string
Status represent status of the vehicle search. Can be either "stolen" or "removed".
type Vehicle ¶
type Vehicle struct { CheckSum string `db:"id" json:"id"` Brand *string `db:"brand" json:"brand"` Maker *string `db:"maker" json:"maker,omitempty"` Model *string `db:"model" json:"model,omitempty"` Color *string `db:"color" json:"color,omitempty"` Number *string `db:"number" json:"number,omitempty"` BodyNumber *string `db:"body_number" json:"body_number,omitempty"` ChassisNumber *string `db:"chassis_number" json:"chassis_number,omitempty"` EngineNumber *string `db:"engine_number" json:"engine_number,omitempty"` OVD string `db:"ovd" json:"ovd"` Kind *string `db:"kind" json:"kind,omitempty"` Status Status `db:"status" json:"status"` RevisionID string `db:"revision_id" json:"revision_id"` TheftDate string `db:"theft_date" json:"theft_date"` InsertDate time.Time `db:"insert_date" json:"insert_date"` }
Vehicle represents storage model for vehicles entity.
func TestVehicle ¶
func VehicleFromGov ¶
func VehicleFromGov(revision string, vehicle *WantedVehicle) (*Vehicle, error)
func (*Vehicle) BeforeCreate ¶
type WantedVehicle ¶
type WantedVehicle struct { OVD string `db:"ovd" json:"organunit"` Brand string `db:"brand" json:"brandmodel"` Color *string `db:"color" json:"color"` CarType *string `db:"car_type" json:"cartype"` Number *string `db:"number" json:"vehiclenumber"` BodyNumber *string `db:"body_number" json:"bodynumber"` ChassisNumber *string `db:"chassis_number" json:"chassisnumber"` EngineNumber *string `db:"engine_number" json:"enginenumber"` TheftDate string `db:"theft_date" json:"illegalseizuredate"` InsertDate string `db:"insert_date" json:"insertdate"` CheckSum string `db:"check_sum" json:"check_sum"` }
func (*WantedVehicle) CalculateCheckSum ¶ added in v0.2.1
func (w *WantedVehicle) CalculateCheckSum() string
Click to show internal directories.
Click to hide internal directories.