models

package
v0.0.0-...-24a0202 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agencies

type Agencies []Agency

func (Agencies) ToJsonAgencies

func (as Agencies) ToJsonAgencies() []JsonAgency

type Agency

type Agency struct {
	Key      string
	Id       int
	Name     string
	Url      string
	Timezone string
	Lang     string
	MinLat   float64
	MaxLat   float64
	MinLon   float64
	MaxLon   float64
}

func (Agency) ToJsonAgency

func (a Agency) ToJsonAgency() JsonAgency

type FirstLastStopNamesByTripId

type FirstLastStopNamesByTripId struct {
	TripId        int
	FirstStopName string
	LastStopName  string
}

type JsonAgency

type JsonAgency struct {
	Key      string  `json:"key"`
	Id       int     `json:"id"`
	Name     string  `json:"name"`
	Url      string  `json:"url"`
	Timezone string  `json:"timezone"`
	Lang     string  `json:"lang"`
	MinLat   float64 `json:"min_lat"`
	MaxLat   float64 `json:"max_lat"`
	MinLon   float64 `json:"min_lon"`
	MaxLon   float64 `json:"max_lon"`
}

type JsonGeoLocation

type JsonGeoLocation struct {
	Lat string `json:"lat"`
	Lon string `json:"lon"`
}

type JsonRoute

type JsonRoute struct {
	Name           string   `json:"name"`
	TripId         int      `json:"trip_id"`
	RouteType      int      `json:"route_type"`
	RouteColor     string   `json:"route_color"`
	RouteTextColor string   `json:"route_text_color"`
	FirstStopName  string   `json:"first_stop_name"`
	LastStopName   string   `json:"last_stop_name"`
	StopTimes      []string `json:"stop_times"`
}

type JsonStopGroup

type JsonStopGroup struct {
	Ids          []int           `json:"ids"`
	Name         string          `json:"name"`
	Desc         string          `json:"desc"`
	Distance     float64         `json:"distance"`
	LocationType int             `json:"location_type"`
	GeoLocation  JsonGeoLocation `json:"geo_location"`
	Routes       []JsonRoute     `json:"routes"`
}

type Route

type Route struct {
	Name           string
	TripId         int
	RouteType      int
	RouteColor     string
	RouteTextColor string
	FirstStopName  string
	LastStopName   string
	StopTimesFull  []StopTimeFull
}

func (*Route) ToJsonRoute

func (r *Route) ToJsonRoute() JsonRoute

type RouteByName

type RouteByName []Route

func (RouteByName) Len

func (rn RouteByName) Len() int

func (RouteByName) Less

func (rn RouteByName) Less(i, j int) bool

func (RouteByName) Swap

func (rn RouteByName) Swap(i, j int)

type Routes

type Routes []Route

func (Routes) ToJsonRoutes

func (rs Routes) ToJsonRoutes() []JsonRoute

type Stop

type Stop struct {
	Id           int
	Name         string
	Desc         string
	Lat          string
	Lon          string
	LocationType int
	Distance     float64
	Routes       Routes
}

func (Stop) ToStopGroup

func (s Stop) ToStopGroup() StopGroup

type StopGroup

type StopGroup struct {
	Ids          []int
	Name         string
	Desc         string
	Lat          string
	Lon          string
	LocationType int
	Distance     float64
	Routes       Routes
}

func (StopGroup) ToJsonStopGroup

func (sg StopGroup) ToJsonStopGroup() JsonStopGroup

type StopGroupByDistance

type StopGroupByDistance []StopGroup

func (StopGroupByDistance) Len

func (sgbd StopGroupByDistance) Len() int

func (StopGroupByDistance) Less

func (sgbd StopGroupByDistance) Less(i, j int) bool

func (StopGroupByDistance) Swap

func (sgbd StopGroupByDistance) Swap(i, j int)

type StopGroups

type StopGroups []StopGroup

func (StopGroups) ToJsonStopGroups

func (sgs StopGroups) ToJsonStopGroups() []JsonStopGroup

type StopTimeFull

type StopTimeFull struct {
	StopId         int
	StopName       string
	StopDesc       string
	StopLat        string
	StopLon        string
	LocationType   int
	ArrivalTime    string
	DepartureTime  string
	StopSequence   int
	DirectionId    int
	RouteShortName string
	RouteType      int
	RouteColor     string
	RouteTextColor string
	TripId         int
}

type StopTimeFullByDepartureDate

type StopTimeFullByDepartureDate []StopTimeFull

func (StopTimeFullByDepartureDate) Len

func (stf StopTimeFullByDepartureDate) Len() int

func (StopTimeFullByDepartureDate) Less

func (stf StopTimeFullByDepartureDate) Less(i, j int) bool

func (StopTimeFullByDepartureDate) Swap

func (stf StopTimeFullByDepartureDate) Swap(i, j int)

type Stops

type Stops []Stop

func (Stops) ToStopGroups

func (ss Stops) ToStopGroups() StopGroups

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL