Documentation
¶
Overview ¶
Package reference contains constructors for public API reference types.
Index ¶
- Constants
- type Generator
- func (h Generator) AgenciesHref(systemID string) *string
- func (h Generator) Agency(id string, systemID string, name string) *api.Agency_Reference
- func (h Generator) Alert(id, systemID, cause, effect string) *api.Alert_Reference
- func (h Generator) Feed(id string, systemID string) *api.Feed_Reference
- func (h Generator) FeedUpdatesHref(systemID string, feedID string) *string
- func (h Generator) FeedsHref(systemID string) *string
- func (h Generator) Route(id string, systemID string, color string) *api.Route_Reference
- func (h Generator) RoutesHref(systemID string) *string
- func (h Generator) Shape(id string, systemID string) *api.Shape_Reference
- func (h Generator) Stop(id string, systemID string, name pgtype.Text) *api.Stop_Reference
- func (h Generator) StopsHref(systemID string) *string
- func (h Generator) System(id string) *api.System_Reference
- func (h Generator) SystemsHref() *string
- func (h Generator) TransfersHref(systemID string) *string
- func (h Generator) Trip(id string, route *api.Route_Reference, destination *api.Stop_Reference, ...) *api.Trip_Reference
- func (h Generator) Vehicle(id string, systemID string) *api.Vehicle_Reference
Constants ¶
View Source
const XTransiterHost = "X-Transiter-Host"
XTransiterHost is the key of the HTTP header whose value is used as the base URL in all link values.
TODO(APIv2): rename X-Transiter-BaseURL
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator is used for generating reference messages.
func NewGenerator ¶
func (Generator) AgenciesHref ¶
func (Generator) Alert ¶
func (h Generator) Alert(id, systemID, cause, effect string) *api.Alert_Reference
func (Generator) FeedUpdatesHref ¶
func (Generator) RoutesHref ¶
func (Generator) Shape ¶ added in v0.6.1
func (h Generator) Shape(id string, systemID string) *api.Shape_Reference
func (Generator) SystemsHref ¶
func (Generator) TransfersHref ¶
func (Generator) Trip ¶
func (h Generator) Trip(id string, route *api.Route_Reference, destination *api.Stop_Reference, vehicle *api.Vehicle_Reference, directionID bool) *api.Trip_Reference
Click to show internal directories.
Click to hide internal directories.