Documentation ¶
Index ¶
- Variables
- func NewAchievementRepo(data *Data, logger log.Logger) biz.AchievementRepo
- func NewDB(conf *conf.Data) *gorm.DB
- func NewRecovery(d *Data) biz.Recovery
- func NewRedis(conf *conf.Data) redis.Cmdable
- func NewTransaction(d *Data) biz.Transaction
- type Achievement
- type AchievementMqPro
- type Active
- type Data
- func (d *Data) DB(ctx context.Context) *gorm.DB
- 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) Recover(ctx context.Context, fn func(ctx context.Context)) func()
- type Medal
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewData, NewDB, NewRedis, NewTransaction, NewAchievementRepo, NewRecovery, NewRocketmqAchievementProducer)
Functions ¶
func NewAchievementRepo ¶
func NewAchievementRepo(data *Data, logger log.Logger) biz.AchievementRepo
func NewRecovery ¶
func NewTransaction ¶
func NewTransaction(d *Data) biz.Transaction
Types ¶
type Achievement ¶
type Achievement struct { Uuid string `gorm:"primaryKey;size:36"` Score int32 `gorm:"type:int unsigned;default:0"` Agree int32 `gorm:"type:int unsigned;default:0"` Collect int32 `gorm:"type:int unsigned;default:0"` View int32 `gorm:"type:int unsigned;default:0"` Follow int32 `gorm:"type:int unsigned;default:0"` Followed int32 `gorm:"type:int unsigned;default:0"` }
type AchievementMqPro ¶
type AchievementMqPro struct {
// contains filtered or unexported fields
}
func NewRocketmqAchievementProducer ¶
func NewRocketmqAchievementProducer(conf *conf.Data) *AchievementMqPro
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
func NewData ¶
func NewData(db *gorm.DB, redisCmd redis.Cmdable, achievementMqPro *AchievementMqPro) (*Data, func(), error)
func (*Data) GroupRecover ¶
type Medal ¶
type Medal struct { Uuid string `gorm:"primaryKey;size:36"` Creation1 int32 `gorm:"type:int unsigned;default:0"` Creation2 int32 `gorm:"type:int unsigned;default:0"` Creation3 int32 `gorm:"type:int unsigned;default:0"` Creation4 int32 `gorm:"type:int unsigned;default:0"` Creation5 int32 `gorm:"type:int unsigned;default:0"` Creation6 int32 `gorm:"type:int unsigned;default:0"` Creation7 int32 `gorm:"type:int unsigned;default:0"` Agree1 int32 `gorm:"type:int unsigned;default:0"` Agree2 int32 `gorm:"type:int unsigned;default:0"` Agree3 int32 `gorm:"type:int unsigned;default:0"` Agree4 int32 `gorm:"type:int unsigned;default:0"` Agree5 int32 `gorm:"type:int unsigned;default:0"` Agree6 int32 `gorm:"type:int unsigned;default:0"` View1 int32 `gorm:"type:int unsigned;default:0"` View2 int32 `gorm:"type:int unsigned;default:0"` View3 int32 `gorm:"type:int unsigned;default:0"` Comment1 int32 `gorm:"type:int unsigned;default:0"` Comment2 int32 `gorm:"type:int unsigned;default:0"` Comment3 int32 `gorm:"type:int unsigned;default:0"` Collect1 int32 `gorm:"type:int unsigned;default:0"` Collect2 int32 `gorm:"type:int unsigned;default:0"` Collect3 int32 `gorm:"type:int unsigned;default:0"` }
Click to show internal directories.
Click to hide internal directories.