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.

48 lines
1.5 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. // ================================================================================
  2. // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
  3. // You can delete these comments if you wish manually maintain this interface file.
  4. // ================================================================================
  5. package service
  6. import (
  7. "context"
  8. v1 "xgit.pub/module/cms/app/api/category/v1"
  9. "xgit.pub/module/cms/app/model"
  10. )
  11. type (
  12. ICategory interface {
  13. // GetTree 获取树
  14. GetTree(ctx context.Context, req *v1.GetTreeReq) (categories []*model.Category, err error)
  15. // GetList 获取列表
  16. GetList(ctx context.Context, req *v1.GetListReq) (res *v1.GetListRes, err error)
  17. // Create 创建
  18. Create(ctx context.Context, req *v1.CreateReq) (res *v1.CreateRes, err error)
  19. // Update 更新
  20. Update(ctx context.Context, in *v1.UpdateReq) (err error)
  21. // Delete 删除
  22. Delete(ctx context.Context, in *v1.DeleteReq) (err error)
  23. // BatchDelete 批量删除
  24. BatchDelete(ctx context.Context, in *v1.BatchDeleteReq) (err error)
  25. Drop(ctx context.Context, source int, target int, action string) (err error)
  26. // GetCategoryNameById 获取分类名称
  27. GetCategoryNameById(ctx context.Context, id uint) (name string)
  28. }
  29. )
  30. var (
  31. localCategory ICategory
  32. )
  33. func Category() ICategory {
  34. if localCategory == nil {
  35. panic("implement not found for interface ICategory, forgot register?")
  36. }
  37. return localCategory
  38. }
  39. func RegisterCategory(i ICategory) {
  40. localCategory = i
  41. }