batchDownloadRoutes.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Batch Download API List
  3. * /batchDownload/manage/list - GET
  4. * /batchDownload/manage/config - POST 创建新配置
  5. * /batchDownload/manage/description/{id} - POST 更新任务说明
  6. * /batchDownload/manage/owner/{id} - POST 设置owner
  7. * /batchDownload/manage/config/{id} - DELETE 删除配置
  8. * /batchDownload/data/{id} - GET 获取指定ID的数据包下载地址
  9. * /batchDownload/manage/path - GET 获取指定ID的文件目录结构
  10. * /batchDownload/manage/fileTree - GET 获取指定文件的目录结构
  11. * /batchDownload/manage/fileDownload - GET 下载指定文件
  12. */
  13. package routes
  14. import (
  15. "fwh-toolbox-server/controllers"
  16. "github.com/gofiber/fiber/v2"
  17. )
  18. func BatchDownloadSetup(api fiber.Router) {
  19. // 获取批量数据下载管理表
  20. api.Get("/batchDownload/manage/list", controllers.GetBatchDownloadList)
  21. // 创建一个批量数据下载管任务
  22. api.Post("/batchDownload/manage/config", controllers.CreateBatchDownload)
  23. // 更新一个批量数据下载说明
  24. api.Post("/batchDownload/manage/description/:id", controllers.UpdateBatchDownloadDescription)
  25. // 设置一个批量数据的owner
  26. api.Post("/batchDownload/manage/owner/:id", controllers.UpdateBatchDownloadOwner)
  27. // 删除一个批量数据下载数据
  28. api.Delete("/batchDownload/manage/config/:id", controllers.DeleteBatchDownload)
  29. // 获取指定ID的批量数据下载数据包地址
  30. api.Get("/batchDownload/data/:id", controllers.GetBatchDownloadData)
  31. // 获取指定ID的文件目录结构
  32. api.Get("/batchDownload/manage/path", controllers.GetBatchDownloadPath)
  33. // 获取指定文件的目录结构
  34. api.Get("/batchDownload/manage/fileTree", controllers.GetBatchDownloadFileTree)
  35. // 下载指定文件
  36. api.Get("/batchDownload/manage/fileDownload", controllers.GetBatchDownloadFileDownload)
  37. }