2024-05-17 22:34:55 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v5.26.1
// source: main.proto
package crm
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 (
2024-05-18 05:36:31 +00:00
CRM_GetCatalog_FullMethodName = "/crabs.crm.CRM/GetCatalog"
CRM_GetPositions_FullMethodName = "/crabs.crm.CRM/GetPositions"
2024-05-17 22:34:55 +00:00
)
// CRMClient is the client API for CRM 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 CRMClient interface {
GetCatalog ( ctx context . Context , in * GetCatalogReq , opts ... grpc . CallOption ) ( * CatalogRsp , error )
2024-05-18 05:36:31 +00:00
GetPositions ( ctx context . Context , in * GetPositionsReq , opts ... grpc . CallOption ) ( * PositionsRsp , error )
2024-05-17 22:34:55 +00:00
}
type cRMClient struct {
cc grpc . ClientConnInterface
}
func NewCRMClient ( cc grpc . ClientConnInterface ) CRMClient {
return & cRMClient { cc }
}
func ( c * cRMClient ) GetCatalog ( ctx context . Context , in * GetCatalogReq , opts ... grpc . CallOption ) ( * CatalogRsp , error ) {
out := new ( CatalogRsp )
err := c . cc . Invoke ( ctx , CRM_GetCatalog_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-05-18 05:36:31 +00:00
func ( c * cRMClient ) GetPositions ( ctx context . Context , in * GetPositionsReq , opts ... grpc . CallOption ) ( * PositionsRsp , error ) {
out := new ( PositionsRsp )
err := c . cc . Invoke ( ctx , CRM_GetPositions_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-05-17 22:34:55 +00:00
// CRMServer is the server API for CRM service.
// All implementations must embed UnimplementedCRMServer
// for forward compatibility
type CRMServer interface {
GetCatalog ( context . Context , * GetCatalogReq ) ( * CatalogRsp , error )
2024-05-18 05:36:31 +00:00
GetPositions ( context . Context , * GetPositionsReq ) ( * PositionsRsp , error )
2024-05-17 22:34:55 +00:00
mustEmbedUnimplementedCRMServer ( )
}
// UnimplementedCRMServer must be embedded to have forward compatible implementations.
type UnimplementedCRMServer struct {
}
func ( UnimplementedCRMServer ) GetCatalog ( context . Context , * GetCatalogReq ) ( * CatalogRsp , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetCatalog not implemented" )
}
2024-05-18 05:36:31 +00:00
func ( UnimplementedCRMServer ) GetPositions ( context . Context , * GetPositionsReq ) ( * PositionsRsp , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetPositions not implemented" )
}
2024-05-17 22:34:55 +00:00
func ( UnimplementedCRMServer ) mustEmbedUnimplementedCRMServer ( ) { }
// UnsafeCRMServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CRMServer will
// result in compilation errors.
type UnsafeCRMServer interface {
mustEmbedUnimplementedCRMServer ( )
}
func RegisterCRMServer ( s grpc . ServiceRegistrar , srv CRMServer ) {
s . RegisterService ( & CRM_ServiceDesc , srv )
}
func _CRM_GetCatalog_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetCatalogReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( CRMServer ) . GetCatalog ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : CRM_GetCatalog_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( CRMServer ) . GetCatalog ( ctx , req . ( * GetCatalogReq ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-05-18 05:36:31 +00:00
func _CRM_GetPositions_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetPositionsReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( CRMServer ) . GetPositions ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : CRM_GetPositions_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( CRMServer ) . GetPositions ( ctx , req . ( * GetPositionsReq ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-05-17 22:34:55 +00:00
// CRM_ServiceDesc is the grpc.ServiceDesc for CRM service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CRM_ServiceDesc = grpc . ServiceDesc {
ServiceName : "crabs.crm.CRM" ,
HandlerType : ( * CRMServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "GetCatalog" ,
Handler : _CRM_GetCatalog_Handler ,
} ,
2024-05-18 05:36:31 +00:00
{
MethodName : "GetPositions" ,
Handler : _CRM_GetPositions_Handler ,
} ,
2024-05-17 22:34:55 +00:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "main.proto" ,
}