Documentation ¶
Index ¶
- Constants
- Variables
- func AffectFromProto(value interface{}, remoteCodeSpace string, m Model) (Affect, *AffectRefs, error)
- func ApplyMigrations(operation, path string, database *sql.DB) error
- func CleanTestDb(t *testing.T)
- func CloseDB(database *gorp.DbMap)
- func InitDB(config config.DatabaseConfig) *gorp.DbMap
- func InitTestDb(t *testing.T)
- func IsContext(c string) bool
- func IsUpdater(u string) bool
- func LoadFromCSVFile(filePath string, referentialSlug string, force bool) error
- func NewContexFromDatabase(sm *SelectMacro) (context, error)
- func NewDefineSituationAffectsUpdater(sm *SelectMacro) (updater, error)
- func NewStopVisitDefineAimedScheduledTimesUpdater(sm *SelectMacro) (updater, error)
- func NewUpdateManager(model Model) func(UpdateEvent)
- func NewUpdaterFromDatabase(sm *SelectMacro) (updater, error)
- func NewVehicleJourneyIfAttributeContext(sm *SelectMacro) (context, error)
- func NewVehicleJourneySetAttributeUpdater(sm *SelectMacro) (updater, error)
- func NormalizedOccupancyName(occupancy string) string
- type APISituation
- type ActionCommon
- type ActionData
- type Affect
- type AffectRefs
- type AffectedAllLines
- type AffectedDestination
- type AffectedLine
- type AffectedRoute
- type AffectedSection
- type AffectedStopArea
- type Affects
- type Attributes
- type Blocking
- type ByTime
- type Code
- func (code Code) CodeSpace() string
- func (code Code) HashValue() string
- func (code Code) IsEmpty() bool
- func (code *Code) MarshalJSON() ([]byte, error)
- func (code *Code) SetValue(toset string)
- func (code Code) String() string
- func (code *Code) UnmarshalJSON(data []byte) error
- func (code Code) Value() string
- type CodeConsumer
- func (consumer *CodeConsumer) Code(codeSpace string) (Code, bool)
- func (consumer *CodeConsumer) CodeSlice() (objs []string)
- func (consumer *CodeConsumer) CodeWithFallback(codeSpaces []string) (Code, bool)
- func (consumer *CodeConsumer) Codes() Codes
- func (consumer *CodeConsumer) CodesResponse() map[string]string
- func (consumer *CodeConsumer) Copy() (c CodeConsumer)
- func (consumer *CodeConsumer) SetCode(code Code)
- type CodeConsumerInterface
- type CodeIndex
- type Codes
- type Collectable
- type ComplexError
- type Consequence
- type DatabaseLine
- type DatabaseLineGroup
- type DatabaseOperator
- type DatabasePartner
- type DatabaseReferential
- type DatabaseStopArea
- type DatabaseStopAreaGroup
- type DatabaseStopVisit
- type DatabaseVehicleJourney
- type Date
- type DiffResult
- type EventKind
- type Index
- type IndexableExtractor
- type InfoLink
- type Line
- func (line *Line) Attribute(key string) (string, bool)
- func (line *Line) DiscoveryCode(codeSpace string) (Code, bool)
- func (line *Line) Id() LineId
- func (line *Line) MarshalJSON() ([]byte, error)
- func (line *Line) Origin() string
- func (line *Line) Reference(key string) (Reference, bool)
- func (line *Line) Referent() (*Line, bool)
- func (line *Line) ReferentOrSelfCode(codeSpace string) (Code, bool)
- func (line *Line) Save() bool
- func (line *Line) SetOrigin(origin string)
- func (line *Line) UnmarshalJSON(data []byte) error
- type LineGroup
- type LineGroupId
- type LineGroups
- type LineId
- type LineUpdateEvent
- type Lines
- type Loader
- type Macro
- type MacroId
- type MacroManager
- type Macros
- type MemoryLineGroups
- func (manager *MemoryLineGroups) Delete(lineGroup *LineGroup) bool
- func (manager *MemoryLineGroups) Find(id LineGroupId) (*LineGroup, bool)
- func (manager *MemoryLineGroups) FindAll() (lineGroups []*LineGroup)
- func (manager *MemoryLineGroups) FindByShortName(shortName string) (*LineGroup, bool)
- func (manager *MemoryLineGroups) Load(referentialSlug string) error
- func (manager *MemoryLineGroups) New() *LineGroup
- func (manager *MemoryLineGroups) Save(lineGroup *LineGroup) bool
- type MemoryLines
- func (manager *MemoryLines) Delete(line *Line) bool
- func (manager *MemoryLines) Find(id LineId) (*Line, bool)
- func (manager *MemoryLines) FindAll() (lines []*Line)
- func (manager *MemoryLines) FindByCode(code Code) (*Line, bool)
- func (manager *MemoryLines) FindByReferentId(id LineId) (lines []*Line)
- func (manager *MemoryLines) FindFamily(lineId LineId) (lineIds []LineId)
- func (manager *MemoryLines) FindFamilyFromCode(code Code) (lineIds []LineId)
- func (manager *MemoryLines) Load(referentialSlug string) error
- func (manager *MemoryLines) New() *Line
- func (manager *MemoryLines) Save(line *Line) bool
- type MemoryModel
- func (model *MemoryModel) Date() Date
- func (model *MemoryModel) LineGroups() LineGroups
- func (model *MemoryModel) Lines() Lines
- func (model *MemoryModel) Load() error
- func (model *MemoryModel) Macros() Macros
- func (model *MemoryModel) Operators() Operators
- func (model *MemoryModel) Referential() string
- func (model *MemoryModel) RefreshMacros()
- func (model *MemoryModel) Reload() *MemoryModel
- func (model *MemoryModel) ScheduledStopVisits() StopVisits
- func (model *MemoryModel) SetBroadcastGMChan(broadcastGMEventChan chan SituationBroadcastEvent)
- func (model *MemoryModel) SetBroadcastSMChan(broadcastSMEventChan chan StopMonitoringBroadcastEvent)
- func (model *MemoryModel) SetBroadcastSXChan(broadcastSXEventChan chan SituationBroadcastEvent)
- func (model *MemoryModel) SetBroadcastVeChan(broadcastVeEventChan chan VehicleBroadcastEvent)
- func (model *MemoryModel) SetReferential(referential string)
- func (model *MemoryModel) Situations() Situations
- func (model *MemoryModel) StopAreaGroups() StopAreaGroups
- func (model *MemoryModel) StopAreas() StopAreas
- func (model *MemoryModel) StopVisits() StopVisits
- func (model *MemoryModel) VehicleJourneys() VehicleJourneys
- func (model *MemoryModel) Vehicles() Vehicles
- type MemoryOperators
- func (manager *MemoryOperators) Delete(operator *Operator) bool
- func (manager *MemoryOperators) Find(id OperatorId) (*Operator, bool)
- func (manager *MemoryOperators) FindAll() (operators []*Operator)
- func (manager *MemoryOperators) FindByCode(code Code) (*Operator, bool)
- func (manager *MemoryOperators) Load(referentialSlug string) error
- func (manager *MemoryOperators) New() *Operator
- func (manager *MemoryOperators) Save(operator *Operator) bool
- type MemorySituations
- func (manager *MemorySituations) Delete(situation *Situation) bool
- func (manager *MemorySituations) Find(id SituationId) (Situation, bool)
- func (manager *MemorySituations) FindAll() (situations []Situation)
- func (manager *MemorySituations) FindByCode(code Code) (Situation, bool)
- func (manager *MemorySituations) New() Situation
- func (manager *MemorySituations) Save(situation *Situation) bool
- type MemoryStopAreaGroups
- func (manager *MemoryStopAreaGroups) Delete(stopAreaGroup *StopAreaGroup) bool
- func (manager *MemoryStopAreaGroups) Find(id StopAreaGroupId) (*StopAreaGroup, bool)
- func (manager *MemoryStopAreaGroups) FindAll() (stopAreaGroups []*StopAreaGroup)
- func (manager *MemoryStopAreaGroups) FindByShortName(shortName string) (*StopAreaGroup, bool)
- func (manager *MemoryStopAreaGroups) Load(referentialSlug string) error
- func (manager *MemoryStopAreaGroups) New() *StopAreaGroup
- func (manager *MemoryStopAreaGroups) Save(stopAreaGroup *StopAreaGroup) bool
- type MemoryStopAreas
- func (manager *MemoryStopAreas) Delete(stopArea *StopArea) bool
- func (manager *MemoryStopAreas) Find(id StopAreaId) (*StopArea, bool)
- func (manager *MemoryStopAreas) FindAll() (stopAreas []*StopArea)
- func (manager *MemoryStopAreas) FindAllValues() (stopAreas []StopArea)
- func (manager *MemoryStopAreas) FindAscendants(stopAreaId StopAreaId) (stopAreas []*StopArea)
- func (manager *MemoryStopAreas) FindAscendantsWithCodeSpace(stopAreaId StopAreaId, kind string) (stopAreaCodes []Code)
- func (manager *MemoryStopAreas) FindByCode(code Code) (*StopArea, bool)
- func (manager *MemoryStopAreas) FindByLineId(id LineId) (stopAreas []*StopArea)
- func (manager *MemoryStopAreas) FindByOrigin(origin string) (stopAreas []StopAreaId)
- func (manager *MemoryStopAreas) FindByParentId(id StopAreaId) (stopAreas []*StopArea)
- func (manager *MemoryStopAreas) FindByReferentId(id StopAreaId) (stopAreas []*StopArea)
- func (manager *MemoryStopAreas) FindFamily(stopAreaId StopAreaId) (stopAreaIds []StopAreaId)
- func (manager *MemoryStopAreas) Load(referentialSlug string) error
- func (manager *MemoryStopAreas) New() *StopArea
- func (manager *MemoryStopAreas) Save(stopArea *StopArea) bool
- type MemoryStopVisits
- func (manager *MemoryStopVisits) Delete(stopVisit *StopVisit) bool
- func (manager *MemoryStopVisits) DeleteMultiple(stopVisits []*StopVisit) bool
- func (manager *MemoryStopVisits) Find(id StopVisitId) (*StopVisit, bool)
- func (manager *MemoryStopVisits) FindAll() (stopVisits []*StopVisit)
- func (manager *MemoryStopVisits) FindAllAfter(t time.Time) (stopVisits []*StopVisit)
- func (manager *MemoryStopVisits) FindByCode(code Code) (*StopVisit, bool)
- func (manager *MemoryStopVisits) FindByStopAreaId(id StopAreaId) (stopVisits []*StopVisit)
- func (manager *MemoryStopVisits) FindByVehicleJourneyId(id VehicleJourneyId) (stopVisits []*StopVisit)
- func (manager *MemoryStopVisits) FindByVehicleJourneyIdAfter(id VehicleJourneyId, t time.Time) (stopVisits []*StopVisit)
- func (manager *MemoryStopVisits) FindByVehicleJourneyIdAndStopAreaId(vjId VehicleJourneyId, saId StopAreaId) []StopVisitId
- func (manager *MemoryStopVisits) FindByVehicleJourneyIdAndStopVisitOrder(vjId VehicleJourneyId, order int) *StopVisit
- func (manager *MemoryStopVisits) FindFollowingByStopAreaId(id StopAreaId) (stopVisits []*StopVisit)
- func (manager *MemoryStopVisits) FindFollowingByStopAreaIds(stopAreaIds []StopAreaId) (stopVisits []*StopVisit)
- func (manager *MemoryStopVisits) FindFollowingByVehicleJourneyId(id VehicleJourneyId) (stopVisits []*StopVisit)
- func (manager *MemoryStopVisits) FindMonitoredByOriginByStopAreaId(id StopAreaId, origin string) (stopVisits []*StopVisit)
- func (manager *MemoryStopVisits) Load(referentialSlug string) error
- func (manager *MemoryStopVisits) New() *StopVisit
- func (manager *MemoryStopVisits) Save(stopVisit *StopVisit) bool
- func (manager *MemoryStopVisits) StopVisitsLenByVehicleJourney(id VehicleJourneyId) int
- func (manager *MemoryStopVisits) UnsafeDelete(stopVisit *StopVisit)
- func (manager *MemoryStopVisits) UnsafeFindAll() (stopVisits []*StopVisit)
- func (manager *MemoryStopVisits) VehicleJourneyHasStopVisits(id VehicleJourneyId) bool
- type MemoryVehicleJourneys
- func (manager *MemoryVehicleJourneys) Delete(vehicleJourney *VehicleJourney) bool
- func (manager *MemoryVehicleJourneys) DeleteById(id VehicleJourneyId) bool
- func (manager *MemoryVehicleJourneys) Find(id VehicleJourneyId) (*VehicleJourney, bool)
- func (manager *MemoryVehicleJourneys) FindAll() (vehicleJourneys []*VehicleJourney)
- func (manager *MemoryVehicleJourneys) FindByCode(code Code) (*VehicleJourney, bool)
- func (manager *MemoryVehicleJourneys) FindByLineId(id LineId) (vehicleJourneys []*VehicleJourney)
- func (manager *MemoryVehicleJourneys) FullVehicleJourneyExistBySubscriptionId(id string, vehicleJourneyId VehicleJourneyId) bool
- func (manager *MemoryVehicleJourneys) Load(referentialSlug string) error
- func (manager *MemoryVehicleJourneys) New() *VehicleJourney
- func (manager *MemoryVehicleJourneys) Save(vehicleJourney *VehicleJourney) bool
- func (manager *MemoryVehicleJourneys) SetFullVehicleJourneyBySubscriptionId(id string, vehicleJourneyId VehicleJourneyId)
- func (manager *MemoryVehicleJourneys) TestLenFullVehicleJourneyBySubscriptionId() int
- type MemoryVehicles
- func (manager *MemoryVehicles) Delete(vehicle *Vehicle) bool
- func (manager *MemoryVehicles) Find(id VehicleId) (*Vehicle, bool)
- func (manager *MemoryVehicles) FindAll() (vehicles []*Vehicle)
- func (manager *MemoryVehicles) FindByCode(code Code) (*Vehicle, bool)
- func (manager *MemoryVehicles) FindByLineId(id LineId) (vehicles []*Vehicle)
- func (manager *MemoryVehicles) FindByNextStopVisitId(stopVisitId StopVisitId) (*Vehicle, bool)
- func (manager *MemoryVehicles) New() *Vehicle
- func (manager *MemoryVehicles) Save(vehicle *Vehicle) bool
- type Model
- type ModelId
- type ModelInstance
- type ModelType
- type NotCollectedUpdateEvent
- type ObjectId
- type Operator
- type OperatorId
- type Operators
- type PublishToDisplayAction
- type PublishToMobileAction
- type PublishToWebAction
- type Purifier
- type Reference
- type References
- func (references *References) Copy() References
- func (references *References) Get(key string) (Reference, bool)
- func (references *References) GetReferences() map[string]Reference
- func (references *References) GetSiriReferences() map[string]string
- func (references *References) IsEmpty() bool
- func (references *References) Set(key string, value Reference)
- func (references *References) SetCode(key string, obj Code)
- func (references *References) SetReference(key string, r Reference)
- func (references *References) SetReferences(r map[string]Reference)
- type ReportType
- type Result
- type SelectLine
- type SelectLineGroup
- type SelectMacro
- type SelectOperator
- type SelectPartner
- type SelectReferential
- type SelectStopArea
- type SelectStopAreaGroup
- type SelectStopVisit
- type SelectVehicleJourney
- type Situation
- func (situation *Situation) Definition() *APISituation
- func (situation *Situation) GMValidUntil() time.Time
- func (situation *Situation) GetGMChannel() (string, bool)
- func (situation *Situation) Id() SituationId
- func (situation *Situation) MarshalJSON() ([]byte, error)
- func (situation *Situation) Save() (ok bool)
- func (situation *Situation) SetDefinition(apiSituation *APISituation)
- type SituationActionStatus
- type SituationAlertCause
- type SituationBroadcastEvent
- type SituationCondition
- type SituationId
- type SituationLinkContent
- type SituationProgress
- type SituationReality
- type SituationScopeType
- type SituationSeverity
- type SituationType
- type SituationUpdateEvent
- func (ue *SituationUpdateEvent) EventKind() EventKind
- func (event *SituationUpdateEvent) Id() SituationUpdateRequestId
- func (event *SituationUpdateEvent) SetId(id SituationUpdateRequestId)
- func (event *SituationUpdateEvent) TestFindAffectByLineId(lineId LineId) (bool, *AffectedLine)
- func (event *SituationUpdateEvent) TestFindAffectByStopAreaId(stopAreaId StopAreaId) (bool, *AffectedStopArea)
- type SituationUpdateRequestId
- type Situations
- type StatusUpdateEvent
- type StopArea
- func (stopArea *StopArea) Attribute(key string) (value string, present bool)
- func (stopArea *StopArea) Id() StopAreaId
- func (stopArea *StopArea) Lines() []*Line
- func (stopArea *StopArea) MarshalJSON() ([]byte, error)
- func (stopArea *StopArea) Parent() (*StopArea, bool)
- func (stopArea *StopArea) Reference(key string) (Reference, bool)
- func (stopArea *StopArea) Referent() (*StopArea, bool)
- func (stopArea *StopArea) ReferentOrSelfCode(codeSpace string) (Code, bool)
- func (stopArea *StopArea) Save() bool
- func (stopArea *StopArea) SetPartnerStatus(partner string, status bool)
- func (stopArea *StopArea) UnmarshalJSON(data []byte) error
- type StopAreaGroup
- type StopAreaGroupId
- type StopAreaGroups
- type StopAreaId
- type StopAreaLineIds
- type StopAreaOrigins
- func (origins *StopAreaOrigins) AllOrigin() map[string]bool
- func (origins *StopAreaOrigins) Copy() *StopAreaOrigins
- func (origins *StopAreaOrigins) MarshalJSON() ([]byte, error)
- func (origins *StopAreaOrigins) Monitored() (monitored bool)
- func (origins *StopAreaOrigins) NewOrigin(partner string)
- func (origins *StopAreaOrigins) Origin(partner string) (status bool, present bool)
- func (origins *StopAreaOrigins) PartnersKO() (partnersSlice []string)
- func (origins *StopAreaOrigins) PartnersLost(comparedOrigins *StopAreaOrigins) (partnersLost []string, r bool)
- func (origins *StopAreaOrigins) SetOriginsFromMap(originMap map[string]bool)
- func (origins *StopAreaOrigins) SetPartnerStatus(partner string, status bool)
- type StopAreaUpdateEvent
- type StopAreas
- type StopMonitoringBroadcastEvent
- type StopVisit
- func (stopVisit *StopVisit) Attribute(key string) (string, bool)
- func (stopVisit *StopVisit) Collected(t time.Time)
- func (stopVisit *StopVisit) CollectedAt() time.Time
- func (stopVisit *StopVisit) Id() StopVisitId
- func (stopVisit *StopVisit) IsArchivable() bool
- func (stopVisit *StopVisit) IsCollected() bool
- func (stopVisit *StopVisit) IsRecordable(now time.Time) bool
- func (stopVisit *StopVisit) MarshalJSON() ([]byte, error)
- func (stopVisit *StopVisit) NotCollected(notCollectedAt time.Time)
- func (stopVisit *StopVisit) Reference(key string) (Reference, bool)
- func (stopVisit *StopVisit) ReferenceArrivalTime() time.Time
- func (stopVisit *StopVisit) ReferenceDepartureTime() time.Time
- func (stopVisit *StopVisit) ReferenceTime() time.Time
- func (stopVisit *StopVisit) Save() bool
- func (stopVisit *StopVisit) StopArea() *StopArea
- func (stopVisit *StopVisit) UnmarshalJSON(data []byte) error
- func (stopVisit *StopVisit) VehicleJourney() *VehicleJourney
- type StopVisitArchiver
- type StopVisitArrivalStatus
- type StopVisitDepartureStatus
- type StopVisitId
- type StopVisitSelector
- func CompositeStopVisitSelector(selectors []StopVisitSelector) StopVisitSelector
- func StopVisitSelectByStopAreaId(stopAreaId StopAreaId) StopVisitSelector
- func StopVisitSelectorAfterTime(startTime time.Time) StopVisitSelector
- func StopVisitSelectorBeforeTime(endTime time.Time) StopVisitSelector
- func StopVisitSelectorByLines(lineIds []LineId) StopVisitSelector
- func StopVisitSelectorByTime(startTime, endTime time.Time) StopVisitSelector
- type StopVisitUpdateEvent
- type StopVisits
- type TimeRange
- type TranslatedString
- type UpdateEvent
- type UpdateManager
- type Vehicle
- type VehicleBroadcastEvent
- type VehicleId
- type VehicleJourney
- func (vehicleJourney *VehicleJourney) Attribute(key string) (string, bool)
- func (vehicleJourney *VehicleJourney) Id() VehicleJourneyId
- func (vehicleJourney *VehicleJourney) Line() *Line
- func (vehicleJourney *VehicleJourney) MarshalJSON() ([]byte, error)
- func (vehicleJourney *VehicleJourney) Reference(key string) (Reference, bool)
- func (vehicleJourney *VehicleJourney) Save() bool
- func (vehicleJourney *VehicleJourney) ToFormat() []string
- func (vehicleJourney *VehicleJourney) UnmarshalJSON(data []byte) error
- type VehicleJourneyId
- type VehicleJourneyUpdateEvent
- type VehicleJourneys
- type VehicleUpdateEvent
- type Vehicles
Constants ¶
const ( STOP_AREA = "stop_area" STOP_AREA_GROUP = "stop_area_group" LINE = "line" LINE_GROUP = "line_group" VEHICLE_JOURNEY = "vehicle_journey" STOP_VISIT = "stop_visit" OPERATOR = "operator" TOTAL_INSERTS = "Total" ERRORS = "Errors" )
CSV Structure
operator,Id,ModelName,Name,Codes stop_area,Id,ParentId,ReferentId,ModelName,Name,Codes,LineIds,Attributes,References,CollectedAlways,CollectChildren,CollectSituations line,Id,ModelName,Name,Codes,Attributes,References,CollectSituations vehicle_journey,Id,ModelName,Name,Codes,LineId,OriginName,DestinationName,Attributes,References,DirectionType, Number stop_visit,Id,ModelName,Codes,StopAreaId,VehicleJourneyId,PassageOrder,Schedules,Attributes,References stop_area_group,Id,ModelName,Name,ShortName,StopAreaIds line_group,Id,ModelName,Name,ShortName,LineIds
Comments are '#' Separators are ',' leading spaces are trimed
Escape quotes with another quote ex: "[""1234"",""5678""]"
const ( IfAttribute = "IfAttribute" SetAttribute = "SetAttribute" DefineAimedScheduledTimes = "DefineAimedScheduledTimes" DefineSituationAffects = "DefineSituationAffects" )
const ( // Warning: Hooks needs to be sorted AfterCreate hook = iota AfterSave )
const ( Undefined = "" Unknown = "unknown" Empty = "empty" ManySeatsAvailable = "manySeatsAvailable" FewSeatsAvailable = "fewSeatsAvailable" StandingRoomOnly = "standingRoomOnly" CrushedStandingRoomOnly = "crushedStandingRoomOnly" Full = "full" NotAcceptingPassengers = "notAcceptingPassengers" StandingAvailable = "standingAvailable" SeatsAvailable = "seatsAvailable" )
const ( SituationReportTypeGeneral ReportType = "general" SituationReportTypeIncident ReportType = "incident" SituationTypeLine SituationType = "Line" SituationTypeStopArea SituationType = "StopArea" SituationTypeAllLines SituationType = "AllLines" )
const ( VEHICLE_DIRECTION_INBOUND = "inbound" VEHICLE_DIRECTION_OUTBOUND = "outbound" )
const (
Default = "_default"
)
Variables ¶
var Database *gorp.DbMap
Functions ¶
func AffectFromProto ¶
func AffectFromProto(value interface{}, remoteCodeSpace string, m Model) (Affect, *AffectRefs, error)
func CleanTestDb ¶
func InitDB ¶
func InitDB(config config.DatabaseConfig) *gorp.DbMap
func InitTestDb ¶
func LoadFromCSVFile ¶
func NewContexFromDatabase ¶
func NewContexFromDatabase(sm *SelectMacro) (context, error)
func NewDefineSituationAffectsUpdater ¶
func NewDefineSituationAffectsUpdater(sm *SelectMacro) (updater, error)
func NewStopVisitDefineAimedScheduledTimesUpdater ¶
func NewStopVisitDefineAimedScheduledTimesUpdater(sm *SelectMacro) (updater, error)
func NewUpdateManager ¶
func NewUpdateManager(model Model) func(UpdateEvent)
func NewUpdaterFromDatabase ¶
func NewUpdaterFromDatabase(sm *SelectMacro) (updater, error)
func NewVehicleJourneyIfAttributeContext ¶
func NewVehicleJourneyIfAttributeContext(sm *SelectMacro) (context, error)
func NewVehicleJourneySetAttributeUpdater ¶
func NewVehicleJourneySetAttributeUpdater(sm *SelectMacro) (updater, error)
func NormalizedOccupancyName ¶
Types ¶
type APISituation ¶
type APISituation struct { Id SituationId `json:",omitempty"` Origin string `json:",omitempty"` CodeConsumer CodeSpace string `json:",omitempty"` SituationNumber string `json:",omitempty"` ExistingSituationCode bool `json:"-"` RecordedAt time.Time `json:",omitempty"` Version int `json:",omitempty"` VersionedAt time.Time `json:",omitempty"` ValidityPeriods []*TimeRange `json:",omitempty"` PublicationWindows []*TimeRange `json:",omitempty"` Progress SituationProgress `json:",omitempty"` Severity SituationSeverity `json:",omitempty"` Reality SituationReality `json:",omitempty"` Keywords []string `json:",omitempty"` ReportType ReportType `json:",omitempty"` AlertCause SituationAlertCause `json:",omitempty"` ProducerRef string `json:",omitempty"` Format string `json:",omitempty"` InternalTags []string `json:",omitempty"` ParticipantRef string `json:",omitempty"` Summary *TranslatedString `json:",omitempty"` Description *TranslatedString `json:",omitempty"` Affects Affects `json:",omitempty"` Consequences []*Consequence `json:",omitempty"` PublishToWebActions []*PublishToWebAction `json:",omitempty"` PublishToMobileActions []*PublishToMobileAction `json:",omitempty"` PublishToDisplayActions []*PublishToDisplayAction `json:",omitempty"` InfoLinks []*InfoLink `json:",omitempty"` Errors e.Errors `json:"Errors,omitempty"` IgnoreValidation bool `json:",omitempty"` }
func (*APISituation) MarshalJSON ¶
func (apiSituation *APISituation) MarshalJSON() ([]byte, error)
func (*APISituation) UnmarshalJSON ¶
func (situation *APISituation) UnmarshalJSON(data []byte) error
func (*APISituation) Validate ¶
func (apiSituation *APISituation) Validate() bool
type ActionCommon ¶
type ActionCommon struct { Name string `json:",omitempty"` ActionType string `json:",omitempty"` Value string `json:",omitempty"` Prompt *TranslatedString `json:",omitempty"` ScopeType SituationScopeType `json:",omitempty"` Affects Affects `json:",omitempty"` ActionStatus SituationActionStatus `json:",omitempty"` Description *TranslatedString `json:",omitempty"` PublicationWindows []*TimeRange `json:",omitempty"` }
type ActionData ¶
type ActionData struct { Name string `json:",omitempty"` ActionType string `json:",omitempty"` Value string `json:",omitempty"` Prompt *TranslatedString `json:",omitempty"` }
type AffectRefs ¶
func AffectToProto ¶
func AffectToProto(a Affect, remoteCodeSpace string, m Model) ([]*gtfs.EntitySelector, *AffectRefs, error)
type AffectedAllLines ¶
type AffectedAllLines struct{}
func NewAffectedAllLines ¶
func NewAffectedAllLines() *AffectedAllLines
func (AffectedAllLines) GetId ¶
func (a AffectedAllLines) GetId() ModelId
func (AffectedAllLines) GetType ¶
func (a AffectedAllLines) GetType() SituationType
func (AffectedAllLines) MarshalJSON ¶
func (affect AffectedAllLines) MarshalJSON() ([]byte, error)
type AffectedDestination ¶
type AffectedDestination struct {
StopAreaId StopAreaId
}
type AffectedLine ¶
type AffectedLine struct { LineId LineId `json:",omitempty"` AffectedDestinations []*AffectedDestination `json:",omitempty"` AffectedSections []*AffectedSection `json:",omitempty"` AffectedRoutes []*AffectedRoute `json:",omitempty"` }
func NewAffectedLine ¶
func NewAffectedLine() *AffectedLine
func (AffectedLine) GetId ¶
func (a AffectedLine) GetId() ModelId
func (AffectedLine) GetType ¶
func (a AffectedLine) GetType() SituationType
func (AffectedLine) MarshalJSON ¶
func (affect AffectedLine) MarshalJSON() ([]byte, error)
type AffectedRoute ¶
type AffectedRoute struct { RouteRef string `json:",omitempty"` StopAreaIds []StopAreaId `json:",omitempty"` }
type AffectedSection ¶
type AffectedSection struct { FirstStop StopAreaId LastStop StopAreaId }
type AffectedStopArea ¶
type AffectedStopArea struct { StopAreaId StopAreaId `json:",omitempty"` LineIds []LineId `json:",omitempty"` }
func NewAffectedStopArea ¶
func NewAffectedStopArea() *AffectedStopArea
func (AffectedStopArea) GetId ¶
func (a AffectedStopArea) GetId() ModelId
func (AffectedStopArea) GetType ¶
func (a AffectedStopArea) GetType() SituationType
func (AffectedStopArea) MarshalJSON ¶
func (affect AffectedStopArea) MarshalJSON() ([]byte, error)
type Attributes ¶
func NewAttributes ¶
func NewAttributes() Attributes
func (Attributes) Copy ¶
func (attributes Attributes) Copy() (c Attributes)
func (Attributes) IsEmpty ¶
func (attributes Attributes) IsEmpty() bool
func (Attributes) Set ¶
func (attributes Attributes) Set(key string, value string)
type Code ¶
type Code struct {
// contains filtered or unexported fields
}
func (*Code) MarshalJSON ¶
func (*Code) UnmarshalJSON ¶
type CodeConsumer ¶
type CodeConsumer struct {
// contains filtered or unexported fields
}
func (*CodeConsumer) CodeSlice ¶
func (consumer *CodeConsumer) CodeSlice() (objs []string)
func (*CodeConsumer) CodeWithFallback ¶
func (consumer *CodeConsumer) CodeWithFallback(codeSpaces []string) (Code, bool)
func (*CodeConsumer) Codes ¶
func (consumer *CodeConsumer) Codes() Codes
func (*CodeConsumer) CodesResponse ¶
func (consumer *CodeConsumer) CodesResponse() map[string]string
func (*CodeConsumer) Copy ¶
func (consumer *CodeConsumer) Copy() (c CodeConsumer)
func (*CodeConsumer) SetCode ¶
func (consumer *CodeConsumer) SetCode(code Code)
type CodeConsumerInterface ¶
type CodeIndex ¶
type CodeIndex struct {
// contains filtered or unexported fields
}
func NewCodeIndex ¶
func NewCodeIndex() *CodeIndex
func (*CodeIndex) Index ¶
func (index *CodeIndex) Index(model ModelInstance)
type Collectable ¶
type Collectable struct {
// contains filtered or unexported fields
}
func (*Collectable) CollectedAt ¶
func (c *Collectable) CollectedAt() time.Time
func (*Collectable) NextCollect ¶
func (c *Collectable) NextCollect(collectTime time.Time)
func (*Collectable) NextCollectAt ¶
func (c *Collectable) NextCollectAt() time.Time
func (*Collectable) Updated ¶
func (c *Collectable) Updated(updateTime time.Time)
type ComplexError ¶
type ComplexError struct {
Errors []string
}
func (*ComplexError) Add ¶
func (c *ComplexError) Add(field string, err error)
func (ComplexError) Error ¶
func (c ComplexError) Error() string
func (ComplexError) ErrorCount ¶
func (c ComplexError) ErrorCount() int
type Consequence ¶
type Consequence struct { Periods []*TimeRange `json:",omitempty"` Condition SituationCondition `json:",omitempty"` Severity SituationSeverity `json:",omitempty"` Affects Affects `json:",omitempty"` Blocking *Blocking `json:",omitempty"` }
type DatabaseLine ¶
type DatabaseLine struct { Id string `db:"id"` ReferentialSlug string `db:"referential_slug"` ModelName string `db:"model_name"` Name string `db:"name"` Codes string `db:"codes"` Attributes string `db:"attributes"` References string `db:"siri_references"` ReferentId sql.NullString `db:"referent_id"` CollectSituations bool `db:"collect_situations"` }
type DatabaseLineGroup ¶
type DatabaseOperator ¶
type DatabasePartner ¶
type DatabaseReferential ¶
type DatabaseStopArea ¶
type DatabaseStopArea struct { LineIds string `db:"line_ids"` ReferentialSlug string `db:"referential_slug"` References string `db:"siri_references"` Attributes string `db:"attributes"` ModelName string `db:"model_name"` Name string `db:"name"` Codes string `db:"codes"` Id string `db:"id"` ReferentId sql.NullString `db:"referent_id"` ParentId sql.NullString `db:"parent_id"` CollectedAlways bool `db:"collected_always"` CollectChildren bool `db:"collect_children"` CollectSituations bool `db:"collect_situations"` }
type DatabaseStopAreaGroup ¶
type DatabaseStopVisit ¶
type DatabaseStopVisit struct { Id string ReferentialSlug string `db:"referential_slug"` ModelName string `db:"model_name"` Codes string `db:"codes"` StopAreaId string `db:"stop_area_id"` VehicleJourneyId string `db:"vehicle_journey_id"` Schedules string `db:"schedules"` Attributes string `db:"attributes"` References string `db:"siri_references"` PassageOrder int `db:"passage_order"` }
type DatabaseVehicleJourney ¶
type DatabaseVehicleJourney struct { Id string `db:"id"` ReferentialSlug string `db:"referential_slug"` ModelName string `db:"model_name"` Name string `db:"name"` Codes string `db:"codes"` LineId string `db:"line_id"` OriginName string `db:"origin_name"` DestinationName string `db:"destination_name"` DirectionType string `db:"direction_type"` Attributes string `db:"attributes"` References string `db:"siri_references"` }
type DiffResult ¶
func Equal ¶
func Equal(x, y interface{}) (*DiffResult, error)
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
func NewIndex ¶
func NewIndex(extractor IndexableExtractor) *Index
func (*Index) Index ¶
func (index *Index) Index(model ModelInstance)
func (*Index) IndexableLength ¶
type IndexableExtractor ¶
type IndexableExtractor func(ModelInstance) ModelId
type Line ¶
type Line struct { Collectable References References CodeConsumer Attributes Attributes ReferentId LineId `json:",omitempty"` Name string `json:",omitempty"` Number string `json:",omitempty"` CollectSituations bool // contains filtered or unexported fields }
func (*Line) DiscoveryCode ¶
Returns true if we need to send the Line in a Discovery
We only send the Line if it has no referent with a correct codeSpace. If that's the case, we'll send the Referent instead
func (*Line) MarshalJSON ¶
func (*Line) ReferentOrSelfCode ¶
func (*Line) UnmarshalJSON ¶
type LineGroup ¶
type LineGroup struct { Name string `json:",omitempty"` ShortName string `json:",omitempty"` LineIds []LineId `json:",omitempty"` // contains filtered or unexported fields }
func NewLineGroup ¶
func (*LineGroup) Id ¶
func (lineGroup *LineGroup) Id() LineGroupId
func (*LineGroup) MarshalJSON ¶
type LineGroupId ¶
type LineGroupId ModelId
type LineGroups ¶
type LineUpdateEvent ¶
func NewLineUpdateEvent ¶
func NewLineUpdateEvent() *LineUpdateEvent
func (*LineUpdateEvent) EventKind ¶
func (ue *LineUpdateEvent) EventKind() EventKind
type Macro ¶
type Macro struct {
// contains filtered or unexported fields
}
func NewMacroWithContext ¶
func NewMacroWithContext(c context) *Macro
func (*Macro) AddContext ¶
func (m *Macro) AddContext(c context)
func (*Macro) AddUpdater ¶
func (m *Macro) AddUpdater(u updater)
type MacroManager ¶
type MacroManager struct {
// contains filtered or unexported fields
}
func NewMacroManager ¶
func NewMacroManager() *MacroManager
func (MacroManager) GetMacros ¶
func (mm MacroManager) GetMacros(h hook, t ModelType) (m []Macro)
If we ask for AfterCreate, we'll also get AfterSave Macros
func (*MacroManager) Load ¶
func (manager *MacroManager) Load(referentialSlug string) error
func (*MacroManager) Reset ¶
func (mm *MacroManager) Reset()
type MemoryLineGroups ¶
type MemoryLineGroups struct { uuid.UUIDConsumer // contains filtered or unexported fields }
func NewMemoryLineGroups ¶
func NewMemoryLineGroups() *MemoryLineGroups
func (*MemoryLineGroups) Delete ¶
func (manager *MemoryLineGroups) Delete(lineGroup *LineGroup) bool
func (*MemoryLineGroups) Find ¶
func (manager *MemoryLineGroups) Find(id LineGroupId) (*LineGroup, bool)
func (*MemoryLineGroups) FindAll ¶
func (manager *MemoryLineGroups) FindAll() (lineGroups []*LineGroup)
func (*MemoryLineGroups) FindByShortName ¶
func (manager *MemoryLineGroups) FindByShortName(shortName string) (*LineGroup, bool)
func (*MemoryLineGroups) Load ¶
func (manager *MemoryLineGroups) Load(referentialSlug string) error
func (*MemoryLineGroups) New ¶
func (manager *MemoryLineGroups) New() *LineGroup
func (*MemoryLineGroups) Save ¶
func (manager *MemoryLineGroups) Save(lineGroup *LineGroup) bool
type MemoryLines ¶
type MemoryLines struct { uuid.UUIDConsumer // contains filtered or unexported fields }
func NewMemoryLines ¶
func NewMemoryLines() *MemoryLines
func (*MemoryLines) Delete ¶
func (manager *MemoryLines) Delete(line *Line) bool
func (*MemoryLines) FindAll ¶
func (manager *MemoryLines) FindAll() (lines []*Line)
func (*MemoryLines) FindByCode ¶
func (manager *MemoryLines) FindByCode(code Code) (*Line, bool)
func (*MemoryLines) FindByReferentId ¶
func (manager *MemoryLines) FindByReferentId(id LineId) (lines []*Line)
func (*MemoryLines) FindFamily ¶
func (manager *MemoryLines) FindFamily(lineId LineId) (lineIds []LineId)
func (*MemoryLines) FindFamilyFromCode ¶
func (manager *MemoryLines) FindFamilyFromCode(code Code) (lineIds []LineId)
func (*MemoryLines) Load ¶
func (manager *MemoryLines) Load(referentialSlug string) error
func (*MemoryLines) New ¶
func (manager *MemoryLines) New() *Line
func (*MemoryLines) Save ¶
func (manager *MemoryLines) Save(line *Line) bool
type MemoryModel ¶
type MemoryModel struct { SMEventsChan chan StopMonitoringBroadcastEvent GMEventsChan chan SituationBroadcastEvent SXEventsChan chan SituationBroadcastEvent VeEventChan chan VehicleBroadcastEvent // contains filtered or unexported fields }
func NewMemoryModel ¶
func NewMemoryModel(referential string) *MemoryModel
func NewTestMemoryModel ¶
func NewTestMemoryModel(referential ...string) *MemoryModel
func (*MemoryModel) Date ¶
func (model *MemoryModel) Date() Date
func (*MemoryModel) LineGroups ¶
func (model *MemoryModel) LineGroups() LineGroups
func (*MemoryModel) Lines ¶
func (model *MemoryModel) Lines() Lines
func (*MemoryModel) Load ¶
func (model *MemoryModel) Load() error
func (*MemoryModel) Macros ¶
func (model *MemoryModel) Macros() Macros
func (*MemoryModel) Operators ¶
func (model *MemoryModel) Operators() Operators
func (*MemoryModel) Referential ¶
func (model *MemoryModel) Referential() string
func (*MemoryModel) RefreshMacros ¶
func (model *MemoryModel) RefreshMacros()
func (*MemoryModel) Reload ¶
func (model *MemoryModel) Reload() *MemoryModel
func (*MemoryModel) ScheduledStopVisits ¶
func (model *MemoryModel) ScheduledStopVisits() StopVisits
func (*MemoryModel) SetBroadcastGMChan ¶
func (model *MemoryModel) SetBroadcastGMChan(broadcastGMEventChan chan SituationBroadcastEvent)
func (*MemoryModel) SetBroadcastSMChan ¶
func (model *MemoryModel) SetBroadcastSMChan(broadcastSMEventChan chan StopMonitoringBroadcastEvent)
func (*MemoryModel) SetBroadcastSXChan ¶
func (model *MemoryModel) SetBroadcastSXChan(broadcastSXEventChan chan SituationBroadcastEvent)
func (*MemoryModel) SetBroadcastVeChan ¶
func (model *MemoryModel) SetBroadcastVeChan(broadcastVeEventChan chan VehicleBroadcastEvent)
func (*MemoryModel) SetReferential ¶
func (model *MemoryModel) SetReferential(referential string)
func (*MemoryModel) Situations ¶
func (model *MemoryModel) Situations() Situations
func (*MemoryModel) StopAreaGroups ¶
func (model *MemoryModel) StopAreaGroups() StopAreaGroups
func (*MemoryModel) StopAreas ¶
func (model *MemoryModel) StopAreas() StopAreas
func (*MemoryModel) StopVisits ¶
func (model *MemoryModel) StopVisits() StopVisits
func (*MemoryModel) VehicleJourneys ¶
func (model *MemoryModel) VehicleJourneys() VehicleJourneys
func (*MemoryModel) Vehicles ¶
func (model *MemoryModel) Vehicles() Vehicles
type MemoryOperators ¶
type MemoryOperators struct { uuid.UUIDConsumer // contains filtered or unexported fields }
func NewMemoryOperators ¶
func NewMemoryOperators() *MemoryOperators
func (*MemoryOperators) Delete ¶
func (manager *MemoryOperators) Delete(operator *Operator) bool
func (*MemoryOperators) Find ¶
func (manager *MemoryOperators) Find(id OperatorId) (*Operator, bool)
func (*MemoryOperators) FindAll ¶
func (manager *MemoryOperators) FindAll() (operators []*Operator)
func (*MemoryOperators) FindByCode ¶
func (manager *MemoryOperators) FindByCode(code Code) (*Operator, bool)
func (*MemoryOperators) Load ¶
func (manager *MemoryOperators) Load(referentialSlug string) error
func (*MemoryOperators) New ¶
func (manager *MemoryOperators) New() *Operator
func (*MemoryOperators) Save ¶
func (manager *MemoryOperators) Save(operator *Operator) bool
type MemorySituations ¶
type MemorySituations struct { uuid.UUIDConsumer GMbroadcastEvent func(event SituationBroadcastEvent) SXbroadcastEvent func(event SituationBroadcastEvent) // contains filtered or unexported fields }
func NewMemorySituations ¶
func NewMemorySituations() *MemorySituations
func (*MemorySituations) Delete ¶
func (manager *MemorySituations) Delete(situation *Situation) bool
func (*MemorySituations) Find ¶
func (manager *MemorySituations) Find(id SituationId) (Situation, bool)
func (*MemorySituations) FindAll ¶
func (manager *MemorySituations) FindAll() (situations []Situation)
func (*MemorySituations) FindByCode ¶
func (manager *MemorySituations) FindByCode(code Code) (Situation, bool)
func (*MemorySituations) New ¶
func (manager *MemorySituations) New() Situation
func (*MemorySituations) Save ¶
func (manager *MemorySituations) Save(situation *Situation) bool
type MemoryStopAreaGroups ¶
type MemoryStopAreaGroups struct { uuid.UUIDConsumer // contains filtered or unexported fields }
func NewMemoryStopAreaGroups ¶
func NewMemoryStopAreaGroups() *MemoryStopAreaGroups
func (*MemoryStopAreaGroups) Delete ¶
func (manager *MemoryStopAreaGroups) Delete(stopAreaGroup *StopAreaGroup) bool
func (*MemoryStopAreaGroups) Find ¶
func (manager *MemoryStopAreaGroups) Find(id StopAreaGroupId) (*StopAreaGroup, bool)
func (*MemoryStopAreaGroups) FindAll ¶
func (manager *MemoryStopAreaGroups) FindAll() (stopAreaGroups []*StopAreaGroup)
func (*MemoryStopAreaGroups) FindByShortName ¶
func (manager *MemoryStopAreaGroups) FindByShortName(shortName string) (*StopAreaGroup, bool)
func (*MemoryStopAreaGroups) Load ¶
func (manager *MemoryStopAreaGroups) Load(referentialSlug string) error
func (*MemoryStopAreaGroups) New ¶
func (manager *MemoryStopAreaGroups) New() *StopAreaGroup
func (*MemoryStopAreaGroups) Save ¶
func (manager *MemoryStopAreaGroups) Save(stopAreaGroup *StopAreaGroup) bool
type MemoryStopAreas ¶
type MemoryStopAreas struct { uuid.UUIDConsumer // contains filtered or unexported fields }
func NewMemoryStopAreas ¶
func NewMemoryStopAreas() *MemoryStopAreas
func (*MemoryStopAreas) Delete ¶
func (manager *MemoryStopAreas) Delete(stopArea *StopArea) bool
func (*MemoryStopAreas) Find ¶
func (manager *MemoryStopAreas) Find(id StopAreaId) (*StopArea, bool)
func (*MemoryStopAreas) FindAll ¶
func (manager *MemoryStopAreas) FindAll() (stopAreas []*StopArea)
func (*MemoryStopAreas) FindAllValues ¶
func (manager *MemoryStopAreas) FindAllValues() (stopAreas []StopArea)
func (*MemoryStopAreas) FindAscendants ¶
func (manager *MemoryStopAreas) FindAscendants(stopAreaId StopAreaId) (stopAreas []*StopArea)
func (*MemoryStopAreas) FindAscendantsWithCodeSpace ¶
func (manager *MemoryStopAreas) FindAscendantsWithCodeSpace(stopAreaId StopAreaId, kind string) (stopAreaCodes []Code)
func (*MemoryStopAreas) FindByCode ¶
func (manager *MemoryStopAreas) FindByCode(code Code) (*StopArea, bool)
func (*MemoryStopAreas) FindByLineId ¶
func (manager *MemoryStopAreas) FindByLineId(id LineId) (stopAreas []*StopArea)
func (*MemoryStopAreas) FindByOrigin ¶
func (manager *MemoryStopAreas) FindByOrigin(origin string) (stopAreas []StopAreaId)
func (*MemoryStopAreas) FindByParentId ¶
func (manager *MemoryStopAreas) FindByParentId(id StopAreaId) (stopAreas []*StopArea)
func (*MemoryStopAreas) FindByReferentId ¶
func (manager *MemoryStopAreas) FindByReferentId(id StopAreaId) (stopAreas []*StopArea)
func (*MemoryStopAreas) FindFamily ¶
func (manager *MemoryStopAreas) FindFamily(stopAreaId StopAreaId) (stopAreaIds []StopAreaId)
func (*MemoryStopAreas) Load ¶
func (manager *MemoryStopAreas) Load(referentialSlug string) error
func (*MemoryStopAreas) New ¶
func (manager *MemoryStopAreas) New() *StopArea
func (*MemoryStopAreas) Save ¶
func (manager *MemoryStopAreas) Save(stopArea *StopArea) bool
type MemoryStopVisits ¶
type MemoryStopVisits struct { uuid.UUIDConsumer clock.ClockConsumer // contains filtered or unexported fields }
func NewMemoryStopVisits ¶
func NewMemoryStopVisits() *MemoryStopVisits
func (*MemoryStopVisits) Delete ¶
func (manager *MemoryStopVisits) Delete(stopVisit *StopVisit) bool
func (*MemoryStopVisits) DeleteMultiple ¶
func (manager *MemoryStopVisits) DeleteMultiple(stopVisits []*StopVisit) bool
func (*MemoryStopVisits) Find ¶
func (manager *MemoryStopVisits) Find(id StopVisitId) (*StopVisit, bool)
func (*MemoryStopVisits) FindAll ¶
func (manager *MemoryStopVisits) FindAll() (stopVisits []*StopVisit)
func (*MemoryStopVisits) FindAllAfter ¶
func (manager *MemoryStopVisits) FindAllAfter(t time.Time) (stopVisits []*StopVisit)
func (*MemoryStopVisits) FindByCode ¶
func (manager *MemoryStopVisits) FindByCode(code Code) (*StopVisit, bool)
func (*MemoryStopVisits) FindByStopAreaId ¶
func (manager *MemoryStopVisits) FindByStopAreaId(id StopAreaId) (stopVisits []*StopVisit)
func (*MemoryStopVisits) FindByVehicleJourneyId ¶
func (manager *MemoryStopVisits) FindByVehicleJourneyId(id VehicleJourneyId) (stopVisits []*StopVisit)
func (*MemoryStopVisits) FindByVehicleJourneyIdAfter ¶
func (manager *MemoryStopVisits) FindByVehicleJourneyIdAfter(id VehicleJourneyId, t time.Time) (stopVisits []*StopVisit)
func (*MemoryStopVisits) FindByVehicleJourneyIdAndStopAreaId ¶
func (manager *MemoryStopVisits) FindByVehicleJourneyIdAndStopAreaId(vjId VehicleJourneyId, saId StopAreaId) []StopVisitId
func (*MemoryStopVisits) FindByVehicleJourneyIdAndStopVisitOrder ¶
func (manager *MemoryStopVisits) FindByVehicleJourneyIdAndStopVisitOrder(vjId VehicleJourneyId, order int) *StopVisit
func (*MemoryStopVisits) FindFollowingByStopAreaId ¶
func (manager *MemoryStopVisits) FindFollowingByStopAreaId(id StopAreaId) (stopVisits []*StopVisit)
func (*MemoryStopVisits) FindFollowingByStopAreaIds ¶
func (manager *MemoryStopVisits) FindFollowingByStopAreaIds(stopAreaIds []StopAreaId) (stopVisits []*StopVisit)
func (*MemoryStopVisits) FindFollowingByVehicleJourneyId ¶
func (manager *MemoryStopVisits) FindFollowingByVehicleJourneyId(id VehicleJourneyId) (stopVisits []*StopVisit)
func (*MemoryStopVisits) FindMonitoredByOriginByStopAreaId ¶
func (manager *MemoryStopVisits) FindMonitoredByOriginByStopAreaId(id StopAreaId, origin string) (stopVisits []*StopVisit)
func (*MemoryStopVisits) Load ¶
func (manager *MemoryStopVisits) Load(referentialSlug string) error
func (*MemoryStopVisits) New ¶
func (manager *MemoryStopVisits) New() *StopVisit
func (*MemoryStopVisits) Save ¶
func (manager *MemoryStopVisits) Save(stopVisit *StopVisit) bool
func (*MemoryStopVisits) StopVisitsLenByVehicleJourney ¶
func (manager *MemoryStopVisits) StopVisitsLenByVehicleJourney(id VehicleJourneyId) int
func (*MemoryStopVisits) UnsafeDelete ¶
func (manager *MemoryStopVisits) UnsafeDelete(stopVisit *StopVisit)
func (*MemoryStopVisits) UnsafeFindAll ¶
func (manager *MemoryStopVisits) UnsafeFindAll() (stopVisits []*StopVisit)
Warning, this method doesn't copy the StopVisits so we shouldn't access its maps
func (*MemoryStopVisits) VehicleJourneyHasStopVisits ¶
func (manager *MemoryStopVisits) VehicleJourneyHasStopVisits(id VehicleJourneyId) bool
type MemoryVehicleJourneys ¶
type MemoryVehicleJourneys struct { uuid.UUIDConsumer // contains filtered or unexported fields }
func NewMemoryVehicleJourneys ¶
func NewMemoryVehicleJourneys() *MemoryVehicleJourneys
func (*MemoryVehicleJourneys) Delete ¶
func (manager *MemoryVehicleJourneys) Delete(vehicleJourney *VehicleJourney) bool
func (*MemoryVehicleJourneys) DeleteById ¶
func (manager *MemoryVehicleJourneys) DeleteById(id VehicleJourneyId) bool
func (*MemoryVehicleJourneys) Find ¶
func (manager *MemoryVehicleJourneys) Find(id VehicleJourneyId) (*VehicleJourney, bool)
func (*MemoryVehicleJourneys) FindAll ¶
func (manager *MemoryVehicleJourneys) FindAll() (vehicleJourneys []*VehicleJourney)
func (*MemoryVehicleJourneys) FindByCode ¶
func (manager *MemoryVehicleJourneys) FindByCode(code Code) (*VehicleJourney, bool)
func (*MemoryVehicleJourneys) FindByLineId ¶
func (manager *MemoryVehicleJourneys) FindByLineId(id LineId) (vehicleJourneys []*VehicleJourney)
func (*MemoryVehicleJourneys) FullVehicleJourneyExistBySubscriptionId ¶
func (manager *MemoryVehicleJourneys) FullVehicleJourneyExistBySubscriptionId(id string, vehicleJourneyId VehicleJourneyId) bool
func (*MemoryVehicleJourneys) Load ¶
func (manager *MemoryVehicleJourneys) Load(referentialSlug string) error
func (*MemoryVehicleJourneys) New ¶
func (manager *MemoryVehicleJourneys) New() *VehicleJourney
func (*MemoryVehicleJourneys) Save ¶
func (manager *MemoryVehicleJourneys) Save(vehicleJourney *VehicleJourney) bool
func (*MemoryVehicleJourneys) SetFullVehicleJourneyBySubscriptionId ¶
func (manager *MemoryVehicleJourneys) SetFullVehicleJourneyBySubscriptionId(id string, vehicleJourneyId VehicleJourneyId)
func (*MemoryVehicleJourneys) TestLenFullVehicleJourneyBySubscriptionId ¶
func (manager *MemoryVehicleJourneys) TestLenFullVehicleJourneyBySubscriptionId() int
type MemoryVehicles ¶
type MemoryVehicles struct { uuid.UUIDConsumer clock.ClockConsumer // contains filtered or unexported fields }
func NewMemoryVehicles ¶
func NewMemoryVehicles() *MemoryVehicles
func (*MemoryVehicles) Delete ¶
func (manager *MemoryVehicles) Delete(vehicle *Vehicle) bool
func (*MemoryVehicles) FindAll ¶
func (manager *MemoryVehicles) FindAll() (vehicles []*Vehicle)
func (*MemoryVehicles) FindByCode ¶
func (manager *MemoryVehicles) FindByCode(code Code) (*Vehicle, bool)
func (*MemoryVehicles) FindByLineId ¶
func (manager *MemoryVehicles) FindByLineId(id LineId) (vehicles []*Vehicle)
func (*MemoryVehicles) FindByNextStopVisitId ¶
func (manager *MemoryVehicles) FindByNextStopVisitId(stopVisitId StopVisitId) (*Vehicle, bool)
func (*MemoryVehicles) New ¶
func (manager *MemoryVehicles) New() *Vehicle
func (*MemoryVehicles) Save ¶
func (manager *MemoryVehicles) Save(vehicle *Vehicle) bool
type Model ¶
type Model interface { Date() Date Referential() string Lines() Lines LineGroups() LineGroups StopAreaGroups() StopAreaGroups Situations() Situations StopAreas() StopAreas StopVisits() StopVisits ScheduledStopVisits() StopVisits VehicleJourneys() VehicleJourneys Operators() Operators Vehicles() Vehicles Macros() Macros }
type ModelInstance ¶
type ModelInstance interface { CodeConsumerInterface // contains filtered or unexported methods }
type NotCollectedUpdateEvent ¶
func NewNotCollectedUpdateEvent ¶
func NewNotCollectedUpdateEvent(obj Code, t time.Time) *NotCollectedUpdateEvent
func (*NotCollectedUpdateEvent) EventKind ¶
func (ue *NotCollectedUpdateEvent) EventKind() EventKind
type Operator ¶
type Operator struct { CodeConsumer Name string `json:",omitempty"` // contains filtered or unexported fields }
func NewOperator ¶
func (*Operator) Id ¶
func (operator *Operator) Id() OperatorId
func (*Operator) MarshalJSON ¶
func (*Operator) UnmarshalJSON ¶
type OperatorId ¶
type OperatorId string
type PublishToDisplayAction ¶
type PublishToDisplayAction struct { ActionCommon OnPlace *bool `json:",omitempty"` OnBoard *bool `json:",omitempty"` }
type PublishToMobileAction ¶
type PublishToMobileAction struct { ActionCommon Incidents *bool `json:",omitempty"` HomePage *bool `json:",omitempty"` }
type PublishToWebAction ¶
type PublishToWebAction struct { ActionCommon Incidents *bool `json:",omitempty"` HomePage *bool `json:",omitempty"` Ticker *bool `json:",omitempty"` SocialNetworks []string `json:",omitempty"` }
type Purifier ¶
type Purifier struct {
// contains filtered or unexported fields
}
func NewPurifier ¶
type References ¶
type References struct {
// contains filtered or unexported fields
}
func NewReferences ¶
func NewReferences() References
func (*References) Copy ¶
func (references *References) Copy() References
func (*References) GetReferences ¶
func (references *References) GetReferences() map[string]Reference
func (*References) GetSiriReferences ¶
func (references *References) GetSiriReferences() map[string]string
func (*References) IsEmpty ¶
func (references *References) IsEmpty() bool
func (*References) Set ¶
func (references *References) Set(key string, value Reference)
func (*References) SetCode ¶
func (references *References) SetCode(key string, obj Code)
func (*References) SetReference ¶
func (references *References) SetReference(key string, r Reference)
func (*References) SetReferences ¶
func (references *References) SetReferences(r map[string]Reference)
type ReportType ¶
type ReportType string
type SelectLine ¶
type SelectLine struct { Id string ReferentialSlug string `db:"referential_slug"` ModelName string `db:"model_name"` ReferentId sql.NullString `db:"referent_id"` Name sql.NullString Number sql.NullString `db:"number"` Codes sql.NullString `db:"codes"` Attributes sql.NullString References sql.NullString `db:"siri_references"` CollectSituations sql.NullBool `db:"collect_situations"` }
type SelectLineGroup ¶
type SelectLineGroup struct { Id string ReferentialSlug string `db:"referential_slug"` ModelName string `db:"model_name"` Name sql.NullString `db:"name"` ShortName sql.NullString `db:"short_name"` LineIds sql.NullString `db:"line_ids"` }
type SelectMacro ¶
type SelectMacro struct { Id string ReferentialSlug string `db:"referential_slug"` ContextId sql.NullString `db:"context_id"` Position int Type string ModelType sql.NullString `db:"model_type"` Hook sql.NullString Attributes sql.NullString }
type SelectOperator ¶
type SelectOperator struct { Id string ReferentialSlug string `db:"referential_slug"` ModelName string `db:"model_name"` Name sql.NullString Codes sql.NullString `db:"codes"` }
type SelectPartner ¶
type SelectPartner struct { Id string ReferentialId string `db:"referential_id"` Slug string Name sql.NullString Settings sql.NullString ConnectorTypes sql.NullString `db:"connector_types"` }
type SelectReferential ¶
type SelectReferential struct { ReferentialId string `db:"referential_id"` OrganisationId sql.NullString `db:"organisation_id"` Slug string Name sql.NullString Settings sql.NullString Tokens sql.NullString ImportTokens sql.NullString `db:"import_tokens"` }
type SelectStopArea ¶
type SelectStopArea struct { Id string ReferentialSlug string `db:"referential_slug"` ModelName string `db:"model_name"` Name sql.NullString Codes sql.NullString `db:"codes"` ParentId sql.NullString `db:"parent_id"` ReferentId sql.NullString `db:"referent_id"` Attributes sql.NullString References sql.NullString `db:"siri_references"` LineIds sql.NullString `db:"line_ids"` CollectedAlways sql.NullBool `db:"collected_always"` CollectChildren sql.NullBool `db:"collect_children"` CollectSituations sql.NullBool `db:"collect_situations"` }
type SelectStopAreaGroup ¶
type SelectStopAreaGroup struct { Id string ReferentialSlug string `db:"referential_slug"` ModelName string `db:"model_name"` Name sql.NullString `db:"name"` ShortName sql.NullString `db:"short_name"` StopAreaIds sql.NullString `db:"stop_area_ids"` }
type SelectStopVisit ¶
type SelectStopVisit struct { Id string ReferentialSlug string `db:"referential_slug"` ModelName string `db:"model_name"` Codes sql.NullString `db:"codes"` StopAreaId sql.NullString `db:"stop_area_id"` VehicleJourneyId sql.NullString `db:"vehicle_journey_id"` Schedules sql.NullString `db:"schedules"` Attributes sql.NullString `db:"attributes"` References sql.NullString `db:"siri_references"` PassageOrder sql.NullInt64 `db:"passage_order"` }
type SelectVehicleJourney ¶
type SelectVehicleJourney struct { Id string ReferentialSlug string `db:"referential_slug"` ModelName string `db:"model_name"` Name sql.NullString Codes sql.NullString `db:"codes"` LineId sql.NullString `db:"line_id"` OriginName sql.NullString `db:"origin_name"` DestinationName sql.NullString `db:"destination_name"` DirectionType sql.NullString `db:"direction_type"` Attributes sql.NullString References sql.NullString `db:"siri_references"` }
type Situation ¶
type Situation struct { CodeConsumer Origin string RecordedAt time.Time Version int `json:",omitempty"` VersionedAt time.Time ValidityPeriods []*TimeRange PublicationWindows []*TimeRange Progress SituationProgress `json:",omitempty"` Severity SituationSeverity `json:",omitempty"` Keywords []string `json:",omitempty"` ReportType ReportType `json:",omitempty"` AlertCause SituationAlertCause `json:",omitempty"` Reality SituationReality `json:",omitempty"` ProducerRef string `json:",omitempty"` Format string `json:",omitempty"` InternalTags []string `json:",omitempty"` ParticipantRef string `json:",omitempty"` Summary *TranslatedString `json:",omitempty"` Description *TranslatedString `json:",omitempty"` Affects Affects `json:",omitempty"` Consequences []*Consequence `json:",omitempty"` PublishToWebActions []*PublishToWebAction `json:",omitempty"` PublishToMobileActions []*PublishToMobileAction `json:",omitempty"` PublishToDisplayActions []*PublishToDisplayAction `json:",omitempty"` InfoLinks []*InfoLink `json:",omitempty"` // contains filtered or unexported fields }
func NewSituation ¶
func (*Situation) Definition ¶
func (situation *Situation) Definition() *APISituation
func (*Situation) GMValidUntil ¶
func (*Situation) GetGMChannel ¶
func (*Situation) Id ¶
func (situation *Situation) Id() SituationId
func (*Situation) MarshalJSON ¶
func (*Situation) SetDefinition ¶
func (situation *Situation) SetDefinition(apiSituation *APISituation)
type SituationActionStatus ¶
type SituationActionStatus string
const ( SituationActionStatusOpen SituationActionStatus = "open" SituationActionStatusPublished SituationActionStatus = "published" SituationActionStatusClosed SituationActionStatus = "closed" )
func (*SituationActionStatus) FromString ¶
func (as *SituationActionStatus) FromString(s string) error
type SituationAlertCause ¶
type SituationAlertCause string
const ( SituationAlertCauseAccident SituationAlertCause = "accident" SituationAlertCauseAirraid SituationAlertCause = "airRaid" SituationAlertCauseAltercation SituationAlertCause = "altercation" SituationAlertCauseAnimalontheline SituationAlertCause = "animalOnTheLine" SituationAlertCauseAsphalting SituationAlertCause = "asphalting" SituationAlertCauseAssault SituationAlertCause = "assault" SituationAlertCauseAttack SituationAlertCause = "attack" SituationAlertCauseAvalanches SituationAlertCause = "avalanches" SituationAlertCauseAwaitingapproach SituationAlertCause = "awaitingApproach" SituationAlertCauseAwaitingoncomingvehicle SituationAlertCause = "awaitingOncomingVehicle" SituationAlertCauseAwaitingshuttle SituationAlertCause = "awaitingShuttle" SituationAlertCauseBlizzardconditions SituationAlertCause = "blizzardConditions" SituationAlertCauseBoardingdelay SituationAlertCause = "boardingDelay" SituationAlertCauseBombalert SituationAlertCause = "bombAlert" SituationAlertCauseBombdisposal SituationAlertCause = "bombDisposal" SituationAlertCauseBombexplosion SituationAlertCause = "bombExplosion" SituationAlertCauseBordercontrol SituationAlertCause = "borderControl" SituationAlertCauseBreakdown SituationAlertCause = "breakDown" SituationAlertCauseBridgedamage SituationAlertCause = "bridgeDamage" SituationAlertCauseBridgestrike SituationAlertCause = "bridgeStrike" SituationAlertCauseBrokenrail SituationAlertCause = "brokenRail" SituationAlertCauseCablefire SituationAlertCause = "cableFire" SituationAlertCauseCabletheft SituationAlertCause = "cableTheft" SituationAlertCauseChangeincarriages SituationAlertCause = "changeInCarriages" SituationAlertCauseCivilemergency SituationAlertCause = "civilEmergency" SituationAlertCauseClosedformaintenance SituationAlertCause = "closedForMaintenance" SituationAlertCauseCollision SituationAlertCause = "collision" SituationAlertCauseCongestion SituationAlertCause = "congestion" SituationAlertCauseConstructionwork SituationAlertCause = "constructionWork" SituationAlertCauseContractorstaffinjury SituationAlertCause = "contractorStaffInjury" SituationAlertCauseDefectivecctv SituationAlertCause = "defectiveCctv" SituationAlertCauseDefectivefirealarmequipment SituationAlertCause = "defectiveFireAlarmEquipment" SituationAlertCauseDefectiveplatformedgedoors SituationAlertCause = "defectivePlatformEdgeDoors" SituationAlertCauseDefectivepublicannouncementsystem SituationAlertCause = "defectivePublicAnnouncementSystem" SituationAlertCauseDefectivesecuritysystem SituationAlertCause = "defectiveSecuritySystem" SituationAlertCauseDefectivetrain SituationAlertCause = "defectiveTrain" SituationAlertCauseDefectivevehicle SituationAlertCause = "defectiveVehicle" SituationAlertCauseDeicingwork SituationAlertCause = "deicingWork" SituationAlertCauseDemonstration SituationAlertCause = "demonstration" SituationAlertCauseDerailment SituationAlertCause = "derailment" SituationAlertCauseDoorfailure SituationAlertCause = "doorFailure" SituationAlertCauseDriftingsnow SituationAlertCause = "driftingSnow" SituationAlertCauseEarthquakedamage SituationAlertCause = "earthquakeDamage" SituationAlertCauseEmergencybrake SituationAlertCause = "emergencyBrake" SituationAlertCauseEmergencyengineeringwork SituationAlertCause = "emergencyEngineeringWork" SituationAlertCauseEmergencymedicalservices SituationAlertCause = "emergencyMedicalServices" SituationAlertCauseEmergencyservices SituationAlertCause = "emergencyServices" SituationAlertCauseEmergencyservicescall SituationAlertCause = "emergencyServicesCall" SituationAlertCauseEnginefailure SituationAlertCause = "engineFailure" SituationAlertCauseEscalatorfailure SituationAlertCause = "escalatorFailure" SituationAlertCauseEvacuation SituationAlertCause = "evacuation" SituationAlertCauseExplosion SituationAlertCause = "explosion" SituationAlertCauseExplosionhazard SituationAlertCause = "explosionHazard" SituationAlertCauseFallenleaves SituationAlertCause = "fallenLeaves" SituationAlertCauseFallentree SituationAlertCause = "fallenTree" SituationAlertCauseFallentreeontheline SituationAlertCause = "fallenTreeOnTheLine" SituationAlertCauseFatality SituationAlertCause = "fatality" SituationAlertCauseFilterblockade SituationAlertCause = "filterBlockade" SituationAlertCauseFire SituationAlertCause = "fire" SituationAlertCauseFireatstation SituationAlertCause = "fireAtStation" SituationAlertCauseFireatthestation SituationAlertCause = "fireAtTheStation" SituationAlertCauseFirebrigadeorder SituationAlertCause = "fireBrigadeOrder" SituationAlertCauseFirebrigadesafetychecks SituationAlertCause = "fireBrigadeSafetyChecks" SituationAlertCauseFirerun SituationAlertCause = "fireRun" SituationAlertCauseFlashfloods SituationAlertCause = "flashFloods" SituationAlertCauseFlooding SituationAlertCause = "flooding" SituationAlertCauseFog SituationAlertCause = "fog" SituationAlertCauseForeigndisturbances SituationAlertCause = "foreignDisturbances" SituationAlertCauseFrozen SituationAlertCause = "frozen" SituationAlertCauseFuelproblem SituationAlertCause = "fuelProblem" SituationAlertCauseFuelshortage SituationAlertCause = "fuelShortage" SituationAlertCauseGangwayproblem SituationAlertCause = "gangwayProblem" SituationAlertCauseGlazedfrost SituationAlertCause = "glazedFrost" SituationAlertCauseGrassfire SituationAlertCause = "grassFire" SituationAlertCauseGunfireonroadway SituationAlertCause = "gunfireOnRoadway" SituationAlertCauseHail SituationAlertCause = "hail" SituationAlertCauseHeavyrain SituationAlertCause = "heavyRain" SituationAlertCauseHeavysnowfall SituationAlertCause = "heavySnowfall" SituationAlertCauseHeavytraffic SituationAlertCause = "heavyTraffic" SituationAlertCauseHightemperatures SituationAlertCause = "highTemperatures" SituationAlertCauseHightide SituationAlertCause = "highTide" SituationAlertCauseHighwaterlevel SituationAlertCause = "highWaterLevel" SituationAlertCauseHoliday SituationAlertCause = "holiday" SituationAlertCauseIce SituationAlertCause = "ice" SituationAlertCauseIcedrift SituationAlertCause = "iceDrift" SituationAlertCauseIceoncarriages SituationAlertCause = "iceOnCarriages" SituationAlertCauseIceonrailway SituationAlertCause = "iceOnRailway" SituationAlertCauseIllvehicleoccupants SituationAlertCause = "illVehicleOccupants" SituationAlertCauseIncident SituationAlertCause = "incident" SituationAlertCauseIndustrialaction SituationAlertCause = "industrialAction" SituationAlertCauseInsufficientdemand SituationAlertCause = "insufficientDemand" SituationAlertCauseLackofoperationalstock SituationAlertCause = "lackOfOperationalStock" SituationAlertCauseLandslide SituationAlertCause = "landslide" SituationAlertCauseLatefinishtoengineeringwork SituationAlertCause = "lateFinishToEngineeringWork" SituationAlertCauseLeaderboardfailure SituationAlertCause = "leaderBoardFailure" SituationAlertCauseLevelcrossingaccident SituationAlertCause = "levelCrossingAccident" SituationAlertCauseLevelcrossingblocked SituationAlertCause = "levelCrossingBlocked" SituationAlertCauseLevelcrossingfailure SituationAlertCause = "levelCrossingFailure" SituationAlertCauseLevelcrossingincident SituationAlertCause = "levelCrossingIncident" SituationAlertCauseLiftfailure SituationAlertCause = "liftFailure" SituationAlertCauseLightingfailure SituationAlertCause = "lightingFailure" SituationAlertCauseLightningstrike SituationAlertCause = "lightningStrike" SituationAlertCauseLinesidefire SituationAlertCause = "linesideFire" SituationAlertCauseLogisticproblems SituationAlertCause = "logisticProblems" SituationAlertCauseLowtide SituationAlertCause = "lowTide" SituationAlertCauseLowwaterlevel SituationAlertCause = "lowWaterLevel" SituationAlertCauseLuggagecarouselproblem SituationAlertCause = "luggageCarouselProblem" SituationAlertCauseMaintenancework SituationAlertCause = "maintenanceWork" SituationAlertCauseMarch SituationAlertCause = "march" SituationAlertCauseMiscellaneous SituationAlertCause = "miscellaneous" SituationAlertCauseMudslide SituationAlertCause = "mudslide" SituationAlertCauseNearmiss SituationAlertCause = "nearMiss" SituationAlertCauseObjectontheline SituationAlertCause = "objectOnTheLine" SituationAlertCauseOperatorceasedtrading SituationAlertCause = "operatorCeasedTrading" SituationAlertCauseOperatorsuspended SituationAlertCause = "operatorSuspended" SituationAlertCauseOvercrowded SituationAlertCause = "overcrowded" SituationAlertCauseOverheadobstruction SituationAlertCause = "overheadObstruction" SituationAlertCauseOverheadwirefailure SituationAlertCause = "overheadWireFailure" SituationAlertCauseOvertaking SituationAlertCause = "overtaking" SituationAlertCausePassengeraction SituationAlertCause = "passengerAction" SituationAlertCausePassengersblockingdoors SituationAlertCause = "passengersBlockingDoors" SituationAlertCausePaving SituationAlertCause = "paving" SituationAlertCausePersonhitbytrain SituationAlertCause = "personHitByTrain" SituationAlertCausePersonhitbyvehicle SituationAlertCause = "personHitByVehicle" SituationAlertCausePersonillonvehicle SituationAlertCause = "personIllOnVehicle" SituationAlertCausePersonontheline SituationAlertCause = "personOnTheLine" SituationAlertCausePersonundertrain SituationAlertCause = "personUnderTrain" SituationAlertCausePointsfailure SituationAlertCause = "pointsFailure" SituationAlertCausePointsproblem SituationAlertCause = "pointsProblem" SituationAlertCausePoliceactivity SituationAlertCause = "policeActivity" SituationAlertCausePoliceorder SituationAlertCause = "policeOrder" SituationAlertCausePoorrailconditions SituationAlertCause = "poorRailConditions" SituationAlertCausePoorweather SituationAlertCause = "poorWeather" SituationAlertCausePowerproblem SituationAlertCause = "powerProblem" SituationAlertCausePrecedingvehicle SituationAlertCause = "precedingVehicle" SituationAlertCausePreviousdisturbances SituationAlertCause = "previousDisturbances" SituationAlertCauseProblemsatborderpost SituationAlertCause = "problemsAtBorderPost" SituationAlertCauseProblemsatcustomspost SituationAlertCause = "problemsAtCustomsPost" SituationAlertCauseProblemsonlocalroad SituationAlertCause = "problemsOnLocalRoad" SituationAlertCauseProcession SituationAlertCause = "procession" SituationAlertCauseProvisiondelay SituationAlertCause = "provisionDelay" SituationAlertCausePublicdisturbance SituationAlertCause = "publicDisturbance" SituationAlertCauseRailwaycrime SituationAlertCause = "railwayCrime" SituationAlertCauseRepairwork SituationAlertCause = "repairWork" SituationAlertCauseRiskofavalanches SituationAlertCause = "riskOfAvalanches" SituationAlertCauseRiskofflooding SituationAlertCause = "riskOfFlooding" SituationAlertCauseRiskoflandslide SituationAlertCause = "riskOfLandslide" SituationAlertCauseRoadclosed SituationAlertCause = "roadClosed" SituationAlertCauseRoadmaintenance SituationAlertCause = "roadMaintenance" SituationAlertCauseRoadwaydamage SituationAlertCause = "roadwayDamage" SituationAlertCauseRoadworks SituationAlertCause = "roadworks" SituationAlertCauseRockfalls SituationAlertCause = "rockfalls" SituationAlertCauseRoughsea SituationAlertCause = "roughSea" SituationAlertCauseRouteblockage SituationAlertCause = "routeBlockage" SituationAlertCauseRoutediversion SituationAlertCause = "routeDiversion" SituationAlertCauseSabotage SituationAlertCause = "sabotage" SituationAlertCauseSafetyviolation SituationAlertCause = "safetyViolation" SituationAlertCauseSecurityalert SituationAlertCause = "securityAlert" SituationAlertCauseSecurityincident SituationAlertCause = "securityIncident" SituationAlertCauseServicedisruption SituationAlertCause = "serviceDisruption" SituationAlertCauseServicefailure SituationAlertCause = "serviceFailure" SituationAlertCauseServiceindicatorfailure SituationAlertCause = "serviceIndicatorFailure" SituationAlertCauseSeweragemaintenance SituationAlertCause = "sewerageMaintenance" SituationAlertCauseSeweroverflow SituationAlertCause = "sewerOverflow" SituationAlertCauseSightseersobstructingaccess SituationAlertCause = "sightseersObstructingAccess" SituationAlertCauseSignalandswitchfailure SituationAlertCause = "signalAndSwitchFailure" SituationAlertCauseSignalfailure SituationAlertCause = "signalFailure" SituationAlertCauseSignalpassedatdanger SituationAlertCause = "signalPassedAtDanger" SituationAlertCauseSignalproblem SituationAlertCause = "signalProblem" SituationAlertCauseSleet SituationAlertCause = "sleet" SituationAlertCauseSlipperiness SituationAlertCause = "slipperiness" SituationAlertCauseSlipperytrack SituationAlertCause = "slipperyTrack" SituationAlertCauseSmokedetectedonvehicle SituationAlertCause = "smokeDetectedOnVehicle" SituationAlertCauseSpecialevent SituationAlertCause = "specialEvent" SituationAlertCauseSpeedrestrictions SituationAlertCause = "speedRestrictions" SituationAlertCauseStaffabsence SituationAlertCause = "staffAbsence" SituationAlertCauseStaffassault SituationAlertCause = "staffAssault" SituationAlertCauseStaffinjury SituationAlertCause = "staffInjury" SituationAlertCauseStaffinwrongplace SituationAlertCause = "staffInWrongPlace" SituationAlertCauseStaffshortage SituationAlertCause = "staffShortage" SituationAlertCauseStaffsickness SituationAlertCause = "staffSickness" SituationAlertCauseStationoverrun SituationAlertCause = "stationOverrun" SituationAlertCauseStormconditions SituationAlertCause = "stormConditions" SituationAlertCauseStormdamage SituationAlertCause = "stormDamage" SituationAlertCauseStrongwinds SituationAlertCause = "strongWinds" SituationAlertCauseSubsidence SituationAlertCause = "subsidence" SituationAlertCauseSuspectvehicle SituationAlertCause = "suspectVehicle" SituationAlertCauseSwingbridgefailure SituationAlertCause = "swingBridgeFailure" SituationAlertCauseTechnicalproblem SituationAlertCause = "technicalProblem" SituationAlertCauseTelephonedthreat SituationAlertCause = "telephonedThreat" SituationAlertCauseTerroristincident SituationAlertCause = "terroristIncident" SituationAlertCauseTheft SituationAlertCause = "theft" SituationAlertCauseTicketingsystemnotavailable SituationAlertCause = "ticketingSystemNotAvailable" SituationAlertCauseTidalrestrictions SituationAlertCause = "tidalRestrictions" SituationAlertCauseTrackcircuitproblem SituationAlertCause = "trackCircuitProblem" SituationAlertCauseTractionfailure SituationAlertCause = "tractionFailure" SituationAlertCauseTrafficmanagementsystemfailure SituationAlertCause = "trafficManagementSystemFailure" SituationAlertCauseTraincoupling SituationAlertCause = "trainCoupling" SituationAlertCauseTraindoor SituationAlertCause = "trainDoor" SituationAlertCauseTrainstruckanimal SituationAlertCause = "trainStruckAnimal" SituationAlertCauseTrainstruckobject SituationAlertCause = "trainStruckObject" SituationAlertCauseTrainwarningsystemproblem SituationAlertCause = "trainWarningSystemProblem" SituationAlertCauseUnattendedbag SituationAlertCause = "unattendedBag" SituationAlertCauseUndefinedalertcause SituationAlertCause = "undefinedAlertCause" SituationAlertCauseUndefinedenvironmentalproblem SituationAlertCause = "undefinedEnvironmentalProblem" SituationAlertCauseUndefinedequipmentproblem SituationAlertCause = "undefinedEquipmentProblem" SituationAlertCauseUndefinedpersonnelproblem SituationAlertCause = "undefinedPersonnelProblem" SituationAlertCauseUndefinedproblem SituationAlertCause = "undefinedProblem" SituationAlertCauseUnknown SituationAlertCause = "unknown" SituationAlertCauseUnofficialindustrialaction SituationAlertCause = "unofficialIndustrialAction" SituationAlertCauseUnscheduledconstructionwork SituationAlertCause = "unscheduledConstructionWork" SituationAlertCauseVandalism SituationAlertCause = "vandalism" SituationAlertCauseVegetation SituationAlertCause = "vegetation" SituationAlertCauseVehicleblockingtrack SituationAlertCause = "vehicleBlockingTrack" SituationAlertCauseVehiclefailure SituationAlertCause = "vehicleFailure" SituationAlertCauseVehicleontheline SituationAlertCause = "vehicleOnTheLine" SituationAlertCauseVehiclestruckanimal SituationAlertCause = "vehicleStruckAnimal" SituationAlertCauseVehiclestruckobject SituationAlertCause = "vehicleStruckObject" SituationAlertCauseViaductfailure SituationAlertCause = "viaductFailure" SituationAlertCauseWaitingfortransferpassengers SituationAlertCause = "waitingForTransferPassengers" SituationAlertCauseWaterlogged SituationAlertCause = "waterlogged" SituationAlertCauseWheelimpactload SituationAlertCause = "wheelImpactLoad" SituationAlertCauseWheelproblem SituationAlertCause = "wheelProblem" SituationAlertCauseWildlandfire SituationAlertCause = "wildlandFire" SituationAlertCauseWorktorule SituationAlertCause = "workToRule" )
func (*SituationAlertCause) FromProto ¶
func (ac *SituationAlertCause) FromProto(value interface{}) error
func (*SituationAlertCause) FromString ¶
func (alertCause *SituationAlertCause) FromString(s string) error
func (SituationAlertCause) ToProto ¶
func (ac SituationAlertCause) ToProto(dest interface{}) error
type SituationBroadcastEvent ¶
type SituationBroadcastEvent struct {
SituationId SituationId
}
type SituationCondition ¶
type SituationCondition string
const ( SituationConditionAdditionalRide SituationCondition = "additionalRide" SituationConditionAdditionalService SituationCondition = "additionalService" SituationContitionAdditionalStop SituationCondition = "additionalStop" SituationConditionAltered SituationCondition = "altered" SituationConditionArrivesEarly SituationCondition = "arrivesEarly" SituationConditionBoarding SituationCondition = "boarding" SituationConditionCancelled SituationCondition = "cancelled" SituationConditionChangeOfPlatform SituationCondition = "changeOfPlatform" SituationConditionDelay SituationCondition = "delay" SituationConditionDelayed SituationCondition = "delayed" SituationConditionDiscontinuedOperation SituationCondition = "discontinuedOperation" SituationConditionDisrupted SituationCondition = "disrupted" SituationConditionDisruption SituationCondition = "disruption" SituationConditionDisturbanceRectified SituationCondition = "disturbanceRectified" SituationConditionDiverted SituationCondition = "diverted" SituationConditionExtendedService SituationCondition = "extendedService" SituationConditionFullLengthService SituationCondition = "fullLengthService" SituationConditionGoToGate SituationCondition = "goToGate" SituationConditionIntermittentService SituationCondition = "intermittentService" SituationConditionIrregularTraffic SituationCondition = "irregularTraffic" SituationConditionLimitedOperation SituationCondition = "limitedOperation" SituationConditionLineCancellation SituationCondition = "lineCancellation" SituationConditionMajorDelays SituationCondition = "majorDelays" SituationConditionMinorDelays SituationCondition = "minorDelays" SituationConditionNormalService SituationCondition = "normalService" SituationConditionNoService SituationCondition = "noService" SituationConditionOnTime SituationCondition = "onTime" SituationConditionOperationTimeExtension SituationCondition = "operationTimeExtension" SituationConditionReplacementRide SituationCondition = "replacementRide" SituationConditionReplacementService SituationCondition = "replacementService" SituationConditionReplacementTransport SituationCondition = "replacementTransport" SituationConditionShortFormedService SituationCondition = "shortFormedService" SituationConditionShuttleService SituationCondition = "shuttleService" SituationConditionSpecialService SituationCondition = "specialService" SituationConditionSplittingTrain SituationCondition = "splittingTrain" SituationConditionStopCancelled SituationCondition = "stopCancelled" SituationConditionStopMove SituationCondition = "stopMoved" SituationConditionStopOnDemand SituationCondition = "stopOnDemand" SituationConditionSubstitutedStop SituationCondition = "substitutedStop" SituationConditionTemporarilyNonStopping SituationCondition = "temporarilyNonStopping" SituationConditionTemporaryStopplace SituationCondition = "temporaryStopplace" SituationConditionTrainShortened SituationCondition = "trainShortened" SituationConditionTripCancellation SituationCondition = "tripCancellation" SituationConditionUndefinedServiceInformation SituationCondition = "undefinedServiceInformation" SituationConditionUndefinedStatus SituationCondition = "undefinedStatus" SituationConditionUnknown SituationCondition = "unknown" SituationConditionWagonOrderChanged SituationCondition = "wagonOrderChanged" )
func (*SituationCondition) FromProto ¶
func (c *SituationCondition) FromProto(value interface{}) error
func (*SituationCondition) FromString ¶
func (condition *SituationCondition) FromString(c string) error
func (SituationCondition) ToProto ¶
func (c SituationCondition) ToProto(dest interface{}) error
type SituationId ¶
type SituationId ModelId
type SituationLinkContent ¶
type SituationLinkContent string
const ( SituationLinkContentAdvice SituationLinkContent = "advice" SituationLinkContentDetails SituationLinkContent = "details" SituationLinkContentOther SituationLinkContent = "other" SituationLinkContentRelatedSite SituationLinkContent = "relatedSite" SituationLinkContentTimetable SituationLinkContent = "timetable" )
func (*SituationLinkContent) FromString ¶
func (lc *SituationLinkContent) FromString(s string) error
type SituationProgress ¶
type SituationProgress string
const ( SituationProgressDraft SituationProgress = "draft" SituationProgressPendingApproval SituationProgress = "pendingApproval" SituationProgressApprovedDraft SituationProgress = "approvedDraft" SituationProgressOpend SituationProgress = "open" SituationProgressPublished SituationProgress = "published" SituationProgressClosing SituationProgress = "closing" SituationProgressClosed SituationProgress = "closed" )
func (*SituationProgress) FromString ¶
func (progress *SituationProgress) FromString(s string) error
type SituationReality ¶
type SituationReality string
const ( SituationRealityReal SituationReality = "real" SituationRealitySecurityExercise SituationReality = "securityExercise" SituationRealityTechnicalExercise SituationReality = "technicalExercise" SituationRealityTest SituationReality = "test" )
func (*SituationReality) FromString ¶
func (reality *SituationReality) FromString(s string) error
type SituationScopeType ¶
type SituationScopeType string
const ( SituationScopeTypeGeneral SituationScopeType = "general" SituationScopeTypeOperator SituationScopeType = "operator" SituationScopeTypeNetwork SituationScopeType = "network" SituationScopeTypeRoute SituationScopeType = "route" SituationScopeTypeLine SituationScopeType = "line" SituationScopeTypePlace SituationScopeType = "place" SituationScopeTypeStopPlace SituationScopeType = "stopPlace" SituationScopeTypeStopPoint SituationScopeType = "stopPoint" SituationScopeTypeVehicleJourney SituationScopeType = "VehicleJourney" )
func (*SituationScopeType) FromString ¶
func (sc *SituationScopeType) FromString(s string) error
type SituationSeverity ¶
type SituationSeverity string
const ( SituationSeverityNoImpact SituationSeverity = "noImpact" SituationSeverityVerySlight SituationSeverity = "verySlight" SituationSeveritySlight SituationSeverity = "slight" SituationSeverityNormal SituationSeverity = "normal" SituationSeveritySevere SituationSeverity = "severe" SituationSeverityUndefinded SituationSeverity = "undefined" SituationSeverityUnknown SituationSeverity = "unknown" SituationSeverityVerySevere SituationSeverity = "verySevere" )
func (*SituationSeverity) FromProto ¶
func (s *SituationSeverity) FromProto(value interface{}) error
func (*SituationSeverity) FromString ¶
func (severity *SituationSeverity) FromString(s string) error
func (SituationSeverity) ToProto ¶
func (s SituationSeverity) ToProto(dest interface{}) error
type SituationType ¶
type SituationType string
type SituationUpdateEvent ¶
type SituationUpdateEvent struct { CreatedAt time.Time RecordedAt time.Time SituationCode Code Origin string Format string ProducerRef string ParticipantRef string VersionedAt time.Time ValidityPeriods []*TimeRange PublicationWindows []*TimeRange Keywords []string InternalTags []string AlertCause SituationAlertCause Progress SituationProgress Reality SituationReality Severity SituationSeverity ReportType ReportType Version int Summary *TranslatedString Description *TranslatedString Affects []Affect Consequences []*Consequence PublishToWebActions []*PublishToWebAction PublishToMobileActions []*PublishToMobileAction PublishToDisplayActions []*PublishToDisplayAction InfoLinks []*InfoLink // contains filtered or unexported fields }
func (*SituationUpdateEvent) EventKind ¶
func (ue *SituationUpdateEvent) EventKind() EventKind
func (*SituationUpdateEvent) Id ¶
func (event *SituationUpdateEvent) Id() SituationUpdateRequestId
func (*SituationUpdateEvent) SetId ¶
func (event *SituationUpdateEvent) SetId(id SituationUpdateRequestId)
func (*SituationUpdateEvent) TestFindAffectByLineId ¶
func (event *SituationUpdateEvent) TestFindAffectByLineId(lineId LineId) (bool, *AffectedLine)
func (*SituationUpdateEvent) TestFindAffectByStopAreaId ¶
func (event *SituationUpdateEvent) TestFindAffectByStopAreaId(stopAreaId StopAreaId) (bool, *AffectedStopArea)
type SituationUpdateRequestId ¶
type SituationUpdateRequestId string
type Situations ¶
type StatusUpdateEvent ¶
type StatusUpdateEvent struct { StopAreaId StopAreaId Partner string Status bool }
func NewStatusUpdateEvent ¶
func NewStatusUpdateEvent(stopAreaId StopAreaId, partner string, status bool) *StatusUpdateEvent
func (*StatusUpdateEvent) EventKind ¶
func (ue *StatusUpdateEvent) EventKind() EventKind
type StopArea ¶
type StopArea struct { Collectable CollectedUntil time.Time References References CodeConsumer Origins *StopAreaOrigins Attributes Attributes ReferentId StopAreaId `json:",omitempty"` ParentId StopAreaId `json:",omitempty"` Name string LineIds StopAreaLineIds `json:"Lines,omitempty"` Latitude float64 `json:",omitempty"` Longitude float64 `json:",omitempty"` CollectChildren bool CollectSituations bool CollectedAlways bool Monitored bool // contains filtered or unexported fields }
func NewStopArea ¶
func (*StopArea) Id ¶
func (stopArea *StopArea) Id() StopAreaId
func (*StopArea) MarshalJSON ¶
func (*StopArea) ReferentOrSelfCode ¶
func (*StopArea) SetPartnerStatus ¶
func (*StopArea) UnmarshalJSON ¶
type StopAreaGroup ¶
type StopAreaGroup struct { Name string `json:",omitempty"` ShortName string `json:",omitempty"` StopAreaIds []StopAreaId `json:",omitempty"` // contains filtered or unexported fields }
func NewStopAreaGroup ¶
func NewStopAreaGroup(model Model) *StopAreaGroup
func (*StopAreaGroup) Id ¶
func (stopAreaGroup *StopAreaGroup) Id() StopAreaGroupId
func (*StopAreaGroup) MarshalJSON ¶
func (stopAreaGroup *StopAreaGroup) MarshalJSON() ([]byte, error)
func (*StopAreaGroup) Save ¶
func (stopAreaGroup *StopAreaGroup) Save() bool
type StopAreaGroupId ¶
type StopAreaGroupId ModelId
type StopAreaGroups ¶
type StopAreaGroups interface { uuid.UUIDInterface New() *StopAreaGroup Find(StopAreaGroupId) (*StopAreaGroup, bool) FindByShortName(string) (*StopAreaGroup, bool) FindAll() []*StopAreaGroup Save(*StopAreaGroup) bool Delete(*StopAreaGroup) bool }
type StopAreaId ¶
type StopAreaId ModelId
type StopAreaLineIds ¶
type StopAreaLineIds []LineId
func (*StopAreaLineIds) Add ¶
func (ids *StopAreaLineIds) Add(id LineId)
func (StopAreaLineIds) Contains ¶
func (ids StopAreaLineIds) Contains(id LineId) bool
func (StopAreaLineIds) Copy ¶
func (ids StopAreaLineIds) Copy() (t StopAreaLineIds)
type StopAreaOrigins ¶
func NewStopAreaOrigins ¶
func NewStopAreaOrigins() *StopAreaOrigins
func (*StopAreaOrigins) AllOrigin ¶
func (origins *StopAreaOrigins) AllOrigin() map[string]bool
func (*StopAreaOrigins) Copy ¶
func (origins *StopAreaOrigins) Copy() *StopAreaOrigins
func (*StopAreaOrigins) MarshalJSON ¶
func (origins *StopAreaOrigins) MarshalJSON() ([]byte, error)
func (*StopAreaOrigins) Monitored ¶
func (origins *StopAreaOrigins) Monitored() (monitored bool)
func (*StopAreaOrigins) NewOrigin ¶
func (origins *StopAreaOrigins) NewOrigin(partner string)
func (*StopAreaOrigins) Origin ¶
func (origins *StopAreaOrigins) Origin(partner string) (status bool, present bool)
func (*StopAreaOrigins) PartnersKO ¶
func (origins *StopAreaOrigins) PartnersKO() (partnersSlice []string)
func (*StopAreaOrigins) PartnersLost ¶
func (origins *StopAreaOrigins) PartnersLost(comparedOrigins *StopAreaOrigins) (partnersLost []string, r bool)
func (*StopAreaOrigins) SetOriginsFromMap ¶
func (origins *StopAreaOrigins) SetOriginsFromMap(originMap map[string]bool)
func (*StopAreaOrigins) SetPartnerStatus ¶
func (origins *StopAreaOrigins) SetPartnerStatus(partner string, status bool)
type StopAreaUpdateEvent ¶
type StopAreaUpdateEvent struct { Origin string Code Code ParentCode Code Name string CollectedAlways bool Longitude float64 Latitude float64 }
func NewStopAreaUpdateEvent ¶
func NewStopAreaUpdateEvent() *StopAreaUpdateEvent
func (*StopAreaUpdateEvent) EventKind ¶
func (ue *StopAreaUpdateEvent) EventKind() EventKind
type StopAreas ¶
type StopAreas interface { uuid.UUIDInterface New() *StopArea Find(StopAreaId) (*StopArea, bool) FindByCode(Code) (*StopArea, bool) FindByLineId(LineId) []*StopArea FindByOrigin(string) []StopAreaId FindAll() []*StopArea FindAllValues() []StopArea FindFamily(StopAreaId) []StopAreaId FindByReferentId(StopAreaId) []*StopArea FindAscendants(StopAreaId) []*StopArea FindAscendantsWithCodeSpace(StopAreaId, string) []Code Save(*StopArea) bool Delete(*StopArea) bool }
type StopVisit ¶
type StopVisit struct { RecordedAt time.Time References References Attributes Attributes Schedules *schedules.StopVisitSchedules CodeConsumer VehicleJourneyId VehicleJourneyId `json:",omitempty"` StopAreaId StopAreaId `json:",omitempty"` ArrivalStatus StopVisitArrivalStatus `json:",omitempty"` DepartureStatus StopVisitDepartureStatus `json:",omitempty"` DataFrameRef string `json:",omitempty"` Origin string PassageOrder int `json:",omitempty"` VehicleAtStop bool // contains filtered or unexported fields }
func NewStopVisit ¶
func (*StopVisit) CollectedAt ¶
func (*StopVisit) Id ¶
func (stopVisit *StopVisit) Id() StopVisitId
func (*StopVisit) IsArchivable ¶
func (*StopVisit) IsCollected ¶
func (*StopVisit) MarshalJSON ¶
func (*StopVisit) NotCollected ¶
func (*StopVisit) ReferenceArrivalTime ¶
func (*StopVisit) ReferenceDepartureTime ¶
func (*StopVisit) ReferenceTime ¶
func (*StopVisit) UnmarshalJSON ¶
func (*StopVisit) VehicleJourney ¶
func (stopVisit *StopVisit) VehicleJourney() *VehicleJourney
type StopVisitArchiver ¶
func (*StopVisitArchiver) Archive ¶
func (sva *StopVisitArchiver) Archive()
func (*StopVisitArchiver) StopArea ¶
func (sva *StopVisitArchiver) StopArea() *StopArea
func (*StopVisitArchiver) VehicleJourney ¶
func (sva *StopVisitArchiver) VehicleJourney() *VehicleJourney
type StopVisitArrivalStatus ¶
type StopVisitArrivalStatus string
const ( STOP_VISIT_ARRIVAL_ARRIVED StopVisitArrivalStatus = "arrived" STOP_VISIT_ARRIVAL_ONTIME StopVisitArrivalStatus = "onTime" STOP_VISIT_ARRIVAL_EARLY StopVisitArrivalStatus = "early" STOP_VISIT_ARRIVAL_DELAYED StopVisitArrivalStatus = "delayed" STOP_VISIT_ARRIVAL_CANCELLED StopVisitArrivalStatus = "cancelled" STOP_VISIT_ARRIVAL_NOREPORT StopVisitArrivalStatus = "noreport" STOP_VISIT_ARRIVAL_MISSED StopVisitArrivalStatus = "missed" STOP_VISIT_ARRIVAL_NOT_EXPECTED StopVisitArrivalStatus = "notExpected" )
func SetStopVisitArrivalStatus ¶
func SetStopVisitArrivalStatus(arrivalStatus string) StopVisitArrivalStatus
func (StopVisitArrivalStatus) Arrived ¶
func (svas StopVisitArrivalStatus) Arrived() bool
type StopVisitDepartureStatus ¶
type StopVisitDepartureStatus string
const ( STOP_VISIT_DEPARTURE_ONTIME StopVisitDepartureStatus = "onTime" STOP_VISIT_DEPARTURE_EARLY StopVisitDepartureStatus = "early" STOP_VISIT_DEPARTURE_DELAYED StopVisitDepartureStatus = "delayed" STOP_VISIT_DEPARTURE_CANCELLED StopVisitDepartureStatus = "cancelled" STOP_VISIT_DEPARTURE_NOREPORT StopVisitDepartureStatus = "noreport" STOP_VISIT_DEPARTURE_DEPARTED StopVisitDepartureStatus = "departed" )
func SetStopVisitDepartureStatus ¶
func SetStopVisitDepartureStatus(departureStatus string) StopVisitDepartureStatus
func (StopVisitDepartureStatus) Departed ¶
func (svds StopVisitDepartureStatus) Departed() bool
type StopVisitId ¶
type StopVisitId ModelId
type StopVisitSelector ¶
func CompositeStopVisitSelector ¶
func CompositeStopVisitSelector(selectors []StopVisitSelector) StopVisitSelector
func StopVisitSelectByStopAreaId ¶
func StopVisitSelectByStopAreaId(stopAreaId StopAreaId) StopVisitSelector
func StopVisitSelectorAfterTime ¶
func StopVisitSelectorAfterTime(startTime time.Time) StopVisitSelector
func StopVisitSelectorBeforeTime ¶
func StopVisitSelectorBeforeTime(endTime time.Time) StopVisitSelector
func StopVisitSelectorByLines ¶
func StopVisitSelectorByLines(lineIds []LineId) StopVisitSelector
func StopVisitSelectorByTime ¶
func StopVisitSelectorByTime(startTime, endTime time.Time) StopVisitSelector
type StopVisitUpdateEvent ¶
type StopVisitUpdateEvent struct { RecordedAt time.Time Schedules *schedules.StopVisitSchedules SiriXML *sxml.XMLMonitoredStopVisit VehicleJourneyCode Code StopAreaCode Code Code Code CodeSpace string DepartureStatus StopVisitDepartureStatus ArrivalStatus StopVisitArrivalStatus DataFrameRef string Origin string PassageOrder int Monitored bool VehicleAtStop bool // contains filtered or unexported fields }
func NewStopVisitUpdateEvent ¶
func NewStopVisitUpdateEvent() *StopVisitUpdateEvent
func (*StopVisitUpdateEvent) Attributes ¶
func (ue *StopVisitUpdateEvent) Attributes() Attributes
func (*StopVisitUpdateEvent) EventKind ¶
func (ue *StopVisitUpdateEvent) EventKind() EventKind
func (*StopVisitUpdateEvent) References ¶
func (ue *StopVisitUpdateEvent) References() References
type StopVisits ¶
type StopVisits interface { uuid.UUIDInterface New() *StopVisit Find(StopVisitId) (*StopVisit, bool) FindByCode(Code) (*StopVisit, bool) FindByVehicleJourneyId(VehicleJourneyId) []*StopVisit FindByVehicleJourneyIdAndStopVisitOrder(VehicleJourneyId, int) *StopVisit VehicleJourneyHasStopVisits(VehicleJourneyId) bool FindByVehicleJourneyIdAfter(VehicleJourneyId, time.Time) []*StopVisit FindFollowingByVehicleJourneyId(VehicleJourneyId) []*StopVisit StopVisitsLenByVehicleJourney(VehicleJourneyId) int FindByStopAreaId(StopAreaId) []*StopVisit FindMonitoredByOriginByStopAreaId(StopAreaId, string) []*StopVisit FindFollowingByStopAreaId(StopAreaId) []*StopVisit FindFollowingByStopAreaIds([]StopAreaId) []*StopVisit FindAll() []*StopVisit UnsafeFindAll() []*StopVisit FindByVehicleJourneyIdAndStopAreaId(VehicleJourneyId, StopAreaId) []StopVisitId FindAllAfter(time.Time) []*StopVisit Save(*StopVisit) bool Delete(*StopVisit) bool DeleteMultiple([]*StopVisit) bool }
type TranslatedString ¶
type TranslatedString struct { DefaultValue string `json:",omitempty"` Translations map[string]string `json:",omitempty"` }
func NewTranslatedStringFromMap ¶
func NewTranslatedStringFromMap(translations map[string]string) *TranslatedString
func NewTranslatedStringFromProto ¶
func NewTranslatedStringFromProto(value []*gtfs.TranslatedString_Translation) *TranslatedString
func (*TranslatedString) ToProto ¶
func (ts *TranslatedString) ToProto(dest *gtfs.TranslatedString)
type UpdateEvent ¶
type UpdateEvent interface {
EventKind() EventKind
}
type UpdateManager ¶
type UpdateManager struct { clock.ClockConsumer uuid.UUIDConsumer // contains filtered or unexported fields }
func (*UpdateManager) Update ¶
func (manager *UpdateManager) Update(event UpdateEvent)
type Vehicle ¶
type Vehicle struct { RecordedAtTime time.Time ValidUntilTime time.Time `json:",omitempty"` CodeConsumer Attributes Attributes StopAreaId StopAreaId `json:",omitempty"` Occupancy string `json:",omitempty"` LineId LineId `json:",omitempty"` VehicleJourneyId VehicleJourneyId `json:",omitempty"` DriverRef string `json:",omitempty"` NextStopVisitId StopVisitId `json:",omitempty"` LinkDistance float64 `json:",omitempty"` Percentage float64 `json:",omitempty"` Longitude float64 `json:",omitempty"` Latitude float64 `json:",omitempty"` Bearing float64 `json:",omitempty"` // contains filtered or unexported fields }
func NewVehicle ¶
func (*Vehicle) MarshalJSON ¶
func (*Vehicle) UnmarshalJSON ¶
func (*Vehicle) VehicleJourney ¶
func (vehicle *Vehicle) VehicleJourney() *VehicleJourney
type VehicleBroadcastEvent ¶
type VehicleJourney ¶
type VehicleJourney struct { References References Attributes Attributes CodeConsumer LineId LineId `json:",omitempty"` Name string `json:",omitempty"` DestinationName string `json:",omitempty"` Occupancy string `json:",omitempty"` DirectionType string `json:",omitempty"` Origin string `json:",omitempty"` OriginName string `json:",omitempty"` Monitored bool HasCompleteStopSequence bool // contains filtered or unexported fields }
func NewVehicleJourney ¶
func NewVehicleJourney(model Model) *VehicleJourney
func (*VehicleJourney) Attribute ¶
func (vehicleJourney *VehicleJourney) Attribute(key string) (string, bool)
func (*VehicleJourney) Id ¶
func (vehicleJourney *VehicleJourney) Id() VehicleJourneyId
func (*VehicleJourney) Line ¶
func (vehicleJourney *VehicleJourney) Line() *Line
func (*VehicleJourney) MarshalJSON ¶
func (vehicleJourney *VehicleJourney) MarshalJSON() ([]byte, error)
func (*VehicleJourney) Reference ¶
func (vehicleJourney *VehicleJourney) Reference(key string) (Reference, bool)
func (*VehicleJourney) Save ¶
func (vehicleJourney *VehicleJourney) Save() bool
func (*VehicleJourney) ToFormat ¶
func (vehicleJourney *VehicleJourney) ToFormat() []string
func (*VehicleJourney) UnmarshalJSON ¶
func (vehicleJourney *VehicleJourney) UnmarshalJSON(data []byte) error
type VehicleJourneyId ¶
type VehicleJourneyId ModelId
type VehicleJourneyUpdateEvent ¶
type VehicleJourneyUpdateEvent struct { SiriXML *sxml.XMLMonitoredVehicleJourney Code Code LineCode Code Direction string DestinationName string DestinationRef string DirectionType string Occupancy string OriginName string CodeSpace string OriginRef string Origin string Monitored bool // contains filtered or unexported fields }
func NewVehicleJourneyUpdateEvent ¶
func NewVehicleJourneyUpdateEvent() *VehicleJourneyUpdateEvent
func (*VehicleJourneyUpdateEvent) Attributes ¶
func (ue *VehicleJourneyUpdateEvent) Attributes() Attributes
func (*VehicleJourneyUpdateEvent) EventKind ¶
func (ue *VehicleJourneyUpdateEvent) EventKind() EventKind
func (*VehicleJourneyUpdateEvent) References ¶
func (ue *VehicleJourneyUpdateEvent) References() References
type VehicleJourneys ¶
type VehicleJourneys interface { uuid.UUIDInterface New() *VehicleJourney Find(VehicleJourneyId) (*VehicleJourney, bool) FindByCode(code Code) (*VehicleJourney, bool) FindByLineId(LineId) []*VehicleJourney FullVehicleJourneyExistBySubscriptionId(string, VehicleJourneyId) bool FindAll() []*VehicleJourney Save(*VehicleJourney) bool SetFullVehicleJourneyBySubscriptionId(string, VehicleJourneyId) Delete(*VehicleJourney) bool DeleteById(VehicleJourneyId) bool }
type VehicleUpdateEvent ¶
type VehicleUpdateEvent struct { ValidUntilTime time.Time RecordedAt time.Time Code Code StopAreaCode Code VehicleJourneyCode Code Occupancy string DriverRef string Origin string Longitude float64 Latitude float64 Bearing float64 Percentage float64 LinkDistance float64 NextStopPointOrder int }
func NewVehicleUpdateEvent ¶
func NewVehicleUpdateEvent() *VehicleUpdateEvent
func (*VehicleUpdateEvent) EventKind ¶
func (ue *VehicleUpdateEvent) EventKind() EventKind
Source Files ¶
- attributes.go
- code.go
- code_index.go
- collectable.go
- database.go
- database_structures.go
- date.go
- define_situation_affects_updater.go
- diff.go
- index.go
- line_group.go
- line_update_event.go
- lines.go
- load_from_csv.go
- macro.go
- macro_manager.go
- model_interface.go
- not_collected_update_event.go
- occupancy_status.go
- operator.go
- purge.go
- reference.go
- references.go
- situation.go
- situation_attributes.go
- situation_broadcast_event.go
- situation_update_event.go
- status_update_event.go
- stop_area.go
- stop_area_group.go
- stop_area_line_ids.go
- stop_area_origin.go
- stop_area_update_event.go
- stop_visit.go
- stop_visit_archiver.go
- stop_visit_arrival_status.go
- stop_visit_broadcast_event.go
- stop_visit_define_aimed_scheduled_times_updater.go
- stop_visit_departure_status.go
- stop_visit_selector.go
- stop_visit_update_event.go
- update_event.go
- update_manager.go
- vehicle_journey.go
- vehicle_journey_if_attribute_context.go
- vehicle_journey_set_attribute_updater.go
- vehicle_journey_update_event.go
- vehicle_montoring_brodcast_event.go
- vehicle_update_event.go
- vehicles.go