mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-18 03:35:10 +08:00
实现WAF
This commit is contained in:
32
internal/waf/checkpoints/checkpoint_interface.go
Normal file
32
internal/waf/checkpoints/checkpoint_interface.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package checkpoints
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeNode/internal/waf/requests"
|
||||
)
|
||||
|
||||
// Check Point
|
||||
type CheckpointInterface interface {
|
||||
// initialize
|
||||
Init()
|
||||
|
||||
// is request?
|
||||
IsRequest() bool
|
||||
|
||||
// get request value
|
||||
RequestValue(req *requests.Request, param string, options map[string]interface{}) (value interface{}, sysErr error, userErr error)
|
||||
|
||||
// get response value
|
||||
ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]interface{}) (value interface{}, sysErr error, userErr error)
|
||||
|
||||
// param option list
|
||||
ParamOptions() *ParamOptions
|
||||
|
||||
// options
|
||||
Options() []OptionInterface
|
||||
|
||||
// start
|
||||
Start()
|
||||
|
||||
// stop
|
||||
Stop()
|
||||
}
|
||||
Reference in New Issue
Block a user