Documentation ¶
Index ¶
- Constants
- func InitDB()
- type App
- type BlogUser
- func (ctrl BlogUser) CheckUser() revel.Result
- func (ctrl BlogUser) CreateSession(username, password string) revel.Result
- func (ctrl BlogUser) DestroySession() revel.Result
- func (ctrl BlogUser) Edit() revel.Result
- func (ctrl BlogUser) Login() revel.Result
- func (ctrl BlogUser) Update(name, oldPassword, newPassword, newPasswordConfirm string) revel.Result
- type Comment
- type GormController
- type Home
- type Post
- func (ctrl Post) CheckUser() revel.Result
- func (ctrl Post) Create(title, body string) revel.Result
- func (ctrl Post) Destroy(ID int) revel.Result
- func (ctrl Post) Edit(ID int) revel.Result
- func (ctrl Post) Index() revel.Result
- func (ctrl Post) New() revel.Result
- func (ctrl Post) Show(ID int) revel.Result
- func (ctrl Post) Update(ID int, title, body string) revel.Result
Constants ¶
View Source
const ( // DefaultName is DefaultName = "Admin" // DefaultRole is DefaultRole = "admin" // DefaultUsername is DefaultUsername = "admin" // DefaultPassword is DefaultPassword = "admin" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlogUser ¶
type BlogUser struct {
App
}
User is
func (BlogUser) CreateSession ¶
CreateSession is
func (BlogUser) DestroySession ¶
DestroySession is
type GormController ¶
type GormController struct { *revel.Controller Txn *gorm.DB }
GormController is
func (*GormController) Commit ¶
func (ctrl *GormController) Commit() revel.Result
Commit the transaction.
func (*GormController) Rollback ¶
func (ctrl *GormController) Rollback() revel.Result
Rollback if it's still going (must have panicked).
Click to show internal directories.
Click to hide internal directories.