cake_crm/proto/main_grpc.pb.go

370 lines
13 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"
2024-05-27 20:11:47 +00:00
httpbody "google.golang.org/genproto/googleapis/api/httpbody"
2024-05-17 22:34:55 +00:00
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-29 20:54:12 +00:00
CRM_GetCart_FullMethodName = "/crabs.crm.CRM/GetCart"
2024-05-27 20:11:47 +00:00
CRM_GetImage_FullMethodName = "/crabs.crm.CRM/GetImage"
2024-05-29 21:17:13 +00:00
CRM_Search_FullMethodName = "/crabs.crm.CRM/Search"
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-29 20:54:12 +00:00
GetCart(ctx context.Context, in *CartReq, opts ...grpc.CallOption) (*CartRsp, error)
2024-05-27 20:11:47 +00:00
GetImage(ctx context.Context, in *GetImageReq, opts ...grpc.CallOption) (*httpbody.HttpBody, error)
2024-05-29 21:17:13 +00:00
Search(ctx context.Context, in *SearchReq, 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-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-29 20:54:12 +00:00
func (c *cRMClient) GetCart(ctx context.Context, in *CartReq, opts ...grpc.CallOption) (*CartRsp, error) {
out := new(CartRsp)
err := c.cc.Invoke(ctx, CRM_GetCart_FullMethodName, in, out, opts...)
2024-05-23 18:10:31 +00:00
if err != nil {
return nil, err
}
return out, nil
}
2024-05-27 20:11:47 +00:00
func (c *cRMClient) GetImage(ctx context.Context, in *GetImageReq, opts ...grpc.CallOption) (*httpbody.HttpBody, error) {
out := new(httpbody.HttpBody)
err := c.cc.Invoke(ctx, CRM_GetImage_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2024-05-29 21:17:13 +00:00
func (c *cRMClient) Search(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*PositionsRsp, error) {
out := new(PositionsRsp)
err := c.cc.Invoke(ctx, CRM_Search_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-29 20:54:12 +00:00
GetCart(context.Context, *CartReq) (*CartRsp, error)
2024-05-27 20:11:47 +00:00
GetImage(context.Context, *GetImageReq) (*httpbody.HttpBody, error)
2024-05-29 21:17:13 +00:00
Search(context.Context, *SearchReq) (*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-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-29 20:54:12 +00:00
func (UnimplementedCRMServer) GetCart(context.Context, *CartReq) (*CartRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCart not implemented")
2024-05-23 18:10:31 +00:00
}
2024-05-27 20:11:47 +00:00
func (UnimplementedCRMServer) GetImage(context.Context, *GetImageReq) (*httpbody.HttpBody, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetImage not implemented")
}
2024-05-29 21:17:13 +00:00
func (UnimplementedCRMServer) Search(context.Context, *SearchReq) (*PositionsRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method Search 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-29 20:54:12 +00:00
func _CRM_GetCart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CartReq)
2024-05-23 18:10:31 +00:00
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
2024-05-29 20:54:12 +00:00
return srv.(CRMServer).GetCart(ctx, in)
2024-05-23 18:10:31 +00:00
}
info := &grpc.UnaryServerInfo{
Server: srv,
2024-05-29 20:54:12 +00:00
FullMethod: CRM_GetCart_FullMethodName,
2024-05-23 18:10:31 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2024-05-29 20:54:12 +00:00
return srv.(CRMServer).GetCart(ctx, req.(*CartReq))
2024-05-23 18:10:31 +00:00
}
return interceptor(ctx, in, info, handler)
}
2024-05-27 20:11:47 +00:00
func _CRM_GetImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetImageReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CRMServer).GetImage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CRM_GetImage_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CRMServer).GetImage(ctx, req.(*GetImageReq))
}
return interceptor(ctx, in, info, handler)
}
2024-05-29 21:17:13 +00:00
func _CRM_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CRMServer).Search(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CRM_Search_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CRMServer).Search(ctx, req.(*SearchReq))
}
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-23 18:10:31 +00:00
{
2024-05-29 20:54:12 +00:00
MethodName: "GetCart",
Handler: _CRM_GetCart_Handler,
2024-05-23 18:10:31 +00:00
},
2024-05-27 20:11:47 +00:00
{
MethodName: "GetImage",
Handler: _CRM_GetImage_Handler,
},
2024-05-29 21:17:13 +00:00
{
MethodName: "Search",
Handler: _CRM_Search_Handler,
},
2024-05-17 22:34:55 +00:00
},
Streams: []grpc.StreamDesc{},
Metadata: "main.proto",
}