audit

package
v1.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2025 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// AuditReply is for new reply events
	AuditReply = "Replied"
	// AuditNewTag is for tag creation events
	AuditNewTag = "Tag Created"
	// AuditAddTag is for adding a tag to an image events
	AuditAddTag = "Tag Added"
	// AuditNewThread is for thread creation events
	AuditNewThread = "Thread Created"

	// AuditCloseThread is for thread closure events
	AuditCloseThread = "Thread Closed"
	// AuditOpenThread is for thread opening events
	AuditOpenThread = "Thread Opened"
	// AuditStickyThread is for thread sticky events
	AuditStickyThread = "Thread Stickied"
	// AuditUnstickyThread is for thread unsticky events
	AuditUnstickyThread = "Thread Unstickied"
	// AuditDeleteThread is for thread deletion events
	AuditDeleteThread = "Thread Deleted"
	// AuditPurgeThread is for thread purging events
	AuditPurgeThread = "Thread Purged"
	// AuditDeletePost is for post deletion events
	AuditDeletePost = "Post Deleted"
	// AuditPurgePost is for post purging events
	AuditPurgePost = "Post Purged"
	// AuditPurge is for total purging events
	AuditPurge = "Deleted Items Purged"
	// AuditFlushCache is for cache flushing events
	AuditFlushCache = "Cache Flushed"
	// AuditBanIP is for user banning events
	AuditBanIP = "IP Banned"
	// AuditBanFile is for file banning events
	AuditBanFile = "File Banned"
	// AuditSpam is for spam reporting events
	AuditSpam = "Spam Reported"
	// AuditUpdateTag is for admin tag update events
	AuditUpdateTag = "Tag Updated"
	// AuditDeleteTag is for admin tag delete events
	AuditDeleteTag = "Tag Deleted"
	// AuditDeleteImageTag is for admin image tag delete events
	AuditDeleteImageTag = "Image Tag Deleted"

	// AuditRegister is for user registration events
	AuditRegister = "Account Registered"
	// AuditChangePassword is for user password update events
	AuditChangePassword = "Password Changed"
	// AuditResetPassword is for user password reset events
	AuditResetPassword = "Password Reset"
	// AuditEmailUpdate is for user email update events
	AuditEmailUpdate = "Email Updated"
	// AuditFavoriteRemoved is for user favorite removal events
	AuditFavoriteRemoved = "Favorite Removed"
	// AuditFavoriteAdded is for user favorite events
	AuditFavoriteAdded = "Favorite Added"
)

Functions

This section is empty.

Types

type Audit

type Audit struct {
	User   uint
	Ib     uint
	Type   LogType
	IP     string
	Action string
	Info   string
}

Audit adds an action to the audit log

func (*Audit) IsValid

func (m *Audit) IsValid() bool

IsValid will check struct validity

func (*Audit) Submit

func (m *Audit) Submit() (err error)

Submit will insert audit info into the audit log

type LogType added in v1.2.0

type LogType uint

LogType type

const (
	// BoardLog is for board specific events
	BoardLog LogType = iota + 1
	// ModLog is for mod events
	ModLog
	// UserLog is for user events
	UserLog
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL