Documentation ¶
Index ¶
- Constants
- type Admin
- type AdminParams
- type AdminTag
- type Blog
- type BlogTag
- type Category
- func (c *Category) Add(ca_name string, ca_ident string, ca_p, ca_id int, ca_desc string) revel.Result
- func (c *Category) AddPage() revel.Result
- func (c *Category) Del(id int) revel.Result
- func (c *Category) EditPage(cid int64) revel.Result
- func (c *Category) Index() revel.Result
- func (c *Category) ListAll() revel.Result
- type Comment
- type DBParams
- type FileInfo
- type Install
- type Login
- type Main
- type Post
- type PostData
- type ResultJson
- type Search
- type Setting
- type SiteInfo
- type Upload
- type User
- func (user *User) Create() revel.Result
- func (user *User) CreateHandler(username, nickname, password, email string, group int) revel.Result
- func (user *User) Delete(ids string) revel.Result
- func (user *User) Edit(id int64) revel.Result
- func (user *User) EditHandler(username, nickname, password, email string, group int, id int64) revel.Result
- func (user *User) Main() revel.Result
Constants ¶
const ( KB int = 1 << (10 * iota) MB GB )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct {
*revel.Controller
}
Admin controller. Admin 控制器,后代所有操作都在此控制器下
func (*Admin) AdminChecker ¶
AdminChecker for get the value of which module user choose, and make the menu selected. TODO:Laily check if it is a admin user 检测 url 是访问后台哪个模块的操作
type AdminParams ¶
type Blog ¶
type Blog struct {
*revel.Controller
}
Blogger controller
func (*Blog) LatestBlogger ¶
func (b *Blog) LatestBlogger()
LatestBlogger get laster n blog 获取最新的 n 条博客
type BlogTag ¶
type BlogTag struct {
*revel.Controller
}
BlogTag controller
func (*BlogTag) GetAllTags ¶
GetAllTags to find all tags 获取所有的标签
type Category ¶
type Category struct {
Admin
}
Category for blog, admin user can access 博客分类,后台用户操作
func (*Category) Add ¶
func (c *Category) Add(ca_name string, ca_ident string, ca_p, ca_id int, ca_desc string) revel.Result
Add to add a new category 添加一个新的分类
type Install ¶
type Install struct {
*revel.Controller
}
func (*Install) HandleInstall ¶
type Login ¶
type Login struct {
*revel.Controller
}
Login controller
func (Login) SignInHandler ¶
handle Sign
type Post ¶
type Post struct {
Admin
}
User for User Controller
func (*Post) ManagePost ¶
ManagePost . 管理博客页面
func (*Post) NewPostHandler ¶
NewPostHandler to Add new article. 添加博客
func (*Post) QueryCategorys ¶
type PostData ¶
type PostData struct { Id int64 Title string // 博客标题 Ident string // 博客标示,用作url ContentMD string // 博客内容 MD ContentHTML string // 博客内容 HTML Category int64 // 博客类别 Tag string // 标签 格式:12,14,32 Keywords string // 关键词 格式:java,web开发 Summary string // 博客摘要 Type int // 0 表示 markdown,1 表示 html NewTag string // 新添加的标签 Createtime string // 创建时间 // contains filtered or unexported fields }
PostData model. 发布博客前端提交的数据
type ResultJson ¶
ResultJson is a json struct used in controller response
type Search ¶
type Search struct {
*revel.Controller
}
type Setting ¶
type Setting struct {
Admin
}
Setting controller
type User ¶
type User struct {
Admin
}
User for User Controller 用户管理控制器
func (*User) CreateHandler ¶
CreateHandler for do create user 处理创建用户的请求