Documentation ¶
Index ¶
- func GetAvailableFilters() []model.Spec
- type Chain
- func (chain *Chain) Add(filter *model.FilterDef) (model.Filter, error)
- func (chain *Chain) Apply(article *model.Article) error
- func (chain *Chain) Get(id int) (model.Filter, error)
- func (chain *Chain) GetFilterDefs() []model.FilterDef
- func (chain *Chain) Remove(filter *model.FilterDef) error
- func (chain *Chain) Update(update *model.FilterDef) (model.Filter, error)
- type FetchFilter
- type MinifyFilter
- type TitleFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAvailableFilters ¶
GetAvailableFilters get all available filters
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain contains filter chain
func (*Chain) GetFilterDefs ¶
GetFilterDefs return definitions of the chain filter
type FetchFilter ¶
type FetchFilter struct {
// contains filtered or unexported fields
}
FetchFilter is a filter that try to fetch the original article content
func (*FetchFilter) DoFilter ¶
func (f *FetchFilter) DoFilter(article *model.Article) error
DoFilter applies filter on the article
func (*FetchFilter) GetDef ¶
func (f *FetchFilter) GetDef() model.FilterDef
GetDef return filter definition
type MinifyFilter ¶
type MinifyFilter struct {
// contains filtered or unexported fields
}
MinifyFilter is a filter that minify HTML content
func (*MinifyFilter) DoFilter ¶
func (f *MinifyFilter) DoFilter(article *model.Article) error
DoFilter applies filter on the article
func (*MinifyFilter) GetDef ¶
func (f *MinifyFilter) GetDef() model.FilterDef
GetDef return filter definition
type TitleFilter ¶
type TitleFilter struct {
// contains filtered or unexported fields
}
TitleFilter is a foo filter
func (*TitleFilter) DoFilter ¶
func (f *TitleFilter) DoFilter(article *model.Article) error
DoFilter applies filter on the article
func (*TitleFilter) GetDef ¶
func (f *TitleFilter) GetDef() model.FilterDef
GetDef return filter definition
Click to show internal directories.
Click to hide internal directories.