Documentation ¶
Overview ¶
Package v1dot2 contains the type definitions for FerryRoute v1.2.
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 Deviation
- func (x *Deviation) Description() *string
- func (x *Deviation) FromDate() *string
- func (x *Deviation) ID() *string
- func (x *Deviation) SpecDate() *string
- func (x *Deviation) ToDate() *string
- func (x *Deviation) Type() *DeviationType
- func (x *Deviation) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type DeviationType
- type FerryRoute
- func (x *FerryRoute) Acknowledged() *time.Time
- func (x *FerryRoute) CheckoutID() *string
- func (x *FerryRoute) Checkouts() *int64
- func (x *FerryRoute) Deleted() *bool
- func (x *FerryRoute) DeviationID() *string
- func (x *FerryRoute) Geometry() *Geometry
- func (x *FerryRoute) Harbors() []Harbor
- func (x *FerryRoute) ID() *int
- func (x *FerryRoute) ItemsAcknowledged() *int64
- func (x *FerryRoute) ItemsLeft() *int64
- func (x *FerryRoute) LeasedUntil() *time.Time
- func (x *FerryRoute) ModifiedTime() *time.Time
- func (x *FerryRoute) Name() *string
- func (x *FerryRoute) Shortname() *string
- func (x *FerryRoute) StatusCode() *uint8
- func (x *FerryRoute) Timetables() []Timetable
- func (x *FerryRoute) Type() *Type
- func (x *FerryRoute) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Geometry
- type Harbor
- type Period
- type Response
- type Schedule
- type StopType
- type Timetable
- type Type
- type Valid
- type Weekday
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ObjectType ¶
func ObjectType() trv.ObjectType
Types ¶
type Deviation ¶
type Deviation struct {
// contains filtered or unexported fields
}
func (*Deviation) Description ¶
SV: Beskrivning av avvikelsen EN: Description of the deviation
func (*Deviation) FromDate ¶
SV: Om avvikelsen gäller under en period så finns den en sträng fråndatum med formatet "mmdd" EN: If the deviation applies for a period, there is a string from date with the format "mmdd"
func (*Deviation) SpecDate ¶
SV: Om avvikelsen gäller specifika datum läggs de till en sträng med formatet "mmdd, mmdd" EN: If the discrepancy applies to specific dates, they are added to a string with the format "mmdd, mmdd
func (*Deviation) ToDate ¶
SV: Om avvikelsen gäller under en period så finns den en sträng slutdatum med formatet "mmdd" EN: If the deviation applies for a period, there is a string end date with the format "mmdd"
func (*Deviation) Type ¶
func (x *Deviation) Type() *DeviationType
func (*Deviation) UnmarshalXML ¶
type DeviationType ¶
type DeviationType struct {
// contains filtered or unexported fields
}
func (*DeviationType) ID ¶
func (x *DeviationType) ID() *string
SV: Avvikelsetypens id EN: Anomaly type ID
func (*DeviationType) Name ¶
func (x *DeviationType) Name() *string
SV: Avvikelsetypens namn, det finns fyra: "Meddelande", "Kallelse", "Går" & "Går ej" EN: The name of the deviation type, there are four: "Meddelande", "Kallelse", "Går" & "Går ej"
func (*DeviationType) UnmarshalXML ¶
func (x *DeviationType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type FerryRoute ¶
type FerryRoute struct {
// contains filtered or unexported fields
}
func (*FerryRoute) Acknowledged ¶
func (x *FerryRoute) Acknowledged() *time.Time
func (*FerryRoute) CheckoutID ¶
func (x *FerryRoute) CheckoutID() *string
func (*FerryRoute) Checkouts ¶
func (x *FerryRoute) Checkouts() *int64
func (*FerryRoute) Deleted ¶
func (x *FerryRoute) Deleted() *bool
func (*FerryRoute) DeviationID ¶
func (x *FerryRoute) DeviationID() *string
SV: Referens till Deviation.Id i objektet Situation EN: Reference to Deviation.Id in the Situation object
func (*FerryRoute) Geometry ¶
func (x *FerryRoute) Geometry() *Geometry
func (*FerryRoute) Harbors ¶
func (x *FerryRoute) Harbors() []Harbor
func (*FerryRoute) ItemsAcknowledged ¶
func (x *FerryRoute) ItemsAcknowledged() *int64
func (*FerryRoute) ItemsLeft ¶
func (x *FerryRoute) ItemsLeft() *int64
func (*FerryRoute) LeasedUntil ¶
func (x *FerryRoute) LeasedUntil() *time.Time
func (*FerryRoute) ModifiedTime ¶
func (x *FerryRoute) ModifiedTime() *time.Time
EN: Specifies when the object is stored. SV: Anger när objektet är sparat.
func (*FerryRoute) Shortname ¶
func (x *FerryRoute) Shortname() *string
SV: Förkortning av ledens namn EN: Abbreviation of the name of the trail
func (*FerryRoute) StatusCode ¶
func (x *FerryRoute) StatusCode() *uint8
func (*FerryRoute) Timetables ¶
func (x *FerryRoute) Timetables() []Timetable
func (*FerryRoute) Type ¶
func (x *FerryRoute) Type() *Type
func (*FerryRoute) UnmarshalXML ¶
func (x *FerryRoute) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type Geometry ¶
type Geometry struct {
// contains filtered or unexported fields
}
func (*Geometry) SWEREF99TM ¶
SV: Geometrisk punkt i koordinatsystem SWEREF99TM EN: Geometric point in coordinate system SWEREF99TM
func (*Geometry) UnmarshalXML ¶
type Harbor ¶
type Harbor struct {
// contains filtered or unexported fields
}
func (*Harbor) UnmarshalXML ¶
type Period ¶
type Period struct {
// contains filtered or unexported fields
}
func (*Period) UnmarshalXML ¶
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 []FerryRoute `xml:"FerryRoute"` } `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/ferryroute/v1dot2" ) func main() { var res api.Response err := xml.Unmarshal(data, &res) }
type Schedule ¶
type Schedule struct {
// contains filtered or unexported fields
}
func (*Schedule) Deviations ¶
func (*Schedule) UnmarshalXML ¶
type StopType ¶
type StopType struct {
// contains filtered or unexported fields
}
func (*StopType) Name ¶
SV: Namn på stopptypen. Det finns tre olika "Avg", "Ank/Avg" & "Ank" EN: Name of the stop type. There are three different "Avg", "Ank/Avg" & "Ank"
func (*StopType) UnmarshalXML ¶
type Timetable ¶
type Timetable struct {
// contains filtered or unexported fields
}
func (*Timetable) Description ¶
SV: Tidtabellens beskrivning EN: Description of the timetable
func (*Timetable) Priority ¶
SV: Tidtabellens prioritet, det kan finnas flera tidtabeller som är giltiga samma datum, den med högst prioritet gäller. EN: The priority of the timetable, there may be several timetables valid on the same date, the one with the highest priority applies.
func (*Timetable) UnmarshalXML ¶
type Type ¶
type Type struct {
// contains filtered or unexported fields
}
func (*Type) UnmarshalXML ¶
type Valid ¶
type Valid struct {
// contains filtered or unexported fields
}
func (*Valid) From ¶
SV: Datumet då tidtabellen börjar gälla EN: The date on which the timetable takes effect
func (*Valid) UnmarshalXML ¶
type Weekday ¶
type Weekday struct {
// contains filtered or unexported fields
}
func (*Weekday) Day ¶
SV: Veckodagar som ingår i perioden (dagens namn) EN: Days of the week included in the period (day name)
func (*Weekday) ID ¶
SV: Veckodagar som ingår i perioden (dagens id) EN: Days of the week included in the period (day id)