Documentation ¶
Overview ¶
Package rule is to control the audit rule behaviors
Index ¶
- type RuleManager
- func (r *RuleManager) Detect(tag string, destination string, email string) (reject bool)
- func (r *RuleManager) GetDetectResult(tag string) (*[]api.DetectResult, error)
- func (r *RuleManager) ProtocolDetect(tag string, protocol string) bool
- func (r *RuleManager) UpdateProtocolRule(tag string, ruleList []string) error
- func (r *RuleManager) UpdateRule(tag string, newRuleList []api.DetectRule) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RuleManager ¶
type RuleManager struct { InboundRule *sync.Map // Key: Tag, Value: []api.DetectRule InboundProtocolRule *sync.Map // Key: Tag, Value: []string InboundDetectResult *sync.Map // key: Tag, Value: mapset.NewSet []api.DetectResult }
func New ¶
func New() *RuleManager
func (*RuleManager) Detect ¶
func (r *RuleManager) Detect(tag string, destination string, email string) (reject bool)
func (*RuleManager) GetDetectResult ¶
func (r *RuleManager) GetDetectResult(tag string) (*[]api.DetectResult, error)
func (*RuleManager) ProtocolDetect ¶
func (r *RuleManager) ProtocolDetect(tag string, protocol string) bool
func (*RuleManager) UpdateProtocolRule ¶
func (r *RuleManager) UpdateProtocolRule(tag string, ruleList []string) error
func (*RuleManager) UpdateRule ¶
func (r *RuleManager) UpdateRule(tag string, newRuleList []api.DetectRule) error
Click to show internal directories.
Click to hide internal directories.