Documentation ¶
Index ¶
- Constants
- Variables
- func InitDB(db *gorm.DB)
- func NewCommentRepo(data *Data, userConn userv1.UserServiceClient, logger log.Logger) biz.CommentRepo
- func NewKafkaWriter(c *conf.Data, l log.Logger) *kafka.Writer
- func NewMysqlConn(c *conf.Data, l log.Logger) *gorm.DB
- func NewRedisConn(c *conf.Data, l log.Logger) *redis.Client
- type Comment
- type Data
- type UserRepo
Constants ¶
View Source
const ( OccupyKey = "-1" OccupyValue = "" )
Variables ¶
View Source
var ( ErrInvalidComment = errors.New("invalid comment") ErrCopy = errors.New("copy error") ErrJsonMarshal = errors.New("json marshal error") ErrRedisSet = errors.New("redis set error") ErrRedisQuery = errors.New("redis query error") ErrMysqlDelete = errors.New("mysql delete error") ErrMysqlInsert = errors.New("mysql insert error") ErrMysqlQuery = errors.New("mysql query error") ErrRedisDelete = errors.New("redis delete error") ErrRedisTransaction = errors.New("redis transaction error") ErrUserServiceResponse = errors.New("user service response error") )
View Source
var ProviderSet = wire.NewSet(NewData, NewKafkaWriter, NewCommentRepo, NewUserRepo, NewMysqlConn, NewRedisConn)
Functions ¶
func NewCommentRepo ¶
func NewCommentRepo( data *Data, userConn userv1.UserServiceClient, logger log.Logger, ) biz.CommentRepo
Types ¶
type Comment ¶
Click to show internal directories.
Click to hide internal directories.