Documentation ¶
Index ¶
- Variables
- func NewCommentRepo(data *Data, logger log.Logger) biz.CommentRepo
- func NewCosServiceClient(conf *conf.Data) *cos.Client
- func NewCreationServiceClient(r *nacos.Registry) creationv1.CreationClient
- 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 AchievementMqPro
- type Comment
- type CommentAgree
- type CommentContentReview
- type CommentDraft
- type CommentMqPro
- type CommentUser
- 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 Record
- type ReviewMqPro
- type SubComment
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewCommentRepo ¶
func NewCommentRepo(data *Data, logger log.Logger) biz.CommentRepo
func NewCosServiceClient ¶
func NewCreationServiceClient ¶
func NewCreationServiceClient(r *nacos.Registry) creationv1.CreationClient
func NewRecovery ¶
func NewTransaction ¶
func NewTransaction(d *Data) biz.Transaction
Types ¶
type AchievementMqPro ¶
type AchievementMqPro struct {
// contains filtered or unexported fields
}
func NewRocketmqAchievementProducer ¶
func NewRocketmqAchievementProducer(conf *conf.Data) *AchievementMqPro
type Comment ¶
type Comment struct { CommentId int32 `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` CreationId int32 `gorm:"index:creation"` CreationType int32 `gorm:"index:creation"` CreationAuthor string `gorm:"index;size:36"` Uuid string `gorm:"index;size:36"` Agree int32 `gorm:"index;type:int unsigned;default:0"` Comment int32 `gorm:"type:int unsigned;default:0"` }
type CommentAgree ¶
type CommentContentReview ¶
type CommentDraft ¶
type CommentMqPro ¶
type CommentMqPro struct {
// contains filtered or unexported fields
}
func NewRocketmqCommentProducer ¶
func NewRocketmqCommentProducer(conf *conf.Data) *CommentMqPro
type CommentUser ¶
type CommentUser struct { CreatedAt time.Time UpdatedAt time.Time Uuid string `gorm:"primarykey;size:36"` Comment int32 `gorm:"type:int unsigned;default:0"` ArticleReply int32 `gorm:"type:int unsigned;default:0"` ArticleReplySub int32 `gorm:"type:int unsigned;default:0"` TalkReply int32 `gorm:"type:int unsigned;default:0"` TalkReplySub int32 `gorm:"type:int unsigned;default:0"` ArticleReplied int32 `gorm:"type:int unsigned;default:0"` ArticleRepliedSub int32 `gorm:"type:int unsigned;default:0"` TalkReplied int32 `gorm:"type:int unsigned;default:0"` TalkRepliedSub int32 `gorm:"type:int unsigned;default:0"` }
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
func NewData ¶
func NewData(db *gorm.DB, cos *cos.Client, redisCmd redis.Cmdable, rm *ReviewMqPro, cm *CommentMqPro, ap *AchievementMqPro, cc creationv1.CreationClient) (*Data, func(), error)
func (*Data) GroupRecover ¶
type ReviewMqPro ¶
type ReviewMqPro struct {
// contains filtered or unexported fields
}
func NewRocketmqReviewProducer ¶
func NewRocketmqReviewProducer(conf *conf.Data) *ReviewMqPro
type SubComment ¶
type SubComment struct { CommentId int32 `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` CreationId int32 `gorm:"index:creation"` CreationType int32 `gorm:"index:creation"` CreationAuthor string `gorm:"size:36"` RootId int32 `gorm:"index"` RootUser string `gorm:"index;size:36"` ParentId int32 `gorm:"index"` Uuid string `gorm:"index;size:36"` Reply string `gorm:"index;size:36"` Agree int32 `gorm:"type:int unsigned;default:0"` }
Click to show internal directories.
Click to hide internal directories.