controllers

package
v0.0.0-...-0a4b280 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2014 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DbMap *gorp.DbMap
)

DbMap is the database mapping used throughout the database controller.

Functions

func Initialize

func Initialize()

Initialize the database and create a database mapping.

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
}

func (Home) About

func (c Home) About() revel.Result

func (Home) Index

func (c Home) Index() revel.Result

func (Home) Overview

func (c Home) Overview() revel.Result

type Profile

type Profile struct {
	Application
}

func (Profile) Add

func (c Profile) Add(product string, calories int64) revel.Result

func (Profile) Delete

func (c Profile) Delete(id int64) revel.Result

func (Profile) Goal

func (c Profile) Goal(calories int64) revel.Result

func (Profile) History

func (c Profile) History() revel.Result

func (Profile) Index

func (c Profile) Index() revel.Result

func (Profile) Logon

func (c Profile) Logon(id string) revel.Result

func (Profile) Stats

func (c Profile) Stats() revel.Result

func (Profile) Trends

func (c Profile) Trends() revel.Result

func (Profile) Weight

func (c Profile) Weight(weight float64) revel.Result

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL