-
Notifications
You must be signed in to change notification settings - Fork 22
/
checkpoint_interface.go
46 lines (33 loc) · 1.05 KB
/
checkpoint_interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package checkpoints
import (
"github.com/TeaOSLab/EdgeNode/internal/waf/requests"
"github.com/TeaOSLab/EdgeNode/internal/waf/utils"
"github.com/iwind/TeaGo/maps"
)
// CheckpointInterface Check Point
type CheckpointInterface interface {
// Init initialize
Init()
// IsRequest is request?
IsRequest() bool
// IsComposed is composed?
IsComposed() bool
// RequestValue get request value
RequestValue(req requests.Request, param string, options maps.Map, ruleId int64) (value any, hasRequestBody bool, sysErr error, userErr error)
// ResponseValue get response value
ResponseValue(req requests.Request, resp *requests.Response, param string, options maps.Map, ruleId int64) (value any, hasRequestBody bool, sysErr error, userErr error)
// ParamOptions param option list
ParamOptions() *ParamOptions
// Options options
Options() []OptionInterface
// Start start
Start()
// Stop stop
Stop()
// SetPriority set priority
SetPriority(priority int)
// Priority get priority
Priority() int
// CacheLife regexp cache life
CacheLife() utils.CacheLife
}