369 lines
16 KiB
Go
369 lines
16 KiB
Go
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||
|
// versions:
|
||
|
// - protoc-gen-go-grpc v1.3.0
|
||
|
// - protoc v3.12.4
|
||
|
// source: solidarity-api.proto
|
||
|
|
||
|
package proto
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
grpc "google.golang.org/grpc"
|
||
|
codes "google.golang.org/grpc/codes"
|
||
|
status "google.golang.org/grpc/status"
|
||
|
)
|
||
|
|
||
|
// This is a compile-time assertion to ensure that this generated file
|
||
|
// is compatible with the grpc package it is being compiled against.
|
||
|
// Requires gRPC-Go v1.32.0 or later.
|
||
|
const _ = grpc.SupportPackageIsVersion7
|
||
|
|
||
|
const (
|
||
|
SolidarityService_SetDriverRegularAvailabilities_FullMethodName = "/SolidarityService/SetDriverRegularAvailabilities"
|
||
|
SolidarityService_SetDriverPunctualAvailabilities_FullMethodName = "/SolidarityService/SetDriverPunctualAvailabilities"
|
||
|
SolidarityService_CreateBooking_FullMethodName = "/SolidarityService/CreateBooking"
|
||
|
SolidarityService_UpdateBooking_FullMethodName = "/SolidarityService/UpdateBooking"
|
||
|
SolidarityService_GetBooking_FullMethodName = "/SolidarityService/GetBooking"
|
||
|
SolidarityService_GetBookingsByStatus_FullMethodName = "/SolidarityService/GetBookingsByStatus"
|
||
|
SolidarityService_DriverJourneys_FullMethodName = "/SolidarityService/DriverJourneys"
|
||
|
SolidarityService_SetPassengerTrip_FullMethodName = "/SolidarityService/SetPassengerTrip"
|
||
|
)
|
||
|
|
||
|
// SolidarityServiceClient is the client API for SolidarityService service.
|
||
|
//
|
||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||
|
type SolidarityServiceClient interface {
|
||
|
SetDriverRegularAvailabilities(ctx context.Context, in *DriverRegularAvailabilities, opts ...grpc.CallOption) (*DriverAvailabilitiesResponse, error)
|
||
|
SetDriverPunctualAvailabilities(ctx context.Context, in *DriverPunctualAvailabilities, opts ...grpc.CallOption) (*DriverAvailabilitiesResponse, error)
|
||
|
CreateBooking(ctx context.Context, in *CreateBookingRequest, opts ...grpc.CallOption) (*CreateBookingResponse, error)
|
||
|
UpdateBooking(ctx context.Context, in *UpdateBookingRequest, opts ...grpc.CallOption) (*UpdateBookingResponse, error)
|
||
|
GetBooking(ctx context.Context, in *GetBookingRequest, opts ...grpc.CallOption) (*GetBookingResponse, error)
|
||
|
GetBookingsByStatus(ctx context.Context, in *GetBookingsByStatusRequest, opts ...grpc.CallOption) (*GetBookingsByStatusResponse, error)
|
||
|
DriverJourneys(ctx context.Context, in *DriverJourneysRequest, opts ...grpc.CallOption) (*DriverJourneysResponse, error)
|
||
|
SetPassengerTrip(ctx context.Context, in *PassengerTripRequest, opts ...grpc.CallOption) (*PassengerTripResponse, error)
|
||
|
}
|
||
|
|
||
|
type solidarityServiceClient struct {
|
||
|
cc grpc.ClientConnInterface
|
||
|
}
|
||
|
|
||
|
func NewSolidarityServiceClient(cc grpc.ClientConnInterface) SolidarityServiceClient {
|
||
|
return &solidarityServiceClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *solidarityServiceClient) SetDriverRegularAvailabilities(ctx context.Context, in *DriverRegularAvailabilities, opts ...grpc.CallOption) (*DriverAvailabilitiesResponse, error) {
|
||
|
out := new(DriverAvailabilitiesResponse)
|
||
|
err := c.cc.Invoke(ctx, SolidarityService_SetDriverRegularAvailabilities_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *solidarityServiceClient) SetDriverPunctualAvailabilities(ctx context.Context, in *DriverPunctualAvailabilities, opts ...grpc.CallOption) (*DriverAvailabilitiesResponse, error) {
|
||
|
out := new(DriverAvailabilitiesResponse)
|
||
|
err := c.cc.Invoke(ctx, SolidarityService_SetDriverPunctualAvailabilities_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *solidarityServiceClient) CreateBooking(ctx context.Context, in *CreateBookingRequest, opts ...grpc.CallOption) (*CreateBookingResponse, error) {
|
||
|
out := new(CreateBookingResponse)
|
||
|
err := c.cc.Invoke(ctx, SolidarityService_CreateBooking_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *solidarityServiceClient) UpdateBooking(ctx context.Context, in *UpdateBookingRequest, opts ...grpc.CallOption) (*UpdateBookingResponse, error) {
|
||
|
out := new(UpdateBookingResponse)
|
||
|
err := c.cc.Invoke(ctx, SolidarityService_UpdateBooking_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *solidarityServiceClient) GetBooking(ctx context.Context, in *GetBookingRequest, opts ...grpc.CallOption) (*GetBookingResponse, error) {
|
||
|
out := new(GetBookingResponse)
|
||
|
err := c.cc.Invoke(ctx, SolidarityService_GetBooking_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *solidarityServiceClient) GetBookingsByStatus(ctx context.Context, in *GetBookingsByStatusRequest, opts ...grpc.CallOption) (*GetBookingsByStatusResponse, error) {
|
||
|
out := new(GetBookingsByStatusResponse)
|
||
|
err := c.cc.Invoke(ctx, SolidarityService_GetBookingsByStatus_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *solidarityServiceClient) DriverJourneys(ctx context.Context, in *DriverJourneysRequest, opts ...grpc.CallOption) (*DriverJourneysResponse, error) {
|
||
|
out := new(DriverJourneysResponse)
|
||
|
err := c.cc.Invoke(ctx, SolidarityService_DriverJourneys_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *solidarityServiceClient) SetPassengerTrip(ctx context.Context, in *PassengerTripRequest, opts ...grpc.CallOption) (*PassengerTripResponse, error) {
|
||
|
out := new(PassengerTripResponse)
|
||
|
err := c.cc.Invoke(ctx, SolidarityService_SetPassengerTrip_FullMethodName, in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// SolidarityServiceServer is the server API for SolidarityService service.
|
||
|
// All implementations must embed UnimplementedSolidarityServiceServer
|
||
|
// for forward compatibility
|
||
|
type SolidarityServiceServer interface {
|
||
|
SetDriverRegularAvailabilities(context.Context, *DriverRegularAvailabilities) (*DriverAvailabilitiesResponse, error)
|
||
|
SetDriverPunctualAvailabilities(context.Context, *DriverPunctualAvailabilities) (*DriverAvailabilitiesResponse, error)
|
||
|
CreateBooking(context.Context, *CreateBookingRequest) (*CreateBookingResponse, error)
|
||
|
UpdateBooking(context.Context, *UpdateBookingRequest) (*UpdateBookingResponse, error)
|
||
|
GetBooking(context.Context, *GetBookingRequest) (*GetBookingResponse, error)
|
||
|
GetBookingsByStatus(context.Context, *GetBookingsByStatusRequest) (*GetBookingsByStatusResponse, error)
|
||
|
DriverJourneys(context.Context, *DriverJourneysRequest) (*DriverJourneysResponse, error)
|
||
|
SetPassengerTrip(context.Context, *PassengerTripRequest) (*PassengerTripResponse, error)
|
||
|
mustEmbedUnimplementedSolidarityServiceServer()
|
||
|
}
|
||
|
|
||
|
// UnimplementedSolidarityServiceServer must be embedded to have forward compatible implementations.
|
||
|
type UnimplementedSolidarityServiceServer struct {
|
||
|
}
|
||
|
|
||
|
func (UnimplementedSolidarityServiceServer) SetDriverRegularAvailabilities(context.Context, *DriverRegularAvailabilities) (*DriverAvailabilitiesResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method SetDriverRegularAvailabilities not implemented")
|
||
|
}
|
||
|
func (UnimplementedSolidarityServiceServer) SetDriverPunctualAvailabilities(context.Context, *DriverPunctualAvailabilities) (*DriverAvailabilitiesResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method SetDriverPunctualAvailabilities not implemented")
|
||
|
}
|
||
|
func (UnimplementedSolidarityServiceServer) CreateBooking(context.Context, *CreateBookingRequest) (*CreateBookingResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method CreateBooking not implemented")
|
||
|
}
|
||
|
func (UnimplementedSolidarityServiceServer) UpdateBooking(context.Context, *UpdateBookingRequest) (*UpdateBookingResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateBooking not implemented")
|
||
|
}
|
||
|
func (UnimplementedSolidarityServiceServer) GetBooking(context.Context, *GetBookingRequest) (*GetBookingResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetBooking not implemented")
|
||
|
}
|
||
|
func (UnimplementedSolidarityServiceServer) GetBookingsByStatus(context.Context, *GetBookingsByStatusRequest) (*GetBookingsByStatusResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetBookingsByStatus not implemented")
|
||
|
}
|
||
|
func (UnimplementedSolidarityServiceServer) DriverJourneys(context.Context, *DriverJourneysRequest) (*DriverJourneysResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method DriverJourneys not implemented")
|
||
|
}
|
||
|
func (UnimplementedSolidarityServiceServer) SetPassengerTrip(context.Context, *PassengerTripRequest) (*PassengerTripResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method SetPassengerTrip not implemented")
|
||
|
}
|
||
|
func (UnimplementedSolidarityServiceServer) mustEmbedUnimplementedSolidarityServiceServer() {}
|
||
|
|
||
|
// UnsafeSolidarityServiceServer may be embedded to opt out of forward compatibility for this service.
|
||
|
// Use of this interface is not recommended, as added methods to SolidarityServiceServer will
|
||
|
// result in compilation errors.
|
||
|
type UnsafeSolidarityServiceServer interface {
|
||
|
mustEmbedUnimplementedSolidarityServiceServer()
|
||
|
}
|
||
|
|
||
|
func RegisterSolidarityServiceServer(s grpc.ServiceRegistrar, srv SolidarityServiceServer) {
|
||
|
s.RegisterService(&SolidarityService_ServiceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _SolidarityService_SetDriverRegularAvailabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(DriverRegularAvailabilities)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(SolidarityServiceServer).SetDriverRegularAvailabilities(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: SolidarityService_SetDriverRegularAvailabilities_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(SolidarityServiceServer).SetDriverRegularAvailabilities(ctx, req.(*DriverRegularAvailabilities))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _SolidarityService_SetDriverPunctualAvailabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(DriverPunctualAvailabilities)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(SolidarityServiceServer).SetDriverPunctualAvailabilities(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: SolidarityService_SetDriverPunctualAvailabilities_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(SolidarityServiceServer).SetDriverPunctualAvailabilities(ctx, req.(*DriverPunctualAvailabilities))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _SolidarityService_CreateBooking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(CreateBookingRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(SolidarityServiceServer).CreateBooking(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: SolidarityService_CreateBooking_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(SolidarityServiceServer).CreateBooking(ctx, req.(*CreateBookingRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _SolidarityService_UpdateBooking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(UpdateBookingRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(SolidarityServiceServer).UpdateBooking(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: SolidarityService_UpdateBooking_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(SolidarityServiceServer).UpdateBooking(ctx, req.(*UpdateBookingRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _SolidarityService_GetBooking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(GetBookingRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(SolidarityServiceServer).GetBooking(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: SolidarityService_GetBooking_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(SolidarityServiceServer).GetBooking(ctx, req.(*GetBookingRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _SolidarityService_GetBookingsByStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(GetBookingsByStatusRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(SolidarityServiceServer).GetBookingsByStatus(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: SolidarityService_GetBookingsByStatus_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(SolidarityServiceServer).GetBookingsByStatus(ctx, req.(*GetBookingsByStatusRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _SolidarityService_DriverJourneys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(DriverJourneysRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(SolidarityServiceServer).DriverJourneys(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: SolidarityService_DriverJourneys_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(SolidarityServiceServer).DriverJourneys(ctx, req.(*DriverJourneysRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _SolidarityService_SetPassengerTrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(PassengerTripRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(SolidarityServiceServer).SetPassengerTrip(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: SolidarityService_SetPassengerTrip_FullMethodName,
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(SolidarityServiceServer).SetPassengerTrip(ctx, req.(*PassengerTripRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
// SolidarityService_ServiceDesc is the grpc.ServiceDesc for SolidarityService service.
|
||
|
// It's only intended for direct use with grpc.RegisterService,
|
||
|
// and not to be introspected or modified (even as a copy)
|
||
|
var SolidarityService_ServiceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "SolidarityService",
|
||
|
HandlerType: (*SolidarityServiceServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "SetDriverRegularAvailabilities",
|
||
|
Handler: _SolidarityService_SetDriverRegularAvailabilities_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "SetDriverPunctualAvailabilities",
|
||
|
Handler: _SolidarityService_SetDriverPunctualAvailabilities_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "CreateBooking",
|
||
|
Handler: _SolidarityService_CreateBooking_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "UpdateBooking",
|
||
|
Handler: _SolidarityService_UpdateBooking_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetBooking",
|
||
|
Handler: _SolidarityService_GetBooking_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetBookingsByStatus",
|
||
|
Handler: _SolidarityService_GetBookingsByStatus_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "DriverJourneys",
|
||
|
Handler: _SolidarityService_DriverJourneys_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "SetPassengerTrip",
|
||
|
Handler: _SolidarityService_SetPassengerTrip_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: "solidarity-api.proto",
|
||
|
}
|