Documentation ¶
Index ¶
- Variables
- func CheckCaseResultValid(caseResults *[]CaseResult, glbCfg *GlbConfig) error
- func CheckCaseResultValidWithJson(cr *CaseResult, glbCfg *GlbConfig) (bool, error)
- func CheckCaseResultValidWithMysql(cr *CaseResult, glbCfg *GlbConfig) (bool, error)
- func ConnectDb(glbCfg *GlbConfig) error
- func GetAllFile(pathname string, files map[string]string) error
- func ReadJson(fname string, v interface{}) error
- func RequestUri(r *ReqCommon) ([]byte, error)
- func WriteJson(data []byte, fname string)
- type CaseResult
- type DBConfig
- type GlbConfig
- type ReqCommon
- type RespCheckCfg
- type RespWafApi
- type RespWafApiData
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var CheckCfgOperator = map[string]string{
"contain_str": "string",
"not_contain": "string",
"equal_str": "string",
"not_equal_str": "string",
"prefix_str": "string",
"suffix_str": "string",
"gt_num": "number",
"lt_num": "number",
"ge_num": "number",
"le_num": "number",
"eq_num": "number",
}
View Source
var OperatorFunc = map[string]interface{}{
"contain_str": contain_str,
"not_contain_str": not_contain_str,
"equal_str": equal_str,
"not_equal_str": not_equal_str,
"prefix_str": prefix_str,
"suffix_str": suffix_str,
"gt_num": gt_num,
"lt_num": lt_num,
"ge_num": ge_num,
"le_num": le_num,
"eq_num": eq_num,
}
Functions ¶
func CheckCaseResultValid ¶
func CheckCaseResultValid(caseResults *[]CaseResult, glbCfg *GlbConfig) error
func CheckCaseResultValidWithJson ¶
func CheckCaseResultValidWithJson(cr *CaseResult, glbCfg *GlbConfig) (bool, error)
func CheckCaseResultValidWithMysql ¶
func CheckCaseResultValidWithMysql(cr *CaseResult, glbCfg *GlbConfig) (bool, error)
func RequestUri ¶
Types ¶
type CaseResult ¶
type CaseResult struct { Name string `json:"case,omitempty"` RespCode int64 `json:"respCode,omitempty"` Type string `json:"type,omitempty"` RespBody []byte `json:"respBody,omitempty"` Resp RespWafApi CheckCfg *RespCheckCfg `json:"-"` CheckResult bool `json:"-"` }
type GlbConfig ¶
type GlbConfig struct { Debug bool `json:"debug,omitempty"` Enable map[string]bool `json:"enable,omitempty"` Method string `json:"method,omitempty"` Hosts map[string]string `json:"hosts,omitempty"` Headers map[string]string `json:"headers,omitempty"` RespFilter string `json:"respFilter,omitempty"` LogRespBody bool `json:"logRespBody,omitempty"` LogFile string `json:"logfile,omitempty"` DbCfg DBConfig `json:"dbCfg,omitempty"` DBEngine *xorm.Engine `json:"-"` //重新加载时手动关闭数据库引擎: DBengine.Close() }
type RespCheckCfg ¶
type RespWafApi ¶
type RespWafApiData ¶
Click to show internal directories.
Click to hide internal directories.