Documentation ¶
Index ¶
- Constants
- func AuthRequired(c *gin.Context)
- func CookieLogin(cookiePath string) gin.HandlerFunc
- func CreateSession(r *gin.Engine, apiPwd string) error
- func Login(apiPwd string) gin.HandlerFunc
- func Logout(c *gin.Context)
- func RefreshCookieFile(cookiePath string) error
- func TorqRequired(c *gin.Context)
Constants ¶
View Source
const Userkey = "user"
Variables ¶
This section is empty.
Functions ¶
func AuthRequired ¶
AuthRequired is a simple middleware to check the session
func CookieLogin ¶ added in v0.11.0
func CookieLogin(cookiePath string) gin.HandlerFunc
Cookie Login creates a user session
func Login ¶
func Login(apiPwd string) gin.HandlerFunc
Login creates a user session, logging them in given the right username and password
func RefreshCookieFile ¶ added in v0.11.0
func TorqRequired ¶ added in v0.14.0
TorqRequired checks the status of the torq service
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.