structs.go 548 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package structs
  2. type VehicleStatus uint8
  3. const (
  4. VEHICLE_INCOMING VehicleStatus = iota
  5. VEHICLE_AT_STOP
  6. VEHICLE_IN_TRANSIT
  7. VEHICLE_DEPARTED
  8. )
  9. type ErrorResponse struct {
  10. Success bool
  11. Field string
  12. Message string
  13. }
  14. type Time struct {
  15. Hour uint
  16. Minute uint
  17. Second uint
  18. DayOffset int8
  19. Zone string
  20. }
  21. type Departure struct {
  22. Line string
  23. Headsign string
  24. Time Time
  25. Status VehicleStatus
  26. IsRealtime bool
  27. StopOrder string
  28. }
  29. type SuccessDepartures struct {
  30. Success bool
  31. Departures []Departure
  32. }