Documentation
¶
Index ¶
- type Request
- type Response
- type TestRequest
- func (this *TestRequest) Format(s string) string
- func (this *TestRequest) WAFClose()
- func (this *TestRequest) WAFGetCacheBody() []byte
- func (this *TestRequest) WAFOnAction(action interface{}) bool
- func (this *TestRequest) WAFRaw() *http.Request
- func (this *TestRequest) WAFReadBody(max int64) (data []byte, err error)
- func (this *TestRequest) WAFRemoteAddr() string
- func (this *TestRequest) WAFRemoteIP() string
- func (this *TestRequest) WAFRestoreBody(data []byte)
- func (this *TestRequest) WAFServerId() int64
- func (this *TestRequest) WAFSetCacheBody(bodyData []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request interface {
// WAFRaw 原始请求
WAFRaw() *http.Request
// WAFRemoteIP 客户端IP
WAFRemoteIP() string
// WAFGetCacheBody 获取缓存中的Body
WAFGetCacheBody() []byte
// WAFSetCacheBody 设置Body
WAFSetCacheBody(body []byte)
// WAFReadBody 读取Body
WAFReadBody(max int64) (data []byte, err error)
// WAFRestoreBody 恢复Body
WAFRestoreBody(data []byte)
// WAFServerId 服务ID
WAFServerId() int64
// WAFClose 关闭当前请求所在的连接
WAFClose()
// WAFOnAction 动作回调
WAFOnAction(action interface{}) (goNext bool)
// WAFFingerprint 读取连接指纹
WAFFingerprint() []byte
// Format 格式化变量
Format(string) string
}
type Response ¶
func NewResponse ¶
type TestRequest ¶
type TestRequest struct {
BodyData []byte
// contains filtered or unexported fields
}
func NewTestRequest ¶
func NewTestRequest(raw *http.Request) *TestRequest
func (*TestRequest) Format ¶
func (this *TestRequest) Format(s string) string
func (*TestRequest) WAFGetCacheBody ¶
func (this *TestRequest) WAFGetCacheBody() []byte
func (*TestRequest) WAFOnAction ¶
func (this *TestRequest) WAFOnAction(action interface{}) bool
func (*TestRequest) WAFRaw ¶
func (this *TestRequest) WAFRaw() *http.Request
func (*TestRequest) WAFReadBody ¶
func (this *TestRequest) WAFReadBody(max int64) (data []byte, err error)
func (*TestRequest) WAFRemoteAddr ¶
func (this *TestRequest) WAFRemoteAddr() string
func (*TestRequest) WAFRemoteIP ¶
func (this *TestRequest) WAFRemoteIP() string
func (*TestRequest) WAFRestoreBody ¶
func (this *TestRequest) WAFRestoreBody(data []byte)
func (*TestRequest) WAFServerId ¶
func (this *TestRequest) WAFServerId() int64
func (*TestRequest) WAFSetCacheBody ¶
func (this *TestRequest) WAFSetCacheBody(bodyData []byte)
Click to show internal directories.
Click to hide internal directories.