entity

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BanReason

type BanReason string

BanReason describes ban reason.

const (
	BanReasonNone           BanReason = "none"
	BanReasonPersonNonGrata BanReason = "person_non_grata"
)

Available ban reasons.

type Comment

type Comment struct {
	ID      int    `json:"id"`
	FromID  int    `json:"from_id"`
	Date    int    `json:"date"`
	Text    string `json:"text"`
	PostID  int    `json:"post_id"`
	OwnerID int    `json:"owner_id"`
}

Comment describes comment.

type HeuristicPersonNonGrataRule

type HeuristicPersonNonGrataRule struct {
	Name      *string `toml:"name"`
	BirthDate *string `toml:"birth_date"`
}

HeuristicPersonNonGrataRule describes person non grata rule.

func (HeuristicPersonNonGrataRule) Check

Check checks if user qualifies for rule.

type HeuristicRules

type HeuristicRules struct {
	PersonNonGrata []HeuristicPersonNonGrataRule `toml:"person_non_grata"`
}

HeuristicRules describes heuristic rules.

func (*HeuristicRules) Check

func (rr *HeuristicRules) Check(user *object.UsersUser) (BanReason, bool)

Check checks if user qualifies for heuristics.

Jump to

Keyboard shortcuts

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