github.com/TeaOSLab/EdgeNode@v1.3.8/internal/waf/checkpoints/sample_response.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 // SampleResponseCheckpoint just a sample checkpoint, copy and change it for your new checkpoint 10 type SampleResponseCheckpoint struct { 11 Checkpoint 12 } 13 14 func (this *SampleResponseCheckpoint) IsRequest() bool { 15 return false 16 } 17 18 func (this *SampleResponseCheckpoint) RequestValue(req requests.Request, param string, options maps.Map, ruleId int64) (value any, sysErr error, userErr error) { 19 return 20 } 21 22 func (this *SampleResponseCheckpoint) ResponseValue(req requests.Request, resp *requests.Response, param string, options maps.Map, ruleId int64) (value any, hasRequestBody bool, sysErr error, userErr error) { 23 return 24 } 25 26 func (this *SampleResponseCheckpoint) CacheLife() utils.CacheLife { 27 return utils.CacheMiddleLife 28 }