gintest

package
v0.0.0-...-550751b Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildURLWithParams

func BuildURLWithParams(url string, params map[string]interface{}) string

func GenerateGetContext

func GenerateGetContext(
	url string,
	urlKeys map[string]interface{},
	params map[string]interface{},
) (*httptest.ResponseRecorder, *gin.Context)

GenerateGetContext generates a gin context for a GET request with given URL and URL parameters

func GeneratePostJSONContext

func GeneratePostJSONContext(
	url string,
	urlKeys map[string]interface{},
	params map[string]interface{},
	postData interface{},
) (*httptest.ResponseRecorder, *gin.Context, error)

GeneratePostJSON generates a gin context for a POST request with with given URL and PostData(will be marshaled into JSON)

Types

This section is empty.

Jump to

Keyboard shortcuts

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