data

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewAchievementRepo

func NewAchievementRepo(data *Data, logger log.Logger) biz.AchievementRepo

func NewDB

func NewDB(conf *conf.Data) *gorm.DB

func NewRecovery

func NewRecovery(d *Data) biz.Recovery

func NewRedis

func NewRedis(conf *conf.Data) redis.Cmdable

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 Active

type Active struct {
	Uuid  string `gorm:"primaryKey;size:36"`
	Agree int32  `gorm:"type:int unsigned;default:0"`
}

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

func (d *Data) DB(ctx context.Context) *gorm.DB

func (*Data) ExecTx

func (d *Data) ExecTx(ctx context.Context, fn func(ctx context.Context) error) error

func (*Data) GroupRecover

func (d *Data) GroupRecover(ctx context.Context, fn func(ctx context.Context) error) func() error

func (*Data) Recover

func (d *Data) Recover(ctx context.Context, fn func(ctx context.Context)) func()

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"`
}

Jump to

Keyboard shortcuts

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