Documentation ¶
Index ¶
- func ParseDasMessage(reader io.Reader) (arrival models.Arrival, err error)
- func ParseDvsMessage(reader io.Reader) (departure models.Departure, err error)
- func ParseInfoPlusBoolean(element *etree.Element) bool
- func ParseInfoPlusDateTime(element *etree.Element) time.Time
- func ParseInfoPlusDuration(element *etree.Element) int
- func ParseInfoPlusModifications(element *etree.Element) []models.Modification
- func ParseInfoPlusModificationsByElement(element *etree.Element, elementName string) []models.Modification
- func ParseInfoPlusPlatform(elements []*etree.Element) string
- func ParseInfoPlusStation(element *etree.Element) models.Station
- func ParseInfoPlusStations(elements []*etree.Element) (stations []models.Station)
- func ParseOptionalText(element *etree.Element) string
- func ParseRitMessage(reader io.Reader) (service models.Service, err error)
- func ParseWhenAttribute(element *etree.Element, tag, attribute, value string) *etree.Element
- func ParseWhenAttributeMulti(element *etree.Element, tag, attribute, value string) []*etree.Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseDasMessage ¶
ParseDasMessage parses a DAS XML message to an Arrival object
func ParseDvsMessage ¶
ParseDvsMessage parses a DVS XML message to a Departure object
func ParseInfoPlusBoolean ¶
ParseInfoPlusBoolean returns true when this is a InfoPlus boolean type which is true
func ParseInfoPlusDateTime ¶
ParseInfoPlusDateTime translates an element with a date/time to a time.Time struct
func ParseInfoPlusDuration ¶
ParseInfoPlusDuration translates an element with a duration (i.e., delays) to seconds
func ParseInfoPlusModifications ¶
func ParseInfoPlusModifications(element *etree.Element) []models.Modification
ParseInfoPlusModifications parses a list of modifications
func ParseInfoPlusModificationsByElement ¶
func ParseInfoPlusModificationsByElement(element *etree.Element, elementName string) []models.Modification
ParseInfoPlusModificationsByElement parses a list of modifications
func ParseInfoPlusPlatform ¶
ParseInfoPlusPlatform translates a platform element to a string
func ParseInfoPlusStation ¶
ParseInfoPlusStation translates an XML InfoPlus station to a Station object
func ParseInfoPlusStations ¶
ParseInfoPlusStations process multiple station elements and returns them as a slice
func ParseOptionalText ¶
ParseOptionalText gets the text from an element, or returns an empty string when the element is nil.
func ParseRitMessage ¶
ParseRitMessage parses a RIT XML message to a Service object
func ParseWhenAttribute ¶
ParseWhenAttribute filters a list of elements on an attribute with a given value. Returns a single element, or nil.
Types ¶
This section is empty.