batchDownloadRoutes.go 1.6 KB

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