Documentation
¶
Index ¶
- Constants
- func DefaultCORSConfig() cors.Config
- func ExtractQueryParams(queryParams map[string]interface{}) (query string, args []interface{})
- func HttpRequestHandler(requestHeader RequestHeader, requestBody interface{}, responseDTO interface{}) (*http.Response, apihelper.ApiErrors)
- func HttpRequestHandlerForUnitTesting(t *testing.T, requestHeader RequestHeader, requestBody interface{}, ...) (*http.Response, apihelper.ApiErrors)
- func WaitForServerToStart(url string) bool
- type ChatfuelError
- type RequestHeader
Constants ¶
View Source
const Week = time.Hour * 24 * 7
Week define the amount of time in a week (time.Hour * 24 * 7)
Variables ¶
This section is empty.
Functions ¶
func DefaultCORSConfig ¶
DefaultCORSConfig Generate CORS config for router
func ExtractQueryParams ¶
ExtractQueryParams format arguments for gorm from a map[string]interface{}
func HttpRequestHandler ¶
func HttpRequestHandler(requestHeader RequestHeader, requestBody interface{}, responseDTO interface{}) (*http.Response, apihelper.ApiErrors)
HttpRequestHandler is a handler for easy http requests
func HttpRequestHandlerForUnitTesting ¶
func HttpRequestHandlerForUnitTesting(t *testing.T, requestHeader RequestHeader, requestBody interface{}, responseDTO interface{}) (*http.Response, apihelper.ApiErrors)
HttpRequestHandlerForUnitTesting is the same as HttpRequestHandler but add logging for tests
func WaitForServerToStart ¶
WaitForServerToStart return true only when API is ready
Types ¶
type ChatfuelError ¶
ChatfuelError define the response body to return in case of error for requests made from Chatfuel
func HttpRequestHandlerForChatfuelUnitTesting ¶
func HttpRequestHandlerForChatfuelUnitTesting(t *testing.T, requestHeader RequestHeader, requestBody interface{}, responseDTO interface{}) (*http.Response, ChatfuelError)
HttpRequestHandlerForChatfuelUnitTesting is the same as HttpRequestHandler but add logging for tests
Click to show internal directories.
Click to hide internal directories.