github.com/TeaOSLab/EdgeNode@v1.3.8/internal/waf/action_interface.go (about) 1 // Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 3 package waf 4 5 import ( 6 "github.com/TeaOSLab/EdgeNode/internal/waf/requests" 7 "net/http" 8 ) 9 10 type ActionInterface interface { 11 // Init 初始化 12 Init(waf *WAF) error 13 14 // ActionId 读取ActionId 15 ActionId() int64 16 17 // SetActionId 设置ID 18 SetActionId(id int64) 19 20 // Code 代号 21 Code() string 22 23 // IsAttack 是否为拦截攻击动作 24 IsAttack() bool 25 26 // WillChange determine if the action will change the request 27 WillChange() bool 28 29 // Perform the action 30 Perform(waf *WAF, group *RuleGroup, set *RuleSet, request requests.Request, writer http.ResponseWriter) PerformResult 31 }