Documentation ¶
Index ¶
- Variables
- func ClearMOTD()
- func RegisterPairConnectionHandler(handler PairConnectionHandler)
- func RenderData(c *yarf.Context, data interface{}, cacheControl string)
- func RenderMsgpack(c *yarf.Context, data interface{})
- func RenderUnauthorized(c *yarf.Context)
- func SetMOTDHTML(v map[string]string)
- func SetMOTDHTMLForLocale(locale, message string)
- func SetMOTDMainLocale(v string)
- func SetMOTDPriority(v int)
- type AndroidClientConfig
- func (r *AndroidClientConfig) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *AndroidClientConfig) Beginx() (sqalx.Node, error)
- func (r *AndroidClientConfig) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *AndroidClientConfig) Get(c *yarf.Context) error
- func (r *AndroidClientConfig) WithNode(node sqalx.Node) *AndroidClientConfig
- type Announcement
- func (r *Announcement) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Announcement) Beginx() (sqalx.Node, error)
- func (r *Announcement) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Announcement) Get(c *yarf.Context) error
- func (r *Announcement) WithAnnouncementStore(store types.AnnouncementStore) *Announcement
- type AuthTest
- func (r *AuthTest) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *AuthTest) Beginx() (sqalx.Node, error)
- func (r *AuthTest) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *AuthTest) Get(c *yarf.Context) error
- func (r *AuthTest) WithHashKey(key []byte) *AuthTest
- func (r *AuthTest) WithNode(node sqalx.Node) *AuthTest
- type Backers
- type Connection
- func (r *Connection) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Connection) Beginx() (sqalx.Node, error)
- func (r *Connection) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Connection) Get(c *yarf.Context) error
- func (r *Connection) WithNode(node sqalx.Node) *Connection
- type Dataset
- func (r *Dataset) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Dataset) Beginx() (sqalx.Node, error)
- func (r *Dataset) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Dataset) Get(c *yarf.Context) error
- func (r *Dataset) WithNode(node sqalx.Node) *Dataset
- func (r *Dataset) WithSquirrel(sdb *sq.StatementBuilderType) *Dataset
- type Disturbance
- func (r *Disturbance) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Disturbance) Beginx() (sqalx.Node, error)
- func (r *Disturbance) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Disturbance) Get(c *yarf.Context) error
- func (r *Disturbance) WithNode(node sqalx.Node) *Disturbance
- type DisturbanceReport
- func (r *DisturbanceReport) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *DisturbanceReport) Beginx() (sqalx.Node, error)
- func (r *DisturbanceReport) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *DisturbanceReport) Post(c *yarf.Context) error
- func (r *DisturbanceReport) WithHashKey(key []byte) *DisturbanceReport
- func (r *DisturbanceReport) WithNode(node sqalx.Node) *DisturbanceReport
- func (r *DisturbanceReport) WithReportHandler(handler ReportHandler) *DisturbanceReport
- type Feedback
- func (r *Feedback) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Feedback) Beginx() (sqalx.Node, error)
- func (r *Feedback) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Feedback) Post(c *yarf.Context) error
- func (r *Feedback) WithHashKey(key []byte) *Feedback
- func (r *Feedback) WithNode(node sqalx.Node) *Feedback
- type Gateway
- func (r *Gateway) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Gateway) Beginx() (sqalx.Node, error)
- func (r *Gateway) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Gateway) Get(c *yarf.Context) error
- func (r *Gateway) RegisterMQTTGateway(mqtt MQTTGatewayInfoProvider) *Gateway
- type Line
- type LineCondition
- func (r *LineCondition) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *LineCondition) Beginx() (sqalx.Node, error)
- func (r *LineCondition) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *LineCondition) Get(c *yarf.Context) error
- func (r *LineCondition) WithNode(node sqalx.Node) *LineCondition
- type Lobby
- type MQTTGatewayInfoProvider
- type Map
- type Meta
- type Network
- func (r *Network) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Network) Beginx() (sqalx.Node, error)
- func (r *Network) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Network) Get(c *yarf.Context) error
- func (r *Network) WithNode(node sqalx.Node) *Network
- type POI
- type Pair
- func (r *Pair) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Pair) Beginx() (sqalx.Node, error)
- func (r *Pair) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Pair) Post(c *yarf.Context) (err error)
- func (r *Pair) WithHashKey(key []byte) *Pair
- func (r *Pair) WithNode(node sqalx.Node) *Pair
- func (r *Pair) WithPublicKey(key *ecdsa.PublicKey) *Pair
- func (r *Pair) WithTelemetryChannel(c chan bool) *Pair
- type PairConnection
- func (r *PairConnection) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *PairConnection) Beginx() (sqalx.Node, error)
- func (r *PairConnection) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *PairConnection) Get(c *yarf.Context) error
- func (r *PairConnection) Post(c *yarf.Context) error
- func (r *PairConnection) WithHashKey(key []byte) *PairConnection
- func (r *PairConnection) WithNode(node sqalx.Node) *PairConnection
- type PairConnectionHandler
- type Realtime
- func (r *Realtime) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Realtime) Beginx() (sqalx.Node, error)
- func (r *Realtime) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Realtime) Post(c *yarf.Context) error
- func (r *Realtime) WithHashKey(key []byte) *Realtime
- func (r *Realtime) WithNode(node sqalx.Node) *Realtime
- func (r *Realtime) WithStatsHandler(handler RealtimeStatsHandler) *Realtime
- func (r *Realtime) WithVehicleHandler(handler RealtimeVehicleHandler) *Realtime
- type RealtimeStatsHandler
- type RealtimeVehicleHandler
- type ReportHandler
- type Station
- func (r *Station) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Station) Beginx() (sqalx.Node, error)
- func (r *Station) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Station) Get(c *yarf.Context) error
- func (r *Station) WithNode(node sqalx.Node) *Station
- type Stats
- func (r *Stats) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Stats) Beginx() (sqalx.Node, error)
- func (r *Stats) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Stats) Get(c *yarf.Context) error
- func (r *Stats) WithNode(node sqalx.Node) *Stats
- func (r *Stats) WithStats(calculator StatsCalculator) *Stats
- type StatsCalculator
- type Transfer
- func (r *Transfer) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Transfer) Beginx() (sqalx.Node, error)
- func (r *Transfer) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Transfer) Get(c *yarf.Context) error
- func (r *Transfer) WithNode(node sqalx.Node) *Transfer
- type Trip
- func (r *Trip) AuthenticateClient(c *yarf.Context) (pair *types.APIPair, err error)
- func (r *Trip) Beginx() (sqalx.Node, error)
- func (r *Trip) DecodeRequest(c *yarf.Context, v interface{}) error
- func (r *Trip) Get(c *yarf.Context) error
- func (r *Trip) Post(c *yarf.Context) error
- func (r *Trip) Put(c *yarf.Context) error
- func (r *Trip) WithHashKey(key []byte) *Trip
- func (r *Trip) WithNode(node sqalx.Node) *Trip
Constants ¶
This section is empty.
Variables ¶
var Consts = map[string]reflect.Value{}
var EnableMQTTGateway = true
EnableMQTTGateway controls whether clients are informed about the MQTT gateway
var Functions = map[string]reflect.Value{ "ClearMOTD": reflect.ValueOf(ClearMOTD), "RegisterPairConnectionHandler": reflect.ValueOf(RegisterPairConnectionHandler), "RenderData": reflect.ValueOf(RenderData), "RenderMsgpack": reflect.ValueOf(RenderMsgpack), "RenderUnauthorized": reflect.ValueOf(RenderUnauthorized), "SetMOTDHTML": reflect.ValueOf(SetMOTDHTML), "SetMOTDHTMLForLocale": reflect.ValueOf(SetMOTDHTMLForLocale), "SetMOTDMainLocale": reflect.ValueOf(SetMOTDMainLocale), "SetMOTDPriority": reflect.ValueOf(SetMOTDPriority), }
var Types = map[string]reflect.Type{ "Announcement": reflect.TypeOf((*Announcement)(nil)).Elem(), "AuthTest": reflect.TypeOf((*AuthTest)(nil)).Elem(), "Backers": reflect.TypeOf((*Backers)(nil)).Elem(), "Connection": reflect.TypeOf((*Connection)(nil)).Elem(), "Dataset": reflect.TypeOf((*Dataset)(nil)).Elem(), "Disturbance": reflect.TypeOf((*Disturbance)(nil)).Elem(), "DisturbanceReport": reflect.TypeOf((*DisturbanceReport)(nil)).Elem(), "Feedback": reflect.TypeOf((*Feedback)(nil)).Elem(), "Gateway": reflect.TypeOf((*Gateway)(nil)).Elem(), "Line": reflect.TypeOf((*Line)(nil)).Elem(), "LineCondition": reflect.TypeOf((*LineCondition)(nil)).Elem(), "Lobby": reflect.TypeOf((*Lobby)(nil)).Elem(), "MQTTGatewayInfoProvider": reflect.TypeOf((*MQTTGatewayInfoProvider)(nil)).Elem(), "Map": reflect.TypeOf((*Map)(nil)).Elem(), "Meta": reflect.TypeOf((*Meta)(nil)).Elem(), "Network": reflect.TypeOf((*Network)(nil)).Elem(), "POI": reflect.TypeOf((*POI)(nil)).Elem(), "Pair": reflect.TypeOf((*Pair)(nil)).Elem(), "PairConnection": reflect.TypeOf((*PairConnection)(nil)).Elem(), "PairConnectionHandler": reflect.TypeOf((*PairConnectionHandler)(nil)).Elem(), "Realtime": reflect.TypeOf((*Realtime)(nil)).Elem(), "RealtimeStatsHandler": reflect.TypeOf((*RealtimeStatsHandler)(nil)).Elem(), "RealtimeVehicleHandler": reflect.TypeOf((*RealtimeVehicleHandler)(nil)).Elem(), "ReportHandler": reflect.TypeOf((*ReportHandler)(nil)).Elem(), "Station": reflect.TypeOf((*Station)(nil)).Elem(), "Stats": reflect.TypeOf((*Stats)(nil)).Elem(), "StatsCalculator": reflect.TypeOf((*StatsCalculator)(nil)).Elem(), "Transfer": reflect.TypeOf((*Transfer)(nil)).Elem(), "Trip": reflect.TypeOf((*Trip)(nil)).Elem(), }
var Variables = map[string]reflect.Value{ "EnableMQTTGateway": reflect.ValueOf(&EnableMQTTGateway), }
Functions ¶
func RegisterPairConnectionHandler ¶
func RegisterPairConnectionHandler(handler PairConnectionHandler)
RegisterPairConnectionHandler registers a pair connection handler
func RenderData ¶
RenderData takes a interface{} object and writes the encoded representation of it. Encoding used will be idented JSON, non-idented JSON, Msgpack or XML
func RenderMsgpack ¶
RenderMsgpack takes a interface{} object and writes the Msgpack encoded string of it.
func RenderUnauthorized ¶
RenderUnauthorized writes a 401 unauthorized to the response and requests authentication
func SetMOTDHTMLForLocale ¶
func SetMOTDHTMLForLocale(locale, message string)
SetMOTDHTMLForLocale sets motd.HTML for locale
Types ¶
type AndroidClientConfig ¶
type AndroidClientConfig struct {
// contains filtered or unexported fields
}
AndroidClientConfig composites resource
func (*AndroidClientConfig) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*AndroidClientConfig) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*AndroidClientConfig) Get ¶
func (r *AndroidClientConfig) Get(c *yarf.Context) error
Get serves HTTP GET requests on this resource
func (*AndroidClientConfig) WithNode ¶
func (r *AndroidClientConfig) WithNode(node sqalx.Node) *AndroidClientConfig
WithNode associates a sqalx Node with this resource
type Announcement ¶
type Announcement struct {
// contains filtered or unexported fields
}
Announcement composites resource
func (*Announcement) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Announcement) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*Announcement) Get ¶
func (r *Announcement) Get(c *yarf.Context) error
Get serves HTTP GET requests on this resource
func (*Announcement) WithAnnouncementStore ¶
func (r *Announcement) WithAnnouncementStore(store types.AnnouncementStore) *Announcement
WithAnnouncementStore associates an AnnouncementStore with this resource
type AuthTest ¶
type AuthTest struct {
// contains filtered or unexported fields
}
AuthTest composites resource
func (*AuthTest) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*AuthTest) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*AuthTest) WithHashKey ¶
WithHashKey associates a HMAC key with this resource so it can participate in authentication processes
type Backers ¶
type Backers struct {
// contains filtered or unexported fields
}
Backers composites resource
func (*Backers) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Backers) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection composites resource
func (*Connection) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Connection) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*Connection) Get ¶
func (r *Connection) Get(c *yarf.Context) error
Get serves HTTP GET requests on this resource
func (*Connection) WithNode ¶
func (r *Connection) WithNode(node sqalx.Node) *Connection
WithNode associates a sqalx Node with this resource
type Dataset ¶
type Dataset struct {
// contains filtered or unexported fields
}
Dataset composites resource
func (*Dataset) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Dataset) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*Dataset) WithSquirrel ¶
func (r *Dataset) WithSquirrel(sdb *sq.StatementBuilderType) *Dataset
WithSquirrel associates a statement builder with this resource
type Disturbance ¶
type Disturbance struct {
// contains filtered or unexported fields
}
Disturbance composites resource
func (*Disturbance) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Disturbance) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*Disturbance) Get ¶
func (r *Disturbance) Get(c *yarf.Context) error
Get serves HTTP GET requests on this resource
func (*Disturbance) WithNode ¶
func (r *Disturbance) WithNode(node sqalx.Node) *Disturbance
WithNode associates a sqalx Node with this resource
type DisturbanceReport ¶
type DisturbanceReport struct {
// contains filtered or unexported fields
}
DisturbanceReport composites resource
func (*DisturbanceReport) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*DisturbanceReport) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*DisturbanceReport) Post ¶
func (r *DisturbanceReport) Post(c *yarf.Context) error
Post serves HTTP POST requests on this resource
func (*DisturbanceReport) WithHashKey ¶
func (r *DisturbanceReport) WithHashKey(key []byte) *DisturbanceReport
WithHashKey associates a HMAC key with this resource so it can participate in authentication processes
func (*DisturbanceReport) WithNode ¶
func (r *DisturbanceReport) WithNode(node sqalx.Node) *DisturbanceReport
WithNode associates a sqalx Node with this resource
func (*DisturbanceReport) WithReportHandler ¶
func (r *DisturbanceReport) WithReportHandler(handler ReportHandler) *DisturbanceReport
WithReportHandler associates a ReportsHandler with this resource
type Feedback ¶
type Feedback struct {
// contains filtered or unexported fields
}
Feedback composites resource
func (*Feedback) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Feedback) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*Feedback) WithHashKey ¶
WithHashKey associates a HMAC key with this resource so it can participate in authentication processes
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
Gateway composites resource Gateways are the UnderLX's form of real-time communication between server and clients They are used to support communication paradigms that are poorly supported by conventional HTTP, such as publish-subscribe or unreliable connections (as in UDP)
func (*Gateway) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Gateway) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*Gateway) RegisterMQTTGateway ¶
func (r *Gateway) RegisterMQTTGateway(mqtt MQTTGatewayInfoProvider) *Gateway
RegisterMQTTGateway associates another MQTTGateway with this resource
type Line ¶
type Line struct {
// contains filtered or unexported fields
}
Line composites resource
func (*Line) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Line) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
type LineCondition ¶
type LineCondition struct {
// contains filtered or unexported fields
}
LineCondition composites resource
func (*LineCondition) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*LineCondition) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*LineCondition) Get ¶
func (r *LineCondition) Get(c *yarf.Context) error
Get serves HTTP GET requests on this resource
func (*LineCondition) WithNode ¶
func (r *LineCondition) WithNode(node sqalx.Node) *LineCondition
WithNode associates a sqalx Node with this resource
type Lobby ¶
type Lobby struct {
// contains filtered or unexported fields
}
Lobby composites resource
func (*Lobby) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Lobby) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
type MQTTGatewayInfoProvider ¶
type MQTTGatewayInfoProvider interface { Hostname() string Port() uint16 IsTLS() bool MQTTVersion() string }
MQTTGatewayInfoProvider contains the methods the Gateway resource uses to provide information about a MQTTGateway
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map composites resource
func (*Map) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Map) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
type Meta ¶
type Meta struct {
// contains filtered or unexported fields
}
Meta composites resource
func (*Meta) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Meta) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
Network composites resource
func (*Network) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Network) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
type POI ¶
type POI struct {
// contains filtered or unexported fields
}
POI composites resource
func (*POI) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*POI) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
type Pair ¶
type Pair struct {
// contains filtered or unexported fields
}
Pair composites resource
func (*Pair) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Pair) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*Pair) WithHashKey ¶
WithHashKey associates a HMAC key with this resource so it can participate in authentication processes
func (*Pair) WithPublicKey ¶
WithPublicKey associates a trusted client public key with this resource
func (*Pair) WithTelemetryChannel ¶
WithTelemetryChannel associates a telemetry channel with this resource
type PairConnection ¶
type PairConnection struct {
// contains filtered or unexported fields
}
PairConnection composites resource
func (*PairConnection) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*PairConnection) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*PairConnection) Get ¶
func (r *PairConnection) Get(c *yarf.Context) error
Get serves HTTP GET requests on this resource
func (*PairConnection) Post ¶
func (r *PairConnection) Post(c *yarf.Context) error
Post serves HTTP POST requests on this resource
func (*PairConnection) WithHashKey ¶
func (r *PairConnection) WithHashKey(key []byte) *PairConnection
WithHashKey associates a HMAC key with this resource so it can participate in authentication processes
func (*PairConnection) WithNode ¶
func (r *PairConnection) WithNode(node sqalx.Node) *PairConnection
WithNode associates a sqalx Node with this resource
type PairConnectionHandler ¶
type PairConnectionHandler interface { ID() string TryCreateConnection(node sqalx.Node, code, deviceName string, pair *types.APIPair) bool GetConnectionsForPair(node sqalx.Node, pair *types.APIPair) ([]types.PairConnection, error) DisplayName() string }
PairConnectionHandler handles connections of APIPairs with external first-party services and subsystems
type Realtime ¶
type Realtime struct {
// contains filtered or unexported fields
}
Realtime composites resource, handles real-time location submissions
func (*Realtime) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Realtime) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*Realtime) WithHashKey ¶
WithHashKey associates a HMAC key with this resource so it can participate in authentication processes
func (*Realtime) WithStatsHandler ¶
func (r *Realtime) WithStatsHandler(handler RealtimeStatsHandler) *Realtime
WithStatsHandler associates a RealtimeStatsHandler with this resource
func (*Realtime) WithVehicleHandler ¶
func (r *Realtime) WithVehicleHandler(handler RealtimeVehicleHandler) *Realtime
WithVehicleHandler associates a RealtimeVehicleHandler with this resource
type RealtimeStatsHandler ¶
type RealtimeStatsHandler interface {
RegisterActivity(lines []*types.Line, user *types.APIPair, justEntered bool)
}
RealtimeStatsHandler handles real-time network statistics such as the number of users in transit
type RealtimeVehicleHandler ¶
type RealtimeVehicleHandler interface {
RegisterTrainPassenger(currentStation *types.Station, direction *types.Station)
}
RealtimeVehicleHandler handles real-time vehicle information such as the position of trains in a network
type ReportHandler ¶
type ReportHandler interface {
HandleLineDisturbanceReport(report *types.LineDisturbanceReport) error
}
ReportHandler handles user reports such as service disturbances
type Station ¶
type Station struct {
// contains filtered or unexported fields
}
Station composites resource
func (*Station) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Station) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
type Stats ¶
type Stats struct {
// contains filtered or unexported fields
}
Stats composites resource
func (*Stats) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Stats) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*Stats) WithStats ¶
func (r *Stats) WithStats(calculator StatsCalculator) *Stats
WithStats associates a StatsCalculator with this resource
type StatsCalculator ¶
type StatsCalculator interface { OITInNetwork(network *types.Network, approximateTo int) int OITInLine(line *types.Line, approximateTo int) int }
StatsCalculator calculates general statistics about a network or part of a network
type Transfer ¶
type Transfer struct {
// contains filtered or unexported fields
}
Transfer composites resource
func (*Transfer) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Transfer) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
type Trip ¶
type Trip struct {
// contains filtered or unexported fields
}
Trip composites resource
func (*Trip) AuthenticateClient ¶
AuthenticateClient authenticates a API client
func (*Trip) DecodeRequest ¶
DecodeRequest decodes a request according to its headers and places the result in v
func (*Trip) WithHashKey ¶
WithHashKey associates a HMAC key with this resource so it can participate in authentication processes
Source Files ¶
- announcement.go
- authtest.go
- backers.go
- clientconfig.go
- connection.go
- dataset.go
- disturbance.go
- disturbancereport.go
- feedback.go
- gateway.go
- helpers.go
- line.go
- linecondition.go
- lobby.go
- map.go
- meta.go
- network.go
- pair.go
- pairconnection.go
- pkgreflect.go
- poi.go
- realtime.go
- station.go
- stats.go
- transfer.go
- trip.go