account

package
v0.0.0-...-5f47394 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUserIsAdmin

func CheckUserIsAdmin(c *gin.Context)

CheckUserIsAdmin determine whether you are an administrator

func EditPassword

func EditPassword(c *gin.Context)

EditPassword modify account password

func GetUserInfo

func GetUserInfo(c *gin.Context)

GetUserInfo get user information

func GetUserRole

func GetUserRole(c *gin.Context)

GetUserRole get user role

func Login

func Login(c *gin.Context)

func Logout

func Logout(c *gin.Context)

Logout user logout

func Register

func Register(c *gin.Context)

@Tags Register @Summary 用户注册 @Produce application/json @Param username formData string true "用户名" @Param password formData string true "密码" @Success 200 {string} string "{"code":"","data":""}" @Router /register [post]

Types

type LoginResult

type LoginResult struct {
	Username string `json:"username"`
	Token    string `json:"token"`
}

login result

Jump to

Keyboard shortcuts

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