27 lines
693 B
Go
27 lines
693 B
Go
package audit
|
|
|
|
import "time"
|
|
|
|
type Status string
|
|
|
|
const (
|
|
StatusSuccess Status = "success"
|
|
StatusValidationFailed Status = "validation_failed"
|
|
StatusAuthenticationError Status = "authentication_error"
|
|
StatusUpstreamRejected Status = "upstream_rejected"
|
|
StatusUpstreamTimeout Status = "upstream_timeout"
|
|
StatusUpstreamUnavailable Status = "upstream_unavailable"
|
|
StatusInternalError Status = "internal_error"
|
|
)
|
|
|
|
type Record struct {
|
|
RequestID string
|
|
CreatedAt time.Time
|
|
Duration time.Duration
|
|
ClientIP *string
|
|
Status Status
|
|
UpstreamHTTPStatus *int
|
|
MaskedCard string
|
|
ResponseJSON []byte
|
|
}
|