filter

package
v0.0.0-...-9835270 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: AGPL-3.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

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

type Filter

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

func (*Filter) Delete

func (f *Filter) Delete(data []byte)

func (*Filter) Insert

func (f *Filter) Insert(data []byte)

func (*Filter) InsertUniq

func (f *Filter) InsertUniq(data []byte)

func (*Filter) Load

func (f *Filter) Load()

func (*Filter) Lookup

func (f *Filter) Lookup(data []byte) bool

may false positive

type FilterLoader

type FilterLoader interface {
	LoadFilterData(context.Context, string, *Filter) bool
}

type FilterMng

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

func GetFilterMng

func GetFilterMng() *FilterMng

func (*FilterMng) Register

func (mng *FilterMng) Register(key string, loader FilterLoader) *Filter

type SimpleFilter

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

func NewSimpleFilter

func NewSimpleFilter(
	loader SimpleFilterLoader,
) *SimpleFilter

func (*SimpleFilter) Delete

func (sf *SimpleFilter) Delete(userId, deviceId string)

func (*SimpleFilter) Insert

func (sf *SimpleFilter) Insert(userId, deviceId string)

func (*SimpleFilter) Load

func (sf *SimpleFilter) Load() bool

func (*SimpleFilter) Lookup

func (sf *SimpleFilter) Lookup(userId, deviceId string) bool

type SimpleFilterLoader

type SimpleFilterLoader interface {
	LoadSimpleFilterData(context.Context, *SimpleFilter) bool
}

Jump to

Keyboard shortcuts

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