1Panel/backend/app/dto/logs.go

51 lines
1.1 KiB
Go
Raw Normal View History

2022-08-16 23:30:23 +08:00
package dto
import (
"time"
)
2022-11-15 17:20:57 +08:00
type OperationLog struct {
2023-02-07 18:48:32 +08:00
ID uint `json:"id"`
Source string `json:"source"`
2022-08-16 23:30:23 +08:00
IP string `json:"ip"`
Path string `json:"path"`
Method string `json:"method"`
UserAgent string `json:"userAgent"`
Latency time.Duration `json:"latency"`
Status string `json:"status"`
Message string `json:"message"`
2022-08-16 23:30:23 +08:00
DetailZH string `json:"detailZH"`
DetailEN string `json:"detailEN"`
2022-08-16 23:30:23 +08:00
CreatedAt time.Time `json:"createdAt"`
}
2022-11-15 17:20:57 +08:00
2023-02-07 18:48:32 +08:00
type SearchOpLogWithPage struct {
PageInfo
Source string `json:"source"`
Status string `json:"status"`
Operation string `json:"operation"`
}
type SearchLgLogWithPage struct {
PageInfo
IP string `json:"ip"`
Status string `json:"status"`
}
2022-11-15 17:20:57 +08:00
type LoginLog struct {
ID uint `json:"id"`
IP string `json:"ip"`
Address string `json:"address"`
Agent string `json:"agent"`
Status string `json:"status"`
Message string `json:"message"`
CreatedAt time.Time `json:"createdAt"`
}
2023-01-04 22:31:51 +08:00
type CleanLog struct {
LogType string `json:"logType" validate:"required,oneof=login operation"`
}