Documentation ¶
Index ¶
- func BuildURLWithParams(url string, params map[string]interface{}) string
- func GenerateGetContext(url string, urlKeys map[string]interface{}, params map[string]interface{}) (*httptest.ResponseRecorder, *gin.Context)
- func GeneratePostJSONContext(url string, urlKeys map[string]interface{}, params map[string]interface{}, ...) (*httptest.ResponseRecorder, *gin.Context, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildURLWithParams ¶
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.
Click to show internal directories.
Click to hide internal directories.