Documentation
¶
Index ¶
- Variables
- func NewAccountRepo(data *Data, logger log.Logger) biz.AccountRepo
- func NewAuthRepo(data *Data, logger log.Logger) biz.UserRepo
- func NewHiveConn(conf *conf.Data, logger log.Logger) *gohive.Connection
- func NewKafkaClient(conf *conf.Data, logger log.Logger) sarama.Client
- func NewRealWorldDB(confServer *conf.Server, confData *conf.Data, logger log.Logger) *gorm.DB
- func NewRedisConn(conf *conf.Data, logger log.Logger) *redis.Client
- type Data
- type Users
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewData, NewRealWorldDB, NewRedisConn, NewHiveConn, NewKafkaClient, NewAuthRepo, NewAccountRepo, )
ProviderSet is data providers.
Functions ¶
func NewAccountRepo ¶
func NewAccountRepo(data *Data, logger log.Logger) biz.AccountRepo
func NewHiveConn ¶
NewHiveConn .
func NewKafkaClient ¶
NewKafkaClient . link: https://www.jianshu.com/p/666d2604e8f8
func NewRealWorldDB ¶
NewRealWorldDB .
Types ¶
type Users ¶
type Users struct { gorm.Model ID uint64 `gorm:"primaryKey"` Email string `gorm:"size:not_null"` Username string `gorm:"size:not_null"` Bio string `gorm:"size:not_null,1000"` Image string `gorm:"size:not_null,1000"` PasswordHash string `gorm:"size:not_null,500"` CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Click to show internal directories.
Click to hide internal directories.