You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.4 KiB
46 lines
1.4 KiB
// ================================================================================
|
|
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
|
// You can delete these comments if you wish manually maintain this interface file.
|
|
// ================================================================================
|
|
|
|
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
v1 "xgit.pub/module/cms/app/api/category/v1"
|
|
"xgit.pub/module/cms/app/model"
|
|
)
|
|
|
|
type (
|
|
ICategory interface {
|
|
// GetTree 获取树
|
|
GetTree(ctx context.Context, req *v1.GetTreeReq) (categories []*model.Category, err error)
|
|
// GetList 获取列表
|
|
GetList(ctx context.Context, req *v1.GetListReq) (res *v1.GetListRes, err error)
|
|
// Create 创建
|
|
Create(ctx context.Context, req *v1.CreateReq) (res *v1.CreateRes, err error)
|
|
// Update 更新
|
|
Update(ctx context.Context, in *v1.UpdateReq) (err error)
|
|
// Delete 删除
|
|
Delete(ctx context.Context, in *v1.DeleteReq) (err error)
|
|
// BatchDelete 批量删除
|
|
BatchDelete(ctx context.Context, in *v1.BatchDeleteReq) (err error)
|
|
Drop(ctx context.Context, source int, target int, action string) (err error)
|
|
}
|
|
)
|
|
|
|
var (
|
|
localCategory ICategory
|
|
)
|
|
|
|
func Category() ICategory {
|
|
if localCategory == nil {
|
|
panic("implement not found for interface ICategory, forgot register?")
|
|
}
|
|
return localCategory
|
|
}
|
|
|
|
func RegisterCategory(i ICategory) {
|
|
localCategory = i
|
|
}
|