cake_crm/proto/main_grpc.pb.go

110 lines
3.4 KiB
Go
Raw Normal View History

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 (
CRM_GetCatalog_FullMethodName = "/crabs.crm.CRM/GetCatalog"
)
// 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)
}
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
}
// 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)
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")
}
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)
}
// 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,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "main.proto",
}