// ================================================================================ // 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) // GetCategoryNameById 获取分类名称 GetCategoryNameById(ctx context.Context, id uint) (name string) } ) 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 }