Documentation ¶
Index ¶
- Variables
- func NewAuthRepo(data *Data, logger log.Logger) biz.AuthRepo
- 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
- func NewUserRepo(data *Data, logger log.Logger) biz.UserRepo
- type AchievementMqPro
- type AvatarReview
- type CodeMqPro
- type Cos
- type CoverReview
- 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 Follow
- type FollowMqPro
- type PictureMqPro
- type Profile
- type ProfileMqPro
- type ProfileUpdate
- type User
Constants ¶
This section is empty.
Variables ¶
Functions ¶
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 AvatarReview ¶
type CodeMqPro ¶
type CodeMqPro struct {
// contains filtered or unexported fields
}
func NewRocketmqCodeProducer ¶
type CoverReview ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
func NewData ¶
func NewData(db *gorm.DB, redisCmd redis.Cmdable, cp *CodeMqPro, es *ElasticSearch, pp *ProfileMqPro, fp *FollowMqPro, pip *PictureMqPro, aq *AchievementMqPro, cos *Cos) (*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 FollowMqPro ¶
type FollowMqPro struct {
// contains filtered or unexported fields
}
func NewRocketmqFollowProducer ¶
func NewRocketmqFollowProducer(conf *conf.Data) *FollowMqPro
type PictureMqPro ¶
type PictureMqPro struct {
// contains filtered or unexported fields
}
func NewRocketmqPictureProducer ¶
func NewRocketmqPictureProducer(conf *conf.Data) *PictureMqPro
type Profile ¶
type Profile struct { CreatedAt time.Time Updated int64 Uuid string `gorm:"primaryKey;size:36"` Username string `gorm:"uniqueIndex;not null;size:20"` Avatar string `gorm:"size:200"` School string `gorm:"size:50"` Company string `gorm:"size:50"` Job string `gorm:"size:50"` Homepage string `gorm:"size:100"` Introduce string `gorm:"size:100"` }
func (Profile) MarshalEasyJSON ¶ added in v1.2.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (Profile) MarshalJSON ¶ added in v1.2.0
MarshalJSON supports json.Marshaler interface
func (*Profile) UnmarshalEasyJSON ¶ added in v1.2.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Profile) UnmarshalJSON ¶ added in v1.2.0
UnmarshalJSON supports json.Unmarshaler interface
type ProfileMqPro ¶
type ProfileMqPro struct {
// contains filtered or unexported fields
}
func NewRocketmqProfileProducer ¶
func NewRocketmqProfileProducer(conf *conf.Data) *ProfileMqPro
type ProfileUpdate ¶
type User ¶
type User struct { gorm.Model Uuid string `gorm:"uniqueIndex;size:36"` Email string `gorm:"uniqueIndex;size:50"` Phone string `gorm:"uniqueIndex;size:20"` Wechat string `gorm:"uniqueIndex;size:100"` Qq string `gorm:"uniqueIndex;size:100"` Weibo string `gorm:"uniqueIndex;size:100"` Github string `gorm:"uniqueIndex;size:100"` Password string `gorm:"size:500"` }
Click to show internal directories.
Click to hide internal directories.