v1

package
v0.0.0-...-9528f6d Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	ExpiresIn   int    `json:"expires_in"`
}

func NewAccessToken

func NewAccessToken(token string) *AccessToken

type Auth

type Auth struct{}

func (Auth) Login

func (Auth) Login(c *gin.Context)

Login user login

func (Auth) Profile

func (Auth) Profile(c *gin.Context)

Profile get current authorized user info

func (Auth) Refresh

func (Auth) Refresh(c *gin.Context)

RefreshToken refresh JWT token

func (Auth) Register

func (Auth) Register(c *gin.Context)

Register user register

type Migrate

type Migrate struct{}

func (Migrate) Index

func (Migrate) Index(c *gin.Context)

Index run database migration, you should remove this method in your production environment.

type UserFormLogin

type UserFormLogin struct {
	Username string `json:"username" binding:"required,min=3,max=12"`
	Password string `json:"password" binding:"required,min=6,max=20"`
}

UserFormLogin user login form

Jump to

Keyboard shortcuts

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