Documentation
¶
Index ¶
- func SetFilter(filter Filter)
- type AbstractFilter
- type Filter
- type FilterOperator
- type FiltersChain
- func (c *FiltersChain) AsFilter() Filter
- func (c *FiltersChain) AttachFilter(filter Filter) FiltersResponsibilityChain
- func (c *FiltersChain) Filter(event events.Event) (bool, error)
- func (c *FiltersChain) GetFilters() []Filter
- func (c *FiltersChain) InitializeFilters(from string)
- func (c *FiltersChain) MatchFilter(name string) bool
- type FiltersResponsibilityChain
- type FiltersStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AbstractFilter ¶
type AbstractFilter struct {
// contains filtered or unexported fields
}
AbstractFilter abstract component of visitor filter
func (*AbstractFilter) MatchFilter ¶
func (f *AbstractFilter) MatchFilter(name string) bool
MatchFilter if the name mathes self filter name
type Filter ¶
type Filter interface { GetName() string Filter(events.Event) (bool, error) MatchFilter(name string) bool }
Filter interface of visitor filter
type FilterOperator ¶
type FilterOperator interface { AttachFilter(filter Filter) FiltersResponsibilityChain Filter(events.Event) (bool, error) InitializeFilters(from string) }
FilterOperator interface for controller operation
type FiltersChain ¶
type FiltersChain struct { AbstractFilter // contains filtered or unexported fields }
FiltersChain responsibility chain of filters
func NewFilterChain ¶
func NewFilterChain(name string) *FiltersChain
NewFilterChain responsibility chain of filters
func (*FiltersChain) AttachFilter ¶
func (c *FiltersChain) AttachFilter(filter Filter) FiltersResponsibilityChain
AttachFilter on filter responsibility chain
func (*FiltersChain) Filter ¶
func (c *FiltersChain) Filter(event events.Event) (bool, error)
Filter call filter responsibility chain
func (*FiltersChain) GetFilters ¶
func (c *FiltersChain) GetFilters() []Filter
GetFilters of filter responsibility chain
func (*FiltersChain) InitializeFilters ¶
func (c *FiltersChain) InitializeFilters(from string)
InitializeFilters called from controller analyzement on loading
func (*FiltersChain) MatchFilter ¶
func (c *FiltersChain) MatchFilter(name string) bool
MatchFilter if the name mathes self filter chain
type FiltersResponsibilityChain ¶
type FiltersResponsibilityChain interface { AttachFilter(filter Filter) FiltersResponsibilityChain GetFilters() []Filter AsFilter() Filter MatchFilter(name string) bool }
FiltersResponsibilityChain
func GetDefaultFiltersChain ¶
func GetDefaultFiltersChain() FiltersResponsibilityChain
GetDefaultFiltersChain for each controllers default filter
type FiltersStrategy ¶
type FiltersStrategy interface {
Filters() []Filter
}
FiltersStrategy interface of filters strategy
Click to show internal directories.
Click to hide internal directories.