// RegisterTripServiceHandlerClient registers the http handlers for service TripService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TripServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TripServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "TripServiceClient" to call the correct interceptors.
RegisterTripServiceHandlerClient registers the http handlers for service TripService
to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TripServiceClient".
Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TripServiceClient"
doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
"TripServiceClient" to call the correct interceptors.
// RegisterTripServiceHandlerClient registers the http handlers for service TripService // to " mux " . The handlers forward requests to the grpc endpoint over the given implementation of " TripServiceClient " . // Note : the gRPC framework executes interceptors within the gRPC handler . If the passed in " TripServiceClient " // doesn ' t go through the normal gRPC flow ( creating a gRPC client etc . ) then it will be up to the passed in // " TripServiceClient " to call the correct interceptors .
func RegisterTripServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TripServiceClient) error {
	mux.Handle("POST", pattern_TripService_CreateTrip_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rental.v1.TripService/CreateTrip", runtime.WithHTTPPathPattern("/v1/trip"))
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_TripService_CreateTrip_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		forward_TripService_CreateTrip_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
	})
	mux.Handle("GET", pattern_TripService_GetTrip_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rental.v1.TripService/GetTrip", runtime.WithHTTPPathPattern("/v1/trip/{id}"))
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_TripService_GetTrip_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		forward_TripService_GetTrip_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
	})
	mux.Handle("GET", pattern_TripService_GetTrips_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rental.v1.TripService/GetTrips", runtime.WithHTTPPathPattern("/v1/trips"))
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_TripService_GetTrips_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		forward_TripService_GetTrips_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
	})
	mux.Handle("PUT", pattern_TripService_UpdateTrip_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rental.v1.TripService/UpdateTrip", runtime.WithHTTPPathPattern("/v1/trip/{id}"))
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_TripService_UpdateTrip_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		forward_TripService_UpdateTrip_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
	})
	return nil
}
func RegisterTripServiceHandlerClient ( ctx context . Context , mux * runtime . ServeMux , client TripServiceClient ) error { mux . Handle ( " " , pattern_TripService_CreateTrip_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) { ctx , cancel := context . WithCancel ( req . Context ( ) ) defer cancel ( ) inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req ) rctx , err := runtime . AnnotateContext ( ctx , mux , req , " " , runtime . WithHTTPPathPattern ( " " ) ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } resp , md , err := request_TripService_CreateTrip_0 ( rctx , inboundMarshaler , client , req , pathParams ) ctx = runtime . NewServerMetadataContext ( ctx , md ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } forward_TripService_CreateTrip_0 ( ctx , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... ) } ) mux . Handle ( " " , pattern_TripService_GetTrip_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) { ctx , cancel := context . WithCancel ( req . Context ( ) ) defer cancel ( ) inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req ) rctx , err := runtime . AnnotateContext ( ctx , mux , req , " " , runtime . WithHTTPPathPattern ( " " ) ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } resp , md , err := request_TripService_GetTrip_0 ( rctx , inboundMarshaler , client , req , pathParams ) ctx = runtime . NewServerMetadataContext ( ctx , md ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } forward_TripService_GetTrip_0 ( ctx , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... ) } ) mux . Handle ( " " , pattern_TripService_GetTrips_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) { ctx , cancel := context . WithCancel ( req . Context ( ) ) defer cancel ( ) inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req ) rctx , err := runtime . AnnotateContext ( ctx , mux , req , " " , runtime . WithHTTPPathPattern ( " " ) ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } resp , md , err := request_TripService_GetTrips_0 ( rctx , inboundMarshaler , client , req , pathParams ) ctx = runtime . NewServerMetadataContext ( ctx , md ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } forward_TripService_GetTrips_0 ( ctx , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... ) } ) mux . Handle ( " " , pattern_TripService_UpdateTrip_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) { ctx , cancel := context . WithCancel ( req . Context ( ) ) defer cancel ( ) inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req ) rctx , err := runtime . AnnotateContext ( ctx , mux , req , " " , runtime . WithHTTPPathPattern ( " " ) ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } resp , md , err := request_TripService_UpdateTrip_0 ( rctx , inboundMarshaler , client , req , pathParams ) ctx = runtime . NewServerMetadataContext ( ctx , md ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } forward_TripService_UpdateTrip_0 ( ctx , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... ) } ) return nil }
RegisterTripServiceHandlerClient registers the http handlers for service TripService
to "mux".
RegisterTripServiceHandlerClient registers the http handlers for service TripService to " mux " .