Documentation ¶
Index ¶
- func DefaultRouter() *gin.Engine
- func InitTestDatabase()
- func PerformRequest(r http.Handler, method, path string, header http.Header, body ...io.Reader) *httptest.ResponseRecorder
- func PerformRequestJSON(r http.Handler, method, path string, body io.Reader, header ...http.Header) *httptest.ResponseRecorder
- func PerformRequestJSONV2(r http.Handler, method, path string, data interface{}, header ...http.Header) *httptest.ResponseRecorder
- func StructToMap(i interface{}) (values url.Values)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PerformRequest ¶
func PerformRequest(r http.Handler, method, path string, header http.Header, body ...io.Reader) *httptest.ResponseRecorder
PerformRequest router test
func PerformRequestJSON ¶
func PerformRequestJSON(r http.Handler, method, path string, body io.Reader, header ...http.Header) *httptest.ResponseRecorder
PerformRequestJSON router test
func PerformRequestJSONV2 ¶
func PerformRequestJSONV2(r http.Handler, method, path string, data interface{}, header ...http.Header) *httptest.ResponseRecorder
PerformRequestJSONV2 使用interface{} 作为json参数,在函数内部去json Marshal
func StructToMap ¶
StructToMap return url Values for struct or map
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.