Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Leg ¶
type Leg struct { StartTime int64 `json:"startTime"` EndTime int64 `json:"endTime"` Mode string `json:"mode"` TransitLeg bool `json:"transitLeg"` AgencyTimeZoneOffset int `json:"agencyTimeZoneOffset"` AgencyId string `json:"agencyId"` ServiceDate string `json:"serviceDate"` From LegVertex `json:"from"` To LegVertex `json:"to"` LegGeometry LegGeometry `json:"legGeometry"` RouteShortName string `json:"routeShortName"` Fares []fares.Fare `json:"fares"` }
func FilterTransitLegs ¶
func FilterTransitLegs(response TripPlannerResponse) []Leg
type LegGeometry ¶
type TripPlannerResponse ¶
type TripPlannerResponse struct {
Plan TripPlan `json:"plan"`
}
func ParseJson ¶
func ParseJson(data []byte) (TripPlannerResponse, error)
func (*TripPlannerResponse) GetAllFares ¶
func (r *TripPlannerResponse) GetAllFares(c *pgx.Conn, a *agency.Agencies) ([][][]fares.Fare, error)
GetAllFares returns a list of fares for each leg of the TripPlannerResponse, following the same structure
Click to show internal directories.
Click to hide internal directories.