Documentation
¶
Overview ¶
Package webapi provides a web API spam detection service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomPassword ¶
GenerateRandomPassword generates a random password of a given length
Types ¶
type Config ¶
type Config struct { Version string // version to show in /ping ListenAddr string // listen address SpamFilter SpamFilter // spam detector AuthPasswd string // basic auth password for user "tg-spam" Dbg bool // debug mode }
Config defines server parameters
type SpamFilter ¶
type SpamFilter interface { Check(msg string, userID string) (spam bool, cr []lib.CheckResult) UpdateSpam(msg string) error UpdateHam(msg string) error AddApprovedUsers(ids ...string) RemoveApprovedUsers(ids ...string) ApprovedUsers() (res []string) }
SpamFilter is a spam detector interface.
Click to show internal directories.
Click to hide internal directories.