Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUserNotFund = statuserr.Errorf("user not found").SetCode(1_400_000).SetStatus(status.BadRequest) ErrUserAlreadyExists = statuserr.Errorf("user already exists").SetCode(1_400_002).SetStatus(status.BadRequest) ErrPasswordMismatch = statuserr.Errorf("password mismatch").SetCode(1_400_004).SetStatus(status.BadRequest) ErrEmailAlreadyUsed = statuserr.Errorf("email already used by other").SetCode(1_400_016).SetStatus(status.BadRequest) ErrVerifyCodeRetryLater = statuserr.Errorf("retry applying for verify code later").SetCode(1_400_032).SetStatus(status.BadRequest) ErrVerifyCodeInvalid = statuserr.Errorf("invliad verify code").SetCode(1_400_033).SetStatus(status.BadRequest) ErrVerifyCodeUsageUnsupported = statuserr.Errorf("verify code usage unsupported").SetCode(1_400_036).SetStatus(status.BadRequest) ErrCredentialInvalid = statuserr.Errorf("invalid credential").SetCode(1_401_001).SetStatus(status.Unauthorized) ErrCredentialExpired = statuserr.Errorf("credential expired").SetCode(1_401_002).SetStatus(status.Unauthorized) ErrTokenNeedsRefresh = statuserr.Errorf("token need to refresh").SetCode(1_401_003).SetStatus(status.Unauthorized) )
Functions ¶
func CheckValidUsage ¶
Types ¶
type CaptchaOption ¶
type EmailBody ¶
type EmailBody struct { ContentType mail.ContentType `mapstructure:"contentType"` From string `mapstructure:"from"` To []string `mapstructure:"to"` CC []string `mapstructure:"cc"` Bcc []string `mapstructure:"bcc"` Subject string `mapstructure:"subject"` Body string `mapstructure:"body"` }
EmailBody represents an email message body
type LoginOptions ¶
type RefreshTokenOptions ¶
type RegisterOptions ¶
type RegisterOptions struct { // username must be alphanumeric Username string `json:"username" binding:"required,alphanum"` // user password Password string `json:"password" binding:"required"` // user email address Email string `json:"email" binding:"email"` // verification code from verify email Code string `json:"code" binding:"required,alphanum"` }
type ResetOptions ¶
type SearchUserOptions ¶
type TokenPayload ¶
type TokenResult ¶
type UidOptions ¶
type UidOptions struct {
Uid string `form:"uid" uri:"uid" binding:"required"`
}
type UserInfo ¶
type UserInfo struct { Uid string `json:"uid"` Username string `json:"username"` Email string `json:"email"` CreatedAt int64 `json:"created_at"` }
func EntsToUsers ¶
type UserSearchResult ¶
Click to show internal directories.
Click to hide internal directories.