From 1085e35a688eb361f6434d69a664f85497fe3bce Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Thu, 20 Jul 2023 20:47:30 +0100 Subject: [PATCH] Removed unused fields from CIF struct types --- pkg/upstreamApi/vstp.go | 98 +++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/pkg/upstreamApi/vstp.go b/pkg/upstreamApi/vstp.go index 7e11545..ebed3b9 100644 --- a/pkg/upstreamApi/vstp.go +++ b/pkg/upstreamApi/vstp.go @@ -5,58 +5,60 @@ 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"` + // 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"` } 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"` - ScheduleLocation []ScheduleLocation `json:"schedule_location"` + 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"` + 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"` - Location struct { - Tiploc struct { - TiplocID string `json:"tiploc_id"` - } `json:"location"` - } `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"` + // 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"` +} + +type LocationTiploc struct { + Tiploc struct { + TiplocId string `json:"tiploc_id"` + } }