web

package
v0.0.0-...-a525ec8 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(secretKey string) gin.HandlerFunc

func LogoutHandler

func LogoutHandler(c *gin.Context)

Logout user handler.

func SigninHandler

func SigninHandler(c *gin.Context)

Login user handler.

func SignupHandler

func SignupHandler(c *gin.Context)

Register user handler.

Types

type CustomClaims

type CustomClaims struct {
	Username string
	jwt.StandardClaims
}

type User

type User struct {
	Username   string `json:"username" binding:"required"`
	Password   string `json:"password" binding:"required"`
	Email      string `json:"email" binding:"email"`
	FullName   string `json:"fullname"`
	CreateDate string `json:"createdate"`
}

Jump to

Keyboard shortcuts

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