service

package
v0.0.0-...-3576a75 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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) UserLogin

func (userService *UserService) UserLogin(user *model.User) (*model.User, error)

UserLogin 用户登录

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 更新用户信息

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL