cake_crm/proto/main_grpc.pb.go

258 lines
8.7 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
2024-05-21 20:46:56 +00:00
package proto
2024-05-17 22:34:55 +00:00
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 06:16:57 +00:00
CRM_GetCatalog_FullMethodName = "/crabs.crm.CRM/GetCatalog"
CRM_GetPositions_FullMethodName = "/crabs.crm.CRM/GetPositions"
CRM_GetProduct_FullMethodName = "/crabs.crm.CRM/GetProduct"
CRM_GetBreadcrumbs_FullMethodName = "/crabs.crm.CRM/GetBreadcrumbs"
2024-05-22 18:40:59 +00:00
CRM_Order_FullMethodName = "/crabs.crm.CRM/Order"
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-18 05:58:50 +00:00
GetProduct(ctx context.Context, in *GetProductReq, opts ...grpc.CallOption) (*ProductRsp, error)
2024-05-18 06:16:57 +00:00
GetBreadcrumbs(ctx context.Context, in *GetBreadcrumbsReq, opts ...grpc.CallOption) (*BreadcrumbsRsp, error)
2024-05-22 18:40:59 +00:00
Order(ctx context.Context, in *OrderReq, opts ...grpc.CallOption) (*OrderRsp, 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-18 05:58:50 +00:00
func (c *cRMClient) GetProduct(ctx context.Context, in *GetProductReq, opts ...grpc.CallOption) (*ProductRsp, error) {
out := new(ProductRsp)
err := c.cc.Invoke(ctx, CRM_GetProduct_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2024-05-18 06:16:57 +00:00
func (c *cRMClient) GetBreadcrumbs(ctx context.Context, in *GetBreadcrumbsReq, opts ...grpc.CallOption) (*BreadcrumbsRsp, error) {
out := new(BreadcrumbsRsp)
err := c.cc.Invoke(ctx, CRM_GetBreadcrumbs_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2024-05-22 18:40:59 +00:00
func (c *cRMClient) Order(ctx context.Context, in *OrderReq, opts ...grpc.CallOption) (*OrderRsp, error) {
out := new(OrderRsp)
err := c.cc.Invoke(ctx, CRM_Order_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-18 05:58:50 +00:00
GetProduct(context.Context, *GetProductReq) (*ProductRsp, error)
2024-05-18 06:16:57 +00:00
GetBreadcrumbs(context.Context, *GetBreadcrumbsReq) (*BreadcrumbsRsp, error)
2024-05-22 18:40:59 +00:00
Order(context.Context, *OrderReq) (*OrderRsp, 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-18 05:58:50 +00:00
func (UnimplementedCRMServer) GetProduct(context.Context, *GetProductReq) (*ProductRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetProduct not implemented")
}
2024-05-18 06:16:57 +00:00
func (UnimplementedCRMServer) GetBreadcrumbs(context.Context, *GetBreadcrumbsReq) (*BreadcrumbsRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBreadcrumbs not implemented")
}
2024-05-22 18:40:59 +00:00
func (UnimplementedCRMServer) Order(context.Context, *OrderReq) (*OrderRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method Order 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-18 05:58:50 +00:00
func _CRM_GetProduct_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetProductReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CRMServer).GetProduct(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CRM_GetProduct_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CRMServer).GetProduct(ctx, req.(*GetProductReq))
}
return interceptor(ctx, in, info, handler)
}
2024-05-18 06:16:57 +00:00
func _CRM_GetBreadcrumbs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBreadcrumbsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CRMServer).GetBreadcrumbs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CRM_GetBreadcrumbs_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CRMServer).GetBreadcrumbs(ctx, req.(*GetBreadcrumbsReq))
}
return interceptor(ctx, in, info, handler)
}
2024-05-22 18:40:59 +00:00
func _CRM_Order_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OrderReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CRMServer).Order(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CRM_Order_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CRMServer).Order(ctx, req.(*OrderReq))
}
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-18 05:58:50 +00:00
{
MethodName: "GetProduct",
Handler: _CRM_GetProduct_Handler,
},
2024-05-18 06:16:57 +00:00
{
MethodName: "GetBreadcrumbs",
Handler: _CRM_GetBreadcrumbs_Handler,
},
2024-05-22 18:40:59 +00:00
{
MethodName: "Order",
Handler: _CRM_Order_Handler,
},
2024-05-17 22:34:55 +00:00
},
Streams: []grpc.StreamDesc{},
Metadata: "main.proto",
}