Documentation
¶
Overview ¶
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Index ¶
- func BindingEmail(c helper.Context, input BindingEmailParams) (res schema.Response)
- func BindingEmailRouter(c *gin.Context)
- func BindingPhone(c helper.Context, input BindingPhoneParams) (res schema.Response)
- func BindingPhoneRouter(c *gin.Context)
- func BindingWechat(c helper.Context, input BindingWechatMiniAppParams) (res schema.Response)
- func BindingWechatRouter(c *gin.Context)
- func CreateUserTx(tx *gorm.DB, userInfo *model.User, inviterCode *string) (err error)
- func GenerateAuthCode() string
- func ResetPassword(input ResetPasswordParams) (res schema.Response)
- func ResetPasswordRouter(c *gin.Context)
- func SendEmailAuthCode(c helper.Context, input SendEmailAuthCodeParams) (res schema.Response)
- func SendEmailAuthCodeRouter(c *gin.Context)
- func SendPhoneAuthCode(c helper.Context, input SendPhoneAuthCodeParams) (res schema.Response)
- func SendPhoneAuthCodeRouter(c *gin.Context)
- func SignIn(c helper.Context, input SignInParams) (res schema.Response)
- func SignInRouter(c *gin.Context)
- func SignInWithEmail(c helper.Context, input SignInWithEmailParams) (res schema.Response)
- func SignInWithEmailRouter(c *gin.Context)
- func SignInWithOAuth(c helper.Context, input SignInWithOAuthParams) (res schema.Response)
- func SignInWithOAuthRouter(c *gin.Context)
- func SignInWithPhone(c helper.Context, input SignInWithPhoneParams) (res schema.Response)
- func SignInWithPhoneRouter(c *gin.Context)
- func SignInWithWechat(c helper.Context, input SignInWithWechatParams) (res schema.Response)
- func SignInWithWechatRouter(c *gin.Context)
- func SignUpWithEmail(input SignUpWithEmailParams) (res schema.Response)
- func SignUpWithEmailAction(input SignUpWithEmailActionParams) (res schema.Response)
- func SignUpWithEmailActionRouter(c *gin.Context)
- func SignUpWithEmailRouter(c *gin.Context)
- func SignUpWithPhone(input SignUpWithPhoneParams) (res schema.Response)
- func SignUpWithPhoneRouter(c *gin.Context)
- func SignUpWithUsername(input SignUpWithUsernameParams) (res schema.Response)
- func SignUpWithUsernameRouter(c *gin.Context)
- func UnbindingEmail(c helper.Context, input UnbindingEmailParams) (res schema.Response)
- func UnbindingEmailRouter(c *gin.Context)
- func UnbindingPhone(c helper.Context, input UnbindingPhoneParams) (res schema.Response)
- func UnbindingPhoneRouter(c *gin.Context)
- func UnbindingWechat(c helper.Context, input UnbindingWechatParams) (res schema.Response)
- func UnbindingWechatRouter(c *gin.Context)
- type BindingEmailParams
- type BindingPhoneParams
- type BindingWechatMiniAppParams
- type ResetPasswordParams
- type SendEmailAuthCodeParams
- type SendPhoneAuthCodeParams
- type SignInParams
- type SignInWithEmailParams
- type SignInWithOAuthParams
- type SignInWithPhoneParams
- type SignInWithWechatParams
- type SignUpWithEmailActionParams
- type SignUpWithEmailParams
- type SignUpWithPhoneParams
- type SignUpWithUsernameParams
- type UnbindingEmailParams
- type UnbindingPhoneParams
- type UnbindingWechatParams
- type WechatCompleteParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindingEmail ¶
func BindingEmail(c helper.Context, input BindingEmailParams) (res schema.Response)
绑定邮箱
func BindingEmailRouter ¶
func BindingPhone ¶
func BindingPhone(c helper.Context, input BindingPhoneParams) (res schema.Response)
绑定手机号
func BindingPhoneRouter ¶
func BindingWechat ¶
func BindingWechat(c helper.Context, input BindingWechatMiniAppParams) (res schema.Response)
绑定微信
func BindingWechatRouter ¶
func CreateUserTx ¶
创建用户帐号,包括创建的邀请码,钱包数据等,继承到一起
func GenerateAuthCode ¶
func GenerateAuthCode() string
func ResetPassword ¶
func ResetPassword(input ResetPasswordParams) (res schema.Response)
func ResetPasswordRouter ¶
func SendEmailAuthCode ¶
func SendEmailAuthCode(c helper.Context, input SendEmailAuthCodeParams) (res schema.Response)
发送邮箱验证码 (不需要登陆)
func SendEmailAuthCodeRouter ¶
func SendPhoneAuthCode ¶
func SendPhoneAuthCode(c helper.Context, input SendPhoneAuthCodeParams) (res schema.Response)
发送手机验证码 (不需要登陆)
func SendPhoneAuthCodeRouter ¶
func SignInRouter ¶
func SignInWithEmail ¶
func SignInWithEmail(c helper.Context, input SignInWithEmailParams) (res schema.Response)
邮箱 + 验证码登陆
func SignInWithEmailRouter ¶
func SignInWithOAuth ¶
func SignInWithOAuth(c helper.Context, input SignInWithOAuthParams) (res schema.Response)
使用 oAuth 认证方式登陆
func SignInWithOAuthRouter ¶
func SignInWithPhone ¶
func SignInWithPhone(c helper.Context, input SignInWithPhoneParams) (res schema.Response)
手机 + 验证码登陆
func SignInWithPhoneRouter ¶
func SignInWithWechat ¶
func SignInWithWechat(c helper.Context, input SignInWithWechatParams) (res schema.Response)
使用微信小程序登陆
func SignInWithWechatRouter ¶
func SignUpWithEmail ¶
func SignUpWithEmail(input SignUpWithEmailParams) (res schema.Response)
使用邮箱注册
func SignUpWithEmailAction ¶
func SignUpWithEmailAction(input SignUpWithEmailActionParams) (res schema.Response)
使用邮箱登陆 (发送邮件)
func SignUpWithEmailRouter ¶
func SignUpWithPhone ¶
func SignUpWithPhone(input SignUpWithPhoneParams) (res schema.Response)
使用手机注册
func SignUpWithPhoneRouter ¶
func SignUpWithUsername ¶
func SignUpWithUsername(input SignUpWithUsernameParams) (res schema.Response)
使用用户名注册
func UnbindingEmail ¶
func UnbindingEmail(c helper.Context, input UnbindingEmailParams) (res schema.Response)
解除邮箱绑定
func UnbindingEmailRouter ¶
func UnbindingPhone ¶
func UnbindingPhone(c helper.Context, input UnbindingPhoneParams) (res schema.Response)
解除手机绑定
func UnbindingPhoneRouter ¶
func UnbindingWechat ¶
func UnbindingWechat(c helper.Context, input UnbindingWechatParams) (res schema.Response)
解除微信绑定
func UnbindingWechatRouter ¶
Types ¶
type BindingEmailParams ¶
type BindingPhoneParams ¶
type BindingWechatMiniAppParams ¶
type BindingWechatMiniAppParams struct {
Code string `json:"code" valid:"required~请输入微信认证码"` // 微信小程序调用 wx.login() 之后,返回的 code
}
type ResetPasswordParams ¶
type SendEmailAuthCodeParams ¶
type SendEmailAuthCodeParams struct {
Email string `json:"email" valid:"required~请输入邮箱"`
}
type SendPhoneAuthCodeParams ¶
type SendPhoneAuthCodeParams struct {
Phone string `json:"phone" valid:"required~请输入手机号"`
}
type SignInParams ¶
type SignInWithEmailParams ¶
type SignInWithOAuthParams ¶
type SignInWithOAuthParams struct {
Code string `json:"code" valid:"required~请输入授权代码"` // oAuth 授权之后回调返回的 code
}
type SignInWithPhoneParams ¶
type SignInWithWechatParams ¶
type SignInWithWechatParams struct {
Code string `json:"code" valid:"required~请输入微信授权代码"` // 微信小程序授权之后返回的 code
}
type SignUpWithEmailParams ¶
type SignUpWithPhoneParams ¶
type UnbindingEmailParams ¶
type UnbindingEmailParams struct {
Code string `json:"code" valid:"required~请输入验证码"` // 解除邮箱绑定前,需要发送邮箱验证码验证
}
type UnbindingPhoneParams ¶
type UnbindingPhoneParams struct {
Code string `json:"code" valid:"required~请输入验证码"` // 解除手机号绑定前,需要发送手机验证码验证
}
type UnbindingWechatParams ¶
type UnbindingWechatParams struct {
Code string `json:"code" valid:"required~请输入验证码"` // 验证码,如果帐号已绑定手机,则为手机号收到的验证码,如果有为邮箱,则用邮箱收到的验证码,否则使用 `wx.login()` 返回的 code
}
type WechatCompleteParams ¶
Click to show internal directories.
Click to hide internal directories.