controllers

package
v0.0.0-...-457b880 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTOTP

func CreateTOTP(accountemail string) (*otp.Key, error)

Create TOTP

func CreateUser

func CreateUser(c *gin.Context)

Create a new user

func DeleteUser

func DeleteUser(c *gin.Context)

Deletes the user

func EmailExists

func EmailExists(c *gin.Context, email string) bool

Check if the Email exists

func GetImage

func GetImage(c *gin.Context)

Get the image

func GetImageBytes

func GetImageBytes(key *otp.Key) ([]byte, error)

Get Image bytes

func GetImageStruct

func GetImageStruct(key *otp.Key) (image.Image, error)

Get Image bytes

func GetSessionByCookie

func GetSessionByCookie(c *gin.Context)

Return Session with user

func GetSessionById

func GetSessionById(c *gin.Context)

Return Session with user of provided session id or token

func GetSessionsOfUser

func GetSessionsOfUser(c *gin.Context)

Get the active sessions of the user

func GetUser

func GetUser(c *gin.Context)

Find user

func LoginHandler

func LoginHandler(c *gin.Context)

Handle the Login

func LogoutHandler

func LogoutHandler(c *gin.Context)

Handle the Login

func SessionExists

func SessionExists(c *gin.Context) bool

Check if a session exists

func UpdateUserAffiliation

func UpdateUserAffiliation(c *gin.Context)

Update the affiliation of a user

func UpdateUserEmail

func UpdateUserEmail(c *gin.Context)

Update the email of a user

func UpdateUserLastseen

func UpdateUserLastseen(c *gin.Context)

Update the last seen time of a user

func UpdateUserPassword

func UpdateUserPassword(c *gin.Context)

Update the email of a user

func UpdateUserRole

func UpdateUserRole(c *gin.Context)

Update the role of a user

func UserExists

func UserExists(c *gin.Context, id string) bool

Check if the User exists

func UsernameExists

func UsernameExists(c *gin.Context, username string) bool

Check if the Username exists

func VerifyTOTP

func VerifyTOTP(c *gin.Context)

Verify the totp

Types

This section is empty.

Jump to

Keyboard shortcuts

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