Documentation ¶
Index ¶
- func OptRegister(name string, bf BootFunc)
- type BootFunc
- type Mail
- type Option
- type RecycleBin
- type RoleClaims
- type Storage
- type Token
- type User
- func (u *User) Active(token string) error
- func (u *User) InviteRequired() bool
- func (u *User) PasswordReset(token, password string) error
- func (u *User) PasswordResetApply(origin, email string) error
- func (u *User) PasswordUpdate(uid int64, oldPwd, newPwd string) error
- func (u *User) SignIn(usernameOrEmail, password string, ttl int) (*model.User, error)
- func (u *User) SignOut()
- func (u *User) Signup(email, password string, opt model.UserCreateOption) (*model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptRegister ¶
Types ¶
type Mail ¶
type Mail struct {
// contains filtered or unexported fields
}
func (*Mail) NotifyPasswordReset ¶
type RecycleBin ¶
type RecycleBin struct {
// contains filtered or unexported fields
}
func NewRecycleBin ¶
func NewRecycleBin() *RecycleBin
func (*RecycleBin) Clean ¶
func (rb *RecycleBin) Clean(uid, sid int64) error
type RoleClaims ¶
type RoleClaims struct { jwt.StandardClaims Roles []string `json:"roles"` }
func NewRoleClaims ¶
func NewRoleClaims(subject string, ttl int, roles []string) *RoleClaims
func (*RoleClaims) Uid ¶
func (rc *RoleClaims) Uid() int64
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func NewStorage() *Storage
func (*Storage) GetProvider ¶
fixme: 单元测试mock侵入了业务代码,有没有更好的办法?
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) InviteRequired ¶
func (*User) PasswordReset ¶
func (*User) PasswordResetApply ¶
Click to show internal directories.
Click to hide internal directories.