Documentation ¶
Index ¶
- func NewFilterResponseFromDef(def *model.FilterDef) *app.FilterResponse
- type Builder
- func (fb *Builder) Alias(alias *string) *Builder
- func (fb *Builder) Build() *model.FilterDef
- func (fb *Builder) Condition(condition *string) *Builder
- func (fb *Builder) Enable(status bool) *Builder
- func (fb *Builder) From(source model.FilterDef) *Builder
- func (fb *Builder) FromURI(URI string) *Builder
- func (fb *Builder) ID(ID string) *Builder
- func (fb *Builder) NewID() *Builder
- func (fb *Builder) Props(props model.FilterProps) *Builder
- func (fb *Builder) Spec(name string) *Builder
- type Chain
- func (chain *Chain) Add(def *model.FilterDef) (model.Filter, error)
- func (chain *Chain) Apply(article *model.Article) error
- func (chain *Chain) Get(id string) (model.Filter, error)
- func (chain *Chain) GetAvailableFilters() []model.Spec
- func (chain *Chain) GetFilterDefs() model.FilterDefCollection
- func (chain *Chain) Remove(id string) error
- func (chain *Chain) Update(id string, update *model.FilterDef) (model.Filter, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFilterResponseFromDef ¶ added in v3.4.0
func NewFilterResponseFromDef(def *model.FilterDef) *app.FilterResponse
NewFilterResponseFromDef creates new Filter response from a definition
Types ¶
type Builder ¶ added in v3.4.0
type Builder struct {
// contains filtered or unexported fields
}
Builder is used to create an Filter definition
func NewBuilder ¶ added in v3.4.0
func NewBuilder() *Builder
NewBuilder creates new Filter definition builder instance
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) GetAvailableFilters ¶
GetAvailableFilters get all available filters
func (*Chain) GetFilterDefs ¶
func (chain *Chain) GetFilterDefs() model.FilterDefCollection
GetFilterDefs return definitions of the chain filter
Click to show internal directories.
Click to hide internal directories.