Documentation ¶
Index ¶
- type ArticleModelDB
- type CategoryModelDB
- type Dao
- func (d *Dao) ArticleAdd(catid uint, title string, content string) error
- func (d *Dao) ArticleDel(id uint) error
- func (d *Dao) ArticleFindAll() ([]ArticleModelDB, error)
- func (d *Dao) ArticleFindByCatID(catid uint) ([]ArticleModelDB, error)
- func (d *Dao) ArticleFindByID(id uint) (*ArticleModelDB, error)
- func (d *Dao) ArticleFindWithNum(num uint) ([]ArticleModelDB, error)
- func (d *Dao) ArticleUpdate(id uint, m *common.ArticleModel) error
- func (d *Dao) ArticleUpdateCat(catID uint, mvCatId uint) error
- func (d *Dao) CategoryAdd(name string, alias string) error
- func (d *Dao) CategoryDel(id uint) error
- func (d *Dao) CategoryFindAll() ([]CategoryModelDB, error)
- func (d *Dao) CategoryFindByAlias(alias string) (*CategoryModelDB, error)
- func (d *Dao) CategoryFindByID(id uint) (*CategoryModelDB, error)
- func (d *Dao) CategoryUpdate(id uint, name string, alias string) error
- func (d *Dao) Open() error
- func (d *Dao) PageAdd(title string, content string) error
- func (d *Dao) PageDel(id uint) error
- func (d *Dao) PageFindAll() ([]PageModelDB, error)
- func (d *Dao) PageFindByID(id uint) (*PageModelDB, error)
- func (d *Dao) PageUpdate(id uint, m *common.PageModel) error
- func (d *Dao) SetMaxIdleConns(n int)
- func (d *Dao) SetMaxOpenConns(n int)
- func (d *Dao) TweetAdd(content string) error
- func (d *Dao) TweetCount() uint
- func (d *Dao) TweetDel(id uint) error
- func (d *Dao) TweetFindByNum(page uint, num uint) ([]TweetModelDB, error)
- type PageModelDB
- type TweetModelDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleModelDB ¶
type ArticleModelDB struct {
common.ArticleModel
}
func (ArticleModelDB) TableName ¶
func (ArticleModelDB) TableName() string
type CategoryModelDB ¶
func (CategoryModelDB) TableName ¶
func (CategoryModelDB) TableName() string
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
func (*Dao) ArticleDel ¶
func (*Dao) ArticleFindAll ¶
func (d *Dao) ArticleFindAll() ([]ArticleModelDB, error)
func (*Dao) ArticleFindByCatID ¶
func (d *Dao) ArticleFindByCatID(catid uint) ([]ArticleModelDB, error)
func (*Dao) ArticleFindByID ¶
func (d *Dao) ArticleFindByID(id uint) (*ArticleModelDB, error)
func (*Dao) ArticleFindWithNum ¶
func (d *Dao) ArticleFindWithNum(num uint) ([]ArticleModelDB, error)
func (*Dao) ArticleUpdate ¶
func (d *Dao) ArticleUpdate(id uint, m *common.ArticleModel) error
func (*Dao) CategoryDel ¶
func (*Dao) CategoryFindAll ¶
func (d *Dao) CategoryFindAll() ([]CategoryModelDB, error)
func (*Dao) CategoryFindByAlias ¶
func (d *Dao) CategoryFindByAlias(alias string) (*CategoryModelDB, error)
func (*Dao) CategoryFindByID ¶
func (d *Dao) CategoryFindByID(id uint) (*CategoryModelDB, error)
func (*Dao) PageFindAll ¶
func (d *Dao) PageFindAll() ([]PageModelDB, error)
func (*Dao) PageFindByID ¶
func (d *Dao) PageFindByID(id uint) (*PageModelDB, error)
func (*Dao) SetMaxIdleConns ¶
func (*Dao) SetMaxOpenConns ¶
func (*Dao) TweetCount ¶
func (*Dao) TweetFindByNum ¶
func (d *Dao) TweetFindByNum(page uint, num uint) ([]TweetModelDB, error)
type PageModelDB ¶
func (PageModelDB) TableName ¶
func (PageModelDB) TableName() string
type TweetModelDB ¶
type TweetModelDB struct {
common.TweetModel
}
func (TweetModelDB) TableName ¶
func (TweetModelDB) TableName() string
Click to show internal directories.
Click to hide internal directories.