@Tags SSH @Summary Export host SSH logs @Accept json @Param request body dto.SearchSSHLog true "request" @Success 200 {string} path @Security ApiKeyAuth @Security Timestamp @Router /hosts/ssh/log/export [post]
(c *gin.Context)
| 212 | // @Security Timestamp |
| 213 | // @Router /hosts/ssh/log/export [post] |
| 214 | func (b *BaseApi) ExportSSHLogs(c *gin.Context) { |
| 215 | var req dto.SearchSSHLog |
| 216 | if err := helper.CheckBindAndValidate(&req, c); err != nil { |
| 217 | return |
| 218 | } |
| 219 | tmpFile, err := sshService.ExportLog(c, req) |
| 220 | if err != nil { |
| 221 | helper.InternalServer(c, err) |
| 222 | return |
| 223 | } |
| 224 | helper.SuccessWithData(c, tmpFile) |
| 225 | } |
| 226 | |
| 227 | // @Tags SSH |
| 228 | // @Summary Load host SSH conf |