Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewData, NewArticleRepo)
ProviderSet is data providers.
Functions ¶
func NewArticleRepo ¶
func NewArticleRepo(data *Data, logger log.Logger) biz.ArticleRepo
NewArticleRepo .
func NewRedis ¶
func NewRedis(ctx context.Context, data *conf.Data_Redis) (client *redis.Client, err error)
func RecordNotFound ¶
RecordNotFound First、Last、Take 这些预期会返回结果的方法查询记录时,才会返回 ErrRecordNotFound
Types ¶
type Article ¶
type Article struct { Id int64 `gorm:"column:id;primaryKey;type:bigint;index;comment:id" json:"id"` Uid int64 `gorm:"column:uid;index;type:bigint;index;comment:user_id" json:"uid"` Title string `gorm:"column:title;type:varchar(32);comment:标题" json:"title"` Content string `gorm:"column:content;type:text;comment:博客内容" json:"content"` CreateTime int64 `gorm:"column:create_time;type:bigint;not null" json:"create_time"` UpdateTime int64 `gorm:"column:update_time;type:bigint;not null" json:"update_time"` DeleteTime soft_delete.DeletedAt `gorm:"column:delete_time;type:bigint;default:0;comment:删除时间" json:"-"` }
Click to show internal directories.
Click to hide internal directories.