实现WAF部分功能

This commit is contained in:
刘祥超
2020-10-08 11:11:49 +08:00
parent 7066d09764
commit 6ae2bbb550
6 changed files with 123 additions and 4 deletions

View File

@@ -105,8 +105,9 @@ func (this *HTTPFirewallRuleDAO) ComposeFirewallRule(ruleId int64) (*firewallcon
}
// 从配置中配置规则
func (this *HTTPFirewallRuleDAO) CreateRuleFromConfig(ruleConfig *firewallconfigs.HTTPFirewallRule) (int64, error) {
func (this *HTTPFirewallRuleDAO) CreateOrUpdateRuleFromConfig(ruleConfig *firewallconfigs.HTTPFirewallRule) (int64, error) {
op := NewHTTPFirewallRuleOperator()
op.Id = ruleConfig.Id
op.State = HTTPFirewallRuleStateEnabled
op.IsOn = ruleConfig.IsOn
op.Description = ruleConfig.Description