Documentation ¶
Index ¶
- Constants
- func NewGtfsError(message string) error
- func URI(baseurl string, path string, params url.Values) (*url.URL, error)
- type Buffer
- type GtfsError
- type HTTPClient
- type HTTPClientOAuth
- type HTTPClientOptions
- type HTTPClientUrls
- type RawBuffer
- type Request
- type SIRIClient
- func (client *SIRIClient) CheckStatus(request *siri.SIRICheckStatusRequest) (*sxml.XMLCheckStatusResponse, error)
- func (client *SIRIClient) DeleteSubscription(request *siri.SIRIDeleteSubscriptionRequest) (*sxml.XMLDeleteSubscriptionResponse, error)
- func (client *SIRIClient) EstimatedTimetableSubscription(request *siri.SIRIEstimatedTimetableSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error)
- func (client *SIRIClient) GeneralMessageSubscription(request *siri.SIRIGeneralMessageSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error)
- func (client *SIRIClient) LineDiscovery(request *siri.SIRILinesDiscoveryRequest) (*sxml.XMLLinesDiscoveryResponse, error)
- func (client *SIRIClient) NotifyEstimatedTimetable(request *siri.SIRINotifyEstimatedTimetable) error
- func (client *SIRIClient) NotifyGeneralMessage(request *siri.SIRINotifyGeneralMessage) error
- func (client *SIRIClient) NotifyProductionTimetable(request *siri.SIRINotifyProductionTimetable) error
- func (client *SIRIClient) NotifySituationExchange(request *siri.SIRINotifySituationExchange) error
- func (client *SIRIClient) NotifyStopMonitoring(request *siri.SIRINotifyStopMonitoring) error
- func (client *SIRIClient) NotifyVehicleMonitoring(request *siri.SIRINotifyVehicleMonitoring) error
- func (client *SIRIClient) SituationExchangeMonitoring(request *siri.SIRIGetSituationExchangeRequest) (*sxml.XMLSituationExchangeResponse, error)
- func (client *SIRIClient) SituationExchangeSubscription(request *siri.SIRISituationExchangeSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error)
- func (client *SIRIClient) SituationMonitoring(request *siri.SIRIGetGeneralMessageRequest) (*sxml.XMLGeneralMessageResponse, error)
- func (client *SIRIClient) StopDiscovery(request *siri.SIRIStopPointsDiscoveryRequest) (*sxml.XMLStopPointsDiscoveryResponse, error)
- func (client *SIRIClient) StopMonitoring(request *siri.SIRIGetStopMonitoringRequest) (*sxml.XMLStopMonitoringResponse, error)
- func (client *SIRIClient) StopMonitoringSubscription(request *siri.SIRIStopMonitoringSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error)
- func (client *SIRIClient) VehicleMonitoring(request *siri.SIRIGetVehicleMonitoringRequest) (*sxml.XMLVehicleMonitoringResponse, error)
- func (client *SIRIClient) VehicleMonitoringSubscription(request *siri.SIRIVehicleMonitoringSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error)
- type SIRIEnvelope
- type SIRILiteClient
- type SOAPBuffer
- type SiriCredentialHeader
Constants ¶
View Source
const ( DEFAULT requestType = iota SUBSCRIPTION NOTIFICATION CHECK_STATUS SUBSCRIPTION_TIMEOUT = 30 * time.Second CHECK_STATUS_TIMEOUT = 9 * time.Second DEFAULT_TIMEOUT = 5 * time.Second )
View Source
const ( RAW_SIRI_ENVELOPE = "raw" SOAP_SIRI_ENVELOPE = "soap" )
Variables ¶
This section is empty.
Functions ¶
func NewGtfsError ¶
Types ¶
type Buffer ¶
func NewSIRIBuffer ¶
type GtfsError ¶
type GtfsError struct {
// contains filtered or unexported fields
}
To handle Partner Status after a Gtfs request
type HTTPClient ¶
type HTTPClient struct { HTTPClientUrls // contains filtered or unexported fields }
func NewHTTPClient ¶
func NewHTTPClient(opts HTTPClientOptions) *HTTPClient
func (*HTTPClient) GTFSRequest ¶
func (c *HTTPClient) GTFSRequest() (*gtfs.FeedMessage, error)
func (*HTTPClient) HTTPClient ¶
func (c *HTTPClient) HTTPClient() *http.Client
func (*HTTPClient) SIRIClient ¶
func (c *HTTPClient) SIRIClient() *SIRIClient
func (*HTTPClient) SIRILiteClient ¶
func (c *HTTPClient) SIRILiteClient() *SIRILiteClient
func (*HTTPClient) SetURLs ¶
func (c *HTTPClient) SetURLs(urls HTTPClientUrls)
type HTTPClientOAuth ¶
type HTTPClientOptions ¶
type HTTPClientOptions struct { SiriEnvelopeType string OAuth *HTTPClientOAuth Urls HTTPClientUrls SiriCredential SiriCredentialHeader }
type HTTPClientUrls ¶
type SIRIClient ¶
type SIRIClient struct {
// contains filtered or unexported fields
}
func NewSIRIClient ¶
func NewSIRIClient(c *HTTPClient, set string) *SIRIClient
func (*SIRIClient) CheckStatus ¶
func (client *SIRIClient) CheckStatus(request *siri.SIRICheckStatusRequest) (*sxml.XMLCheckStatusResponse, error)
func (*SIRIClient) DeleteSubscription ¶
func (client *SIRIClient) DeleteSubscription(request *siri.SIRIDeleteSubscriptionRequest) (*sxml.XMLDeleteSubscriptionResponse, error)
func (*SIRIClient) EstimatedTimetableSubscription ¶
func (client *SIRIClient) EstimatedTimetableSubscription(request *siri.SIRIEstimatedTimetableSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error)
func (*SIRIClient) GeneralMessageSubscription ¶
func (client *SIRIClient) GeneralMessageSubscription(request *siri.SIRIGeneralMessageSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error)
func (*SIRIClient) LineDiscovery ¶
func (client *SIRIClient) LineDiscovery(request *siri.SIRILinesDiscoveryRequest) (*sxml.XMLLinesDiscoveryResponse, error)
func (*SIRIClient) NotifyEstimatedTimetable ¶
func (client *SIRIClient) NotifyEstimatedTimetable(request *siri.SIRINotifyEstimatedTimetable) error
func (*SIRIClient) NotifyGeneralMessage ¶
func (client *SIRIClient) NotifyGeneralMessage(request *siri.SIRINotifyGeneralMessage) error
func (*SIRIClient) NotifyProductionTimetable ¶
func (client *SIRIClient) NotifyProductionTimetable(request *siri.SIRINotifyProductionTimetable) error
func (*SIRIClient) NotifySituationExchange ¶
func (client *SIRIClient) NotifySituationExchange(request *siri.SIRINotifySituationExchange) error
func (*SIRIClient) NotifyStopMonitoring ¶
func (client *SIRIClient) NotifyStopMonitoring(request *siri.SIRINotifyStopMonitoring) error
func (*SIRIClient) NotifyVehicleMonitoring ¶
func (client *SIRIClient) NotifyVehicleMonitoring(request *siri.SIRINotifyVehicleMonitoring) error
func (*SIRIClient) SituationExchangeMonitoring ¶
func (client *SIRIClient) SituationExchangeMonitoring(request *siri.SIRIGetSituationExchangeRequest) (*sxml.XMLSituationExchangeResponse, error)
func (*SIRIClient) SituationExchangeSubscription ¶
func (client *SIRIClient) SituationExchangeSubscription(request *siri.SIRISituationExchangeSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error)
func (*SIRIClient) SituationMonitoring ¶
func (client *SIRIClient) SituationMonitoring(request *siri.SIRIGetGeneralMessageRequest) (*sxml.XMLGeneralMessageResponse, error)
func (*SIRIClient) StopDiscovery ¶
func (client *SIRIClient) StopDiscovery(request *siri.SIRIStopPointsDiscoveryRequest) (*sxml.XMLStopPointsDiscoveryResponse, error)
func (*SIRIClient) StopMonitoring ¶
func (client *SIRIClient) StopMonitoring(request *siri.SIRIGetStopMonitoringRequest) (*sxml.XMLStopMonitoringResponse, error)
func (*SIRIClient) StopMonitoringSubscription ¶
func (client *SIRIClient) StopMonitoringSubscription(request *siri.SIRIStopMonitoringSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error)
func (*SIRIClient) VehicleMonitoring ¶
func (client *SIRIClient) VehicleMonitoring(request *siri.SIRIGetVehicleMonitoringRequest) (*sxml.XMLVehicleMonitoringResponse, error)
func (*SIRIClient) VehicleMonitoringSubscription ¶
func (client *SIRIClient) VehicleMonitoringSubscription(request *siri.SIRIVehicleMonitoringSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error)
type SIRIEnvelope ¶
type SIRIEnvelope struct {
// contains filtered or unexported fields
}
func NewAutodetectSIRIEnvelope ¶
func NewAutodetectSIRIEnvelope(body io.Reader) (*SIRIEnvelope, error)
func NewSIRIEnvelope ¶
func NewSIRIEnvelope(body io.Reader, envelopeType string) (*SIRIEnvelope, error)
func (*SIRIEnvelope) Body ¶
func (envelope *SIRIEnvelope) Body() xml.Node
func (*SIRIEnvelope) BodyOrError ¶
func (envelope *SIRIEnvelope) BodyOrError(expectedResponsess []string) (xml.Node, error)
func (*SIRIEnvelope) BodyType ¶
func (envelope *SIRIEnvelope) BodyType() string
type SIRILiteClient ¶
type SIRILiteClient struct { HTTPClientUrls // contains filtered or unexported fields }
func NewSIRILiteClient ¶
func NewSIRILiteClient(c *HTTPClient, credential SiriCredentialHeader) *SIRILiteClient
func (*SIRILiteClient) StopMonitoring ¶
func (client *SIRILiteClient) StopMonitoring(stopArea string) (*slite.SIRILiteStopMonitoring, error)
type SOAPBuffer ¶
type SOAPBuffer struct {
// contains filtered or unexported fields
}
func (*SOAPBuffer) Length ¶
func (sb *SOAPBuffer) Length() int64
func (*SOAPBuffer) String ¶
func (sb *SOAPBuffer) String() string
func (*SOAPBuffer) WriteXML ¶
func (sb *SOAPBuffer) WriteXML(xml string)
type SiriCredentialHeader ¶
Click to show internal directories.
Click to hide internal directories.