tool

package
v1.1.24 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterVerify

func FilterVerify(f *pipeline.Filter) bool

FilterVerify verify filter's type return false is illegal

func FilterVerifyStr

func FilterVerifyStr(s string) bool

FilterVerifyStr verify sting correct return false if illegal

Types

type Filter

type Filter struct {
	DBBlack    map[string]bool
	TableBlack map[string]bool
	DBWhite    map[string]bool
	TableWhite map[string]bool
}

Filter verify message, filter or pass message by blacklist and whitelist

func NewFilter

func NewFilter(filters []*pipeline.Filter) (f *Filter)

NewFilter return a Filter object

func (*Filter) IsFilter

func (t *Filter) IsFilter(msg *message.Message) bool

IsFilter filter message by message object return true if not pass

func (*Filter) IsFilterWithName

func (t *Filter) IsFilterWithName(name string) (bool, error)

IsFilterWithName filter message by database name and table name. return true if not pass

Jump to

Keyboard shortcuts

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