filter

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

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

Chain contains filter chain

func NewChainFilter

func NewChainFilter(definitions model.FilterDefCollection) (*Chain, error)

NewChainFilter create new chain filter

func (*Chain) Add

func (chain *Chain) Add(def *model.FilterDef) (model.Filter, error)

Add a filter to the chain

func (*Chain) Apply

func (chain *Chain) Apply(article *model.Article) error

Apply applies filter chain on an article

func (*Chain) Get

func (chain *Chain) Get(id string) (model.Filter, error)

Get returns a filter of the chain filter

func (*Chain) GetAvailableFilters

func (chain *Chain) GetAvailableFilters() []model.Spec

GetAvailableFilters get all available filters

func (*Chain) GetFilterDefs

func (chain *Chain) GetFilterDefs() model.FilterDefCollection

GetFilterDefs return definitions of the chain filter

func (*Chain) Remove

func (chain *Chain) Remove(id string) error

Remove a filter from the chain

func (*Chain) Update

func (chain *Chain) Update(id string, update *model.FilterDef) (model.Filter, error)

Update a filter of the chain

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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