2020-10-08 15:06:42 +08:00
|
|
|
package checkpoints
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/TeaOSLab/EdgeNode/internal/waf/requests"
|
2020-11-18 19:35:38 +08:00
|
|
|
"github.com/iwind/TeaGo/maps"
|
2020-10-08 15:06:42 +08:00
|
|
|
)
|
|
|
|
|
|
2021-07-18 15:51:49 +08:00
|
|
|
// CheckpointInterface Check Point
|
2020-10-08 15:06:42 +08:00
|
|
|
type CheckpointInterface interface {
|
2021-07-18 15:51:49 +08:00
|
|
|
// Init initialize
|
2020-10-08 15:06:42 +08:00
|
|
|
Init()
|
|
|
|
|
|
2021-07-18 15:51:49 +08:00
|
|
|
// IsRequest is request?
|
2020-10-08 15:06:42 +08:00
|
|
|
IsRequest() bool
|
|
|
|
|
|
2021-07-18 15:51:49 +08:00
|
|
|
// IsComposed is composed?
|
2020-11-18 19:35:38 +08:00
|
|
|
IsComposed() bool
|
|
|
|
|
|
2021-07-18 15:51:49 +08:00
|
|
|
// RequestValue get request value
|
|
|
|
|
RequestValue(req requests.Request, param string, options maps.Map) (value interface{}, sysErr error, userErr error)
|
2020-10-08 15:06:42 +08:00
|
|
|
|
2021-07-18 15:51:49 +08:00
|
|
|
// ResponseValue get response value
|
|
|
|
|
ResponseValue(req requests.Request, resp *requests.Response, param string, options maps.Map) (value interface{}, sysErr error, userErr error)
|
2020-10-08 15:06:42 +08:00
|
|
|
|
2021-07-18 15:51:49 +08:00
|
|
|
// ParamOptions param option list
|
2020-10-08 15:06:42 +08:00
|
|
|
ParamOptions() *ParamOptions
|
|
|
|
|
|
2021-07-18 15:51:49 +08:00
|
|
|
// Options options
|
2020-10-08 15:06:42 +08:00
|
|
|
Options() []OptionInterface
|
|
|
|
|
|
2021-07-18 15:51:49 +08:00
|
|
|
// Start start
|
2020-10-08 15:06:42 +08:00
|
|
|
Start()
|
|
|
|
|
|
2021-07-18 15:51:49 +08:00
|
|
|
// Stop stop
|
2020-10-08 15:06:42 +08:00
|
|
|
Stop()
|
|
|
|
|
}
|