Documentation ¶
Index ¶
- func CRSSelector(crs string) string
- func GetDeparturesAsJSON(crs string, r *http.Request) []byte
- func GetDeparturesAsProto(crs string, r *http.Request) []byte
- func GetServiceDetailsAsJSON(id string, r *http.Request) []byte
- func GetServiceDetailsAsProto(id string, r *http.Request) []byte
- func ServiceSelector(service string) string
- type BoardService
- type CallingPoint
- type DepartureBoard
- type DepartureBoardResponse
- type Location
- type ServiceDetail
- type ServiceDetailResponse
- type ServiceID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CRSSelector ¶
func ServiceSelector ¶
Types ¶
type BoardService ¶
type BoardService struct { ScheduledDeparture string `xml:"std" json:"scheduledDeparture"` EstimatedDeparture string `xml:"etd" json:"estimatedDeparture"` ScheduledArrival string `xml:"sta" json:"scheduledArrival"` EstimatedArrival string `xml:"eta" json:"estimatedArrival"` Platform string `xml:"platform" json:"platform"` Operator string `xml:"operator" json:"operator"` OperatorCode string `xml:"operatorCode" json:"operatorCode"` ServiceType string `xml:"serviceType" json:"serviceType"` ServiceID ServiceID `xml:"serviceID" json:"serviceID"` Origin Location `xml:"origin>location" json:"origin"` Destination Location `xml:"destination>location" json:"destination"` }
type CallingPoint ¶
type DepartureBoard ¶
type DepartureBoard struct { GeneratedAt string `xml:"generatedAt" json:"generatedAt"` Location string `xml:"locationName" json:"location"` CRS string `xml:"crs" json:"crs"` PlatformAvailable bool `xml:"platformAvailable" json:"platformAvailable"` Services []BoardService `xml:"trainServices>service" json:"services"` }
type DepartureBoardResponse ¶
type DepartureBoardResponse struct {
Board DepartureBoard `xml:"Body>GetDepartureBoardResponse>GetStationBoardResult"`
}
func GetDepartures ¶
func GetDepartures(crs string, r *http.Request) DepartureBoardResponse
type ServiceDetail ¶
type ServiceDetail struct { Location GeneratedAt string `xml:"generatedAt"` ServiceType string `xml:"serviceType"` Platform int `xml:"platform"` Operator string `xml:"operator"` OperatorCode string `xml:"operatorCode"` ScheduledDeparture string `xml:"std"` EstimatedDeparture string `xml:"etd"` SubsequentCallingPoints []CallingPoint `xml:"subsequentCallingPoints>callingPointList>callingPoint"` }
type ServiceDetailResponse ¶
type ServiceDetailResponse struct {
Detail ServiceDetail `xml:"Body>GetServiceDetailsResponse>GetServiceDetailsResult"`
}
func GetServiceDetails ¶
func GetServiceDetails(id string, r *http.Request) ServiceDetailResponse
Click to show internal directories.
Click to hide internal directories.