add breadcrumbs
This commit is contained in:
+40
-3
@@ -19,9 +19,10 @@ import (
|
||||
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_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"
|
||||
)
|
||||
|
||||
// CRMClient is the client API for CRM service.
|
||||
@@ -31,6 +32,7 @@ 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)
|
||||
}
|
||||
|
||||
type cRMClient struct {
|
||||
@@ -68,6 +70,15 @@ func (c *cRMClient) GetProduct(ctx context.Context, in *GetProductReq, opts ...g
|
||||
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
|
||||
}
|
||||
|
||||
// CRMServer is the server API for CRM service.
|
||||
// All implementations must embed UnimplementedCRMServer
|
||||
// for forward compatibility
|
||||
@@ -75,6 +86,7 @@ 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)
|
||||
mustEmbedUnimplementedCRMServer()
|
||||
}
|
||||
|
||||
@@ -91,6 +103,9 @@ func (UnimplementedCRMServer) GetPositions(context.Context, *GetPositionsReq) (*
|
||||
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) mustEmbedUnimplementedCRMServer() {}
|
||||
|
||||
// UnsafeCRMServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -158,6 +173,24 @@ func _CRM_GetProduct_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
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)
|
||||
}
|
||||
|
||||
// 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)
|
||||
@@ -177,6 +210,10 @@ var CRM_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GetProduct",
|
||||
Handler: _CRM_GetProduct_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetBreadcrumbs",
|
||||
Handler: _CRM_GetBreadcrumbs_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "main.proto",
|
||||
|
||||
Reference in New Issue
Block a user