Documentation ¶
Index ¶
- Variables
- func NewAchievementRepo(data *Data, logger log.Logger) biz.AchievementRepo
- func NewAchievementServiceClient(r *nacos.Registry) achievementv1.AchievementClient
- func NewCommentRepo(data *Data, logger log.Logger) biz.CommentRepo
- func NewCommentServiceClient(r *nacos.Registry) commentv1.CommentClient
- func NewCreationRepo(data *Data, logger log.Logger) biz.CreationRepo
- func NewCreationServiceClient(r *nacos.Registry) creationv1.CreationClient
- func NewDB(conf *conf.Data) *gorm.DB
- func NewJwt(d *Data) biz.Jwt
- func NewMessageRepo(data *Data, logger log.Logger) biz.MessageRepo
- func NewRecovery(d *Data) biz.Recovery
- func NewRedis(conf *conf.Data) redis.Cmdable
- func NewTransaction(d *Data) biz.Transaction
- func NewUserRepo(data *Data, logger log.Logger) biz.UserRepo
- func NewUserServiceClient(r *nacos.Registry) userv1.UserClient
- type CosComment
- type CosCreation
- type CosUser
- type Data
- func (d *Data) ExecTx(ctx context.Context, fn func(ctx context.Context) error) error
- func (d *Data) GroupRecover(ctx context.Context, fn func(ctx context.Context) error) func() error
- func (d *Data) JwtCheck(jwtToken string) (string, error)
- func (d *Data) Recover(ctx context.Context, fn func(ctx context.Context)) func()
- type Jwt
- type SystemNotification
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LOG = log.NewHelper(log.With(log.GetLogger(), "source", "accesslog")) ErrMissingJwtToken = errors.Unauthorized("TOKEN_MISSING", "JWT token is missing") ErrTokenInvalid = errors.Unauthorized("TOKEN_INVALID", "Token is invalid") ErrTokenExpired = errors.Unauthorized("TOKEN_EXPIRED", "JWT token has expired") ErrTokenParseFail = errors.Unauthorized("TOKEN_PARSE_FAIL", "Fail to parse JWT token ") ErrUnSupportSigningMethod = errors.Unauthorized("UN_SUPPORT_SIGNING_METHOD", "Wrong signing method") )
View Source
var ProviderSet = wire.NewSet(NewData, NewUserRepo, NewCreationRepo, NewCommentRepo, NewMessageRepo, NewAchievementRepo, NewUserServiceClient, NewCreationServiceClient, NewAchievementServiceClient, NewCommentServiceClient, NewCosUserClient, NewCosCreationClient, NewCosCommentClient, NewJwtClient, NewJwt, NewRecovery, NewTransaction, NewRedis, NewDB)
Functions ¶
func NewAchievementRepo ¶
func NewAchievementRepo(data *Data, logger log.Logger) biz.AchievementRepo
func NewAchievementServiceClient ¶
func NewAchievementServiceClient(r *nacos.Registry) achievementv1.AchievementClient
func NewCommentRepo ¶
func NewCommentRepo(data *Data, logger log.Logger) biz.CommentRepo
func NewCommentServiceClient ¶
func NewCommentServiceClient(r *nacos.Registry) commentv1.CommentClient
func NewCreationRepo ¶
func NewCreationRepo(data *Data, logger log.Logger) biz.CreationRepo
func NewCreationServiceClient ¶
func NewCreationServiceClient(r *nacos.Registry) creationv1.CreationClient
func NewMessageRepo ¶
func NewMessageRepo(data *Data, logger log.Logger) biz.MessageRepo
func NewRecovery ¶
func NewTransaction ¶
func NewTransaction(d *Data) biz.Transaction
func NewUserServiceClient ¶
func NewUserServiceClient(r *nacos.Registry) userv1.UserClient
Types ¶
type CosComment ¶
type CosComment struct {
// contains filtered or unexported fields
}
func NewCosCommentClient ¶
func NewCosCommentClient(conf *conf.Data) *CosComment
type CosCreation ¶
type CosCreation struct {
// contains filtered or unexported fields
}
func NewCosCreationClient ¶
func NewCosCreationClient(conf *conf.Data) *CosCreation
type CosUser ¶
type CosUser struct {
// contains filtered or unexported fields
}
func NewCosUserClient ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
func NewData ¶
func NewData(db *gorm.DB, redisCmd redis.Cmdable, uc userv1.UserClient, cc creationv1.CreationClient, commc commentv1.CommentClient, ac achievementv1.AchievementClient, jwt Jwt, cosUser *CosUser, cosCreation *CosCreation, cosComment *CosComment, logger log.Logger) (*Data, func(), error)
func (*Data) GroupRecover ¶
Click to show internal directories.
Click to hide internal directories.