Documentation ¶
Overview ¶
Package filtermodel holds rules related files
Package filtermodel holds rules related files ¶
Package filtermodel holds rules related files
Index ¶
- type OSOnlyFilterEvent
- func (e *OSOnlyFilterEvent) GetFieldEventType(_ eval.Field) (string, error)
- func (e *OSOnlyFilterEvent) GetFieldType(field eval.Field) (reflect.Kind, error)
- func (e *OSOnlyFilterEvent) GetFieldValue(field eval.Field) (interface{}, error)
- func (e *OSOnlyFilterEvent) GetTags() []string
- func (e *OSOnlyFilterEvent) GetType() string
- func (e *OSOnlyFilterEvent) Init()
- func (e *OSOnlyFilterEvent) SetFieldValue(field eval.Field, _ interface{}) error
- type OSOnlyFilterModel
- func (m *OSOnlyFilterModel) GetEvaluator(field eval.Field, _ eval.RegisterID) (eval.Evaluator, error)
- func (m *OSOnlyFilterModel) GetFieldRestrictions(_ eval.Field) []eval.EventType
- func (m *OSOnlyFilterModel) NewEvent() eval.Event
- func (m *OSOnlyFilterModel) ValidateField(_ string, _ eval.FieldValue) error
- 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 OSOnlyFilterEvent ¶
type OSOnlyFilterEvent struct {
// contains filtered or unexported fields
}
OSOnlyFilterEvent defines an os-only rule filter event
func (*OSOnlyFilterEvent) GetFieldEventType ¶
func (e *OSOnlyFilterEvent) GetFieldEventType(_ eval.Field) (string, error)
GetFieldEventType returns the event type for the given field
func (*OSOnlyFilterEvent) GetFieldType ¶
GetFieldType get the type of the field
func (*OSOnlyFilterEvent) GetFieldValue ¶
func (e *OSOnlyFilterEvent) GetFieldValue(field eval.Field) (interface{}, error)
GetFieldValue gets a field value
func (*OSOnlyFilterEvent) GetTags ¶
func (e *OSOnlyFilterEvent) GetTags() []string
GetTags returns the tags for this event
func (*OSOnlyFilterEvent) GetType ¶
func (e *OSOnlyFilterEvent) GetType() string
GetType returns the type for this event
func (*OSOnlyFilterEvent) Init ¶
func (e *OSOnlyFilterEvent) Init()
Init inits the rule filter event
func (*OSOnlyFilterEvent) SetFieldValue ¶
func (e *OSOnlyFilterEvent) SetFieldValue(field eval.Field, _ interface{}) error
SetFieldValue sets the value for the given field
type OSOnlyFilterModel ¶
type OSOnlyFilterModel struct {
// contains filtered or unexported fields
}
OSOnlyFilterModel defines a filter model
func NewOSOnlyFilterModel ¶
func NewOSOnlyFilterModel(os string) *OSOnlyFilterModel
NewOSOnlyFilterModel returns a new rule filter model
func (*OSOnlyFilterModel) GetEvaluator ¶
func (m *OSOnlyFilterModel) GetEvaluator(field eval.Field, _ eval.RegisterID) (eval.Evaluator, error)
GetEvaluator gets the evaluator
func (*OSOnlyFilterModel) GetFieldRestrictions ¶
func (m *OSOnlyFilterModel) GetFieldRestrictions(_ eval.Field) []eval.EventType
GetFieldRestrictions returns the field event type restrictions
func (*OSOnlyFilterModel) NewEvent ¶
func (m *OSOnlyFilterModel) NewEvent() eval.Event
NewEvent returns a new event
func (*OSOnlyFilterModel) ValidateField ¶
func (m *OSOnlyFilterModel) ValidateField(_ string, _ eval.FieldValue) error
ValidateField returns whether the value use against the field is valid
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