siri

package
v0.0.0-...-635a37d Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSiriError

func NewSiriError(message string) error

func NewSiriErrorWithCode

func NewSiriErrorWithCode(errCode, message string) error

Types

type AffectedLine

type AffectedLine struct {
	LineRef      string
	Destinations []SIRIAffectedDestination
	Sections     []SIRIAffectedSection
	Routes       []SIRIAffectedRoute
}

type AffectedStopPoint

type AffectedStopPoint struct {
	StopPointRef  string
	StopPointName string
	LineRefs      []string
}

type Consequence

type Consequence struct {
	Periods    []*model.TimeRange
	Severity   model.SituationSeverity
	Condition  model.SituationCondition
	HasAffects bool
	SIRIAffects
	Blocking *model.Blocking
}

type ErrorCondition

type ErrorCondition struct {
	ErrorType   string
	ErrorNumber int
	ErrorText   string
}

func (*ErrorCondition) MarshalJson

func (ec *ErrorCondition) MarshalJson() ([]byte, error)
type InfoLink struct {
	Uri         string
	Label       string
	ImageRef    string
	LinkContent string
}

type MonitoredCall

type MonitoredCall struct {
	StopPointRef          string    `json:",omitempty"`
	StopPointName         string    `json:",omitempty"`
	VehicleAtStop         bool      `json:",omitempty"`
	DestinationDisplay    string    `json:",omitempty"`
	ExpectedArrivalTime   time.Time `json:",omitempty"`
	ExpectedDepartureTime time.Time `json:",omitempty"`
	DepartureStatus       string    `json:",omitempty"`
	Order                 *int      `json:",omitempty"`
	AimedArrivalTime      time.Time `json:",omitempty"`
	ArrivalPlatformName   string    `json:",omitempty"`
	AimedDepartureTime    time.Time `json:",omitempty"`
	ArrivalStatus         string    `json:",omitempty"`
	ActualArrivalTime     time.Time `json:",omitempty"`
	ActualDepartureTime   time.Time `json:",omitempty"`
}

type PublishToDisplayAction

type PublishToDisplayAction struct {
	SIRIPublishActionCommon

	OnPlace *bool
	OnBoard *bool
}

type PublishToMobileAction

type PublishToMobileAction struct {
	SIRIPublishActionCommon

	Incidents *bool
	HomePage  *bool
}

type PublishToWebAction

type PublishToWebAction struct {
	SIRIPublishActionCommon

	Incidents      *bool
	HomePage       *bool
	Ticker         *bool
	SocialNetworks []string
}

type SIRIAffectedDestination

type SIRIAffectedDestination struct {
	StopPlaceRef  string
	StopPlaceName string
}

type SIRIAffectedRef

type SIRIAffectedRef struct {
	Kind string
	Id   string
}

type SIRIAffectedRoute

type SIRIAffectedRoute struct {
	RouteRef      string
	StopPointRefs []string
}

type SIRIAffectedSection

type SIRIAffectedSection struct {
	FirstStopPointRef string
	LastStopPointRef  string
}

type SIRIAffects

type SIRIAffects struct {
	AffectedAllLines   bool
	AffectedLines      []*AffectedLine
	AffectedStopPoints []*AffectedStopPoint
}

func (*SIRIAffects) BuildSituationAffectsXML

func (affects *SIRIAffects) BuildSituationAffectsXML() (string, error)

type SIRIAnnotatedLine

type SIRIAnnotatedLine struct {
	LineRef   string
	LineName  string
	Monitored bool
}

type SIRIAnnotatedLineByLineRef

type SIRIAnnotatedLineByLineRef []*SIRIAnnotatedLine

func (SIRIAnnotatedLineByLineRef) Len

func (SIRIAnnotatedLineByLineRef) Less

func (a SIRIAnnotatedLineByLineRef) Less(i, j int) bool

func (SIRIAnnotatedLineByLineRef) Swap

func (a SIRIAnnotatedLineByLineRef) Swap(i, j int)

type SIRIAnnotatedStopPoint

type SIRIAnnotatedStopPoint struct {
	StopPointRef string
	StopName     string
	Lines        []string
	Monitored    bool
	TimingPoint  bool
}

type SIRIAnnotatedStopPointByStopPointRef

type SIRIAnnotatedStopPointByStopPointRef []*SIRIAnnotatedStopPoint

func (SIRIAnnotatedStopPointByStopPointRef) Len

func (SIRIAnnotatedStopPointByStopPointRef) Less

func (SIRIAnnotatedStopPointByStopPointRef) Swap

type SIRICancelledStopVisit

type SIRICancelledStopVisit struct {
	RecordedAtTime         time.Time
	ItemRef                string
	DirectionRef           string
	VisitNumber            int
	MonitoringRef          string
	LineRef                string
	DataFrameRef           string
	DatedVehicleJourneyRef string
	PublishedLineName      string
}

func (*SIRICancelledStopVisit) BuildCancelledStopVisitXML

func (stopVisit *SIRICancelledStopVisit) BuildCancelledStopVisitXML() (string, error)

type SIRICheckStatusRequest

type SIRICheckStatusRequest struct {
	MessageIdentifier string
	RequestorRef      string
	RequestTimestamp  time.Time
}

func NewSIRICheckStatusRequest

func NewSIRICheckStatusRequest(
	RequestorRef string,
	RequestTimestamp time.Time,
	MessageIdentifier string) *SIRICheckStatusRequest

func (*SIRICheckStatusRequest) BuildXML

func (request *SIRICheckStatusRequest) BuildXML(envelopeType ...string) (string, error)

TODO : Handle errors

type SIRICheckStatusResponse

type SIRICheckStatusResponse struct {
	Address                   string
	ProducerRef               string
	RequestMessageRef         string
	ResponseMessageIdentifier string
	Status                    bool
	ErrorType                 string
	ErrorNumber               int
	ErrorText                 string
	ResponseTimestamp         time.Time
	ServiceStartedTime        time.Time
}

func NewSIRICheckStatusResponse

func NewSIRICheckStatusResponse(
	address string,
	producerRef string,
	requestMessageRef string,
	responseMessageIdentifier string,
	status bool,
	errorType string,
	errorNumber int,
	errorText string,
	responseTimestamp time.Time,
	serviceStartedTime time.Time) *SIRICheckStatusResponse

func (*SIRICheckStatusResponse) BuildXML

func (response *SIRICheckStatusResponse) BuildXML(envelopeType ...string) (string, error)

TODO : Handle errors

type SIRIDatedCall

type SIRIDatedCall struct {
	StopPointRef       string
	StopPointName      string
	DestinationDisplay string
	Order              int
	UseVisitNumber     bool

	AimedArrivalTime   time.Time
	AimedDepartureTime time.Time
}

type SIRIDatedCalls

type SIRIDatedCalls []*SIRIDatedCall

func (SIRIDatedCalls) Len

func (a SIRIDatedCalls) Len() int

func (SIRIDatedCalls) Swap

func (a SIRIDatedCalls) Swap(i, j int)

type SIRIDatedTimetableVersionFrame

type SIRIDatedTimetableVersionFrame struct {
	LineRef        string
	DirectionType  string
	RecordedAtTime time.Time

	Attributes map[string]string

	DatedVehicleJourneys []*SIRIDatedVehicleJourney
}

func (*SIRIDatedTimetableVersionFrame) BuildDatedTimetableVersionFrameXML

func (frame *SIRIDatedTimetableVersionFrame) BuildDatedTimetableVersionFrameXML() (string, error)

func (*SIRIDatedTimetableVersionFrame) BuildDatedTimetableVersionFrameXMLRaw

func (frame *SIRIDatedTimetableVersionFrame) BuildDatedTimetableVersionFrameXMLRaw() (string, error)

type SIRIDatedTimetableVersionFrames

type SIRIDatedTimetableVersionFrames []*SIRIDatedTimetableVersionFrame

func (SIRIDatedTimetableVersionFrames) Len

func (SIRIDatedTimetableVersionFrames) Swap

func (a SIRIDatedTimetableVersionFrames) Swap(i, j int)

type SIRIDatedVehicleJourney

type SIRIDatedVehicleJourney struct {
	DataFrameRef           string
	DatedVehicleJourneyRef string
	PublishedLineName      string

	Attributes map[string]string
	References map[string]string

	DatedCalls []*SIRIDatedCall
}

type SIRIDeleteSubscriptionRequest

type SIRIDeleteSubscriptionRequest struct {
	RequestorRef     string
	RequestTimestamp time.Time

	MessageIdentifier string
	SubscriptionRef   string
	CancelAll         bool
}

func (*SIRIDeleteSubscriptionRequest) BuildXML

func (request *SIRIDeleteSubscriptionRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIDeleteSubscriptionResponse

type SIRIDeleteSubscriptionResponse struct {
	ResponderRef      string
	RequestMessageRef string
	ResponseTimestamp time.Time

	ResponseStatus []*SIRITerminationResponseStatus
}

func (*SIRIDeleteSubscriptionResponse) BuildXML

func (notify *SIRIDeleteSubscriptionResponse) BuildXML(envelopeType ...string) (string, error)

type SIRIEstimatedCall

type SIRIEstimatedCall struct {
	ArrivalStatus      string
	DepartureStatus    string
	StopPointRef       string
	StopPointName      string
	DestinationDisplay string

	Occupancy     string
	VehicleAtStop bool

	Order          int
	UseVisitNumber bool

	AimedArrivalTime    time.Time
	ExpectedArrivalTime time.Time

	AimedDepartureTime    time.Time
	ExpectedDepartureTime time.Time
}

type SIRIEstimatedCalls

type SIRIEstimatedCalls []*SIRIEstimatedCall

func (SIRIEstimatedCalls) Len

func (a SIRIEstimatedCalls) Len() int

func (SIRIEstimatedCalls) Swap

func (a SIRIEstimatedCalls) Swap(i, j int)

type SIRIEstimatedJourneyVersionFrame

type SIRIEstimatedJourneyVersionFrame struct {
	RecordedAtTime time.Time

	EstimatedVehicleJourneys []*SIRIEstimatedVehicleJourney
}

func (*SIRIEstimatedJourneyVersionFrame) BuildEstimatedJourneyVersionFrameXML

func (frame *SIRIEstimatedJourneyVersionFrame) BuildEstimatedJourneyVersionFrameXML() (string, error)

func (*SIRIEstimatedJourneyVersionFrame) BuildEstimatedJourneyVersionFrameXMLRaw

func (frame *SIRIEstimatedJourneyVersionFrame) BuildEstimatedJourneyVersionFrameXMLRaw() (string, error)

type SIRIEstimatedTimetableDelivery

type SIRIEstimatedTimetableDelivery struct {
	RequestMessageRef string

	ResponseTimestamp time.Time

	Status      bool
	ErrorType   string
	ErrorNumber int
	ErrorText   string

	EstimatedJourneyVersionFrames []*SIRIEstimatedJourneyVersionFrame

	MonitoringRefs     map[string]struct{}
	VehicleJourneyRefs map[string]struct{}
}

func (*SIRIEstimatedTimetableDelivery) BuildEstimatedTimetableDeliveryXML

func (delivery *SIRIEstimatedTimetableDelivery) BuildEstimatedTimetableDeliveryXML() (string, error)

func (*SIRIEstimatedTimetableDelivery) BuildEstimatedTimetableDeliveryXMLRaw

func (delivery *SIRIEstimatedTimetableDelivery) BuildEstimatedTimetableDeliveryXMLRaw() (string, error)

func (*SIRIEstimatedTimetableDelivery) ErrorString

func (delivery *SIRIEstimatedTimetableDelivery) ErrorString() string

type SIRIEstimatedTimetableRequest

type SIRIEstimatedTimetableRequest struct {
	MessageIdentifier string

	Lines []string

	RequestTimestamp time.Time
}

func (*SIRIEstimatedTimetableRequest) BuildEstimatedTimetableRequestXML

func (request *SIRIEstimatedTimetableRequest) BuildEstimatedTimetableRequestXML() (string, error)

func (*SIRIEstimatedTimetableRequest) BuildEstimatedTimetableRequestXMLRaw

func (request *SIRIEstimatedTimetableRequest) BuildEstimatedTimetableRequestXMLRaw() (string, error)

type SIRIEstimatedTimetableResponse

type SIRIEstimatedTimetableResponse struct {
	SIRIEstimatedTimetableDelivery

	Address                   string
	ProducerRef               string
	ResponseMessageIdentifier string
}

func (*SIRIEstimatedTimetableResponse) BuildXML

func (response *SIRIEstimatedTimetableResponse) BuildXML(envelopeType ...string) (string, error)

type SIRIEstimatedTimetableSubscriptionRequest

type SIRIEstimatedTimetableSubscriptionRequest struct {
	ConsumerAddress   string
	MessageIdentifier string
	RequestorRef      string
	RequestTimestamp  time.Time

	Entries []*SIRIEstimatedTimetableSubscriptionRequestEntry

	SortPayloadForTest bool
}

func (*SIRIEstimatedTimetableSubscriptionRequest) BuildXML

func (request *SIRIEstimatedTimetableSubscriptionRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIEstimatedTimetableSubscriptionRequestEntry

type SIRIEstimatedTimetableSubscriptionRequestEntry struct {
	SIRIEstimatedTimetableRequest

	SubscriberRef          string
	SubscriptionIdentifier string

	InitialTerminationTime time.Time
}

type SIRIEstimatedVehicleJourney

type SIRIEstimatedVehicleJourney struct {
	LineRef                string
	DatedVehicleJourneyRef string
	DataFrameRef           string
	DirectionType          string
	PublishedLineName      string
	DestinationName        string
	Cancellation           bool

	IsCompleteStopSequence bool

	Attributes map[string]string
	References map[string]string

	EstimatedCalls []*SIRIEstimatedCall
	RecordedCalls  []*SIRIRecordedCall
}

type SIRIFacilityCondition

type SIRIFacilityCondition struct {
	FacilityRef    string
	FacilityStatus string
}

func (*SIRIFacilityCondition) BuildFacilityConditionXML

func (delivery *SIRIFacilityCondition) BuildFacilityConditionXML() (string, error)

func (*SIRIFacilityCondition) BuildFacilityConditionXMLRaw

func (delivery *SIRIFacilityCondition) BuildFacilityConditionXMLRaw() (string, error)

type SIRIFacilityMonitoringDelivery

type SIRIFacilityMonitoringDelivery struct {
	SIRIFacilityCondition

	RequestMessageRef string
	Status            bool
	ErrorType         string
	ErrorNumber       int
	ErrorText         string
	ResponseTimestamp time.Time
}

func (*SIRIFacilityMonitoringDelivery) BuildFacilityMonitoringDeliveryXML

func (delivery *SIRIFacilityMonitoringDelivery) BuildFacilityMonitoringDeliveryXML() (string, error)

func (*SIRIFacilityMonitoringDelivery) BuildFacilityMonitoringDeliveryXMLRaw

func (delivery *SIRIFacilityMonitoringDelivery) BuildFacilityMonitoringDeliveryXMLRaw() (string, error)

func (*SIRIFacilityMonitoringDelivery) ErrorString

func (delivery *SIRIFacilityMonitoringDelivery) ErrorString() string

type SIRIFacilityMonitoringRequest

type SIRIFacilityMonitoringRequest struct {
	MessageIdentifier string
	FacilityRef       string
	StopVisitTypes    string

	RequestTimestamp time.Time
}

func (*SIRIFacilityMonitoringRequest) BuildFacilityMonitoringRequestXML

func (request *SIRIFacilityMonitoringRequest) BuildFacilityMonitoringRequestXML() (string, error)

func (*SIRIFacilityMonitoringRequest) BuildFacilityMonitoringRequestXMLRaw

func (request *SIRIFacilityMonitoringRequest) BuildFacilityMonitoringRequestXMLRaw() (string, error)

type SIRIFacilityMonitoringResponse

type SIRIFacilityMonitoringResponse struct {
	SIRIFacilityMonitoringDelivery

	Address                   string
	ProducerRef               string
	ResponseMessageIdentifier string
}

func (*SIRIFacilityMonitoringResponse) BuildXML

func (response *SIRIFacilityMonitoringResponse) BuildXML(envelopeType ...string) (string, error)

type SIRIFacilityMonitoringSubscriptionRequest

type SIRIFacilityMonitoringSubscriptionRequest struct {
	ConsumerAddress   string
	MessageIdentifier string
	RequestorRef      string
	RequestTimestamp  time.Time

	Entries []*SIRIFacilityMonitoringSubscriptionRequestEntry
}

func (*SIRIFacilityMonitoringSubscriptionRequest) BuildXML

func (request *SIRIFacilityMonitoringSubscriptionRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIFacilityMonitoringSubscriptionRequestEntry

type SIRIFacilityMonitoringSubscriptionRequestEntry struct {
	SIRIFacilityMonitoringRequest

	SubscriberRef          string
	SubscriptionIdentifier string

	InitialTerminationTime time.Time
}

type SIRIFramedVehicleJourneyRef

type SIRIFramedVehicleJourneyRef struct {
	DataFrameRef           string
	DatedVehicleJourneyRef string
}

type SIRIGeneralMessage

type SIRIGeneralMessage struct {
	RecordedAtTime        time.Time
	ValidUntilTime        time.Time
	ItemIdentifier        string
	InfoMessageIdentifier string
	FormatRef             string
	InfoMessageVersion    int
	InfoChannelRef        string

	AffectedLineRefs        []string
	AffectedStopPointRefs   []string
	AffectedDestinationRefs []string
	AffectedRouteRefs       []string
	LineSections            []*SIRILineSection
	Messages                []*SIRIMessage
}

func (*SIRIGeneralMessage) BuildGeneralMessageXML

func (message *SIRIGeneralMessage) BuildGeneralMessageXML() (string, error)

type SIRIGeneralMessageCancellation

type SIRIGeneralMessageCancellation struct {
	RecordedAtTime        time.Time
	ItemIdentifier        string
	InfoMessageIdentifier string
}

func (*SIRIGeneralMessageCancellation) BuildGeneralMessageCancellationXML

func (message *SIRIGeneralMessageCancellation) BuildGeneralMessageCancellationXML() (string, error)

type SIRIGeneralMessageDelivery

type SIRIGeneralMessageDelivery struct {
	RequestMessageRef string

	ResponseTimestamp time.Time

	Status      bool
	ErrorType   string
	ErrorNumber int
	ErrorText   string

	GeneralMessages []*SIRIGeneralMessage
}

func (*SIRIGeneralMessageDelivery) BuildGeneralMessageDeliveryXML

func (delivery *SIRIGeneralMessageDelivery) BuildGeneralMessageDeliveryXML() (string, error)

func (*SIRIGeneralMessageDelivery) ErrorString

func (delivery *SIRIGeneralMessageDelivery) ErrorString() string

type SIRIGeneralMessageRequest

type SIRIGeneralMessageRequest struct {
	XsdInWsdl bool

	MessageIdentifier string

	RequestTimestamp time.Time

	InfoChannelRef []string

	LineRef        []string
	StopPointRef   []string
	DestinationRef []string
	RouteRef       []string
}

func (*SIRIGeneralMessageRequest) BuildGeneralMessageRequestXML

func (request *SIRIGeneralMessageRequest) BuildGeneralMessageRequestXML() (string, error)

type SIRIGeneralMessageResponse

type SIRIGeneralMessageResponse struct {
	SIRIGeneralMessageDelivery

	Address                   string
	ProducerRef               string
	ResponseMessageIdentifier string
}

func (*SIRIGeneralMessageResponse) BuildXML

func (response *SIRIGeneralMessageResponse) BuildXML(envelopeType ...string) (string, error)

type SIRIGeneralMessageSubscriptionRequest

type SIRIGeneralMessageSubscriptionRequest struct {
	ConsumerAddress   string
	MessageIdentifier string
	RequestorRef      string
	RequestTimestamp  time.Time

	Entries []*SIRIGeneralMessageSubscriptionRequestEntry
}

func (*SIRIGeneralMessageSubscriptionRequest) BuildXML

func (request *SIRIGeneralMessageSubscriptionRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIGeneralMessageSubscriptionRequestEntry

type SIRIGeneralMessageSubscriptionRequestEntry struct {
	SIRIGeneralMessageRequest

	SubscriberRef          string
	SubscriptionIdentifier string

	InitialTerminationTime time.Time
}

type SIRIGetEstimatedTimetableRequest

type SIRIGetEstimatedTimetableRequest struct {
	SIRIEstimatedTimetableRequest

	RequestorRef string
}

func NewSIRIGetEstimatedTimetableRequest

func NewSIRIGetEstimatedTimetableRequest(
	messageIdentifier string,
	lines []string,
	requestorRef string,
	requestTimestamp time.Time) *SIRIGetEstimatedTimetableRequest

func (*SIRIGetEstimatedTimetableRequest) BuildXML

func (request *SIRIGetEstimatedTimetableRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIGetFacilityMonitoringRequest

type SIRIGetFacilityMonitoringRequest struct {
	SIRIFacilityMonitoringRequest

	RequestorRef string
}

func NewSIRIGetFacilityMonitoringRequest

func NewSIRIGetFacilityMonitoringRequest(
	messageIdentifier,
	facilityRef,
	requestorRef string,
	requestTimestamp time.Time) *SIRIGetFacilityMonitoringRequest

func (*SIRIGetFacilityMonitoringRequest) BuildXML

func (request *SIRIGetFacilityMonitoringRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIGetGeneralMessageRequest

type SIRIGetGeneralMessageRequest struct {
	SIRIGeneralMessageRequest

	RequestorRef string
}

func NewSIRIGeneralMessageRequest

func NewSIRIGeneralMessageRequest(
	messageIdentifier,
	requestorRef string,
	requestTimestamp time.Time) *SIRIGetGeneralMessageRequest

func (*SIRIGetGeneralMessageRequest) BuildXML

func (request *SIRIGetGeneralMessageRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIGetSituationExchangeRequest

type SIRIGetSituationExchangeRequest struct {
	SIRISituationExchangeRequest

	RequestorRef string
}

func NewSIRISituationExchangeRequest

func NewSIRISituationExchangeRequest(
	messageIdentifier,
	requestorRef string,
	requestTimestamp time.Time) *SIRIGetSituationExchangeRequest

func (*SIRIGetSituationExchangeRequest) BuildXML

func (request *SIRIGetSituationExchangeRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIGetStopMonitoringRequest

type SIRIGetStopMonitoringRequest struct {
	SIRIStopMonitoringRequest

	RequestorRef string
}

func NewSIRIGetStopMonitoringRequest

func NewSIRIGetStopMonitoringRequest(
	messageIdentifier,
	monitoringRef,
	requestorRef string,
	requestTimestamp time.Time) *SIRIGetStopMonitoringRequest

func (*SIRIGetStopMonitoringRequest) BuildXML

func (request *SIRIGetStopMonitoringRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIGetVehicleMonitoringRequest

type SIRIGetVehicleMonitoringRequest struct {
	SIRIVehicleMonitoringRequest

	RequestorRef string
}

func NewSIRIGetVehicleMonitoringRequest

func NewSIRIGetVehicleMonitoringRequest() *SIRIGetVehicleMonitoringRequest

func (*SIRIGetVehicleMonitoringRequest) BuildXML

func (request *SIRIGetVehicleMonitoringRequest) BuildXML(envelopeType ...string) (string, error)

type SIRILineSection

type SIRILineSection struct {
	FirstStop string
	LastStop  string
	LineRef   string
}

type SIRILinesDiscoveryRequest

type SIRILinesDiscoveryRequest struct {
	MessageIdentifier string
	RequestorRef      string

	RequestTimestamp time.Time
}

func NewSIRILinesDiscoveryRequest

func NewSIRILinesDiscoveryRequest(messageIdentifier, requestorRef string, requestTimestamp time.Time) *SIRILinesDiscoveryRequest

func (*SIRILinesDiscoveryRequest) BuildXML

func (request *SIRILinesDiscoveryRequest) BuildXML(envelopeType ...string) (string, error)

type SIRILinesDiscoveryResponse

type SIRILinesDiscoveryResponse struct {
	Status            bool
	ResponseTimestamp time.Time

	AnnotatedLines []*SIRIAnnotatedLine
}

func (*SIRILinesDiscoveryResponse) BuildXML

func (response *SIRILinesDiscoveryResponse) BuildXML(envelopeType ...string) (string, error)

type SIRIMessage

type SIRIMessage struct {
	SIRITranslatedString
	Type string
}

type SIRIMonitoredStopVisit

type SIRIMonitoredStopVisit struct {
	ItemIdentifier         string
	MonitoringRef          string
	StopPointRef           string
	StopPointName          string
	DatedVehicleJourneyRef string
	LineRef                string
	PublishedLineName      string
	DepartureStatus        string
	ArrivalStatus          string
	VehicleJourneyName     string
	OriginName             string
	DestinationName        string
	DirectionType          string
	StopAreaCode           string
	DataFrameRef           string
	Occupancy              string
	Bearing                float64

	SIRIVehicleLocation
	HasVehicleInformation bool
	VehicleAtStop         bool
	Monitored             bool

	Order          int
	UseVisitNumber bool

	AimedArrivalTime    time.Time
	ExpectedArrivalTime time.Time
	ActualArrivalTime   time.Time

	RecordedAt            time.Time
	AimedDepartureTime    time.Time
	ExpectedDepartureTime time.Time
	ActualDepartureTime   time.Time

	Attributes map[string]map[string]string
	References map[string]map[string]string
}

func (*SIRIMonitoredStopVisit) BuildMonitoredStopVisitXML

func (stopVisit *SIRIMonitoredStopVisit) BuildMonitoredStopVisitXML() (string, error)

type SIRIMonitoredVehicleJourney

type SIRIMonitoredVehicleJourney struct {
	LineRef                 string                       `json:",omitempty"`
	FramedVehicleJourneyRef *SIRIFramedVehicleJourneyRef `json:",omitempty"`
	PublishedLineName       string                       `json:",omitempty"`
	DirectionName           string                       `json:",omitempty"`
	DirectionType           string                       `json:",omitempty"`
	OriginRef               string                       `json:",omitempty"`
	OriginName              string                       `json:",omitempty"`
	DestinationRef          string                       `json:",omitempty"`
	DestinationName         string                       `json:",omitempty"`
	Monitored               bool
	Delay                   *time.Time `json:",omitempty"`
	Bearing                 float64
	VehicleLocation         *SIRIVehicleLocation
	Occupancy               string         `json:",omitempty"`
	DriverRef               string         `json:",omitempty"`
	JourneyPatternRef       string         `json:",omitempty"`
	JourneyPatternName      string         `json:",omitempty"`
	VehicleRef              string         `json:",omitempty"`
	MonitoredCall           *MonitoredCall `json:",omitempty"`
}

func (*SIRIMonitoredVehicleJourney) BuildMonitoredVehicleJourneyXML

func (response *SIRIMonitoredVehicleJourney) BuildMonitoredVehicleJourneyXML() (string, error)

type SIRINotifyEstimatedTimetable

type SIRINotifyEstimatedTimetable struct {
	Address                   string
	RequestMessageRef         string
	ProducerRef               string
	ResponseMessageIdentifier string
	SubscriberRef             string
	SubscriptionIdentifier    string

	ResponseTimestamp time.Time
	Status            bool
	ErrorType         string
	ErrorNumber       int
	ErrorText         string

	EstimatedJourneyVersionFrames []*SIRIEstimatedJourneyVersionFrame
}

func (*SIRINotifyEstimatedTimetable) BuildXML

func (notify *SIRINotifyEstimatedTimetable) BuildXML(envelopeType ...string) (string, error)

func (*SIRINotifyEstimatedTimetable) ErrorString

func (notify *SIRINotifyEstimatedTimetable) ErrorString() string

type SIRINotifyFacilityMonitoring

type SIRINotifyFacilityMonitoring struct {
	Address                   string
	RequestMessageRef         string
	ProducerRef               string
	ResponseMessageIdentifier string
	SubscriberRef             string
	SubscriptionIdentifier    string

	ResponseTimestamp time.Time
	Status            bool
	ErrorType         string
	ErrorNumber       int
	ErrorText         string

	FacilityConditions []*SIRIFacilityCondition

	SortPayloadForTest bool
}

func (*SIRINotifyFacilityMonitoring) BuildXML

func (notify *SIRINotifyFacilityMonitoring) BuildXML(envelopeType ...string) (string, error)

func (*SIRINotifyFacilityMonitoring) ErrorString

func (notify *SIRINotifyFacilityMonitoring) ErrorString() string

type SIRINotifyGeneralMessage

type SIRINotifyGeneralMessage struct {
	Address                   string
	ProducerRef               string
	RequestMessageRef         string
	ResponseMessageIdentifier string
	SubscriberRef             string
	SubscriptionIdentifier    string

	ResponseTimestamp time.Time

	Status      bool
	ErrorType   string
	ErrorNumber int
	ErrorText   string

	GeneralMessages             []*SIRIGeneralMessage
	GeneralMessageCancellations []*SIRIGeneralMessageCancellation
}

func (*SIRINotifyGeneralMessage) BuildXML

func (notify *SIRINotifyGeneralMessage) BuildXML(envelopeType ...string) (string, error)

func (*SIRINotifyGeneralMessage) ErrorString

func (notify *SIRINotifyGeneralMessage) ErrorString() string

type SIRINotifyProductionTimetable

type SIRINotifyProductionTimetable struct {
	ProducerRef            string
	SubscriptionIdentifier string

	ResponseTimestamp time.Time
	Status            bool
	ErrorType         string
	ErrorNumber       int
	ErrorText         string

	DatedTimetableVersionFrames []*SIRIDatedTimetableVersionFrame

	SortPayloadForTest bool
}

func (*SIRINotifyProductionTimetable) BuildXML

func (notify *SIRINotifyProductionTimetable) BuildXML(envelopeType ...string) (string, error)

func (*SIRINotifyProductionTimetable) ErrorString

func (notify *SIRINotifyProductionTimetable) ErrorString() string

type SIRINotifySituationExchange

type SIRINotifySituationExchange struct {
	Address                   string
	ProducerRef               string
	RequestMessageRef         string
	ResponseMessageIdentifier string

	ResponseTimestamp time.Time

	Status      bool
	ErrorType   string
	ErrorNumber int
	ErrorText   string

	SituationExchangeDeliveries []*SIRISituationExchangeDelivery
}

func (*SIRINotifySituationExchange) BuildXML

func (notify *SIRINotifySituationExchange) BuildXML(envelopeType ...string) (string, error)

func (*SIRINotifySituationExchange) ErrorString

func (notify *SIRINotifySituationExchange) ErrorString() string

type SIRINotifyStopMonitoring

type SIRINotifyStopMonitoring struct {
	Address                   string
	ProducerRef               string
	RequestMessageRef         string
	ResponseMessageIdentifier string
	ResponseTimestamp         time.Time

	Deliveries []*SIRINotifyStopMonitoringDelivery
}

func (*SIRINotifyStopMonitoring) BuildXML

func (notify *SIRINotifyStopMonitoring) BuildXML(envelopeType ...string) (string, error)

type SIRINotifyStopMonitoringDelivery

type SIRINotifyStopMonitoringDelivery struct {
	MonitoringRef          string
	RequestMessageRef      string
	SubscriberRef          string
	SubscriptionIdentifier string
	ResponseTimestamp      time.Time

	Status      bool
	ErrorType   string
	ErrorNumber int
	ErrorText   string

	MonitoredVehicleJourney *SIRIMonitoredVehicleJourney
	MonitoredStopVisits     []*SIRIMonitoredStopVisit
	CancelledStopVisits     []*SIRICancelledStopVisit
}

func (*SIRINotifyStopMonitoringDelivery) BuildNotifyStopMonitoringDeliveryXML

func (delivery *SIRINotifyStopMonitoringDelivery) BuildNotifyStopMonitoringDeliveryXML() (string, error)

func (*SIRINotifyStopMonitoringDelivery) ErrorString

func (delivery *SIRINotifyStopMonitoringDelivery) ErrorString() string

type SIRINotifyVehicleMonitoring

type SIRINotifyVehicleMonitoring struct {
	Address                   string
	RequestMessageRef         string
	ProducerRef               string
	ResponseMessageIdentifier string
	SubscriberRef             string
	SubscriptionIdentifier    string

	ResponseTimestamp time.Time
	Status            bool
	ErrorType         string
	ErrorNumber       int
	ErrorText         string

	VehicleActivities []*SIRIVehicleActivity

	SortPayloadForTest bool
}

func (*SIRINotifyVehicleMonitoring) BuildXML

func (notify *SIRINotifyVehicleMonitoring) BuildXML(envelopeType ...string) (string, error)

func (*SIRINotifyVehicleMonitoring) ErrorString

func (notify *SIRINotifyVehicleMonitoring) ErrorString() string

type SIRIProgressBetweenStops

type SIRIProgressBetweenStops struct {
	LinkDistance float64 `json:",omitempty"`
	Percentage   float64 `json:",omitempty"`
}

type SIRIPtSituationElement

type SIRIPtSituationElement struct {
	CreationTime       time.Time
	SituationNumber    string
	Version            int
	VersionedAtTime    time.Time
	ValidityPeriods    []*model.TimeRange
	PublicationWindows []*model.TimeRange
	AlertCause         model.SituationAlertCause
	Progress           model.SituationProgress
	Keywords           string
	ReportType         model.ReportType
	Severity           model.SituationSeverity
	Reality            model.SituationReality
	ParticipantRef     string
	Summary            *SIRITranslatedString
	Description        *SIRITranslatedString

	HasAffects bool
	SIRIAffects

	Consequences []*Consequence

	HasPublishingActions    bool
	PublishToWebActions     []*PublishToWebAction
	PublishToMobileActions  []*PublishToMobileAction
	PublishToDisplayActions []*PublishToDisplayAction

	HasInfoLinks bool
	InfoLinks    []*InfoLink
}

func (*SIRIPtSituationElement) BuildSituationExchangeXML

func (message *SIRIPtSituationElement) BuildSituationExchangeXML() (string, error)

type SIRIPublishActionCommon

type SIRIPublishActionCommon struct {
	HasAffects bool
	SIRIAffects

	Name               string                `json:",omitempty"`
	ActionType         string                `json:",omitempty"`
	Value              string                `json:",omitempty"`
	Prompt             *SIRITranslatedString `json:",omitempty"`
	HasPublishAtScope  bool
	ScopeType          model.SituationScopeType    `json:",omitempty"`
	ActionStatus       model.SituationActionStatus `json:",omitempty"`
	Description        *SIRITranslatedString       `json:",omitempty"`
	PublicationWindows []*model.TimeRange          `json:",omitempty"`
}

func (*SIRIPublishActionCommon) BuildPublishActionCommonXML

func (ac *SIRIPublishActionCommon) BuildPublishActionCommonXML(envelopeType ...string) (string, error)

type SIRIRecordedCall

type SIRIRecordedCall struct {
	ArrivalStatus      string
	DepartureStatus    string
	StopPointRef       string
	StopPointName      string
	DestinationDisplay string

	Order          int
	UseVisitNumber bool

	AimedArrivalTime    time.Time
	ExpectedArrivalTime time.Time

	AimedDepartureTime    time.Time
	ExpectedDepartureTime time.Time
}

type SIRIRecordedCalls

type SIRIRecordedCalls []*SIRIRecordedCall

func (SIRIRecordedCalls) Len

func (a SIRIRecordedCalls) Len() int

func (SIRIRecordedCalls) Swap

func (a SIRIRecordedCalls) Swap(i, j int)

type SIRIResponseStatus

type SIRIResponseStatus struct {
	RequestMessageRef string
	SubscriberRef     string
	SubscriptionRef   string

	Status      bool
	ErrorType   string
	ErrorNumber int
	ErrorText   string

	ResponseTimestamp time.Time
	ValidUntil        time.Time
}

type SIRISituationExchangeDelivery

type SIRISituationExchangeDelivery struct {
	RequestMessageRef      string
	SubscriberRef          string
	SubscriptionIdentifier string
	ResponseTimestamp      time.Time

	Status      bool
	ErrorType   string
	ErrorNumber int
	ErrorText   string

	Situations []*SIRIPtSituationElement

	LineRefs       map[string]struct{} `json:"-"`
	MonitoringRefs map[string]struct{} `json:"-"`
}

func (*SIRISituationExchangeDelivery) BuildSituationExchangeDeliveryXML

func (delivery *SIRISituationExchangeDelivery) BuildSituationExchangeDeliveryXML() (string, error)

type SIRISituationExchangeRequest

type SIRISituationExchangeRequest struct {
	MessageIdentifier string

	RequestTimestamp time.Time
	// TODO: to be removed. See ARA-1470
	StartTime time.Time

	InfoChannelRef []string

	LineRef      []string
	StopPointRef []string
}

func (*SIRISituationExchangeRequest) BuildSituationExchangeRequestXML

func (request *SIRISituationExchangeRequest) BuildSituationExchangeRequestXML() (string, error)

type SIRISituationExchangeResponse

type SIRISituationExchangeResponse struct {
	SIRISituationExchangeDelivery

	Address                   string
	ProducerRef               string
	ResponseMessageIdentifier string
}

func (*SIRISituationExchangeResponse) BuildXML

func (response *SIRISituationExchangeResponse) BuildXML(envelopeType ...string) (string, error)

type SIRISituationExchangeSubscriptionRequest

type SIRISituationExchangeSubscriptionRequest struct {
	ConsumerAddress   string
	MessageIdentifier string
	RequestorRef      string
	RequestTimestamp  time.Time

	Entries []*SIRISituationExchangeSubscriptionRequestEntry
}

func (*SIRISituationExchangeSubscriptionRequest) BuildXML

func (request *SIRISituationExchangeSubscriptionRequest) BuildXML(envelopeType ...string) (string, error)

type SIRISituationExchangeSubscriptionRequestEntry

type SIRISituationExchangeSubscriptionRequestEntry struct {
	SIRISituationExchangeRequest

	SubscriberRef          string
	SubscriptionIdentifier string

	InitialTerminationTime time.Time
}

type SIRIStopMonitoringDelivery

type SIRIStopMonitoringDelivery struct {
	RequestMessageRef string
	Status            bool
	ErrorType         string
	ErrorNumber       int
	ErrorText         string
	ResponseTimestamp time.Time
	MonitoringRef     string

	MonitoredStopVisits []*SIRIMonitoredStopVisit
	CancelledStopVisits []*SIRICancelledStopVisit

	VehicleJourneyRefs map[string]struct{}
	LineRefs           map[string]struct{}
}

func (*SIRIStopMonitoringDelivery) BuildStopMonitoringDeliveryXML

func (delivery *SIRIStopMonitoringDelivery) BuildStopMonitoringDeliveryXML() (string, error)

func (*SIRIStopMonitoringDelivery) ErrorString

func (delivery *SIRIStopMonitoringDelivery) ErrorString() string

type SIRIStopMonitoringRequest

type SIRIStopMonitoringRequest struct {
	MessageIdentifier string
	MonitoringRef     string
	StopVisitTypes    string

	RequestTimestamp time.Time
}

func (*SIRIStopMonitoringRequest) BuildStopMonitoringRequestXML

func (request *SIRIStopMonitoringRequest) BuildStopMonitoringRequestXML() (string, error)

type SIRIStopMonitoringResponse

type SIRIStopMonitoringResponse struct {
	SIRIStopMonitoringDelivery

	Address                   string
	ProducerRef               string
	ResponseMessageIdentifier string
}

func (*SIRIStopMonitoringResponse) BuildXML

func (response *SIRIStopMonitoringResponse) BuildXML(envelopeType ...string) (string, error)

type SIRIStopMonitoringSubscriptionRequest

type SIRIStopMonitoringSubscriptionRequest struct {
	ConsumerAddress   string
	MessageIdentifier string
	RequestorRef      string
	RequestTimestamp  time.Time

	Entries []*SIRIStopMonitoringSubscriptionRequestEntry
}

func (*SIRIStopMonitoringSubscriptionRequest) BuildXML

func (request *SIRIStopMonitoringSubscriptionRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIStopMonitoringSubscriptionRequestEntry

type SIRIStopMonitoringSubscriptionRequestEntry struct {
	SIRIStopMonitoringRequest

	SubscriberRef          string
	SubscriptionIdentifier string

	InitialTerminationTime time.Time
}

type SIRIStopPointsDiscoveryRequest

type SIRIStopPointsDiscoveryRequest struct {
	MessageIdentifier string
	RequestorRef      string

	RequestTimestamp time.Time
}

func NewSIRIStopPointsDiscoveryRequest

func NewSIRIStopPointsDiscoveryRequest(messageIdentifier, requestorRef string, requestTimestamp time.Time) *SIRIStopPointsDiscoveryRequest

func (*SIRIStopPointsDiscoveryRequest) BuildXML

func (request *SIRIStopPointsDiscoveryRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIStopPointsDiscoveryResponse

type SIRIStopPointsDiscoveryResponse struct {
	Status            bool
	ResponseTimestamp time.Time

	AnnotatedStopPoints []*SIRIAnnotatedStopPoint
}

func (*SIRIStopPointsDiscoveryResponse) BuildXML

func (response *SIRIStopPointsDiscoveryResponse) BuildXML(envelopeType ...string) (string, error)

type SIRISubscriptionResponse

type SIRISubscriptionResponse struct {
	Address           string
	ResponderRef      string
	RequestMessageRef string

	ResponseTimestamp  time.Time
	ServiceStartedTime time.Time

	ResponseStatus []SIRIResponseStatus
}

func (*SIRISubscriptionResponse) BuildXML

func (response *SIRISubscriptionResponse) BuildXML(envelopeType ...string) (string, error)

type SIRITerminationResponseStatus

type SIRITerminationResponseStatus struct {
	SubscriberRef     string
	SubscriptionRef   string
	ResponseTimestamp time.Time

	Status      bool
	ErrorType   string
	ErrorNumber string
	ErrorText   string
}

type SIRITranslatedString

type SIRITranslatedString struct {
	Tag    string
	Prefix string
	model.TranslatedString
}

func NewSIRISXTranslatedString

func NewSIRISXTranslatedString() *SIRITranslatedString

func (*SIRITranslatedString) BuildTranslatedStringXML

func (t *SIRITranslatedString) BuildTranslatedStringXML() (string, error)

type SIRIVehicleActivity

type SIRIVehicleActivity struct {
	RecordedAtTime       time.Time                 `json:",omitempty"`
	ValidUntilTime       time.Time                 `json:",omitempty"`
	VehicleMonitoringRef string                    `json:",omitempty"`
	ProgressBetweenStops *SIRIProgressBetweenStops `json:",omitempty"`

	MonitoredVehicleJourney *SIRIMonitoredVehicleJourney `json:",omitempty"`
}

func NewSiriLiteVehicleActivity

func NewSiriLiteVehicleActivity() *SIRIVehicleActivity

func (*SIRIVehicleActivity) BuildVehicleActivityXML

func (response *SIRIVehicleActivity) BuildVehicleActivityXML() (string, error)

type SIRIVehicleLocation

type SIRIVehicleLocation struct {
	Coordinates string  `json:",omitempty"`
	Longitude   float64 `json:",omitempty"`
	Latitude    float64 `json:",omitempty"`
}

type SIRIVehicleMonitoringDelivery

type SIRIVehicleMonitoringDelivery struct {
	Version           string
	ResponseTimestamp time.Time `json:",omitempty"`
	RequestMessageRef string    `json:",omitempty"`
	Status            bool
	ErrorCondition    *ErrorCondition `json:",omitempty"`
	VehicleActivity   []*SIRIVehicleActivity

	LineRefs           map[string]struct{} `json:"-"`
	VehicleJourneyRefs map[string]struct{} `json:"-"`
	VehicleRefs        map[string]struct{} `json:"-"`
}

func NewSiriLiteVehicleMonitoringDelivery

func NewSiriLiteVehicleMonitoringDelivery() *SIRIVehicleMonitoringDelivery

func (*SIRIVehicleMonitoringDelivery) BuildVehicleMonitoringDeliveryXML

func (response *SIRIVehicleMonitoringDelivery) BuildVehicleMonitoringDeliveryXML() (string, error)

func (*SIRIVehicleMonitoringDelivery) ErrorString

func (delivery *SIRIVehicleMonitoringDelivery) ErrorString() string

type SIRIVehicleMonitoringRequest

type SIRIVehicleMonitoringRequest struct {
	MessageIdentifier string
	LineRef           string

	RequestTimestamp time.Time
}

func (*SIRIVehicleMonitoringRequest) BuildVehicleMonitoringRequestXML

func (request *SIRIVehicleMonitoringRequest) BuildVehicleMonitoringRequestXML() (string, error)

func (*SIRIVehicleMonitoringRequest) BuildVehicleMonitoringRequestXMLRaw

func (request *SIRIVehicleMonitoringRequest) BuildVehicleMonitoringRequestXMLRaw() (string, error)

type SIRIVehicleMonitoringResponse

type SIRIVehicleMonitoringResponse struct {
	ResponseTimestamp         time.Time `json:",omitempty"`
	ProducerRef               string    `json:",omitempty"`
	ResponseMessageIdentifier string    `json:",omitempty"`
	RequestMessageRef         string    `json:",omitempty"`
	Address                   string    `json:".omitempty"`

	SIRIVehicleMonitoringDelivery
}

func (*SIRIVehicleMonitoringResponse) BuildXML

func (response *SIRIVehicleMonitoringResponse) BuildXML(envelopeType ...string) (string, error)

type SIRIVehicleMonitoringSubscriptionRequest

type SIRIVehicleMonitoringSubscriptionRequest struct {
	ConsumerAddress   string
	MessageIdentifier string
	RequestorRef      string
	RequestTimestamp  time.Time

	Entries []*SIRIVehicleMonitoringSubscriptionRequestEntry
}

func (*SIRIVehicleMonitoringSubscriptionRequest) BuildXML

func (request *SIRIVehicleMonitoringSubscriptionRequest) BuildXML(envelopeType ...string) (string, error)

type SIRIVehicleMonitoringSubscriptionRequestEntry

type SIRIVehicleMonitoringSubscriptionRequestEntry struct {
	SIRIVehicleMonitoringRequest

	SubscriberRef          string
	SubscriptionIdentifier string

	InitialTerminationTime time.Time
}

type ServiceDelivery

type ServiceDelivery struct {
	ResponseTimestamp         time.Time                      `json:",omitempty"`
	ProducerRef               string                         `json:",omitempty"`
	ResponseMessageIdentifier string                         `json:",omitempty"`
	RequestMessageRef         string                         `json:",omitempty"`
	VehicleMonitoringDelivery *SIRIVehicleMonitoringDelivery `json:",omitempty"`
}

type SiriError

type SiriError struct {
	// contains filtered or unexported fields
}

Handle SIRI CRITICAL errors

func (*SiriError) ErrCode

func (e *SiriError) ErrCode() string

func (*SiriError) Error

func (e *SiriError) Error() string

func (*SiriError) FullMessage

func (e *SiriError) FullMessage() string

type SiriLiteResponse

type SiriLiteResponse struct {
	Siri *SiriLiteResponseSubstructure
}

func NewSiriLiteResponse

func NewSiriLiteResponse() *SiriLiteResponse

type SiriLiteResponseSubstructure

type SiriLiteResponseSubstructure struct {
	ServiceDelivery *ServiceDelivery
}

type SortByDirectionType

type SortByDirectionType struct {
	SIRIDatedTimetableVersionFrames
}

func (SortByDirectionType) Less

func (s SortByDirectionType) Less(i, j int) bool

type SortByStopPointOrder

type SortByStopPointOrder struct{ SIRIDatedCalls }

func (SortByStopPointOrder) Less

func (s SortByStopPointOrder) Less(i, j int) bool

type SortByVehicleMonitoringRef

type SortByVehicleMonitoringRef struct {
	VehicleActivities
}

func (SortByVehicleMonitoringRef) Less

func (s SortByVehicleMonitoringRef) Less(i, j int) bool

type SortEstimatedCallsByStopVisitOrder

type SortEstimatedCallsByStopVisitOrder struct{ SIRIEstimatedCalls }

func (SortEstimatedCallsByStopVisitOrder) Less

type SortRecordedCallsByStopVisitOrder

type SortRecordedCallsByStopVisitOrder struct{ SIRIRecordedCalls }

func (SortRecordedCallsByStopVisitOrder) Less

type VehicleActivities

type VehicleActivities []*SIRIVehicleActivity

func (VehicleActivities) Len

func (a VehicleActivities) Len() int

func (VehicleActivities) Swap

func (a VehicleActivities) Swap(i, j int)

Jump to

Keyboard shortcuts

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