filters

package
v0.0.0-...-5c90490 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	// contains filtered or unexported fields
}

func NewChannel

func NewChannel(banChecker channelBanChecker) *Channel

func (*Channel) Description

func (*Channel) Description() Description

func (*Channel) IsMessageAllowed

func (f *Channel) IsMessageAllowed(message *tgbotapi.Message) bool

func (*Channel) ScrutinyModeOnly

func (*Channel) ScrutinyModeOnly() bool

func (*Channel) ShouldSuppressMock

func (*Channel) ShouldSuppressMock() bool

type Description

type Description struct {
	ID, Name, Desc string
}

type Filter

type Filter interface {
	IsMessageAllowed(message *tgbotapi.Message) bool
	ScrutinyModeOnly() bool
	ShouldSuppressMock() bool
	Description() Description
}

type Multi

type Multi struct {
	// contains filtered or unexported fields
}

func NewMulti

func NewMulti(s scrutinyChecker, f filterEnabledChecker, filters ...Filter) *Multi

func (Multi) HasFilterWithID

func (f Multi) HasFilterWithID(filterID string) bool

func (*Multi) IsMessageAllowed

func (f *Multi) IsMessageAllowed(message *tgbotapi.Message) (allowed bool, suppressMock bool)

type Mute

type Mute struct {
	// contains filtered or unexported fields
}

func NewMute

func NewMute(muteDB muteDB, messageSender sender, chatIDLister chatIDLister) *Mute

func (*Mute) Description

func (*Mute) Description() Description

func (*Mute) IsMessageAllowed

func (f *Mute) IsMessageAllowed(message *tgbotapi.Message) bool

func (*Mute) ScrutinyModeOnly

func (*Mute) ScrutinyModeOnly() bool

func (*Mute) ShouldSuppressMock

func (*Mute) ShouldSuppressMock() bool

type Regex

type Regex struct {
	// contains filtered or unexported fields
}

func NewRegex

func NewRegex(bannedRegexGetter bannedRegexGetter) *Regex

func NewRegexWithCompiler

func NewRegexWithCompiler(bannedRegexGetter bannedRegexGetter, regexCompiler regexCompiler) *Regex

func (*Regex) Description

func (*Regex) Description() Description

func (*Regex) IsMessageAllowed

func (f *Regex) IsMessageAllowed(message *tgbotapi.Message) bool

func (*Regex) ScrutinyModeOnly

func (*Regex) ScrutinyModeOnly() bool

func (*Regex) ShouldSuppressMock

func (*Regex) ShouldSuppressMock() bool

type Screenshot

type Screenshot struct {
	// contains filtered or unexported fields
}

func NewScreenshot

func NewScreenshot(messageImageDownloader messageImageDownloader, screenshotDetector screenshotDetector) *Screenshot

func (*Screenshot) Description

func (*Screenshot) Description() Description

func (*Screenshot) IsMessageAllowed

func (s *Screenshot) IsMessageAllowed(message *tgbotapi.Message) bool

func (*Screenshot) ScrutinyModeOnly

func (*Screenshot) ScrutinyModeOnly() bool

func (*Screenshot) ShouldSuppressMock

func (*Screenshot) ShouldSuppressMock() bool

type Stories

type Stories struct{}

func (*Stories) Description

func (*Stories) Description() Description

func (*Stories) IsMessageAllowed

func (*Stories) IsMessageAllowed(message *tgbotapi.Message) bool

func (*Stories) ScrutinyModeOnly

func (*Stories) ScrutinyModeOnly() bool

func (*Stories) ShouldSuppressMock

func (*Stories) ShouldSuppressMock() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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