Documentation ¶
Index ¶
- func CheckMustBeConnected(router *gin.Engine, mustBeConnected bool, methode, url string) error
- func PerformTestAuth(router *gin.Engine, user model.User) *http.Cookie
- func SendRequest(router *gin.Engine, parameters []byte, methode string, url string) *httptest.ResponseRecorder
- func SendRequestWithFile(router *gin.Engine, methode, url string, authCookie *http.Cookie, ...) (*httptest.ResponseRecorder, error)
- func SendRequestWithToken(router *gin.Engine, params []byte, methode, url string, ...) *httptest.ResponseRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMustBeConnected ¶
CheckMustBeConnected check if an user has to be connected for the access of a route mustBeConnected errorQueryTocken error true false true false false false true true false false true true
func PerformTestAuth ¶
PerformTestAuth return the cookie of the auth
func SendRequest ¶
func SendRequest(router *gin.Engine, parameters []byte, methode string, url string) *httptest.ResponseRecorder
SendRequest send a simple request
func SendRequestWithFile ¶
func SendRequestWithFile( router *gin.Engine, methode, url string, authCookie *http.Cookie, params map[string][]byte, pathFile, fieldName, fileName string, ) (*httptest.ResponseRecorder, error)
SendRequestWithFile send a request with a file
func SendRequestWithToken ¶
func SendRequestWithToken( router *gin.Engine, params []byte, methode, url string, authCookie *http.Cookie, ) *httptest.ResponseRecorder
SendRequestWithToken send a simple request with the connection token
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.