tester

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpTester

type HttpTester struct {
	// contains filtered or unexported fields
}

func (*HttpTester) DELETE

func (h *HttpTester) DELETE(uri string, param interface{}) (int, *e.Response)

DELETE 模擬 Delete Request的動作

func (*HttpTester) GET

func (h *HttpTester) GET(uri string) (int, *e.Response)

Get 模擬Get Request的動作

func (*HttpTester) PATCH

func (h *HttpTester) PATCH(uri string, param interface{}) (int, *e.Response)

PATCH 模擬 Patch Request的動作

func (*HttpTester) POST

func (h *HttpTester) POST(uri string, param interface{}) (int, *e.Response)

POST 模擬Post Request的動作

func (*HttpTester) PUT

func (h *HttpTester) PUT(uri string, param interface{}) (int, *e.Response)

PUT 模擬Post Request的動作

type HttpTesterInterface

type HttpTesterInterface interface {
	GET(uri string) (int, *e.Response)
	POST(uri string, param interface{}) (int, *e.Response)
	PUT(uri string, param interface{}) (int, *e.Response)
	PATCH(uri string, param interface{}) (int, *e.Response)
	DELETE(uri string, param interface{}) (int, *e.Response)
}

func NewHttpTester

func NewHttpTester(router *gin.Engine) HttpTesterInterface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL