Documentation ¶
Index ¶
- func AbortWithError(c *gin.Context, err error)
- 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 HeaderToken(c *gin.Context) (string, error)
- 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 AbortWithError ¶
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 HeaderToken ¶
get token from Authorization header
func TestDeleteRequest ¶
func TestGetRequest ¶
func TestPostRequest ¶
func TestRouter ¶
Obtiene Router server con el contexto de testing adecuado mockeando interfaces a serivcios externos
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.