api

package
v0.0.0-...-76b4d0c Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallBackGithub

func CallBackGithub(c *gin.Context)

CallBackGithub 登录成功

func GetUserInfo

func GetUserInfo(c *gin.Context)

GetUserInfo 获取用户信息 @Summary 获取用户信息 @accept application/x-www-form-urlencoded @Security ApiKeyAuth @Tags user @Produce json @Success 200 {object} users.User @Router /api/v1/user/getUserInfo [post]

func Login

func Login(c *gin.Context)

Login 账号密码登录 @Summary 账号密码登录 @accept application/x-www-form-urlencoded @Tags auth @Produce json @Param auth body api.auth true "用户信息" @Success 200 {string} json "{"code":200,"data":{},"msg":"ok"}" @Failure 204 {object} json "{"code":200,"data":{},"msg":"ok"}" @Router /auth/login [post]

func LoginGithub

func LoginGithub(c *gin.Context)

LoginGithub github登录/注册

func PhoneLogin

func PhoneLogin(c *gin.Context)

PhoneLogin 手机号快速登陆/注册 @Summary 手机号快速登陆/注册 @Document 如果登录手机号未注册,则自动注册再登录 @accept application/x-www-form-urlencoded @Tags auth @Produce json @Param auth body api.phone true "手机号快速登录/注册" @Success 200 {string} json "{"code":200,"data":{},"msg":"ok"}" @Router /auth/phonelogin [post]

func Register

func Register(c *gin.Context)

Register 账号密码注册 @Summary 账号密码注册 @accept application/x-www-form-urlencoded @Tags auth @Produce json @Param auth body api.auth true "账号密码登录/注册" @Success 200 {string} json "{"code":200,"data":{},"msg":"ok"}" @Router /auth/register [post]

func SendCode

func SendCode(c *gin.Context)

SendCode 发送手机验证码 @Summary 发送手机验证码 @accept application/x-www-form-urlencoded @Tags auth @Produce json @Param phone formData string true "手机号" @Success 200 {string} json "{"code":200,"data":{},"msg":"ok"}" @Router /auth/code [post]

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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