shared

package
v0.1.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type References

type References struct {
	Agencies   []ReferencesAgency    `json:"agencies,required"`
	Routes     []ReferencesRoute     `json:"routes,required"`
	Situations []ReferencesSituation `json:"situations,required"`
	Stops      []ReferencesStop      `json:"stops,required"`
	StopTimes  []ReferencesStopTime  `json:"stopTimes,required"`
	Trips      []ReferencesTrip      `json:"trips,required"`
	JSON       referencesJSON        `json:"-"`
}

func (*References) UnmarshalJSON

func (r *References) UnmarshalJSON(data []byte) (err error)

type ReferencesAgency

type ReferencesAgency struct {
	ID             string               `json:"id,required"`
	Name           string               `json:"name,required"`
	Timezone       string               `json:"timezone,required"`
	URL            string               `json:"url,required"`
	Disclaimer     string               `json:"disclaimer"`
	Email          string               `json:"email"`
	FareURL        string               `json:"fareUrl"`
	Lang           string               `json:"lang"`
	Phone          string               `json:"phone"`
	PrivateService bool                 `json:"privateService"`
	JSON           referencesAgencyJSON `json:"-"`
}

func (*ReferencesAgency) UnmarshalJSON

func (r *ReferencesAgency) UnmarshalJSON(data []byte) (err error)

type ReferencesRoute

type ReferencesRoute struct {
	ID                string              `json:"id,required"`
	AgencyID          string              `json:"agencyId,required"`
	Type              int64               `json:"type,required"`
	Color             string              `json:"color"`
	Description       string              `json:"description"`
	LongName          string              `json:"longName"`
	NullSafeShortName string              `json:"nullSafeShortName"`
	ShortName         string              `json:"shortName"`
	TextColor         string              `json:"textColor"`
	URL               string              `json:"url"`
	JSON              referencesRouteJSON `json:"-"`
}

func (*ReferencesRoute) UnmarshalJSON

func (r *ReferencesRoute) UnmarshalJSON(data []byte) (err error)

type ReferencesSituation

type ReferencesSituation struct {
	// Unique identifier for the situation.
	ID string `json:"id,required"`
	// Unix timestamp of when this situation was created.
	CreationTime  int64                              `json:"creationTime,required"`
	ActiveWindows []ReferencesSituationsActiveWindow `json:"activeWindows"`
	AllAffects    []ReferencesSituationsAllAffect    `json:"allAffects"`
	// Message regarding the consequence of the situation.
	ConsequenceMessage string                                  `json:"consequenceMessage"`
	Consequences       []ReferencesSituationsConsequence       `json:"consequences"`
	Description        ReferencesSituationsDescription         `json:"description"`
	PublicationWindows []ReferencesSituationsPublicationWindow `json:"publicationWindows"`
	// Reason for the service alert, taken from TPEG codes.
	Reason ReferencesSituationsReason `json:"reason"`
	// Severity of the situation.
	Severity string                      `json:"severity"`
	Summary  ReferencesSituationsSummary `json:"summary"`
	URL      ReferencesSituationsURL     `json:"url"`
	JSON     referencesSituationJSON     `json:"-"`
}

func (*ReferencesSituation) UnmarshalJSON

func (r *ReferencesSituation) UnmarshalJSON(data []byte) (err error)

type ReferencesSituationsActiveWindow

type ReferencesSituationsActiveWindow struct {
	// Start time of the active window as a Unix timestamp.
	From int64 `json:"from"`
	// End time of the active window as a Unix timestamp.
	To   int64                                `json:"to"`
	JSON referencesSituationsActiveWindowJSON `json:"-"`
}

func (*ReferencesSituationsActiveWindow) UnmarshalJSON

func (r *ReferencesSituationsActiveWindow) UnmarshalJSON(data []byte) (err error)

type ReferencesSituationsAllAffect

type ReferencesSituationsAllAffect struct {
	// Identifier for the agency.
	AgencyID string `json:"agencyId"`
	// Identifier for the application.
	ApplicationID string `json:"applicationId"`
	// Identifier for the direction.
	DirectionID string `json:"directionId"`
	// Identifier for the route.
	RouteID string `json:"routeId"`
	// Identifier for the stop.
	StopID string `json:"stopId"`
	// Identifier for the trip.
	TripID string                            `json:"tripId"`
	JSON   referencesSituationsAllAffectJSON `json:"-"`
}

func (*ReferencesSituationsAllAffect) UnmarshalJSON

func (r *ReferencesSituationsAllAffect) UnmarshalJSON(data []byte) (err error)

type ReferencesSituationsConsequence

type ReferencesSituationsConsequence struct {
	// Condition of the consequence.
	Condition        string                                           `json:"condition"`
	ConditionDetails ReferencesSituationsConsequencesConditionDetails `json:"conditionDetails"`
	JSON             referencesSituationsConsequenceJSON              `json:"-"`
}

func (*ReferencesSituationsConsequence) UnmarshalJSON

func (r *ReferencesSituationsConsequence) UnmarshalJSON(data []byte) (err error)

type ReferencesSituationsConsequencesConditionDetails

type ReferencesSituationsConsequencesConditionDetails struct {
	DiversionPath    ReferencesSituationsConsequencesConditionDetailsDiversionPath `json:"diversionPath"`
	DiversionStopIDs []string                                                      `json:"diversionStopIds"`
	JSON             referencesSituationsConsequencesConditionDetailsJSON          `json:"-"`
}

func (*ReferencesSituationsConsequencesConditionDetails) UnmarshalJSON

func (r *ReferencesSituationsConsequencesConditionDetails) UnmarshalJSON(data []byte) (err error)

type ReferencesSituationsConsequencesConditionDetailsDiversionPath

type ReferencesSituationsConsequencesConditionDetailsDiversionPath struct {
	// Length of the diversion path.
	Length int64 `json:"length"`
	// Levels of the diversion path.
	Levels string `json:"levels"`
	// Points of the diversion path.
	Points string                                                            `json:"points"`
	JSON   referencesSituationsConsequencesConditionDetailsDiversionPathJSON `json:"-"`
}

func (*ReferencesSituationsConsequencesConditionDetailsDiversionPath) UnmarshalJSON

type ReferencesSituationsDescription

type ReferencesSituationsDescription struct {
	// Language of the description.
	Lang string `json:"lang"`
	// Longer description of the situation.
	Value string                              `json:"value"`
	JSON  referencesSituationsDescriptionJSON `json:"-"`
}

func (*ReferencesSituationsDescription) UnmarshalJSON

func (r *ReferencesSituationsDescription) UnmarshalJSON(data []byte) (err error)

type ReferencesSituationsPublicationWindow

type ReferencesSituationsPublicationWindow struct {
	// Start time of the time window as a Unix timestamp.
	From int64 `json:"from,required"`
	// End time of the time window as a Unix timestamp.
	To   int64                                     `json:"to,required"`
	JSON referencesSituationsPublicationWindowJSON `json:"-"`
}

func (*ReferencesSituationsPublicationWindow) UnmarshalJSON

func (r *ReferencesSituationsPublicationWindow) UnmarshalJSON(data []byte) (err error)

type ReferencesSituationsReason

type ReferencesSituationsReason string

Reason for the service alert, taken from TPEG codes.

const (
	ReferencesSituationsReasonEquipmentReason     ReferencesSituationsReason = "equipmentReason"
	ReferencesSituationsReasonEnvironmentReason   ReferencesSituationsReason = "environmentReason"
	ReferencesSituationsReasonPersonnelReason     ReferencesSituationsReason = "personnelReason"
	ReferencesSituationsReasonMiscellaneousReason ReferencesSituationsReason = "miscellaneousReason"
	ReferencesSituationsReasonSecurityAlert       ReferencesSituationsReason = "securityAlert"
)

func (ReferencesSituationsReason) IsKnown

func (r ReferencesSituationsReason) IsKnown() bool

type ReferencesSituationsSummary

type ReferencesSituationsSummary struct {
	// Language of the summary.
	Lang string `json:"lang"`
	// Short summary of the situation.
	Value string                          `json:"value"`
	JSON  referencesSituationsSummaryJSON `json:"-"`
}

func (*ReferencesSituationsSummary) UnmarshalJSON

func (r *ReferencesSituationsSummary) UnmarshalJSON(data []byte) (err error)

type ReferencesSituationsURL

type ReferencesSituationsURL struct {
	// Language of the URL.
	Lang string `json:"lang"`
	// URL for more information about the situation.
	Value string                      `json:"value"`
	JSON  referencesSituationsURLJSON `json:"-"`
}

func (*ReferencesSituationsURL) UnmarshalJSON

func (r *ReferencesSituationsURL) UnmarshalJSON(data []byte) (err error)

type ReferencesStop

type ReferencesStop struct {
	ID                 string             `json:"id,required"`
	Lat                float64            `json:"lat,required"`
	Lon                float64            `json:"lon,required"`
	Name               string             `json:"name,required"`
	Parent             string             `json:"parent,required"`
	RouteIDs           []string           `json:"routeIds,required"`
	StaticRouteIDs     []string           `json:"staticRouteIds,required"`
	Code               string             `json:"code"`
	Direction          string             `json:"direction"`
	LocationType       int64              `json:"locationType"`
	WheelchairBoarding string             `json:"wheelchairBoarding"`
	JSON               referencesStopJSON `json:"-"`
}

func (*ReferencesStop) UnmarshalJSON

func (r *ReferencesStop) UnmarshalJSON(data []byte) (err error)

type ReferencesStopTime

type ReferencesStopTime struct {
	ArrivalTime         int64                  `json:"arrivalTime"`
	DepartureTime       int64                  `json:"departureTime"`
	DistanceAlongTrip   float64                `json:"distanceAlongTrip"`
	HistoricalOccupancy string                 `json:"historicalOccupancy"`
	StopHeadsign        string                 `json:"stopHeadsign"`
	StopID              string                 `json:"stopId"`
	JSON                referencesStopTimeJSON `json:"-"`
}

func (*ReferencesStopTime) UnmarshalJSON

func (r *ReferencesStopTime) UnmarshalJSON(data []byte) (err error)

type ReferencesTrip

type ReferencesTrip struct {
	ID             string             `json:"id,required"`
	RouteID        string             `json:"routeId,required"`
	ServiceID      string             `json:"serviceId,required"`
	BlockID        string             `json:"blockId"`
	DirectionID    string             `json:"directionId"`
	PeakOffpeak    int64              `json:"peakOffpeak"`
	RouteShortName string             `json:"routeShortName"`
	ShapeID        string             `json:"shapeId"`
	TimeZone       string             `json:"timeZone"`
	TripHeadsign   string             `json:"tripHeadsign"`
	TripShortName  string             `json:"tripShortName"`
	JSON           referencesTripJSON `json:"-"`
}

func (*ReferencesTrip) UnmarshalJSON

func (r *ReferencesTrip) UnmarshalJSON(data []byte) (err error)

type ResponseWrapper

type ResponseWrapper struct {
	Code        int64               `json:"code,required"`
	CurrentTime int64               `json:"currentTime,required"`
	Text        string              `json:"text,required"`
	Version     int64               `json:"version,required"`
	JSON        responseWrapperJSON `json:"-"`
}

func (*ResponseWrapper) UnmarshalJSON

func (r *ResponseWrapper) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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