Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GraphQLConfigs = map[string]*struct { Config *placeholder.GraphQLConfig Encoders []string GetPayloadFunc func(r *http.Request) string }{ "graphql-set1": { Config: &placeholder.GraphQLConfig{Method: "GET"}, Encoders: []string{"URL"}, GetPayloadFunc: func(r *http.Request) string { return r.URL.Query().Get("query") }, }, "rawrequest-set2": { Config: &placeholder.GraphQLConfig{Method: "POST"}, Encoders: []string{"Plain"}, GetPayloadFunc: func(r *http.Request) string { defer r.Body.Close() b, _ := io.ReadAll(r.Body) return string(b) }, }, }
View Source
var RawRequestConfigs = map[string]*struct { Config *placeholder.RawRequestConfig Encoders []string GetPayloadFunc func(r *http.Request) string }{ "rawrequest-set1": { Config: &placeholder.RawRequestConfig{Method: "POST", Path: "/{{payload}}", Headers: map[string]string{}, Body: ""}, Encoders: []string{"Base64", "Base64Flat", "URL"}, GetPayloadFunc: func(r *http.Request) string { return strings.TrimPrefix(r.URL.Path, "/") }, }, "rawrequest-set2": { Config: &placeholder.RawRequestConfig{Method: "POST", Path: "/", Headers: map[string]string{"X-Test": "{{payload}}"}, Body: ""}, Encoders: []string{"Base64", "Base64Flat", "JSUnicode", "Plain", "URL", "XMLEntity"}, GetPayloadFunc: func(r *http.Request) string { return r.Header.Get("X-Test") }, }, "rawrequest-set3": { Config: &placeholder.RawRequestConfig{Method: "POST", Path: "/", Headers: map[string]string{}, Body: "{{payload}}"}, Encoders: []string{"Base64", "Base64Flat", "JSUnicode", "Plain", "URL", "XMLEntity"}, GetPayloadFunc: func(r *http.Request) string { defer r.Body.Close() b, _ := io.ReadAll(r.Body) return string(b) }, }, }
Functions ¶
func GetConfigWithChromeClient ¶ added in v0.5.0
func GetConfigWithGoHTTPClient ¶ added in v0.5.0
func PickUpTestPorts ¶
Types ¶
type TestCasesMap ¶
func GenerateTestCases ¶
func GenerateTestCases() (testCases []*db.Case, testCasesMap *TestCasesMap)
func (*TestCasesMap) CheckTestCaseAvailability ¶
func (tcm *TestCasesMap) CheckTestCaseAvailability(caseHash string) (string, bool)
func (*TestCasesMap) CountTestCases ¶
func (tcm *TestCasesMap) CountTestCases() int
func (*TestCasesMap) GetRemainingValues ¶
func (tcm *TestCasesMap) GetRemainingValues() []string
Click to show internal directories.
Click to hide internal directories.