Documentation ¶
Index ¶
- type Account
- func (a *Account) Activate(usr *model.User) error
- func (a *Account) ChangePassword(usr *model.User) error
- func (a *Account) Create(usr *model.User) (*model.User, error)
- func (a *Account) CreateAndVerify(usr *model.User) (*model.Verification, error)
- func (a *Account) CreateForgotToken(usr *model.User) (*model.Verification, error)
- func (a *Account) CreateNewOTP(usr *model.User) (*model.Verification, error)
- func (a *Account) CreateWithMagic(usr *model.User) (int, error)
- func (a *Account) CreateWithMobile(usr *model.User) error
- func (a *Account) DeleteVerificationToken(v *model.Verification) error
- func (a *Account) FindVerificationToken(token string) (*model.Verification, error)
- func (a *Account) FindVerificationTokenByUser(usr *model.User) (*model.Verification, error)
- func (a *Account) ResetPassword(usr *model.User) error
- func (a *Account) UpdateAvatar(usr *model.User) error
- type User
- func (u *User) Delete(usr *model.User) error
- func (u *User) FindByEmail(email string) (*model.User, error)
- func (u *User) FindByMobile(countryCode, mobile string) (*model.User, error)
- func (u *User) FindByReferralCode(username string) (*model.ReferralCodeVerifyResponse, error)
- func (u *User) FindByToken(token string) (*model.User, error)
- func (u *User) FindByUsername(username string) (*model.User, error)
- func (u *User) List(lq *model.ListQuery, p *model.Pagination) ([]model.User, error)
- func (u *User) Update(usr *model.User) (*model.User, error)
- func (u *User) UpdateLogin(usr *model.User) error
- func (u *User) View(id int) (*model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ActivateFn func(*model.User) error CreateFn func(*model.User) (*model.User, error) CreateAndVerifyFn func(*model.User) (*model.Verification, error) CreateWithMobileFn func(*model.User) error CreateForgotTokenFn func(*model.User) (*model.Verification, error) CreateNewOTPFn func(*model.User) (*model.Verification, error) CreateWithMagicFn func(*model.User) (int, error) ChangePasswordFn func(*model.User) error ResetPasswordFn func(*model.User) error UpdateAvatarFn func(*model.User) error FindVerificationTokenFn func(string) (*model.Verification, error) FindVerificationTokenByUserFn func(*model.User) (*model.Verification, error) DeleteVerificationTokenFn func(*model.Verification) error }
Account database mock
func (*Account) ChangePassword ¶
ChangePassword mock
func (*Account) CreateAndVerify ¶
CreateAndVerify mock
func (*Account) CreateForgotToken ¶
func (*Account) CreateNewOTP ¶
func (*Account) CreateWithMobile ¶
CreateWithMobile mock
func (*Account) DeleteVerificationToken ¶
func (a *Account) DeleteVerificationToken(v *model.Verification) error
DeleteVerificationToken mock
func (*Account) FindVerificationToken ¶
func (a *Account) FindVerificationToken(token string) (*model.Verification, error)
FindVerificationToken mock
func (*Account) FindVerificationTokenByUser ¶
type User ¶
type User struct { ViewFn func(int) (*model.User, error) FindByReferralCodeFn func(string) (*model.ReferralCodeVerifyResponse, error) FindByUsernameFn func(string) (*model.User, error) FindByEmailFn func(string) (*model.User, error) FindByMobileFn func(string, string) (*model.User, error) FindByTokenFn func(string) (*model.User, error) UpdateLoginFn func(*model.User) error ListFn func(*model.ListQuery, *model.Pagination) ([]model.User, error) DeleteFn func(*model.User) error UpdateFn func(*model.User) (*model.User, error) }
User database mock
func (*User) FindByEmail ¶
FindByEmail mock
func (*User) FindByMobile ¶
FindByMobile mock
func (*User) FindByReferralCode ¶
func (u *User) FindByReferralCode(username string) (*model.ReferralCodeVerifyResponse, error)
FindByReferralCode mock
func (*User) FindByToken ¶
FindByToken mock
func (*User) FindByUsername ¶
FindByUsername mock
Click to show internal directories.
Click to hide internal directories.