Documentation ¶
Index ¶
- Constants
- type Line
- type LineArrDto
- type LineDto
- type LineDto02
- type LineOasa
- type OasaError
- type Point
- type Route
- type RouteDetail
- type RouteDto
- type RouteOasa
- type RouteStops
- type ScheduleMaster
- type ScheduleMasterDto
- type ScheduleOasa
- type ScheduleTime
- type ScheduleTimeDto
- type ScheduleTimes
- type Sequence
- type Stop
- type StopDto
- type StopOasa
Constants ¶
const ( INTERNALL_SERVER_ERROR = "INTERNAL SERVER ERROR" BAD_SYNTAX = "REQUEST CONTAINS BAD SYNTAX OR CANNOT BE FULLFILLED" )
const BUSLINE_SEQ = "BUSLINE_SEQ"
const BUSROUTE_SEQ = "BUSROUTE_SEQ"
const BUSSCHEDULEMASTERLINE = "BUSSCHEDULEMASTERLINE"
const BUSSTOP_SEQ = "BUSSTOP"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Line ¶ added in v0.1.0
type Line struct { Id int64 `json:"id" gorm:"primaryKey"` Ml_Code int16 `json:"ml_code"` Sdc_Code int16 `json:"sdc_code"` Line_Code int32 `json:"line_code" gorm:"index:LINE_CODE,unique"` Line_Id string `json:"line_id"` Line_Descr string `json:"line_descr"` Line_Descr_Eng string `json:"line_descr_eng"` Mld_master int8 `json:"is_master"` }
****************************************** Struct for Bus Lines Entities for database ******************************************
type LineArrDto ¶ added in v0.1.2
type LineArrDto []LineDto
func (LineArrDto) SortWithId ¶ added in v0.1.2
func (t LineArrDto) SortWithId()
type LineDto ¶
type LineDto struct { Id int64 `json:"id"` Ml_Code int64 `json:"ml_code"` Sdc_Code int64 `json:"sdc_code"` Line_Code int32 `json:"line_code"` Line_Id string `json:"line_id"` Line_Descr string `json:"line_descr"` Line_Descr_Eng string `json:"line_descr_eng"` Routes []RouteDto `json:"routes"` Schedules []ScheduleMasterDto `json:"scheduleDay"` }
*************************************************
This struct is for different reasons
*************************************************
type LineOasa ¶ added in v0.1.0
type LineOasa struct { Ml_Code int16 `json:"masterCode" oasa:"ml_code"` Sdc_Code int16 `json:"scheduleCode" oasa:"sdc_code"` Line_Code int32 `json:"lineCode" oasa:"line_code" gorm:"index:LINE_CODE,unique"` Line_Id string `json:"lineId" oasa:"line_id"` Line_Descr string `json:"lineDescr" oasa:"line_descr"` Line_Descr_Eng string `json:"lineDescrEng" oasa:"line_descr_eng"` Mld_master int8 `json:"mld_master" oasa:"mld_master"` }
*************************************************** This struct is to get data from OASA Application ***************************************************
type Route ¶ added in v0.1.0
type Route struct { Id int64 `json:"Id" gorm:"PrimaryKey"` Route_Code int32 `json:"route_code" gorm:"index:ROUTE_CODE_UN,unique" oasa:"RouteCode"` Line_Code int32 `json:"line_code" gorm:"index:LINE_CODE_INDX" oasa:"LineCode"` Route_Descr string `json:"route_descr" oasa:"RouteDescr"` Route_Descr_eng string `json:"route_descr_eng" oasa:"RouteDescrEng"` Route_Type int8 `json:"route_type" oasa:"RouteType"` Route_Distance float32 `json:"route_distance" oasa:"RouteDistance"` }
****************************************** Struct for Bus Lines Entities for database ******************************************
type RouteDetail ¶ added in v0.1.0
type RouteDetail struct { Routed_x float32 `json:"routeLati" oasa:"routed_x"` Routed_y float32 `json:"routeLong" oasa:"routed_y"` Routed_order int16 `json:"routeOrder" oasa:"routed_order"` }
********* Struct for Route Details Entities **************
type RouteDto ¶ added in v0.1.0
type RouteDto struct { Id int64 `json:"Id"` Route_Code int32 `json:"route_code"` // Line_Code int32 `json:"line_code"` Route_Descr string `json:"route_descr"` Route_Descr_Eng string `json:"route_descr_eng"` Route_Type int8 `json:"route_type"` Route_Distance float32 `json:"route_distance"` Stops []Stop `json:"stops"` RouteDetails []RouteDetail `json:"routeDetails"` }
type RouteOasa ¶ added in v0.1.0
type RouteOasa struct { Route_Code int32 `json:"routeCode" oasa:"RouteCode"` Line_Code int32 `json:"lineCode" oasa:"LineCode"` Route_Descr string `json:"routeDescr" oasa:"RouteDescr"` Route_Descr_Eng string `json:"routeDescrEng" oasa:"RouteDescrEng"` Route_Type int8 `json:"routeType" oasa:"RouteType"` Route_Distance float32 `json:"routeDistance" oasa:"RouteDistance"` }
*************************************************** This struct is to get data from OASA Application ***************************************************
type RouteStops ¶ added in v0.1.0
type RouteStops struct { Route_code int32 `json:"routeCode" gorm:"primaryKey"` Stop_code int64 `json:"stopCode" gorm:"primaryKey"` Senu int16 `json:"senu" gorm:"primaryKey"` }
****************************************** Struct for Bus Lines Entities for database ******************************************
type ScheduleMaster ¶ added in v0.1.0
type ScheduleMasterDto ¶ added in v0.1.0
type ScheduleMasterDto struct { Sdc_Descr string `json:"sdc_descr" oasa:"sdc_descr"` Sdc_Descr_Eng string `json:"sdc_descr_eng" oasa:"sdc_descr_eng"` Sdc_Code int32 `json:"sdc_code" oasa:"sdc_code"` ShcedeLine ScheduleTimes `json:"scheduleLine"` }
type ScheduleOasa ¶ added in v0.1.0
type ScheduleOasa struct { Sdc_Descr string `json:"scheduleDescr" oasa:"sdc_descr"` Sdc_Descr_Eng string `json:"scheduleDescrEng" oasa:"sdc_descr_eng"` Sdc_Code int32 `json:"scheduleCode" oasa:"sdc_code"` }
*************************************************** This struct is to get data from OASA Application
type ScheduleTime ¶ added in v0.1.0
type ScheduleTimeDto ¶ added in v0.1.0
type ScheduleTimes ¶ added in v0.1.0
type ScheduleTimes struct { Go []ScheduleTimeDto `oasa:"go"` Come []ScheduleTimeDto `oasa:"come"` }
type Stop ¶ added in v0.1.0
type Stop struct { Id int64 `json:"Id" gorm:"primaryKey"` Stop_code int64 `json:"Stop_code" gorm:"index:STOP_CODE_UN,unique" oasa:"StopCode"` Stop_id string `json:"stop_id" oasa:"StopID"` Stop_descr string `json:"stop_descr" oasa:"StopDescr"` Stop_descr_eng string `json:"stop_descr_eng" oasa:"StopDescrEng"` Stop_street string `json:"stop_street" oasa:"StopStreet"` Stop_street_eng string `json:"stop_street_eng" oasa:"StopStreetEng"` Stop_heading int32 `json:"stop_heading" oasa:"StopHeading"` Stop_lat float64 `json:"stop_lat" oasa:"StopLat"` Stop_lng float64 `json:"stop_lng" oasa:"StopLng"` //Senu int16 `json:"stopOrder" oasa:"RouteStopOrder"` Stop_type int8 `json:"stop_type" oasa:"StopType"` Stop_amea int8 `json:"stop_amea" oasa:"StopAmea"` }
type StopOasa ¶ added in v0.1.0
type StopOasa struct { Stop_code int64 `json:"StopCode" oasa:"StopCode"` Stop_id string `json:"stopId" oasa:"StopID"` Stop_descr string `json:"stopDescr" oasa:"StopDescr"` Stop_descr_eng string `json:"stopDescrEng" oasa:"StopDescrEng"` Stop_street string `json:"stopStreet" oasa:"StopStreet"` Stop_street_eng string `json:"stopStreetEng" oasa:"StopStreetEng"` Stop_heading int32 `json:"stopHeading" oasa:"StopHeading"` Stop_lat float64 `json:"stopLat" oasa:"StopLat"` Stop_lng float64 `json:"stopLng" oasa:"StopLng"` Senu int16 `json:"stopOrder" oasa:"RouteStopOrder"` Stop_type int8 `json:"stopType" oasa:"StopType"` Stop_amea int8 `json:"stopAmea" oasa:"StopAmea"` }