Documentation
¶
Index ¶
- func GetDates(service DmvService, office FieldOffice) (dates []string, err error)
- func GetTimes(service DmvService, office FieldOffice, date string) (times []string, err error)
- func NewRetryableClient() *http.Client
- type Appointment
- type AppointmentResponse
- type AuthCheck
- type Availability
- type Branch
- type DmvFieldOfficeHours
- type DmvService
- type FieldOffice
- type Friday
- type Meta
- type Monday
- type Saturday
- type Sunday
- type Thursday
- type Title
- type Tuesday
- type Wednesday
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDates ¶
func GetDates(service DmvService, office FieldOffice) (dates []string, err error)
GetDates ["2024-02-16T00:00:00", "2024-03-22T00:00:00"]
func GetTimes ¶
func GetTimes(service DmvService, office FieldOffice, date string) (times []string, err error)
GetTimes 24h format, f.e. ["10:20","11:00","11:20","13:40","14:20","14:40","15:20","15:40"]
func NewRetryableClient ¶
Types ¶
type Appointment ¶
type Appointment struct {
NumberItems int `json:"numberItems"`
OfficeID string `json:"officeId"`
RequestDate string `json:"requestDate"`
RequestTime string `json:"requestTime"`
RequestTask string `json:"requestTask"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
TelNumber string `json:"telNumber"`
Token string `json:"token"`
HasPrevPermit bool `json:"hasPrevPermit"`
Dob string `json:"dob"`
DlNumber string `json:"dlNumber"`
SafetyCourseCompleted string `json:"safetyCourseCompleted"`
}
type AppointmentResponse ¶
type AppointmentResponse struct {
FindApptResponse struct {
Cheader []any `json:"cheader,omitempty"`
Status struct {
Success string `json:"bsuccess,omitempty"`
} `json:"bstatus,omitempty"`
Payload struct {
Hold []any `json:"dhold,omitempty"`
Office []any `json:"doffice,omitempty"`
FoaStatusCode struct {
StatusCode string `json:"dstatusCode,omitempty"`
} `json:"dfoaStatusCode,omitempty"`
} `json:"dpayload,omitempty"`
} `json:"dFindApptResponse,omitempty"`
}
func PostAppointment ¶
func PostAppointment(appointment Appointment) (response *AppointmentResponse, err error)
type AuthCheck ¶
type AuthCheck struct {
User string `json:"user,omitempty"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
UID bool `json:"uid,omitempty"`
}
func GetAuthCheck ¶
type Availability ¶
type Availability struct {
PublicID string `json:"publicId,omitempty"`
Name string `json:"name,omitempty"`
AddressLine1 string `json:"addressLine1,omitempty"`
AddressZip string `json:"addressZip,omitempty"`
}
func GetAvailable ¶
func GetAvailable(service DmvService) (availabilityList []Availability, err error)
type Branch ¶
type Branch struct {
PublicID string `json:"publicId,omitempty"`
Name string `json:"name,omitempty"`
AddressLine1 string `json:"addressLine1,omitempty"`
AddressZip string `json:"addressZip,omitempty"`
}
func GetBranches ¶
type DmvFieldOfficeHours ¶
type DmvFieldOfficeHours struct {
Sunday Sunday `json:"sunday,omitempty"`
Monday Monday `json:"monday,omitempty"`
Tuesday Tuesday `json:"tuesday,omitempty"`
Wednesday Wednesday `json:"wednesday,omitempty"`
Thursday Thursday `json:"thursday,omitempty"`
Friday Friday `json:"friday,omitempty"`
Saturday Saturday `json:"saturday,omitempty"`
}
type DmvService ¶
type DmvService struct {
PublicID string `json:"publicId,omitempty"`
Name string `json:"name,omitempty"`
Active bool `json:"active,omitempty"`
PublicEnabled bool `json:"publicEnabled,omitempty"`
}
func GetServices ¶
func GetServices() (services []DmvService, err error)
type FieldOffice ¶
type FieldOffice struct {
ID int `json:"id,omitempty"`
Slug string `json:"slug,omitempty"`
Link string `json:"link,omitempty"`
Title Title `json:"title,omitempty"`
Meta Meta `json:"meta,omitempty"`
Distance bool `json:"distance,omitempty"`
}
func GetFieldOffices ¶
func GetFieldOffices(query string) (offices []FieldOffice, err error)
func (FieldOffice) LatLon ¶
func (o FieldOffice) LatLon() (lat, lon float64)
func (FieldOffice) String ¶
func (o FieldOffice) String() string
type Meta ¶
type Meta struct {
PublicID string `json:"dmv_field_office_public_id,omitempty"`
Appointment string `json:"dmv_field_office_appointment,omitempty"`
Street string `json:"dmv_field_office_street,omitempty"`
City string `json:"dmv_field_office_city,omitempty"`
Zipcode string `json:"dmv_field_office_zipcode,omitempty"`
Latitude string `json:"dmv_field_office_latitude,omitempty"`
Longitude string `json:"dmv_field_office_longitude,omitempty"`
Hours DmvFieldOfficeHours `json:"dmv_field_office_hours,omitempty"`
Phone string `json:"dmv_field_office_phone,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.