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.

44 lines
1.3 KiB

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. )
  10. type (
  11. ICategory interface {
  12. // GetTree 获取树
  13. GetTree(ctx context.Context, req *v1.GetTreeReq) (res *v1.GetTreeRes, err error)
  14. // GetList 获取列表
  15. GetList(ctx context.Context, req *v1.GetListReq) (res *v1.GetListRes, err error)
  16. // Create 创建
  17. Create(ctx context.Context, req *v1.CreateReq) (res *v1.CreateRes, err error)
  18. // Update 更新
  19. Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error)
  20. // Delete 删除
  21. Delete(ctx context.Context, req *v1.DeleteReq) (res *v1.DeleteRes, err error)
  22. // BatchDelete 批量删除
  23. BatchDelete(ctx context.Context, req *v1.BatchDeleteReq) (res *v1.BatchDeleteRes, err error)
  24. }
  25. )
  26. var (
  27. localCategory ICategory
  28. )
  29. func Category() ICategory {
  30. if localCategory == nil {
  31. panic("implement not found for interface ICategory, forgot register?")
  32. }
  33. return localCategory
  34. }
  35. func RegisterCategory(i ICategory) {
  36. localCategory = i
  37. }