fleets/grpcapi/fleets_grpc.pb.go

472 lines
17 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// source: fleets.proto
package grpcapi
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
// FleetsClient is the client API for Fleets 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 FleetsClient interface {
// Vehicles management
AddVehicle(ctx context.Context, in *AddVehicleRequest, opts ...grpc.CallOption) (*AddVehicleResponse, error)
GetVehicle(ctx context.Context, in *GetVehicleRequest, opts ...grpc.CallOption) (*GetVehicleResponse, error)
GetVehicles(ctx context.Context, in *GetVehiclesRequest, opts ...grpc.CallOption) (*GetVehiclesResponse, error)
UpdateVehicle(ctx context.Context, in *UpdateVehicleRequest, opts ...grpc.CallOption) (*UpdateVehicleResponse, error)
//Bookings
CreateBooking(ctx context.Context, in *CreateBookingRequest, opts ...grpc.CallOption) (*CreateBookingResponse, error)
GetBooking(ctx context.Context, in *GetBookingRequest, opts ...grpc.CallOption) (*GetBookingResponse, error)
GetBookings(ctx context.Context, in *GetBookingsRequest, opts ...grpc.CallOption) (*GetBookingsResponse, error)
GetDriverBookings(ctx context.Context, in *GetDriverBookingsRequest, opts ...grpc.CallOption) (*GetDriverBookingsResponse, error)
UpdateBooking(ctx context.Context, in *UpdateBookingRequest, opts ...grpc.CallOption) (*UpdateBookingResponse, error)
DeleteBooking(ctx context.Context, in *DeleteBookingRequest, opts ...grpc.CallOption) (*DeleteBookingResponse, error)
//Search / Availabilities
FindVehicle(ctx context.Context, in *FindVehicleRequest, opts ...grpc.CallOption) (*FindVehicleResponse, error)
}
type fleetsClient struct {
cc grpc.ClientConnInterface
}
func NewFleetsClient(cc grpc.ClientConnInterface) FleetsClient {
return &fleetsClient{cc}
}
func (c *fleetsClient) AddVehicle(ctx context.Context, in *AddVehicleRequest, opts ...grpc.CallOption) (*AddVehicleResponse, error) {
out := new(AddVehicleResponse)
err := c.cc.Invoke(ctx, "/Fleets/AddVehicle", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fleetsClient) GetVehicle(ctx context.Context, in *GetVehicleRequest, opts ...grpc.CallOption) (*GetVehicleResponse, error) {
out := new(GetVehicleResponse)
err := c.cc.Invoke(ctx, "/Fleets/GetVehicle", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fleetsClient) GetVehicles(ctx context.Context, in *GetVehiclesRequest, opts ...grpc.CallOption) (*GetVehiclesResponse, error) {
out := new(GetVehiclesResponse)
err := c.cc.Invoke(ctx, "/Fleets/GetVehicles", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fleetsClient) UpdateVehicle(ctx context.Context, in *UpdateVehicleRequest, opts ...grpc.CallOption) (*UpdateVehicleResponse, error) {
out := new(UpdateVehicleResponse)
err := c.cc.Invoke(ctx, "/Fleets/UpdateVehicle", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fleetsClient) CreateBooking(ctx context.Context, in *CreateBookingRequest, opts ...grpc.CallOption) (*CreateBookingResponse, error) {
out := new(CreateBookingResponse)
err := c.cc.Invoke(ctx, "/Fleets/CreateBooking", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fleetsClient) GetBooking(ctx context.Context, in *GetBookingRequest, opts ...grpc.CallOption) (*GetBookingResponse, error) {
out := new(GetBookingResponse)
err := c.cc.Invoke(ctx, "/Fleets/GetBooking", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fleetsClient) GetBookings(ctx context.Context, in *GetBookingsRequest, opts ...grpc.CallOption) (*GetBookingsResponse, error) {
out := new(GetBookingsResponse)
err := c.cc.Invoke(ctx, "/Fleets/GetBookings", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fleetsClient) GetDriverBookings(ctx context.Context, in *GetDriverBookingsRequest, opts ...grpc.CallOption) (*GetDriverBookingsResponse, error) {
out := new(GetDriverBookingsResponse)
err := c.cc.Invoke(ctx, "/Fleets/GetDriverBookings", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fleetsClient) UpdateBooking(ctx context.Context, in *UpdateBookingRequest, opts ...grpc.CallOption) (*UpdateBookingResponse, error) {
out := new(UpdateBookingResponse)
err := c.cc.Invoke(ctx, "/Fleets/UpdateBooking", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fleetsClient) DeleteBooking(ctx context.Context, in *DeleteBookingRequest, opts ...grpc.CallOption) (*DeleteBookingResponse, error) {
out := new(DeleteBookingResponse)
err := c.cc.Invoke(ctx, "/Fleets/DeleteBooking", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fleetsClient) FindVehicle(ctx context.Context, in *FindVehicleRequest, opts ...grpc.CallOption) (*FindVehicleResponse, error) {
out := new(FindVehicleResponse)
err := c.cc.Invoke(ctx, "/Fleets/FindVehicle", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FleetsServer is the server API for Fleets service.
// All implementations must embed UnimplementedFleetsServer
// for forward compatibility
type FleetsServer interface {
// Vehicles management
AddVehicle(context.Context, *AddVehicleRequest) (*AddVehicleResponse, error)
GetVehicle(context.Context, *GetVehicleRequest) (*GetVehicleResponse, error)
GetVehicles(context.Context, *GetVehiclesRequest) (*GetVehiclesResponse, error)
UpdateVehicle(context.Context, *UpdateVehicleRequest) (*UpdateVehicleResponse, error)
//Bookings
CreateBooking(context.Context, *CreateBookingRequest) (*CreateBookingResponse, error)
GetBooking(context.Context, *GetBookingRequest) (*GetBookingResponse, error)
GetBookings(context.Context, *GetBookingsRequest) (*GetBookingsResponse, error)
GetDriverBookings(context.Context, *GetDriverBookingsRequest) (*GetDriverBookingsResponse, error)
UpdateBooking(context.Context, *UpdateBookingRequest) (*UpdateBookingResponse, error)
DeleteBooking(context.Context, *DeleteBookingRequest) (*DeleteBookingResponse, error)
//Search / Availabilities
FindVehicle(context.Context, *FindVehicleRequest) (*FindVehicleResponse, error)
mustEmbedUnimplementedFleetsServer()
}
// UnimplementedFleetsServer must be embedded to have forward compatible implementations.
type UnimplementedFleetsServer struct {
}
func (UnimplementedFleetsServer) AddVehicle(context.Context, *AddVehicleRequest) (*AddVehicleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddVehicle not implemented")
}
func (UnimplementedFleetsServer) GetVehicle(context.Context, *GetVehicleRequest) (*GetVehicleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVehicle not implemented")
}
func (UnimplementedFleetsServer) GetVehicles(context.Context, *GetVehiclesRequest) (*GetVehiclesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVehicles not implemented")
}
func (UnimplementedFleetsServer) UpdateVehicle(context.Context, *UpdateVehicleRequest) (*UpdateVehicleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateVehicle not implemented")
}
func (UnimplementedFleetsServer) CreateBooking(context.Context, *CreateBookingRequest) (*CreateBookingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateBooking not implemented")
}
func (UnimplementedFleetsServer) GetBooking(context.Context, *GetBookingRequest) (*GetBookingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBooking not implemented")
}
func (UnimplementedFleetsServer) GetBookings(context.Context, *GetBookingsRequest) (*GetBookingsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBookings not implemented")
}
func (UnimplementedFleetsServer) GetDriverBookings(context.Context, *GetDriverBookingsRequest) (*GetDriverBookingsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDriverBookings not implemented")
}
func (UnimplementedFleetsServer) UpdateBooking(context.Context, *UpdateBookingRequest) (*UpdateBookingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateBooking not implemented")
}
func (UnimplementedFleetsServer) DeleteBooking(context.Context, *DeleteBookingRequest) (*DeleteBookingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteBooking not implemented")
}
func (UnimplementedFleetsServer) FindVehicle(context.Context, *FindVehicleRequest) (*FindVehicleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindVehicle not implemented")
}
func (UnimplementedFleetsServer) mustEmbedUnimplementedFleetsServer() {}
// UnsafeFleetsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FleetsServer will
// result in compilation errors.
type UnsafeFleetsServer interface {
mustEmbedUnimplementedFleetsServer()
}
func RegisterFleetsServer(s grpc.ServiceRegistrar, srv FleetsServer) {
s.RegisterService(&Fleets_ServiceDesc, srv)
}
func _Fleets_AddVehicle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddVehicleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FleetsServer).AddVehicle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Fleets/AddVehicle",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FleetsServer).AddVehicle(ctx, req.(*AddVehicleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fleets_GetVehicle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetVehicleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FleetsServer).GetVehicle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Fleets/GetVehicle",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FleetsServer).GetVehicle(ctx, req.(*GetVehicleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fleets_GetVehicles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetVehiclesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FleetsServer).GetVehicles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Fleets/GetVehicles",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FleetsServer).GetVehicles(ctx, req.(*GetVehiclesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fleets_UpdateVehicle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateVehicleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FleetsServer).UpdateVehicle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Fleets/UpdateVehicle",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FleetsServer).UpdateVehicle(ctx, req.(*UpdateVehicleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fleets_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.(FleetsServer).CreateBooking(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Fleets/CreateBooking",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FleetsServer).CreateBooking(ctx, req.(*CreateBookingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fleets_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.(FleetsServer).GetBooking(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Fleets/GetBooking",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FleetsServer).GetBooking(ctx, req.(*GetBookingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fleets_GetBookings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBookingsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FleetsServer).GetBookings(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Fleets/GetBookings",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FleetsServer).GetBookings(ctx, req.(*GetBookingsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fleets_GetDriverBookings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDriverBookingsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FleetsServer).GetDriverBookings(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Fleets/GetDriverBookings",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FleetsServer).GetDriverBookings(ctx, req.(*GetDriverBookingsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fleets_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.(FleetsServer).UpdateBooking(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Fleets/UpdateBooking",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FleetsServer).UpdateBooking(ctx, req.(*UpdateBookingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fleets_DeleteBooking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteBookingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FleetsServer).DeleteBooking(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Fleets/DeleteBooking",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FleetsServer).DeleteBooking(ctx, req.(*DeleteBookingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fleets_FindVehicle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindVehicleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FleetsServer).FindVehicle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Fleets/FindVehicle",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FleetsServer).FindVehicle(ctx, req.(*FindVehicleRequest))
}
return interceptor(ctx, in, info, handler)
}
// Fleets_ServiceDesc is the grpc.ServiceDesc for Fleets service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Fleets_ServiceDesc = grpc.ServiceDesc{
ServiceName: "Fleets",
HandlerType: (*FleetsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AddVehicle",
Handler: _Fleets_AddVehicle_Handler,
},
{
MethodName: "GetVehicle",
Handler: _Fleets_GetVehicle_Handler,
},
{
MethodName: "GetVehicles",
Handler: _Fleets_GetVehicles_Handler,
},
{
MethodName: "UpdateVehicle",
Handler: _Fleets_UpdateVehicle_Handler,
},
{
MethodName: "CreateBooking",
Handler: _Fleets_CreateBooking_Handler,
},
{
MethodName: "GetBooking",
Handler: _Fleets_GetBooking_Handler,
},
{
MethodName: "GetBookings",
Handler: _Fleets_GetBookings_Handler,
},
{
MethodName: "GetDriverBookings",
Handler: _Fleets_GetDriverBookings_Handler,
},
{
MethodName: "UpdateBooking",
Handler: _Fleets_UpdateBooking_Handler,
},
{
MethodName: "DeleteBooking",
Handler: _Fleets_DeleteBooking_Handler,
},
{
MethodName: "FindVehicle",
Handler: _Fleets_FindVehicle_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "fleets.proto",
}