Documentation ¶
Index ¶
- Variables
- func NewArticleRepo(data *Data, logger log.Logger) biz.ArticleRepo
- func NewColumnRepo(data *Data, logger log.Logger) biz.ColumnRepo
- func NewCosServiceClient(conf *conf.Data) *cos.Client
- func NewCreationRepo(data *Data, logger log.Logger) biz.CreationRepo
- func NewDB(conf *conf.Data) *gorm.DB
- func NewNewsRepo(data *Data, logger log.Logger) biz.NewsRepo
- func NewRecovery(d *Data) biz.Recovery
- func NewRedis(conf *conf.Data) redis.Cmdable
- func NewTalkRepo(data *Data, logger log.Logger) biz.TalkRepo
- func NewTransaction(d *Data) biz.Transaction
- type Article
- type ArticleAgree
- type ArticleCollect
- type ArticleContentReview
- type ArticleDraft
- type ArticleReview
- type ArticleStatistic
- type Collect
- type Collections
- type CollectionsContentReview
- type CollectionsDraft
- type Column
- type ColumnAgree
- type ColumnCollect
- type ColumnContentReview
- type ColumnDraft
- type ColumnInclusion
- type ColumnReview
- type ColumnStatistic
- type CreationUser
- type CreationUserVisitor
- 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 ElasticSearch
- type MqPro
- type News
- type NewsClient
- type Record
- type Subscribe
- type Talk
- type TalkAgree
- type TalkCollect
- type TalkContentReview
- type TalkDraft
- type TalkReview
- type TalkStatistic
- type TimeLine
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewArticleRepo ¶
func NewArticleRepo(data *Data, logger log.Logger) biz.ArticleRepo
func NewColumnRepo ¶
func NewColumnRepo(data *Data, logger log.Logger) biz.ColumnRepo
func NewCosServiceClient ¶
func NewCreationRepo ¶
func NewCreationRepo(data *Data, logger log.Logger) biz.CreationRepo
func NewRecovery ¶
func NewTransaction ¶
func NewTransaction(d *Data) biz.Transaction
Types ¶
type ArticleAgree ¶
type ArticleCollect ¶
type ArticleContentReview ¶
type ArticleDraft ¶
type ArticleReview ¶
type ArticleStatistic ¶
type ArticleStatistic struct { ArticleId int32 `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Uuid string `gorm:"index;size:20"` Agree int32 `gorm:"index;type:int unsigned;default:0"` View int32 `gorm:"type:int unsigned;default:0"` Collect int32 `gorm:"type:int unsigned;default:0"` Comment int32 `gorm:"type:int unsigned;default:0"` Auth int32 `gorm:"default:1"` }
type Collections ¶
type Collections struct { CollectionsId int32 `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Uuid string `gorm:"index;size:20"` Auth int32 `gorm:"default:1"` Article int32 `gorm:"type:int unsigned;default:0"` Column int32 `gorm:"type:int unsigned;default:0"` Talk int32 `gorm:"type:int unsigned;default:0"` }
type CollectionsDraft ¶
type ColumnAgree ¶
type ColumnCollect ¶
type ColumnContentReview ¶
type ColumnDraft ¶
type ColumnInclusion ¶
type ColumnReview ¶
type ColumnStatistic ¶
type ColumnStatistic struct { ColumnId int32 `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Uuid string `gorm:"index;size:20"` Agree int32 `gorm:"type:int unsigned;index;default:0"` View int32 `gorm:"type:int unsigned;default:0"` Collect int32 `gorm:"type:int unsigned;default:0"` Auth int32 `gorm:"default:1"` }
type CreationUser ¶
type CreationUser struct { CreatedAt time.Time UpdatedAt time.Time Uuid string `gorm:"primarykey;size:20"` Article int32 `gorm:"type:int unsigned;default:0"` Column int32 `gorm:"type:int unsigned;default:0"` Talk int32 `gorm:"type:int unsigned;default:0"` Collections int32 `gorm:"type:int unsigned;default:0"` Collect int32 `gorm:"type:int unsigned;default:0"` Subscribe int32 `gorm:"type:int unsigned;default:0"` }
type CreationUserVisitor ¶
type CreationUserVisitor struct { CreatedAt time.Time UpdatedAt time.Time Uuid string `gorm:"primarykey;size:20"` Article int32 `gorm:"type:int unsigned;default:0"` Column int32 `gorm:"type:int unsigned;default:0"` Talk int32 `gorm:"type:int unsigned;default:0"` Collections 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, cos *cos.Client, es *ElasticSearch, mq *MqPro, news *NewsClient, logger log.Logger) (*Data, func(), error)
func (*Data) GroupRecover ¶
type ElasticSearch ¶
type ElasticSearch struct {
// contains filtered or unexported fields
}
func NewElasticsearch ¶
func NewElasticsearch(conf *conf.Data) *ElasticSearch
type MqPro ¶ added in v1.3.0
type MqPro struct {
// contains filtered or unexported fields
}
func NewRocketmqProducer ¶ added in v1.3.0
type NewsClient ¶ added in v1.4.0
type NewsClient struct {
// contains filtered or unexported fields
}
func NewNewsClient ¶
func NewNewsClient(conf *conf.Data) *NewsClient
type TalkCollect ¶
type TalkContentReview ¶
type TalkReview ¶
type TalkStatistic ¶
type TalkStatistic struct { TalkId int32 `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Uuid string `gorm:"index;size:20"` Agree int32 `gorm:"index;type:int unsigned;default:0"` View int32 `gorm:"type:int unsigned;default:0"` Collect int32 `gorm:"type:int unsigned;default:0"` Comment int32 `gorm:"type:int unsigned;default:0"` Auth int32 `gorm:"default:1"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.