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 Comment
- type CommentAgree
- type CommentContentReview
- type CommentDraft
- 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 MqPro
- type Record
- type SubComment
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewData, NewDB, NewRedis, NewTransaction, NewCommentRepo, NewRocketMqProducer, NewCosServiceClient, NewCreationServiceClient, NewRecovery)
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 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:20"` Uuid string `gorm:"index;size:20"` Agree int32 `gorm:"index;type:int unsigned;default:0"` Comment int32 `gorm:"type:int unsigned;default:0"` }
type CommentAgree ¶
type CommentContentReview ¶
type CommentDraft ¶
type CommentUser ¶
type CommentUser struct { CreatedAt time.Time UpdatedAt time.Time Uuid string `gorm:"primarykey;size:20"` 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, mq *MqPro, cc creationv1.CreationClient, logger log.Logger) (*Data, func(), error)
func (*Data) GroupRecover ¶
type MqPro ¶ added in v1.3.0
type MqPro struct {
// contains filtered or unexported fields
}
func NewRocketMqProducer ¶ added in v1.3.0
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:20"` RootId int32 `gorm:"index"` RootUser string `gorm:"index;size:20"` ParentId int32 `gorm:"index"` Uuid string `gorm:"index;size:20"` Reply string `gorm:"index;size:20"` Agree int32 `gorm:"type:int unsigned;default:0"` }
Click to show internal directories.
Click to hide internal directories.