Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoResults = errors.New("no results") ErrMultipleVehicles = errors.New("multiple vehicles returned") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*jsonclient.Client
}
type Date ¶
type Date string
Date accepts the DVSA's silly date format (2006.01.02) and converts it to ISO8601 while unmarshalling. When marshalling, it remains as ISO8601.
func (*Date) UnmarshalJSON ¶
type MOTTest ¶
type MOTTest struct { CompletedDate Time `json:"completedDate"` TestResult string `json:"testResult"` ExpiryDate *Date `json:"expiryDate"` OdometerValue string `json:"odometerValue"` OdometerUnit string `json:"odometerUnit"` OdometerResultType string `json:"odometerResultType"` MOTTestNumber string `json:"motTestNumber"` // RfRAndComments provide any "reasons for rejection" and comments RfRAndComments []*RfROrComment `json:"rfrAndComments"` }
type MOTTestsByCompletedDate ¶
type MOTTestsByCompletedDate []*MOTTest
func (MOTTestsByCompletedDate) Len ¶
func (a MOTTestsByCompletedDate) Len() int
func (MOTTestsByCompletedDate) Less ¶
func (a MOTTestsByCompletedDate) Less(i, j int) bool
func (MOTTestsByCompletedDate) Swap ¶
func (a MOTTestsByCompletedDate) Swap(i, j int)
type RfROrComment ¶
type Time ¶
Time accepts the DVSA's silly time format (2006.01.02 15:04:05) and converts it to ISO8601 while unmarshalling. When marshalling, it remains as ISO8601.
func (*Time) UnmarshalJSON ¶
type Vehicle ¶
type Vehicle struct { Registration string `json:"registration"` Make string `json:"make"` Model string `json:"model"` FuelType string `json:"fuelType"` PrimaryColour string `json:"primaryColour"` ManufactureYear *string `json:"manufactureYear"` DVLAID *string `json:"dvlaId"` MOTTestDueDate *string `json:"motTestDueDate"` FirstUsedDate *Date `json:"firstUsedDate"` MOTTests []*MOTTest `json:"motTests"` }
Click to show internal directories.
Click to hide internal directories.