Documentation ¶
Index ¶
- Variables
- func Initialize()
- type Application
- type DatabaseController
- type Home
- type Profile
- func (c Profile) Add(product string, calories int64) revel.Result
- func (c Profile) Delete(id int64) revel.Result
- func (c Profile) Goal(calories int64) revel.Result
- func (c Profile) History() revel.Result
- func (c Profile) Index() revel.Result
- func (c Profile) Logon(id string) revel.Result
- func (c Profile) Stats() revel.Result
- func (c Profile) Trends() revel.Result
- func (c Profile) Weight(weight float64) revel.Result
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DbMap *gorp.DbMap
)
DbMap is the database mapping used throughout the database controller.
Functions ¶
Types ¶
type Application ¶
type Application struct {
DatabaseController
}
func (Application) Connected ¶
func (c Application) Connected() *models.Account
type DatabaseController ¶
type DatabaseController struct { *revel.Controller Transaction *gorp.Transaction }
DatabaseController wraps the Revel controller together with the database Transaction.
func (*DatabaseController) Begin ¶
func (c *DatabaseController) Begin() revel.Result
Begin creates a new transaction to be used.
func (*DatabaseController) Commit ¶
func (c *DatabaseController) Commit() revel.Result
Commit attempts to finalize all database commands.
func (*DatabaseController) Rollback ¶
func (c *DatabaseController) Rollback() revel.Result
Rollback will revert all recent changes returning the database to its original state.
type Home ¶
type Home struct {
Application
}
type Profile ¶
type Profile struct {
Application
}
Click to show internal directories.
Click to hide internal directories.