* Router implements: PACE Fueling API Fueling API */
(service interface{}, fallback http.Handler)
| 684 | Fueling API |
| 685 | */ |
| 686 | func RouterWithFallback(service interface{}, fallback http.Handler) *mux.Router { |
| 687 | router := mux.NewRouter() |
| 688 | // Subrouter s1 - Path: /fueling/beta/ |
| 689 | s1 := router.PathPrefix("/fueling/beta/").Subrouter() |
| 690 | s1.Methods("GET").Path("/gas-stations/{gasStationId}/pumps/{pumpId}/wait-for-status-change").Name("WaitOnPumpStatusChange").Handler(WaitOnPumpStatusChangeHandlerWithFallbackHelper(service, fallback)) |
| 691 | s1.Methods("GET").Path("/gas-stations/{gasStationId}/pumps/{pumpId}").Name("GetPump").Handler(GetPumpHandlerWithFallbackHelper(service, fallback)) |
| 692 | s1.Methods("POST").Path("/gas-station/{gasStationId}/payment").Name("ProcessPayment").Handler(ProcessPaymentHandlerWithFallbackHelper(service, fallback)) |
| 693 | s1.Methods("POST").Path("/gas-stations/{gasStationId}/approaching").Name("ApproachingAtTheForecourt").Handler(ApproachingAtTheForecourtHandlerWithFallbackHelper(service, fallback)) |
| 694 | // Subrouter s2 - Path: /fueling/v1/ |
| 695 | s2 := router.PathPrefix("/fueling/v1/").Subrouter() |
| 696 | s2.Methods("GET").Path("/gas-stations/{gasStationId}/pumps/{pumpId}/wait-for-status-change").Name("WaitOnPumpStatusChange").Handler(WaitOnPumpStatusChangeHandlerWithFallbackHelper(service, fallback)) |
| 697 | s2.Methods("GET").Path("/gas-stations/{gasStationId}/pumps/{pumpId}").Name("GetPump").Handler(GetPumpHandlerWithFallbackHelper(service, fallback)) |
| 698 | s2.Methods("POST").Path("/gas-station/{gasStationId}/payment").Name("ProcessPayment").Handler(ProcessPaymentHandlerWithFallbackHelper(service, fallback)) |
| 699 | s2.Methods("POST").Path("/gas-stations/{gasStationId}/approaching").Name("ApproachingAtTheForecourt").Handler(ApproachingAtTheForecourtHandlerWithFallbackHelper(service, fallback)) |
| 700 | return router |
| 701 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…