Documentation ¶
Index ¶
- type JwtService
- type UserService
- func (userService *UserService) GetUser(id int64) (model.User, error)
- func (userService *UserService) UserAvatar(id int64, fileHeader *multipart.FileHeader) error
- func (userService *UserService) UserAvatarLocal(id int64, fileHeader *multipart.FileHeader) error
- func (userService *UserService) UserDelete(id int64) error
- func (userService *UserService) UserLogin(user *model.User) (*model.User, error)
- func (userService *UserService) UserRegister(user *model.User) error
- func (userService *UserService) UserSearch(r request.UserSearch) (int64, int, int, interface{}, int, error)
- func (userService *UserService) UserUpdate(user model.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JwtService ¶
type JwtService struct{}
func (*JwtService) GetRedisJWT ¶
func (jwtService *JwtService) GetRedisJWT(username string) (string, error)
GetRedisJWT 从 redis 中获取 JWT
func (*JwtService) SetRedisJWT ¶
func (jwtService *JwtService) SetRedisJWT(jwt string, username string) error
SetRedisJWT JWT 存入 redis 并设置过期时间
type UserService ¶
type UserService struct { }
func (*UserService) GetUser ¶
func (userService *UserService) GetUser(id int64) (model.User, error)
GetUser 根据 id 获取用户
func (*UserService) UserAvatar ¶
func (userService *UserService) UserAvatar(id int64, fileHeader *multipart.FileHeader) error
UserAvatar 更新用户头像
func (*UserService) UserAvatarLocal ¶
func (userService *UserService) UserAvatarLocal(id int64, fileHeader *multipart.FileHeader) error
UserAvatarLocal 更新用户头像到本地
func (*UserService) UserDelete ¶
func (userService *UserService) UserDelete(id int64) error
UserDelete 删除用户
func (*UserService) UserRegister ¶
func (userService *UserService) UserRegister(user *model.User) error
UserRegister 用户注册
func (*UserService) UserSearch ¶
func (userService *UserService) UserSearch(r request.UserSearch) (int64, int, int, interface{}, int, error)
UserSearch 搜索用户
func (*UserService) UserUpdate ¶
func (userService *UserService) UserUpdate(user model.User) error
UserUpdate 更新用户信息
Click to show internal directories.
Click to hide internal directories.