/* * Fault Record API List(MQTT 直连,支持 env=prod|test) * /faultRecord/devices - GET 查询网关下可操作的设备 * /faultRecord/operations - POST 创建操作(异步) * /faultRecord/operations - GET 操作历史 * /faultRecord/operations/:id - GET 操作详情 * /faultRecord/operations/:id/cancel - POST 取消操作 * /faultRecord/operations/:id/retry-download - POST 手动重试下载 * /faultRecord/operations/:id/record - GET 录波详情 * /faultRecord/operations/:id/export - GET 导出(format=raw|csv) */ package routes import ( "fwh-toolbox-server/controllers" "github.com/gofiber/fiber/v2" ) func FaultRecordSetup(api fiber.Router) { api.Get("/faultRecord/devices", controllers.GetFaultRecordDevices) api.Post("/faultRecord/operations", controllers.CreateFaultRecordOperation) api.Get("/faultRecord/operations", controllers.ListFaultRecordOperations) api.Get("/faultRecord/operations/:id", controllers.GetFaultRecordOperation) api.Post("/faultRecord/operations/:id/cancel", controllers.CancelFaultRecordOperation) api.Post("/faultRecord/operations/:id/retry-download", controllers.RetryFaultRecordDownload) api.Get("/faultRecord/operations/:id/record", controllers.GetFaultRecordRecord) api.Get("/faultRecord/operations/:id/export", controllers.ExportFaultRecordFile) }