Documentation
¶
Overview ¶
Auto-Moderation rules engine for anti-spam and other moderation tasks.
This package (`github.com/bluesky-social/indigo/automod`) contains a "rules engine" to augment human moderators in the atproto network. Batches of rules are processed for novel "events" such as a new post or update of an account handle. Counters and other statistics are collected, which can drive subsequent rule invocations. The outcome of rules can be moderation events like "report account for human review" or "label post". A lot of what this package does is collect and maintain caches of relevant metadata about accounts and pieces of content, so that rules have efficient access to this information.
See `automod/README.md` for more background, and `cmd/hepa` for a daemon built on this package.
Index ¶
- Variables
- type AccountContext
- type AccountMeta
- type AccountPrivate
- type BlobRuleFunc
- type Engine
- type EngineConfig
- type IdentityRuleFunc
- type Notifier
- type OzoneEventContext
- type OzoneEventRuleFunc
- type PostRuleFunc
- type ProfileRuleFunc
- type ProfileSummary
- type RecordContext
- type RecordOp
- type RecordRuleFunc
- type RuleSet
- type SlackNotifier
Constants ¶
This section is empty.
Variables ¶
var ( ReportReasonSpam = engine.ReportReasonSpam ReportReasonViolation = engine.ReportReasonViolation ReportReasonMisleading = engine.ReportReasonMisleading ReportReasonSexual = engine.ReportReasonSexual ReportReasonRude = engine.ReportReasonRude ReportReasonOther = engine.ReportReasonOther PeriodTotal = countstore.PeriodTotal PeriodDay = countstore.PeriodDay PeriodHour = countstore.PeriodHour CreateOp = engine.CreateOp UpdateOp = engine.UpdateOp DeleteOp = engine.DeleteOp )
Functions ¶
This section is empty.
Types ¶
type AccountContext ¶
type AccountContext = engine.AccountContext
type AccountMeta ¶
type AccountMeta = engine.AccountMeta
type AccountPrivate ¶
type AccountPrivate = engine.AccountPrivate
type BlobRuleFunc ¶
type BlobRuleFunc = engine.BlobRuleFunc
type EngineConfig ¶
type EngineConfig = engine.EngineConfig
type IdentityRuleFunc ¶
type IdentityRuleFunc = engine.IdentityRuleFunc
type OzoneEventContext ¶
type OzoneEventContext = engine.OzoneEventContext
type OzoneEventRuleFunc ¶
type OzoneEventRuleFunc = engine.OzoneEventRuleFunc
type PostRuleFunc ¶
type PostRuleFunc = engine.PostRuleFunc
type ProfileRuleFunc ¶
type ProfileRuleFunc = engine.ProfileRuleFunc
type ProfileSummary ¶
type ProfileSummary = engine.ProfileSummary
type RecordContext ¶
type RecordContext = engine.RecordContext
type RecordRuleFunc ¶
type RecordRuleFunc = engine.RecordRuleFunc
type SlackNotifier ¶
type SlackNotifier = engine.SlackNotifier
Directories
¶
Path | Synopsis |
---|---|
Automod component for caching arbitrary data (as JSON strings) with a fixed TTL and purging.
|
Automod component for caching arbitrary data (as JSON strings) with a fixed TTL and purging. |
Automod development helpers for fetching and saving snapshots of real-world content and metadata.
|
Automod development helpers for fetching and saving snapshots of real-world content and metadata. |
Code for consuming from atproto firehose and ozone event stream, pushing events in to automod engine.
|
Code for consuming from atproto firehose and ozone event stream, pushing events in to automod engine. |
Interface for fast atomic counters, and separate implementations using redis and in-process memory.
|
Interface for fast atomic counters, and separate implementations using redis and in-process memory. |
Core automod rules engine implementation and related types
|
Core automod rules engine implementation and related types |
Interface for storing "flags", a form of private automod metadata.
|
Interface for storing "flags", a form of private automod metadata. |
String processing helpers for doing fuzzy detection and normalized token matching against keyword lists.
|
String processing helpers for doing fuzzy detection and normalized token matching against keyword lists. |
Example automod rules and helpers.
|
Example automod rules and helpers. |
Interface for simple sets of strings, with fast inclusion checks.
|
Interface for simple sets of strings, with fast inclusion checks. |
automod helpers for visual content (image blobs)
|
automod helpers for visual content (image blobs) |