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
  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/collect/v1"
  9. )
  10. type (
  11. ICollect interface {
  12. // GetList 获取列表
  13. GetList(ctx context.Context, req *v1.GetListReq) (res *v1.GetListRes, err error)
  14. // Get 获取详情
  15. Get(ctx context.Context, req *v1.GetReq) (res *v1.GetRes, 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. // GetCollectNameById 获取收藏名称
  25. GetCollectNameById(ctx context.Context, id int) (name string)
  26. }
  27. )
  28. var (
  29. localCollect ICollect
  30. )
  31. func Collect() ICollect {
  32. if localCollect == nil {
  33. panic("implement not found for interface ICollect, forgot register?")
  34. }
  35. return localCollect
  36. }
  37. func RegisterCollect(i ICollect) {
  38. localCollect = i
  39. }