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