Documentation ¶
Index ¶
- func Do(handler echo.HandlerFunc, req *http.Request, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)
- func DoDELETE(handler echo.HandlerFunc, url string, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)
- func DoGET(handler echo.HandlerFunc, url string, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)
- func DoPATCH(handler echo.HandlerFunc, url string, json string, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)
- func DoPOST(handler echo.HandlerFunc, url string, json string, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)
- func DoPUT(handler echo.HandlerFunc, url string, json string, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)
- func EqualResp(t *testing.T, expected Response, rec *httptest.ResponseRecorder)
- type Request
- type Response
- type TestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Do ¶ added in v0.9.1
func Do(handler echo.HandlerFunc, req *http.Request, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)
Do request against the handler
func DoDELETE ¶
func DoDELETE(handler echo.HandlerFunc, url string, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)
DoDELETE return echo.Context and httptest.ResponseRecorder for DELETE Request (deprecated)
func DoGET ¶
func DoGET(handler echo.HandlerFunc, url string, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)
DoGET return recorder and error for GET API (deprecated)
func DoPATCH ¶ added in v0.9.1
func DoPATCH(handler echo.HandlerFunc, url string, json string, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)
DoPATCH return echo.Context and httptest.ResponseRecorder for PUT Request (deprecated)
func DoPOST ¶
func DoPOST(handler echo.HandlerFunc, url string, json string, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)
DoPOST return echo.Context and httptest.ResponseRecorder for POST Request (deprecated)
Types ¶
type Request ¶ added in v0.8.30
type Request struct { Method string Target string Body string Header http.Header URLParams map[string]string }
Request for testcase
Click to show internal directories.
Click to hide internal directories.