Documentation ¶
Index ¶
- Variables
- type User
- func (u *User) CacheUserInfo(ctx context.Context, userInfo *model.UserM) error
- func (u *User) ChangeAvatar(ctx context.Context, id int64, avatar string) error
- func (u *User) ChangeBackground(ctx context.Context, id int64, background string) error
- func (u *User) ClearUserInfoCache(ctx context.Context, id int64) error
- func (u *User) CreateUserInMongo(ctx context.Context, user *model.UserM) error
- func (u *User) CreateUserInMysql(user *model.User) error
- func (u *User) GetUserByUsername(username string) (user *model.User, err error)
- func (u *User) GetUserInfo(ctx context.Context, id int64) (userInfo *model.UserM, err error)
- func (u *User) GetVerification(ctx context.Context, email string) (int64, error)
- func (u *User) SetVerification(ctx context.Context, email string, vCode int32) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUserNotFound = errors.New("no such user") ErrUserExist = errors.New("user already exist") )
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) CacheUserInfo ¶
func (*User) ChangeAvatar ¶
func (*User) ChangeBackground ¶
func (*User) ClearUserInfoCache ¶
func (*User) CreateUserInMongo ¶
func (*User) GetUserByUsername ¶
func (*User) GetUserInfo ¶
func (*User) GetVerification ¶
Click to show internal directories.
Click to hide internal directories.