moderationservice

package
v0.2.49 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanAccessModeration

func CanAccessModeration(userID uint64) bool

func CanModerateAnyCategory

func CanModerateAnyCategory(userID uint64, categoryIDs []uint64) bool

func HasOpenReports

func HasOpenReports(userID uint64) bool

func Invalidate

func Invalidate()

func InvalidateTopic

func InvalidateTopic(topicID uint64)

func IsAdmin

func IsAdmin(userID uint64) bool

func IsModerator

func IsModerator(userID uint64) bool

func PostStatusChanged

func PostStatusChanged(actorUserId uint64, snapshot PostSnapshot, blocked bool)

func ReportStatusChanged

func ReportStatusChanged(actorUserId uint64, snapshot ReportSnapshot, status string)

func ScopeForUser

func ScopeForUser(userID uint64) (bool, []uint64)

func TopicStatusChanged

func TopicStatusChanged(actorUserId uint64, topicId uint64, title string, blocked bool)

Types

type Grant

type Grant struct {
	UserID    uint64
	ScopeType string
	ScopeID   uint64
}

type PostSnapshot

type PostSnapshot struct {
	PostId       uint64
	TopicId      uint64
	TopicTitle   string
	PostNo       uint64
	PostAuthorId uint64
	PostAuthor   string
	Excerpt      string
}

type ReportSnapshot

type ReportSnapshot struct {
	ReportId   uint64
	TargetType string
	TargetId   uint64
	TargetURL  string
	TopicId    uint64
	TopicTitle string
	PostNo     uint64
	Reason     string
	Resolution string
	ReporterId uint64
	Reporter   string
	Excerpt    string
}

type Snapshot

type Snapshot struct {
	Grants    []Grant
	ExpiresAt time.Time
}

Jump to

Keyboard shortcuts

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