auth

package
v0.0.0-...-e1ceb80 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptInvite

func AcceptInvite(ctx context.Context, db boil.ContextExecutor, s sender.Sender, invite *core.UserInvitation, username string, password string) error

func AddFlash

func AddFlash(c *gin.Context, flash interface{}, vars ...string)

func Auth

func Auth(c *gin.Context, db *sqlx.DB)

func EnforceAuth

func EnforceAuth(c *gin.Context)

func GetFlashes

func GetFlashes(c *gin.Context, vars ...string) []interface{}

func Login

func Login(c *gin.Context, db boil.ContextExecutor, email string, password string) error

func Logout

func Logout(c *gin.Context)

func Signup

func Signup(ctx context.Context, db boil.ContextExecutor, sender sender.Sender, email string, username, password string, attribution string) (*core.User, error)

Signup assumes the transaction is already began

Types

type UserData

type UserData struct {
	User       *pgsession.User
	DBUser     *core.User
	IsLoggedIn bool
}

func GetUserData

func GetUserData(c *gin.Context) UserData

Jump to

Keyboard shortcuts

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