user

package
v0.0.0-...-746aa3e Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvatarService

type AvatarService struct {
	Size string `uri:"size" binding:"required,eq=l|eq=m|eq=s"`
}

AvatarService 头像服务

func (*AvatarService) Get

func (service *AvatarService) Get(c *gin.Context) serializer.Response

Get 获取用户头像

type ChangerNick

type ChangerNick struct {
	Nick string `json:"nick" binding:"required,min=1,max=255"`
}

ChangerNick 昵称更改服务

func (*ChangerNick) Update

func (service *ChangerNick) Update(c *gin.Context, user *model.User) serializer.Response

Update 更改昵称

type DeleteWebAuthn

type DeleteWebAuthn struct {
	ID string `json:"id" binding:"required"`
}

DeleteWebAuthn 删除WebAuthn凭证

func (*DeleteWebAuthn) Update

func (service *DeleteWebAuthn) Update(c *gin.Context, user *model.User) serializer.Response

Update 删除凭证

type Enable2FA

type Enable2FA struct {
	Code string `json:"code" binding:"required"`
}

Enable2FA 开启二步验证

func (*Enable2FA) Login

func (service *Enable2FA) Login(c *gin.Context) serializer.Response

Login 二步验证继续登录

func (*Enable2FA) Update

func (service *Enable2FA) Update(c *gin.Context, user *model.User) serializer.Response

Update 更改二步验证设定

type HomePage

type HomePage struct {
	Enabled bool `json:"status"`
}

HomePage 更改个人主页开关

func (*HomePage) Update

func (service *HomePage) Update(c *gin.Context, user *model.User) serializer.Response

Update 切换个人主页开关

type OptionsChangeHandler

type OptionsChangeHandler interface {
	Update(*gin.Context, *model.User) serializer.Response
}

OptionsChangeHandler 属性更改接口

type PasswordChange

type PasswordChange struct {
	Old string `json:"old" binding:"required,min=4,max=64"`
	New string `json:"new" binding:"required,min=4,max=64"`
}

PasswordChange 更改密码

func (*PasswordChange) Update

func (service *PasswordChange) Update(c *gin.Context, user *model.User) serializer.Response

Update 更改密码

type PolicyChange

type PolicyChange struct {
	ID string `json:"id" binding:"required"`
}

PolicyChange 更改存储策略

type SettingListService

type SettingListService struct {
	Page int `form:"page" binding:"required,min=1"`
}

SettingListService 通用设置列表服务

func (*SettingListService) ListTasks

func (service *SettingListService) ListTasks(c *gin.Context, user *model.User) serializer.Response

ListTasks 列出任务

type SettingService

type SettingService struct {
}

SettingService 通用设置服务

func (*SettingService) Activate

func (service *SettingService) Activate(c *gin.Context) serializer.Response

Activate 激活用户

func (*SettingService) Init2FA

func (service *SettingService) Init2FA(c *gin.Context, user *model.User) serializer.Response

Init2FA 初始化二步验证

func (*SettingService) Settings

func (service *SettingService) Settings(c *gin.Context, user *model.User) serializer.Response

Settings 获取用户设定

type SettingUpdateService

type SettingUpdateService struct {
	Option string `uri:"option" binding:"required,eq=nick|eq=theme|eq=homepage|eq=vip|eq=qq|eq=policy|eq=password|eq=2fa|eq=authn"`
}

SettingUpdateService 设定更改服务

type ThemeChose

type ThemeChose struct {
	Theme string `json:"theme" binding:"required,hexcolor|rgb|rgba|hsl"`
}

ThemeChose 主题选择

func (*ThemeChose) Update

func (service *ThemeChose) Update(c *gin.Context, user *model.User) serializer.Response

Update 更新主题设定

type UserLoginService

type UserLoginService struct {
	//TODO 细致调整验证规则
	UserName    string `form:"userName" json:"userName" binding:"required,email"`
	Password    string `form:"Password" json:"Password" binding:"required,min=4,max=64"`
	CaptchaCode string `form:"captchaCode" json:"captchaCode"`
}

UserLoginService 管理用户登录的服务

func (*UserLoginService) Login

func (service *UserLoginService) Login(c *gin.Context) serializer.Response

Login 用户登录函数

type UserRegisterService

type UserRegisterService struct {
	//TODO 细致调整验证规则
	UserName    string `form:"userName" json:"userName" binding:"required,email"`
	Password    string `form:"Password" json:"Password" binding:"required,min=4,max=64"`
	CaptchaCode string `form:"captchaCode" json:"captchaCode"`
}

UserRegisterService 管理用户注册的服务

func (*UserRegisterService) Register

func (service *UserRegisterService) Register(c *gin.Context) serializer.Response

Register 新用户注册

type UserResetEmailService

type UserResetEmailService struct {
	UserName    string `form:"userName" json:"userName" binding:"required,email"`
	CaptchaCode string `form:"captchaCode" json:"captchaCode"`
}

UserResetEmailService 发送密码重设邮件服务

func (*UserResetEmailService) Reset

Reset 发送密码重设邮件

type UserResetService

type UserResetService struct {
	Password string `form:"Password" json:"Password" binding:"required,min=4,max=64"`
	ID       string `json:"id" binding:"required"`
	Secret   string `json:"secret" binding:"required"`
}

UserResetService 密码重设服务

func (*UserResetService) Reset

func (service *UserResetService) Reset(c *gin.Context) serializer.Response

Reset 重设密码

Jump to

Keyboard shortcuts

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