Documentation
¶
Index ¶
- Constants
- type Entity
- type Line
- type LineArrDto
- type LineDto
- type LineDto02
- type LineOasa
- type OasaError
- type Point
- type Route
- type Route01
- type Route01Oasa
- type Route02
- type RouteDto
- type RouteOasa
- type Schedule
- type Schedule01
- type Schedule01Dto
- type ScheduleOasa
- type Sequence
- type Stop
- type StopDto
- type StopOasa
- type UVersions
- type UVersionsOasa
Constants ¶
const ( INTERNALL_SERVER_ERROR = "INTERNAL SERVER ERROR" BAD_SYNTAX = "REQUEST CONTAINS BAD SYNTAX OR CANNOT BE FULLFILLED" )
const ( UVERSIONS_LINE = "LINES" UVERSIONS_ROUTE = "ROUTES" UVERSIONS_STOP = "STOPS" UVERSIONS_ROUTESTOPS = "ROUTE STOPS" UVERSIONS_SCHED_CATS = "SCHED_CATS" SCHED_ENTRIES = "SCHED_ENTRIES" )
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:"mld_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 { 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 []Schedule `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 Route01 ¶ added in v0.2.1
type Route01 struct { Id int64 `json:"id" gorm:"primaryKey"` Route_code int32 `json:"route_code" gorm:"index:route01_code_un,unique"` Routed_x float32 `json:"routed_x"` Routed_y float32 `json:"routed_y"` Routed_order int16 `json:"routed_order" gorm:"index:route01_code_un,unique"` }
********* Struct for Route Details Entities **************
type Route01Oasa ¶ added in v0.2.1
type Route01Oasa struct { Routed_x float32 `oasa:"routed_x"` Routed_y float32 `oasa:"routed_y"` Routed_order int16 `oasa:"routed_order"` }
********* Struct for Route Details OASA **************
type Route02 ¶ added in v0.2.1
type Route02 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 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 []Route01 `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 Schedule ¶ added in v0.2.1
type Schedule struct { Id int64 `json:"id"` Sdc_Descr string `json:"sdc_descr"` Sdc_Descr_Eng string `json:"sdc_descr_eng"` Sdc_Code int32 `json:"sdc_code"` Line_Code int64 `json:"line_code"` Go []Schedule01 `oasa:"go"` Come []Schedule01 `oasa:"come"` }
type Schedule01 ¶ added in v0.2.1
type Schedule01Dto ¶ added in v0.2.1
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 Stop ¶ added in v0.1.0
type Stop struct { Id int64 `json:"Id" gorm:"primaryKey"` Stop_code int32 `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"` Stop_type int8 `json:"stop_type" oasa:"StopType"` Stop_amea int8 `json:"stop_amea" oasa:"StopAmea"` Destinations string `json:"destinations"` Destinations_Eng string `json:"destinations_eng"` }
type StopOasa ¶ added in v0.1.0
type StopOasa struct { Stop_code int32 `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"` }