216 lines
9.2 KiB
Go
216 lines
9.2 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: carpool-incentives-service.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
|
||
|
|
||
|
// CarpoolIncentivesClient is the client API for CarpoolIncentives 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 CarpoolIncentivesClient interface {
|
||
|
// rpc XXXX(Request) returns (Response) {}
|
||
|
GetAvailableIncentives(ctx context.Context, in *GetAvailableIncentivesRequest, opts ...grpc.CallOption) (*GetAvailableIncentivesResponse, error)
|
||
|
GetInitiatedIncentives(ctx context.Context, in *GetInitiatedIncentivesRequest, opts ...grpc.CallOption) (*GetInitiatedIncentivesResponse, error)
|
||
|
GetDeclinedIncentives(ctx context.Context, in *GetDeclinedIncentivesRequest, opts ...grpc.CallOption) (*GetDeclinedIncentivesResponse, error)
|
||
|
SubscribeIncentive(ctx context.Context, in *SubscribeIncentiveRequest, opts ...grpc.CallOption) (*SubscribeIncentiveResponse, error)
|
||
|
}
|
||
|
|
||
|
type carpoolIncentivesClient struct {
|
||
|
cc grpc.ClientConnInterface
|
||
|
}
|
||
|
|
||
|
func NewCarpoolIncentivesClient(cc grpc.ClientConnInterface) CarpoolIncentivesClient {
|
||
|
return &carpoolIncentivesClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *carpoolIncentivesClient) GetAvailableIncentives(ctx context.Context, in *GetAvailableIncentivesRequest, opts ...grpc.CallOption) (*GetAvailableIncentivesResponse, error) {
|
||
|
out := new(GetAvailableIncentivesResponse)
|
||
|
err := c.cc.Invoke(ctx, "/CarpoolIncentives/GetAvailableIncentives", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *carpoolIncentivesClient) GetInitiatedIncentives(ctx context.Context, in *GetInitiatedIncentivesRequest, opts ...grpc.CallOption) (*GetInitiatedIncentivesResponse, error) {
|
||
|
out := new(GetInitiatedIncentivesResponse)
|
||
|
err := c.cc.Invoke(ctx, "/CarpoolIncentives/GetInitiatedIncentives", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *carpoolIncentivesClient) GetDeclinedIncentives(ctx context.Context, in *GetDeclinedIncentivesRequest, opts ...grpc.CallOption) (*GetDeclinedIncentivesResponse, error) {
|
||
|
out := new(GetDeclinedIncentivesResponse)
|
||
|
err := c.cc.Invoke(ctx, "/CarpoolIncentives/GetDeclinedIncentives", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *carpoolIncentivesClient) SubscribeIncentive(ctx context.Context, in *SubscribeIncentiveRequest, opts ...grpc.CallOption) (*SubscribeIncentiveResponse, error) {
|
||
|
out := new(SubscribeIncentiveResponse)
|
||
|
err := c.cc.Invoke(ctx, "/CarpoolIncentives/SubscribeIncentive", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// CarpoolIncentivesServer is the server API for CarpoolIncentives service.
|
||
|
// All implementations must embed UnimplementedCarpoolIncentivesServer
|
||
|
// for forward compatibility
|
||
|
type CarpoolIncentivesServer interface {
|
||
|
// rpc XXXX(Request) returns (Response) {}
|
||
|
GetAvailableIncentives(context.Context, *GetAvailableIncentivesRequest) (*GetAvailableIncentivesResponse, error)
|
||
|
GetInitiatedIncentives(context.Context, *GetInitiatedIncentivesRequest) (*GetInitiatedIncentivesResponse, error)
|
||
|
GetDeclinedIncentives(context.Context, *GetDeclinedIncentivesRequest) (*GetDeclinedIncentivesResponse, error)
|
||
|
SubscribeIncentive(context.Context, *SubscribeIncentiveRequest) (*SubscribeIncentiveResponse, error)
|
||
|
mustEmbedUnimplementedCarpoolIncentivesServer()
|
||
|
}
|
||
|
|
||
|
// UnimplementedCarpoolIncentivesServer must be embedded to have forward compatible implementations.
|
||
|
type UnimplementedCarpoolIncentivesServer struct {
|
||
|
}
|
||
|
|
||
|
func (UnimplementedCarpoolIncentivesServer) GetAvailableIncentives(context.Context, *GetAvailableIncentivesRequest) (*GetAvailableIncentivesResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetAvailableIncentives not implemented")
|
||
|
}
|
||
|
func (UnimplementedCarpoolIncentivesServer) GetInitiatedIncentives(context.Context, *GetInitiatedIncentivesRequest) (*GetInitiatedIncentivesResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetInitiatedIncentives not implemented")
|
||
|
}
|
||
|
func (UnimplementedCarpoolIncentivesServer) GetDeclinedIncentives(context.Context, *GetDeclinedIncentivesRequest) (*GetDeclinedIncentivesResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetDeclinedIncentives not implemented")
|
||
|
}
|
||
|
func (UnimplementedCarpoolIncentivesServer) SubscribeIncentive(context.Context, *SubscribeIncentiveRequest) (*SubscribeIncentiveResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method SubscribeIncentive not implemented")
|
||
|
}
|
||
|
func (UnimplementedCarpoolIncentivesServer) mustEmbedUnimplementedCarpoolIncentivesServer() {}
|
||
|
|
||
|
// UnsafeCarpoolIncentivesServer may be embedded to opt out of forward compatibility for this service.
|
||
|
// Use of this interface is not recommended, as added methods to CarpoolIncentivesServer will
|
||
|
// result in compilation errors.
|
||
|
type UnsafeCarpoolIncentivesServer interface {
|
||
|
mustEmbedUnimplementedCarpoolIncentivesServer()
|
||
|
}
|
||
|
|
||
|
func RegisterCarpoolIncentivesServer(s grpc.ServiceRegistrar, srv CarpoolIncentivesServer) {
|
||
|
s.RegisterService(&CarpoolIncentives_ServiceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _CarpoolIncentives_GetAvailableIncentives_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(GetAvailableIncentivesRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(CarpoolIncentivesServer).GetAvailableIncentives(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/CarpoolIncentives/GetAvailableIncentives",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(CarpoolIncentivesServer).GetAvailableIncentives(ctx, req.(*GetAvailableIncentivesRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _CarpoolIncentives_GetInitiatedIncentives_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(GetInitiatedIncentivesRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(CarpoolIncentivesServer).GetInitiatedIncentives(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/CarpoolIncentives/GetInitiatedIncentives",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(CarpoolIncentivesServer).GetInitiatedIncentives(ctx, req.(*GetInitiatedIncentivesRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _CarpoolIncentives_GetDeclinedIncentives_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(GetDeclinedIncentivesRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(CarpoolIncentivesServer).GetDeclinedIncentives(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/CarpoolIncentives/GetDeclinedIncentives",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(CarpoolIncentivesServer).GetDeclinedIncentives(ctx, req.(*GetDeclinedIncentivesRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _CarpoolIncentives_SubscribeIncentive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(SubscribeIncentiveRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(CarpoolIncentivesServer).SubscribeIncentive(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/CarpoolIncentives/SubscribeIncentive",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(CarpoolIncentivesServer).SubscribeIncentive(ctx, req.(*SubscribeIncentiveRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
// CarpoolIncentives_ServiceDesc is the grpc.ServiceDesc for CarpoolIncentives service.
|
||
|
// It's only intended for direct use with grpc.RegisterService,
|
||
|
// and not to be introspected or modified (even as a copy)
|
||
|
var CarpoolIncentives_ServiceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "CarpoolIncentives",
|
||
|
HandlerType: (*CarpoolIncentivesServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "GetAvailableIncentives",
|
||
|
Handler: _CarpoolIncentives_GetAvailableIncentives_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetInitiatedIncentives",
|
||
|
Handler: _CarpoolIncentives_GetInitiatedIncentives_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetDeclinedIncentives",
|
||
|
Handler: _CarpoolIncentives_GetDeclinedIncentives_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "SubscribeIncentive",
|
||
|
Handler: _CarpoolIncentives_SubscribeIncentive_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: "carpool-incentives-service.proto",
|
||
|
}
|