Documentation
¶
Overview ¶
Package v1 contains the type definitions for ReasonCode v1.
All types have accessor methods to access fields which can be chained on nils. This makes it possible to easily drill down into deeply nested data.
Index ¶
- func ObjectType() trv.ObjectType
- type ReasonCode
- func (x *ReasonCode) Code() *string
- func (x *ReasonCode) Deleted() *bool
- func (x *ReasonCode) GroupDescription() *string
- func (x *ReasonCode) Level1Description() *string
- func (x *ReasonCode) Level2Description() *string
- func (x *ReasonCode) Level3Description() *string
- func (x *ReasonCode) ModifiedTime() *time.Time
- func (x *ReasonCode) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ObjectType ¶
func ObjectType() trv.ObjectType
Types ¶
type ReasonCode ¶
type ReasonCode struct {
// contains filtered or unexported fields
}
func (*ReasonCode) Code ¶
func (x *ReasonCode) Code() *string
SV: Full orsakskod, detta fält motsvarar det som finns från och med TrainAnnouncement version 1.5 under t.ex. Deviation.Code<br /> eller i objekttypen TrainMessage från och med schemaversion 1.5 under ReasonCode.Code
func (*ReasonCode) GroupDescription ¶
func (x *ReasonCode) GroupDescription() *string
SV: Beskrivning för vilken grupp orsakskoden tillhör, t.ex Annonseringstexter och Orsaker nya principer
func (*ReasonCode) Level1Description ¶
func (x *ReasonCode) Level1Description() *string
SV: Nivå 1 beskrivning, beskriver vilken typ av orsakskod.
func (*ReasonCode) Level2Description ¶
func (x *ReasonCode) Level2Description() *string
SV: Nivå 2 beskrivning, beskriver vilken betydelse orsakskoden har, t.ex. Nationell
func (*ReasonCode) Level3Description ¶
func (x *ReasonCode) Level3Description() *string
SV: Nivå 3 beskrivning, beskrivande text för orsakskoden, detta fält motsvarar det som finns i objekttypen TrainAnnouncement från och med schemaversion 1.5 under t.ex. Deviation.Description<br /> eller i objekttypen TrainMessage från och med schemaversion 1.5 under ReasonCode.Description
func (*ReasonCode) ModifiedTime ¶
func (x *ReasonCode) ModifiedTime() *time.Time
SV: Tidpunkt då dataposten ändrades
func (*ReasonCode) UnmarshalXML ¶
func (x *ReasonCode) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type Response ¶
type Response struct { XMLName xml.Name `xml:"RESPONSE"` Results []struct { Info struct { LastModified trv.LastModified `xml:"LASTMODIFIED"` LastChangeID string `xml:"LASTCHANGEID"` EvalResult []any `xml:"EVALRESULT"` SSEURL string `xml:"SSEURL"` } `xml:"INFO"` Error *trv.APIError `xml:"ERROR"` Data []ReasonCode `xml:"ReasonCode"` } `xml:"RESULT"` }
Response can be used to decode the response from the API.
For example:
package main import ( "encoding/xml" api "code.dny.dev/trafikinfo/trv/reasoncode/v1" ) func main() { var res api.Response err := xml.Unmarshal(data, &res) }