Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { Locations *LocationService Slots *SlotService }
Client is an HTTP client for the Trusted Traveler API
type Location ¶
type Location struct { ID int `json:"id" header:"ID,text"` Name string `json:"name" header:"Name"` ShortName string `json:"shortName"` LocationType string `json:"locationType"` LocationCode string `json:"locationCode"` Address string `json:"address"` AddressAdditional string `json:"addressAdditional"` City string `json:"city" header:"City"` State string `json:"state" header:"State"` PostalCode string `json:"postalCode"` CountryCode string `json:"countryCode"` TzData string `json:"tzData"` PhoneNumber string `json:"phoneNumber"` PhoneAreaCode string `json:"phoneAreaCode"` PhoneCountryCode string `json:"phoneCountryCode"` PhoneExtension string `json:"phoneExtension"` PhoneAltNumber string `json:"phoneAltNumber"` PhoneAltAreaCode string `json:"phoneAltAreaCode"` PhoneAltCountryCode string `json:"phoneAltCountryCode"` PhoneAltExtension string `json:"phoneAltExtension"` FaxNumber string `json:"faxNumber"` FaxAreaCode string `json:"faxAreaCode"` FaxCountryCode string `json:"faxCountryCode"` FaxExtension string `json:"faxExtension"` EffectiveDate string `json:"effectiveDate"` Temporary bool `json:"temporary"` InviteOnly bool `json:"inviteOnly"` Operational bool `json:"operational"` Directions string `json:"directions"` Notes string `json:"notes"` MapFileName string `json:"mapFileName"` LastUpdatedBy string `json:"lastUpdatedBy"` LastUpdatedDate string `json:"lastUpdatedDate"` CreatedDate string `json:"createdDate"` Services []Service `json:"services" header:"Services,text"` }
Location is a place where Trusted Traveler services are offered
type LocationParameters ¶
type LocationParameters struct { InviteOnly *bool `url:"inviteOnly,omitempty"` Operational *bool `url:"operational,omitempty"` ServiceName *string `url:"serviceName,omitempty"` }
LocationParameters represent filters on a list of locations. All fields are optional and will be omitted if nil.
type LocationService ¶
type LocationService struct {
// contains filtered or unexported fields
}
LocationService can list locations from the schedule API
func (*LocationService) List ¶
func (s *LocationService) List(params LocationParameters) ([]Location, error)
List fetches the list of locations based on the supplied parameters
type Options ¶
type Options struct {
URL string
}
Options holds configurable parameters for a Client
type Slot ¶
type Slot struct { LocationID int `json:"locationId" header:"Location,text"` Start string `json:"startTimestamp" header:"Start"` End string `json:"endTimestamp" header:"End"` Active bool `json:"active"` Duration int `json:"duration" header:"Duration"` }
Slot is an available interview appointment
type SlotParameters ¶
type SlotParameters struct { OrderBy *string `url:"orderBy,omitempty"` Limit *int `url:"limit,omitempty"` LocationID *string `url:"locationId,omitempty"` Minimum *int `url:"minimum,omitempty"` }
SlotParameters represent filters on a list of slots. All fields are optional and will be omitted if nil.
type SlotService ¶
type SlotService struct {
// contains filtered or unexported fields
}
SlotService can list appointment slots from the schedule API
func (*SlotService) List ¶
func (s *SlotService) List(params SlotParameters) ([]Slot, error)
List fetches the list of slots based on the supplied parameters