From 5fda100222200d117417df09d2f87fb4b3bfdc33 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Thu, 20 Jul 2023 20:57:42 +0100 Subject: [PATCH] Update types --- pkg/upstreamApi/vstp.go | 66 ++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 44 deletions(-) diff --git a/pkg/upstreamApi/vstp.go b/pkg/upstreamApi/vstp.go index ebed3b9..a426451 100644 --- a/pkg/upstreamApi/vstp.go +++ b/pkg/upstreamApi/vstp.go @@ -5,60 +5,38 @@ type VstpMsg struct { } type Schedule struct { - // ScheduleID string `json:"schedule_id"` - TransactionType string `json:"transaction_type"` - ScheduleStartDate string `json:"schedule_start_date"` - ScheduleEndDate string `json:"schedule_end_date"` - ScheduleDaysRun string `json:"schedule_days_runs"` - // ApplicableTimetable string `json:"applicable_timetable"` - // CIFBankHolidayRun string `json:"CIF_bank_holiday_running"` - CIFTrainUID string `json:"CIF_train_uid"` - // TrainStatus string `json:"train_status"` - CIFSTPIndicator string `json:"CIF_stp_indicator"` - ScheduleSegment []ScheduleSegment `json:"schedule_segment"` + TransactionType string `json:"transaction_type"` + ScheduleStartDate string `json:"schedule_start_date"` + ScheduleEndDate string `json:"schedule_end_date"` + ScheduleDaysRun string `json:"schedule_days_runs"` + CIFTrainUID string `json:"CIF_train_uid"` + CIFSTPIndicator string `json:"CIF_stp_indicator"` + ScheduleSegment []ScheduleSegment `json:"schedule_segment"` } type ScheduleSegment struct { - SignallingID string `json:"signalling_id"` - // UICCode string `json:"uic_code"` - ATOCCode string `json:"atoc_code"` - CIFTrainCategory string `json:"CIF_train_category"` - CIFHeadcode string `json:"CIF_headcode"` - // CIFCourseIndicator string `json:"CIF_course_indicator"` - // CIFTrainServiceCode string `json:"CIF_train_service_code"` - // CIFBusinessSector string `json:"CIF_business_sector"` - CIFPowerType string `json:"CIF_power_type"` - // CIFTimingLoad string `json:"CIF_timing_load"` - CIFSpeed string `json:"CIF_speed"` - // CIFOperatingCharacteristics string `json:"CIF_operating_characteristics"` - // CIFTrainClass string `json:"CIF_train_class"` - // CIFSleepers string `json:"CIF_sleepers"` - // CIFReservations string `json:"CIF_reservations"` - // CIFConnectionIndicator string `json:"CIF_connection_indicator"` - // CIFCateringCode string `json:"CIF_catering_code"` - // CIFServiceBranding string `json:"CIF_service_branding"` - // CIFTractionClass string `json:"CIF_traction_class"` + SignallingID string `json:"signalling_id"` + ATOCCode string `json:"atoc_code"` + CIFTrainCategory string `json:"CIF_train_category"` + CIFHeadcode string `json:"CIF_headcode"` + CIFPowerType string `json:"CIF_power_type"` + CIFSpeed string `json:"CIF_speed"` ScheduleLocation []ScheduleLocation `json:"schedule_location"` } type ScheduleLocation struct { - ScheduledArrivalTime string `json:"scheduled_arrival_time"` - ScheduledDepartureTime string `json:"scheduled_departure_time"` - ScheduledPassTime string `json:"scheduled_pass_time"` - PublicArrivalTime string `json:"public_arrival_time"` - PublicDepartureTime string `json:"public_departure_time"` - CIFPlatform string `json:"CIF_platform"` - CIFLine string `json:"CIF_line"` - // CIFPath string `json:"CIF_path"` - // CIFActivity string `json:"CIF_activity"` - // CIFEngineeringAllowance string `json:"CIF_engineering_allowance"` - // CIFPathingAllowance string `json:"CIF_pathing_allowance"` - // CIFPerformanceAllowance string `json:"CIF_performance_allowance"` - Tiploc LocationTiploc `json:"location"` + ScheduledArrivalTime string `json:"scheduled_arrival_time"` + ScheduledDepartureTime string `json:"scheduled_departure_time"` + ScheduledPassTime string `json:"scheduled_pass_time"` + PublicArrivalTime string `json:"public_arrival_time"` + PublicDepartureTime string `json:"public_departure_time"` + CIFPlatform string `json:"CIF_platform"` + CIFLine string `json:"CIF_line"` + Tiploc LocationTiploc `json:"location"` } type LocationTiploc struct { Tiploc struct { TiplocId string `json:"tiploc_id"` - } + } `json:"tiploc"` }