Documentation ¶
Index ¶
- Variables
- type JwtRepo
- type JwtService
- func (s *JwtService) CreateToken(GuardName string, user domain.JwtUser) (*domain.TokenOutPut, *jwt.Token, error)
- func (s *JwtService) GetUserInfo(ctx *gin.Context, guardName, id string) (domain.JwtUser, error)
- func (s *JwtService) IsInBlacklist(ctx *gin.Context, tokenStr string) bool
- func (s *JwtService) JoinBlackList(ctx *gin.Context, token *jwt.Token) error
- func (s *JwtService) RefreshToken(ctx *gin.Context, guardName string, token *jwt.Token) (*domain.TokenOutPut, error)
- type MediaRepo
- type MediaService
- type Transaction
- type UserRepo
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewUserService, NewJwtService, NewMediaService)
ProviderSet is service providers.
Functions ¶
This section is empty.
Types ¶
type JwtService ¶
type JwtService struct {
// contains filtered or unexported fields
}
func NewJwtService ¶
func NewJwtService(conf *config.Configuration, log *zap.Logger, jRepo JwtRepo, uS *UserService, lb *compo.LockBuilder) *JwtService
func (*JwtService) CreateToken ¶
func (s *JwtService) CreateToken(GuardName string, user domain.JwtUser) (*domain.TokenOutPut, *jwt.Token, error)
func (*JwtService) GetUserInfo ¶
func (*JwtService) IsInBlacklist ¶
func (s *JwtService) IsInBlacklist(ctx *gin.Context, tokenStr string) bool
func (*JwtService) JoinBlackList ¶
func (s *JwtService) JoinBlackList(ctx *gin.Context, token *jwt.Token) error
func (*JwtService) RefreshToken ¶
func (s *JwtService) RefreshToken(ctx *gin.Context, guardName string, token *jwt.Token) (*domain.TokenOutPut, error)
type MediaService ¶
type MediaService struct {
// contains filtered or unexported fields
}
func NewMediaService ¶
func NewMediaService(conf *config.Configuration, log *zap.Logger, mRepo MediaRepo, s *compo.Storage) *MediaService
NewMediaService .
func (*MediaService) GetUrlById ¶
func (s *MediaService) GetUrlById(ctx *gin.Context, id uint64) string
func (*MediaService) HashName ¶
func (s *MediaService) HashName(fileName string) string
func (*MediaService) SaveImage ¶
func (s *MediaService) SaveImage(ctx *gin.Context, params *request.ImageUpload) (*domain.Media, error)
SaveImage 保存图片(公共读)
type Transaction ¶
Transaction 新增事务接口方法
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(uRepo UserRepo, tm Transaction) *UserService
NewUserService .
func (*UserService) GetUserInfo ¶
GetUserInfo 获取用户信息
Click to show internal directories.
Click to hide internal directories.