Documentation ¶
Overview ¶
Package apioneshot defines oneshot functions which allows you to run particular Mobroute commands in single 'oneshot' function call rather then manually setting up a MobrouteRuntime (via RuntimeInitialize).
The functions defined in this package are helpful in simple usecases where not reusing the database is necessary.
Index ¶
- func OneshotDatabase(r *OneshotDatabaseRequest) (*apirtdatabase.DatabaseResponse, error)
- func OneshotDatabaseq(r *OneshotDatabaseqRequest) (*apirtdatabaseq.DatabaseqResponse, error)
- func OneshotRoute(r *OneshotRouteRequest) (*apirtroute.RouteResponse, error)
- func OneshotSchedule(r *OneshotScheduleRequest) (*apirtschedule.ScheduleResponse, error)
- func OneshotStops(r *OneshotStopsRequest) (*apirtstops.StopsResponse, error)
- type OneshotDatabaseRequest
- type OneshotDatabaseqRequest
- type OneshotRouteRequest
- type OneshotScheduleRequest
- type OneshotStopsRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OneshotDatabase ¶ added in v0.7.0
func OneshotDatabase(r *OneshotDatabaseRequest) (*apirtdatabase.DatabaseResponse, error)
func OneshotDatabaseq ¶ added in v0.7.0
func OneshotDatabaseq(r *OneshotDatabaseqRequest) (*apirtdatabaseq.DatabaseqResponse, error)
func OneshotRoute ¶
func OneshotRoute(r *OneshotRouteRequest) (*apirtroute.RouteResponse, error)
OneshotRoute performs routing in a one-shot / single function fashion. All parameters for the entire request are passed in the OneShotRouteRequest.
func OneshotSchedule ¶ added in v0.7.0
func OneshotSchedule(r *OneshotScheduleRequest) (*apirtschedule.ScheduleResponse, error)
OneshotSchedule performs stops query in a one-shot / single function fashion. All parameters for the entire request are passed in the OneShotScheduleRequest.
func OneshotStops ¶ added in v0.7.0
func OneshotStops(r *OneshotStopsRequest) (*apirtstops.StopsResponse, error)
OneshotStops performs stops query in a one-shot / single function fashion. All parameters for the entire request are passed in the OneShotStopsRequest.
Types ¶
type OneshotDatabaseRequest ¶ added in v0.7.0
type OneshotDatabaseRequest struct { MobrouteRuntimeConfig *apirtinit.MobrouteRuntimeConfig `json:"mobroute_runtime_config"` DatabaseParams *apirtdatabase.DatabaseParams `json:"database_params" validate:"required"` }
OneshotMobsqlRequest groups both the MobrouteRuntimeConfig and MobsqlParams for the mobsql request
type OneshotDatabaseqRequest ¶ added in v0.7.0
type OneshotDatabaseqRequest struct { MobrouteRuntimeConfig *apirtinit.MobrouteRuntimeConfig `json:"mobroute_runtime_config"` DatabaseqParams *apirtdatabaseq.DatabaseqParams `json:"databaseq_params" validate:"required"` }
OneshotDatabaseqRequest groups both the MobrouteRuntimeConfig and DatabaseqParams
type OneshotRouteRequest ¶
type OneshotRouteRequest struct { MobrouteRuntimeConfig *apirtinit.MobrouteRuntimeConfig `json:"mobroute_runtime_config"` RouteParams *apirtroute.RouteParams `json:"route_params" validate:"required"` }
OneShotRouteRequest groups both the MobrouteRuntimeConfig and RouteParams
type OneshotScheduleRequest ¶ added in v0.7.0
type OneshotScheduleRequest struct { MobrouteRuntimeConfig *apirtinit.MobrouteRuntimeConfig `json:"mobroute_runtime_config"` ScheduleParams *apirtschedule.ScheduleParams `json:"schedule_params" validate:"required"` }
OneShotScheduleRequest groups both the MobrouteRuntimeConfig and StoptimesParams
type OneshotStopsRequest ¶ added in v0.7.0
type OneshotStopsRequest struct { MobrouteRuntimeConfig *apirtinit.MobrouteRuntimeConfig `json:"mobroute_runtime_config"` StopsParams *apirtstops.StopsParams `json:"stops_params" validate:"required"` }
OneShotStopsRequest groups both the MobrouteRuntimeConfig and StopsParams