backendOperationEvent.go 631 B

123456789101112131415161718
  1. package eventmodels
  2. // 后台用户操作事件
  3. type BackendOperationEventContent struct {
  4. UserBasic
  5. EventBasic
  6. RoleId string `json:"role_id"` // 角色ID
  7. Path string `json:"url"` // 请求路径
  8. Method string `json:"method"` // 请求方法
  9. StatusCode int `json:"status_code"` // HTTP状态码
  10. Dur int64 `json:"dur"` // 请求耗时(毫秒)
  11. ClientIP string `json:"client_ip"` // 客户端IP
  12. ErrorMessage string `json:"error_message"` // 错误信息
  13. }
  14. func (e *BackendOperationEventContent) EventName() string {
  15. return "BackendOperation"
  16. }