Documentation ¶
Overview ¶
Package filtermodel holds rules related files
Package filtermodel holds rules related files
Index ¶
- type RuleFilterEvent
- func (e *RuleFilterEvent) GetFieldEventType(_ eval.Field) (string, error)
- func (e *RuleFilterEvent) GetFieldType(field eval.Field) (reflect.Kind, error)
- func (e *RuleFilterEvent) GetFieldValue(field eval.Field) (interface{}, error)
- func (e *RuleFilterEvent) GetTags() []string
- func (e *RuleFilterEvent) GetType() string
- func (e *RuleFilterEvent) Init()
- func (e *RuleFilterEvent) SetFieldValue(field eval.Field, _ interface{}) error
- type RuleFilterModel
- func (m *RuleFilterModel) GetEvaluator(field eval.Field, _ eval.RegisterID) (eval.Evaluator, error)
- func (m *RuleFilterModel) GetFieldRestrictions(_ eval.Field) []eval.EventType
- func (m *RuleFilterModel) NewEvent() eval.Event
- func (m *RuleFilterModel) ValidateField(_ string, _ eval.FieldValue) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RuleFilterEvent ¶
RuleFilterEvent defines a rule filter event
func (*RuleFilterEvent) GetFieldEventType ¶
func (e *RuleFilterEvent) GetFieldEventType(_ eval.Field) (string, error)
GetFieldEventType returns the event type for the given field
func (*RuleFilterEvent) GetFieldType ¶
GetFieldType get the type of the field
func (*RuleFilterEvent) GetFieldValue ¶
func (e *RuleFilterEvent) GetFieldValue(field eval.Field) (interface{}, error)
GetFieldValue gets a field value
func (*RuleFilterEvent) GetTags ¶
func (e *RuleFilterEvent) GetTags() []string
GetTags returns the tags for this event
func (*RuleFilterEvent) GetType ¶
func (e *RuleFilterEvent) GetType() string
GetType returns the type for this event
func (*RuleFilterEvent) SetFieldValue ¶
func (e *RuleFilterEvent) SetFieldValue(field eval.Field, _ interface{}) error
SetFieldValue sets the value for the given field
type RuleFilterModel ¶
RuleFilterModel defines a filter model
func NewRuleFilterModel ¶
func NewRuleFilterModel(cfg *config.Config, origin string) (*RuleFilterModel, error)
NewRuleFilterModel returns a new rule filter model
func (*RuleFilterModel) GetEvaluator ¶
func (m *RuleFilterModel) GetEvaluator(field eval.Field, _ eval.RegisterID) (eval.Evaluator, error)
GetEvaluator gets the evaluator
func (*RuleFilterModel) GetFieldRestrictions ¶
func (m *RuleFilterModel) GetFieldRestrictions(_ eval.Field) []eval.EventType
GetFieldRestrictions returns the field event type restrictions
func (*RuleFilterModel) NewEvent ¶
func (m *RuleFilterModel) NewEvent() eval.Event
NewEvent returns a new event
func (*RuleFilterModel) ValidateField ¶
func (m *RuleFilterModel) ValidateField(_ string, _ eval.FieldValue) error
ValidateField returns whether the value use against the field is valid