v1

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiGroupsIns = new(ApiEntrances)

Functions

This section is empty.

Types

type ApiEntrances

type ApiEntrances struct {
	BaseApi
	JwtApi
}

type BaseApi

type BaseApi struct{}

func (*BaseApi) Captcha

func (b *BaseApi) Captcha(c *gin.Context)

Captcha

@Tags		Base
@Summary	生成验证码
@Security	ApiKeyAuth
@accept		application/json
@Produce	application/json
@Success	200	{object}	response.Response{code=int,data=response.CaptchaResponse,msg=string}	"生成验证码,返回包括随机数id,base64,验证码长度,是否开启验证码"
@Router		/base/captcha [post]

func (*BaseApi) ChangePassword

func (b *BaseApi) ChangePassword(c *gin.Context)

ChangePassword

@Tags		User
@Summary	用户修改密码
@Security	ApiKeyAuth
@Produce	application/json
@Param		data	body		request.ChangePasswordReq				true	"用户名, 原密码, 新密码"
@Success	200		{object}	response.Response{code=int,msg=string}	"用户修改密码"
@Router		/user/changePassword [post]

func (*BaseApi) Login

func (b *BaseApi) Login(c *gin.Context)

Login

@Tags		Base
@Summary	用户登录
@Produce	application/json
@Param		data	body		request.Login													true	"用户名, 密码, 验证码"
@Success	200		{object}	response.Response{code=int,data=response.LoginResp,msg=string}	"返回包括用户信息,token,过期时间"
@Router		/base/login [post]

func (*BaseApi) Register

func (b *BaseApi) Register(c *gin.Context)

Register

@Tags		User
@Summary	用户注册账号
@Produce	application/json
@Param		data	body		request.Register												true	"用户名, 昵称, 密码, 角色ID"
@Success	200		{object}	response.Response{code=int,data=response.UserResp,msg=string}	"用户注册账号,返回包括用户信息"
@Router		/user/register [post]

func (*BaseApi) ResetPassword added in v0.18.0

func (b *BaseApi) ResetPassword(c *gin.Context)

ResetPassword

@Tags		User
@Summary	用户重置密码
@Security	ApiKeyAuth
@Produce	application/json
@Param		data	body		request.ResetPasswordReq				true	"ID"
@Success	200		{object}	response.Response{code=int,msg=string}	"用户修改密码"
@Router		/user/changePassword [post]

func (*BaseApi) UserWithToken

func (b *BaseApi) UserWithToken(c *gin.Context, user model.SrvUser)

UserWithToken return user with jwt token

type JwtApi

type JwtApi struct{}

func (*JwtApi) JsonInBlacklist

func (j *JwtApi) JsonInBlacklist(c *gin.Context)

JsonInBlacklist

@Tags		Jwt
@Summary	jwt加入黑名单
@Security	ApiKeyAuth
@accept		application/json
@Produce	application/json
@Success	200	{object}	response.Response{code=int,msg=string}	"jwt加入黑名单"
@Router		/jwt/jsonInBlacklist [post]

Jump to

Keyboard shortcuts

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