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

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 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. }
  27. )
  28. var (
  29. localCategory ICategory
  30. )
  31. func Category() ICategory {
  32. if localCategory == nil {
  33. panic("implement not found for interface ICategory, forgot register?")
  34. }
  35. return localCategory
  36. }
  37. func RegisterCategory(i ICategory) {
  38. localCategory = i
  39. }