Documentation
¶
Index ¶
- Constants
- func AddBlog(pid int64, title string, remark string) error
- func AddIdeal(title string, remark string) error
- func AddImage(name string, uri string, filepath string, filetype string, filename string, ...) (int64, error)
- func DeleteActicleById(id int64) (int64, error)
- func DeleteCategoryById(id int64) (int64, error)
- func DeleteImageById(id int64) (int64, error)
- func DeleteNavById(id int64) (int64, error)
- func DeleteNavByPid(pid int64) (int64, error)
- func FmtUrl(url string) string
- func GetAllArticleCount() (int64, error)
- func GetAllArticleOrerByID() *[]Article
- func GetAllArticlePage(page int, pagecnt int) *[]Article
- func GetAllBlog() *[]Blog
- func GetAllIdeal() *[]Ideal
- func GetAllNavCount() (int64, error)
- func GetArticleByCateId(cateid int64) *[]Article
- func GetArticleCountByCateId(cateid int64) (int64, error)
- func GetArticlePageByCateId(cateid int64, page int, pagecnt int) *[]Article
- func GetNavCountByPid(id int64) (int64, error)
- func IsErrNavNotExist(err error) bool
- func SaveActicle(name string, cateid int64, desc string, content string, arttype int8, ...) (int64, error)
- func SaveCategory(name string, desc string, orderno int64) (int64, error)
- func SaveNav(name string, url string, orderno int64, pid int64) (int64, error)
- func UpdateActicle(id int64, cateid int64, name string, desc string, content string, arttype int8, ...) (int64, error)
- func UpdateCategory(id int64, name string, desc string, orderno int64) (int64, error)
- func UpdateImage(id int64, name string, uri string, filepath string, filetype string, ...) (int64, error)
- func UpdateNav(id int64, name string, url string, orderno int64, pid int64) (int64, error)
- type Article
- type Blog
- type Category
- type DBinfo
- type ErrNavNotExist
- type Ideal
- type Image
- type Nav
- type User
Constants ¶
View Source
const XORM_LOG_PATH = "./data/log/xorm.log"
Variables ¶
This section is empty.
Functions ¶
func DeleteActicleById ¶
func DeleteCategoryById ¶
func DeleteImageById ¶
func DeleteNavById ¶
func DeleteNavByPid ¶
func GetAllArticleOrerByID ¶
func GetAllArticleOrerByID() *[]Article
func GetAllArticlePage ¶
GetAllArticlePage 得到当前页面的文章
func GetAllBlog ¶
func GetAllBlog() *[]Blog
func GetAllIdeal ¶
func GetAllIdeal() *[]Ideal
func GetAllNavCount ¶
func GetArticleByCateId ¶
GetArticleByCateId 得到该类别下当前页面的文章
func GetArticleCountByCateId ¶
GetArticleCountByCateId 得到该类别下的文章总数量
func GetArticlePageByCateId ¶
GetArticlePageByCateId 得到该类别下当前页面的文章
func GetNavCountByPid ¶
func IsErrNavNotExist ¶
func SaveActicle ¶
func UpdateActicle ¶
func UpdateCategory ¶
func UpdateImage ¶
Types ¶
type Article ¶
type Article struct {
Id int64 `json:"id" xorm:"pk autoincr"`
Name string `json:"name" xorm:"unique index"`
Desc string `json:"desc"`
CateId int64 `json:cateid xorm:"index"`
CateName string `json:catename`
ArtType int8 ////arttype 1 html ,2 makedown
Content template.HTML `json:"content" xorm:"text"`
Source string `'json:"source" xorm:"text"`
Created time.Time `json:"create" xorm:"created"`
Updated time.Time `json:"updated" xorm:"updated"`
}
func GetArticleById ¶
type Blog ¶
type Category ¶
type Category struct {
Id int64 `json:"id"`
Name string `json:"name" xorm:"unique index"`
Desc string `json:"desc"`
Orderno int64 `json:"orderno"`
Created time.Time `json:"create" xorm:"created"`
Updated time.Time `json:"updated" xorm:"updated"`
}
func GetAllCategoryOrderByOrderno ¶
func GetAllCategoryOrderByOrderno() []*Category
func GetCategoryById ¶
type DBinfo ¶
type ErrNavNotExist ¶
type ErrNavNotExist struct {
}
func (ErrNavNotExist) Error ¶
func (err ErrNavNotExist) Error() string
type Ideal ¶
type Image ¶
type Image struct {
Id int64 `json:"id"`
Name string `json:"name" xorm:"unique index"`
Uri string `json:"uri" xorm:"unique index"`
FilePath string `json:"filepath"`
FileType string `json:"filetype"`
FileName string `json:"filename"`
FileSize int64 `json:"filesize"`
Created time.Time `json:"create" xorm:"created"`
Updated time.Time `json:"updated" xorm:"updated"`
}
func GetAllImage ¶
func GetAllImage() []*Image
func GetImageById ¶
func GetImageByURI ¶
type Nav ¶
type Nav struct {
}
func GetAllNavOrderByOrderno ¶
func GetAllNavOrderByOrderno() []*Nav
func GetNavById ¶
func GetNavByUrl ¶
type User ¶
type User struct {
Id int64
Name string `xorm:"index unique"`
Pwd string
Email string `xorm:"index unique"`
Nickname string `xorm:"index"`
EditorType int8 //1 cke ; 2 editormd
Issys bool `xorm:"Bool"`
Status bool `xorm:"Bool"`
Created time.Time `xorm:"created"`
Updated time.Time `xorm:"updated"`
}
func GetUserByNameWithPwd ¶
Click to show internal directories.
Click to hide internal directories.