package audit

import "time"

type EventType int

const (
	EventUnspecified EventType = iota
	EventSuccessfullLogin
	EventFailedLogin
	EventSuccessfullRegister
	EventFailedRegister
	EventSuccessfullAuth
	EventFailedAuth
	EventUserUpdated
)

type Severity int

const (
	SeverityAlert   = 0
	SeverityWarning = 10
	SeverityInfo    = 100
	SeverityNotice  = 200
)

type Actor struct {
	ActorSysName string
	RemoteIP     string
	ID           int64
}

const (
	ActorDrainCloudCore = "_actor_draincloud_core"
	ActorUser           = "user"
)

type AuditLogEntry struct {
	EventType EventType
	// Who caused changes
	Actor     Actor
	Severity  Severity
	SessionID int64
	CreatedAt time.Time
	// What changed
	Object string
	// How it was changed
	Action string
}
