Documentation ¶
Index ¶
- func AssertBadRequestError(t *testing.T, w *httptest.ResponseRecorder)
- func AssertDocumentNotFound(t *testing.T, w *httptest.ResponseRecorder)
- func AssertInternalServerError(t *testing.T, w *httptest.ResponseRecorder)
- func AssertUnauthorized(t *testing.T, w *httptest.ResponseRecorder)
- func ErrorHandler(c *gin.Context)
- func GinCtx(c *gin.Context) []interface{}
- func GinLoggerMiddleware(ctx ...interface{}) gin.HandlerFunc
- func Router(ctx ...interface{}) *gin.Engine
- func TestDeleteRequest(url string, tokenString string) (*http.Request, *httptest.ResponseRecorder)
- func TestGetRequest(url string, tokenString string) (*http.Request, *httptest.ResponseRecorder)
- func TestPostRequest(url string, body interface{}, tokenString string) (*http.Request, *httptest.ResponseRecorder)
- func TestRouter(ctx ...interface{}) *gin.Engine
- func ValidateAuthentication(c *gin.Context)
- type ErrorData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertBadRequestError ¶
func AssertBadRequestError(t *testing.T, w *httptest.ResponseRecorder)
func AssertDocumentNotFound ¶
func AssertDocumentNotFound(t *testing.T, w *httptest.ResponseRecorder)
func AssertInternalServerError ¶
func AssertInternalServerError(t *testing.T, w *httptest.ResponseRecorder)
func AssertUnauthorized ¶
func AssertUnauthorized(t *testing.T, w *httptest.ResponseRecorder)
Assertion Functions
func GinLoggerMiddleware ¶
func GinLoggerMiddleware(ctx ...interface{}) gin.HandlerFunc
func TestDeleteRequest ¶
func TestGetRequest ¶
func TestPostRequest ¶
func TestRouter ¶
Gets Router engine with the appropriate testing context mocking interfaces to external services
func ValidateAuthentication ¶
ValidateAuthentication validate gets and check variable body to create new variable puts model.Variable in context as body if everything is correct
Types ¶
Click to show internal directories.
Click to hide internal directories.