Documentation ¶
Index ¶
- type ArticleRepo
- type CategoryRepo
- func (r *CategoryRepo) Create(value *models.Category) error
- func (r *CategoryRepo) FindByCond(cond map[string]interface{}) ([]*models.Category, error)
- func (r *CategoryRepo) GetByCond(cond map[string]interface{}) (*models.Category, error)
- func (r *CategoryRepo) UpdateByIdAndCond(id uint, cond map[string]interface{}) error
- type UserRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleRepo ¶
type ArticleRepo struct {
// contains filtered or unexported fields
}
func NewArticleRepo ¶
func NewArticleRepo(engine *gorm.DB) *ArticleRepo
type CategoryRepo ¶
type CategoryRepo struct {
// contains filtered or unexported fields
}
func NewCategoryRepo ¶
func NewCategoryRepo(engine *gorm.DB) *CategoryRepo
func (*CategoryRepo) Create ¶
func (r *CategoryRepo) Create(value *models.Category) error
Create 创建分类.
func (*CategoryRepo) FindByCond ¶
func (r *CategoryRepo) FindByCond(cond map[string]interface{}) ([]*models.Category, error)
FindByCond 根据条件搜索分类.
func (*CategoryRepo) GetByCond ¶
func (r *CategoryRepo) GetByCond(cond map[string]interface{}) (*models.Category, error)
GetByCond 根据条件查询分类.
func (*CategoryRepo) UpdateByIdAndCond ¶
func (r *CategoryRepo) UpdateByIdAndCond(id uint, cond map[string]interface{}) error
UpdateByIdAndCond 根据id和条件更新.
type UserRepo ¶
type UserRepo struct {
// contains filtered or unexported fields
}
func NewUserRepo ¶
func (*UserRepo) ExistByCond ¶
ExistByCond 根据条件判断是否存在.
Click to show internal directories.
Click to hide internal directories.