672 lines
27 KiB
Go
672 lines
27 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v3.19.4
|
|
// source: rpc/category.proto
|
|
|
|
package category
|
|
|
|
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.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
Category_Ping_FullMethodName = "/category.Category/Ping"
|
|
Category_CreateCategory_FullMethodName = "/category.Category/CreateCategory"
|
|
Category_UpdateCategory_FullMethodName = "/category.Category/UpdateCategory"
|
|
Category_DeleteCategory_FullMethodName = "/category.Category/DeleteCategory"
|
|
Category_GetCategory_FullMethodName = "/category.Category/GetCategory"
|
|
Category_GetChildren_FullMethodName = "/category.Category/GetChildren"
|
|
Category_GetTree_FullMethodName = "/category.Category/GetTree"
|
|
Category_MoveCategory_FullMethodName = "/category.Category/MoveCategory"
|
|
Category_GetAncestorPath_FullMethodName = "/category.Category/GetAncestorPath"
|
|
Category_BatchCreateCategories_FullMethodName = "/category.Category/BatchCreateCategories"
|
|
Category_BatchUpdateCategories_FullMethodName = "/category.Category/BatchUpdateCategories"
|
|
Category_ListCategories_FullMethodName = "/category.Category/ListCategories"
|
|
Category_CheckAlias_FullMethodName = "/category.Category/CheckAlias"
|
|
Category_GetSystemCategories_FullMethodName = "/category.Category/GetSystemCategories"
|
|
Category_GetFullCategories_FullMethodName = "/category.Category/GetFullCategories"
|
|
)
|
|
|
|
// CategoryClient is the client API for Category 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 CategoryClient interface {
|
|
// 健康检查
|
|
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
|
|
// 分类基础操作
|
|
CreateCategory(ctx context.Context, in *CreateCategoryRequest, opts ...grpc.CallOption) (*CategoryInfoResponse, error)
|
|
UpdateCategory(ctx context.Context, in *UpdateCategoryRequest, opts ...grpc.CallOption) (*CategoryInfoResponse, error)
|
|
DeleteCategory(ctx context.Context, in *DeleteCategoryRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
|
|
GetCategory(ctx context.Context, in *GetCategoryRequest, opts ...grpc.CallOption) (*CategoryInfoResponse, error)
|
|
// 层级结构操作
|
|
GetChildren(ctx context.Context, in *GetChildrenRequest, opts ...grpc.CallOption) (*CategoryListResponse, error)
|
|
GetTree(ctx context.Context, in *GetTreeRequest, opts ...grpc.CallOption) (*CategoryTreeResponse, error)
|
|
MoveCategory(ctx context.Context, in *MoveCategoryRequest, opts ...grpc.CallOption) (*CategoryInfoResponse, error)
|
|
GetAncestorPath(ctx context.Context, in *GetAncestorPathRequest, opts ...grpc.CallOption) (*CategoryPathResponse, error)
|
|
// 批量操作
|
|
BatchCreateCategories(ctx context.Context, in *BatchCreateRequest, opts ...grpc.CallOption) (*BatchCreateResponse, error)
|
|
BatchUpdateCategories(ctx context.Context, in *BatchUpdateRequest, opts ...grpc.CallOption) (*BatchUpdateResponse, error)
|
|
// 查询过滤
|
|
ListCategories(ctx context.Context, in *ListCategoryRequest, opts ...grpc.CallOption) (*CategoryListResponse, error)
|
|
CheckAlias(ctx context.Context, in *CheckAliasRequest, opts ...grpc.CallOption) (*CheckAliasResponse, error)
|
|
// 根据系统ID获取分类
|
|
GetSystemCategories(ctx context.Context, in *GetSystemCategoriesRequest, opts ...grpc.CallOption) (*GetSystemCategoriesResponse, error)
|
|
// 获取某一个类别的完整类别(从根类别到当前类别的所有类别)
|
|
GetFullCategories(ctx context.Context, in *GetCategoryRequest, opts ...grpc.CallOption) (*GetFullCategoriesResponse, error)
|
|
}
|
|
|
|
type categoryClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewCategoryClient(cc grpc.ClientConnInterface) CategoryClient {
|
|
return &categoryClient{cc}
|
|
}
|
|
|
|
func (c *categoryClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PingResponse)
|
|
err := c.cc.Invoke(ctx, Category_Ping_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) CreateCategory(ctx context.Context, in *CreateCategoryRequest, opts ...grpc.CallOption) (*CategoryInfoResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CategoryInfoResponse)
|
|
err := c.cc.Invoke(ctx, Category_CreateCategory_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) UpdateCategory(ctx context.Context, in *UpdateCategoryRequest, opts ...grpc.CallOption) (*CategoryInfoResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CategoryInfoResponse)
|
|
err := c.cc.Invoke(ctx, Category_UpdateCategory_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) DeleteCategory(ctx context.Context, in *DeleteCategoryRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteResponse)
|
|
err := c.cc.Invoke(ctx, Category_DeleteCategory_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) GetCategory(ctx context.Context, in *GetCategoryRequest, opts ...grpc.CallOption) (*CategoryInfoResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CategoryInfoResponse)
|
|
err := c.cc.Invoke(ctx, Category_GetCategory_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) GetChildren(ctx context.Context, in *GetChildrenRequest, opts ...grpc.CallOption) (*CategoryListResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CategoryListResponse)
|
|
err := c.cc.Invoke(ctx, Category_GetChildren_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) GetTree(ctx context.Context, in *GetTreeRequest, opts ...grpc.CallOption) (*CategoryTreeResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CategoryTreeResponse)
|
|
err := c.cc.Invoke(ctx, Category_GetTree_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) MoveCategory(ctx context.Context, in *MoveCategoryRequest, opts ...grpc.CallOption) (*CategoryInfoResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CategoryInfoResponse)
|
|
err := c.cc.Invoke(ctx, Category_MoveCategory_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) GetAncestorPath(ctx context.Context, in *GetAncestorPathRequest, opts ...grpc.CallOption) (*CategoryPathResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CategoryPathResponse)
|
|
err := c.cc.Invoke(ctx, Category_GetAncestorPath_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) BatchCreateCategories(ctx context.Context, in *BatchCreateRequest, opts ...grpc.CallOption) (*BatchCreateResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(BatchCreateResponse)
|
|
err := c.cc.Invoke(ctx, Category_BatchCreateCategories_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) BatchUpdateCategories(ctx context.Context, in *BatchUpdateRequest, opts ...grpc.CallOption) (*BatchUpdateResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(BatchUpdateResponse)
|
|
err := c.cc.Invoke(ctx, Category_BatchUpdateCategories_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) ListCategories(ctx context.Context, in *ListCategoryRequest, opts ...grpc.CallOption) (*CategoryListResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CategoryListResponse)
|
|
err := c.cc.Invoke(ctx, Category_ListCategories_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) CheckAlias(ctx context.Context, in *CheckAliasRequest, opts ...grpc.CallOption) (*CheckAliasResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CheckAliasResponse)
|
|
err := c.cc.Invoke(ctx, Category_CheckAlias_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) GetSystemCategories(ctx context.Context, in *GetSystemCategoriesRequest, opts ...grpc.CallOption) (*GetSystemCategoriesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetSystemCategoriesResponse)
|
|
err := c.cc.Invoke(ctx, Category_GetSystemCategories_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *categoryClient) GetFullCategories(ctx context.Context, in *GetCategoryRequest, opts ...grpc.CallOption) (*GetFullCategoriesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetFullCategoriesResponse)
|
|
err := c.cc.Invoke(ctx, Category_GetFullCategories_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// CategoryServer is the server API for Category service.
|
|
// All implementations must embed UnimplementedCategoryServer
|
|
// for forward compatibility.
|
|
//
|
|
// 分类服务 - 分类管理、树形结构操作、批量处理
|
|
type CategoryServer interface {
|
|
// 健康检查
|
|
Ping(context.Context, *PingRequest) (*PingResponse, error)
|
|
// 分类基础操作
|
|
CreateCategory(context.Context, *CreateCategoryRequest) (*CategoryInfoResponse, error)
|
|
UpdateCategory(context.Context, *UpdateCategoryRequest) (*CategoryInfoResponse, error)
|
|
DeleteCategory(context.Context, *DeleteCategoryRequest) (*DeleteResponse, error)
|
|
GetCategory(context.Context, *GetCategoryRequest) (*CategoryInfoResponse, error)
|
|
// 层级结构操作
|
|
GetChildren(context.Context, *GetChildrenRequest) (*CategoryListResponse, error)
|
|
GetTree(context.Context, *GetTreeRequest) (*CategoryTreeResponse, error)
|
|
MoveCategory(context.Context, *MoveCategoryRequest) (*CategoryInfoResponse, error)
|
|
GetAncestorPath(context.Context, *GetAncestorPathRequest) (*CategoryPathResponse, error)
|
|
// 批量操作
|
|
BatchCreateCategories(context.Context, *BatchCreateRequest) (*BatchCreateResponse, error)
|
|
BatchUpdateCategories(context.Context, *BatchUpdateRequest) (*BatchUpdateResponse, error)
|
|
// 查询过滤
|
|
ListCategories(context.Context, *ListCategoryRequest) (*CategoryListResponse, error)
|
|
CheckAlias(context.Context, *CheckAliasRequest) (*CheckAliasResponse, error)
|
|
// 根据系统ID获取分类
|
|
GetSystemCategories(context.Context, *GetSystemCategoriesRequest) (*GetSystemCategoriesResponse, error)
|
|
// 获取某一个类别的完整类别(从根类别到当前类别的所有类别)
|
|
GetFullCategories(context.Context, *GetCategoryRequest) (*GetFullCategoriesResponse, error)
|
|
mustEmbedUnimplementedCategoryServer()
|
|
}
|
|
|
|
// UnimplementedCategoryServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedCategoryServer struct{}
|
|
|
|
func (UnimplementedCategoryServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) CreateCategory(context.Context, *CreateCategoryRequest) (*CategoryInfoResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateCategory not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) UpdateCategory(context.Context, *UpdateCategoryRequest) (*CategoryInfoResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateCategory not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) DeleteCategory(context.Context, *DeleteCategoryRequest) (*DeleteResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteCategory not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) GetCategory(context.Context, *GetCategoryRequest) (*CategoryInfoResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetCategory not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) GetChildren(context.Context, *GetChildrenRequest) (*CategoryListResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetChildren not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) GetTree(context.Context, *GetTreeRequest) (*CategoryTreeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetTree not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) MoveCategory(context.Context, *MoveCategoryRequest) (*CategoryInfoResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method MoveCategory not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) GetAncestorPath(context.Context, *GetAncestorPathRequest) (*CategoryPathResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetAncestorPath not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) BatchCreateCategories(context.Context, *BatchCreateRequest) (*BatchCreateResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method BatchCreateCategories not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) BatchUpdateCategories(context.Context, *BatchUpdateRequest) (*BatchUpdateResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateCategories not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) ListCategories(context.Context, *ListCategoryRequest) (*CategoryListResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListCategories not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) CheckAlias(context.Context, *CheckAliasRequest) (*CheckAliasResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CheckAlias not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) GetSystemCategories(context.Context, *GetSystemCategoriesRequest) (*GetSystemCategoriesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetSystemCategories not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) GetFullCategories(context.Context, *GetCategoryRequest) (*GetFullCategoriesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetFullCategories not implemented")
|
|
}
|
|
func (UnimplementedCategoryServer) mustEmbedUnimplementedCategoryServer() {}
|
|
func (UnimplementedCategoryServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeCategoryServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to CategoryServer will
|
|
// result in compilation errors.
|
|
type UnsafeCategoryServer interface {
|
|
mustEmbedUnimplementedCategoryServer()
|
|
}
|
|
|
|
func RegisterCategoryServer(s grpc.ServiceRegistrar, srv CategoryServer) {
|
|
// If the following call pancis, it indicates UnimplementedCategoryServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&Category_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Category_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).Ping(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_Ping_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).Ping(ctx, req.(*PingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_CreateCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateCategoryRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).CreateCategory(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_CreateCategory_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).CreateCategory(ctx, req.(*CreateCategoryRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_UpdateCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateCategoryRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).UpdateCategory(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_UpdateCategory_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).UpdateCategory(ctx, req.(*UpdateCategoryRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_DeleteCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteCategoryRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).DeleteCategory(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_DeleteCategory_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).DeleteCategory(ctx, req.(*DeleteCategoryRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_GetCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetCategoryRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).GetCategory(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_GetCategory_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).GetCategory(ctx, req.(*GetCategoryRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_GetChildren_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetChildrenRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).GetChildren(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_GetChildren_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).GetChildren(ctx, req.(*GetChildrenRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_GetTree_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetTreeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).GetTree(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_GetTree_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).GetTree(ctx, req.(*GetTreeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_MoveCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(MoveCategoryRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).MoveCategory(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_MoveCategory_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).MoveCategory(ctx, req.(*MoveCategoryRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_GetAncestorPath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetAncestorPathRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).GetAncestorPath(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_GetAncestorPath_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).GetAncestorPath(ctx, req.(*GetAncestorPathRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_BatchCreateCategories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(BatchCreateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).BatchCreateCategories(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_BatchCreateCategories_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).BatchCreateCategories(ctx, req.(*BatchCreateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_BatchUpdateCategories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(BatchUpdateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).BatchUpdateCategories(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_BatchUpdateCategories_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).BatchUpdateCategories(ctx, req.(*BatchUpdateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_ListCategories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListCategoryRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).ListCategories(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_ListCategories_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).ListCategories(ctx, req.(*ListCategoryRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_CheckAlias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CheckAliasRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).CheckAlias(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_CheckAlias_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).CheckAlias(ctx, req.(*CheckAliasRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_GetSystemCategories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetSystemCategoriesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).GetSystemCategories(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_GetSystemCategories_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).GetSystemCategories(ctx, req.(*GetSystemCategoriesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Category_GetFullCategories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetCategoryRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CategoryServer).GetFullCategories(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Category_GetFullCategories_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CategoryServer).GetFullCategories(ctx, req.(*GetCategoryRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Category_ServiceDesc is the grpc.ServiceDesc for Category service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Category_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "category.Category",
|
|
HandlerType: (*CategoryServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Ping",
|
|
Handler: _Category_Ping_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateCategory",
|
|
Handler: _Category_CreateCategory_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateCategory",
|
|
Handler: _Category_UpdateCategory_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteCategory",
|
|
Handler: _Category_DeleteCategory_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetCategory",
|
|
Handler: _Category_GetCategory_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetChildren",
|
|
Handler: _Category_GetChildren_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetTree",
|
|
Handler: _Category_GetTree_Handler,
|
|
},
|
|
{
|
|
MethodName: "MoveCategory",
|
|
Handler: _Category_MoveCategory_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetAncestorPath",
|
|
Handler: _Category_GetAncestorPath_Handler,
|
|
},
|
|
{
|
|
MethodName: "BatchCreateCategories",
|
|
Handler: _Category_BatchCreateCategories_Handler,
|
|
},
|
|
{
|
|
MethodName: "BatchUpdateCategories",
|
|
Handler: _Category_BatchUpdateCategories_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListCategories",
|
|
Handler: _Category_ListCategories_Handler,
|
|
},
|
|
{
|
|
MethodName: "CheckAlias",
|
|
Handler: _Category_CheckAlias_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetSystemCategories",
|
|
Handler: _Category_GetSystemCategories_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetFullCategories",
|
|
Handler: _Category_GetFullCategories_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "rpc/category.proto",
|
|
}
|