filter

package
v0.0.0-...-6b47566 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppFilter = iota
	UserFilter
	TransportFilter
)

Variables

View Source
var Filters []*Filter
View Source
var ScriptFiles embed.FS

Functions

func InitFilter

func InitFilter()

Types

type Filter

type Filter struct {
	gorm.Model `json:"-"`
	Name       string
	Content    string
	Type       FilterType
	Enabled    bool
	// contains filtered or unexported fields
}

func FindFilter

func FindFilter(name string) *Filter

func (*Filter) ProcessMessage

func (ev *Filter) ProcessMessage(ctx context.Context, msg *msg.Message) (bool, error)

func (*Filter) SetupEvalFilter

func (ev *Filter) SetupEvalFilter() error

type FilterType

type FilterType int

func (FilterType) String

func (ft FilterType) String() string

Jump to

Keyboard shortcuts

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