controller

package
v0.0.0-...-bd0fe52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMustBeConnected

func CheckMustBeConnected(router *gin.Engine, mustBeConnected bool, methode, url string) error

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

func PerformTestAuth(router *gin.Engine, user model.User) *http.Cookie

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL