Documentation ¶
Index ¶
- Constants
- func NewDBEngine(databaseSetting *setting.DatabaseSettingS) (*gorm.DB, error)
- type Article
- func (a Article) CountByTagID(db *gorm.DB, tagID uint32) (int, error)
- func (a Article) Create(db *gorm.DB) (*Article, error)
- func (a Article) Delete(db *gorm.DB) error
- func (a Article) Get(db *gorm.DB) (Article, error)
- func (a Article) ListByTagID(db *gorm.DB, tagID uint32, pageOffset, pageSize int) ([]*ArticleRow, error)
- func (a Article) TableName() string
- func (a Article) Update(db *gorm.DB, values interface{}) error
- type ArticleRow
- type ArticleSwagger
- type ArticleTag
- func (a ArticleTag) Create(db *gorm.DB) error
- func (a ArticleTag) Delete(db *gorm.DB) error
- func (a ArticleTag) DeleteOne(db *gorm.DB) error
- func (a ArticleTag) GetByAID(db *gorm.DB) (ArticleTag, error)
- func (a ArticleTag) ListByAIDs(db *gorm.DB, articleIDs []uint32) ([]*ArticleTag, error)
- func (a ArticleTag) ListByTID(db *gorm.DB) ([]*ArticleTag, error)
- func (a ArticleTag) TableName() string
- func (a ArticleTag) UpdateOne(db *gorm.DB, values interface{}) error
- type Auth
- type Model
- type Tag
- func (t Tag) Count(db *gorm.DB) (int, error)
- func (t Tag) Create(db *gorm.DB) error
- func (t Tag) Delete(db *gorm.DB) error
- func (t Tag) Get(db *gorm.DB) (Tag, error)
- func (t Tag) List(db *gorm.DB, pageOffset, pageSize int) ([]*Tag, error)
- func (t Tag) ListByIDs(db *gorm.DB, ids []uint32) ([]*Tag, error)
- func (t Tag) TableName() string
- func (t Tag) Update(db *gorm.DB, values interface{}) error
- type TagSwagger
Constants ¶
View Source
const ( STATE_OPEN = 1 STATE_CLOSE = 0 )
Variables ¶
This section is empty.
Functions ¶
func NewDBEngine ¶
func NewDBEngine(databaseSetting *setting.DatabaseSettingS) (*gorm.DB, error)
Types ¶
type Article ¶
type Article struct { *Model Title string `json:"title"` Desc string `json:"desc"` Content string `json:"content"` CoverImageUrl string `json:"cover_image_url"` State uint8 `json:"state"` }
func (Article) ListByTagID ¶
type ArticleRow ¶
type ArticleSwagger ¶
type ArticleTag ¶
func (ArticleTag) GetByAID ¶
func (a ArticleTag) GetByAID(db *gorm.DB) (ArticleTag, error)
func (ArticleTag) ListByAIDs ¶
func (a ArticleTag) ListByAIDs(db *gorm.DB, articleIDs []uint32) ([]*ArticleTag, error)
func (ArticleTag) ListByTID ¶
func (a ArticleTag) ListByTID(db *gorm.DB) ([]*ArticleTag, error)
func (ArticleTag) TableName ¶
func (a ArticleTag) TableName() string
type TagSwagger ¶
Click to show internal directories.
Click to hide internal directories.