333 lines
11 KiB
Go
333 lines
11 KiB
Go
// 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 proto
|
|
|
|
import (
|
|
context "context"
|
|
httpbody "google.golang.org/genproto/googleapis/api/httpbody"
|
|
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"
|
|
CRM_GetPositions_FullMethodName = "/crabs.crm.CRM/GetPositions"
|
|
CRM_GetProduct_FullMethodName = "/crabs.crm.CRM/GetProduct"
|
|
CRM_GetBreadcrumbs_FullMethodName = "/crabs.crm.CRM/GetBreadcrumbs"
|
|
CRM_Order_FullMethodName = "/crabs.crm.CRM/Order"
|
|
CRM_GetCard_FullMethodName = "/crabs.crm.CRM/GetCard"
|
|
CRM_GetImage_FullMethodName = "/crabs.crm.CRM/GetImage"
|
|
)
|
|
|
|
// 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)
|
|
GetPositions(ctx context.Context, in *GetPositionsReq, opts ...grpc.CallOption) (*PositionsRsp, error)
|
|
GetProduct(ctx context.Context, in *GetProductReq, opts ...grpc.CallOption) (*ProductRsp, error)
|
|
GetBreadcrumbs(ctx context.Context, in *GetBreadcrumbsReq, opts ...grpc.CallOption) (*BreadcrumbsRsp, error)
|
|
Order(ctx context.Context, in *OrderReq, opts ...grpc.CallOption) (*OrderRsp, error)
|
|
GetCard(ctx context.Context, in *CardReq, opts ...grpc.CallOption) (*CardRsp, error)
|
|
GetImage(ctx context.Context, in *GetImageReq, opts ...grpc.CallOption) (*httpbody.HttpBody, 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
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
func (c *cRMClient) GetCard(ctx context.Context, in *CardReq, opts ...grpc.CallOption) (*CardRsp, error) {
|
|
out := new(CardRsp)
|
|
err := c.cc.Invoke(ctx, CRM_GetCard_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
// 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)
|
|
GetPositions(context.Context, *GetPositionsReq) (*PositionsRsp, error)
|
|
GetProduct(context.Context, *GetProductReq) (*ProductRsp, error)
|
|
GetBreadcrumbs(context.Context, *GetBreadcrumbsReq) (*BreadcrumbsRsp, error)
|
|
Order(context.Context, *OrderReq) (*OrderRsp, error)
|
|
GetCard(context.Context, *CardReq) (*CardRsp, error)
|
|
GetImage(context.Context, *GetImageReq) (*httpbody.HttpBody, 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) GetPositions(context.Context, *GetPositionsReq) (*PositionsRsp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetPositions not implemented")
|
|
}
|
|
func (UnimplementedCRMServer) GetProduct(context.Context, *GetProductReq) (*ProductRsp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetProduct not implemented")
|
|
}
|
|
func (UnimplementedCRMServer) GetBreadcrumbs(context.Context, *GetBreadcrumbsReq) (*BreadcrumbsRsp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetBreadcrumbs not implemented")
|
|
}
|
|
func (UnimplementedCRMServer) Order(context.Context, *OrderReq) (*OrderRsp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Order not implemented")
|
|
}
|
|
func (UnimplementedCRMServer) GetCard(context.Context, *CardReq) (*CardRsp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetCard not implemented")
|
|
}
|
|
func (UnimplementedCRMServer) GetImage(context.Context, *GetImageReq) (*httpbody.HttpBody, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetImage 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)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
func _CRM_GetCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CardReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CRMServer).GetCard(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CRM_GetCard_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CRMServer).GetCard(ctx, req.(*CardReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
// 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,
|
|
},
|
|
{
|
|
MethodName: "GetPositions",
|
|
Handler: _CRM_GetPositions_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetProduct",
|
|
Handler: _CRM_GetProduct_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetBreadcrumbs",
|
|
Handler: _CRM_GetBreadcrumbs_Handler,
|
|
},
|
|
{
|
|
MethodName: "Order",
|
|
Handler: _CRM_Order_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetCard",
|
|
Handler: _CRM_GetCard_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetImage",
|
|
Handler: _CRM_GetImage_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "main.proto",
|
|
}
|