controllers

package
v0.0.0-...-5707e41 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2014 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	POST_THRESHOLD = 30

	ERR_POST_THRESHOLD_REACHED = "You have reached your maximum post limit"
	ERR_MULTIPLE_VOTE          = "You may not vote more than once"
	ERR_ID_NOT_FOUND           = "id not found"
)

Variables

View Source
var (
	Dbm *gorp.DbMap
)

Functions

func Init

func Init()

Types

type Api

type Api struct {
	Base
}

func (*Api) Index

func (c *Api) Index(arg models.Args) revel.Result

func (*Api) Insert

func (c *Api) Insert() revel.Result

func (*Api) Single

func (c *Api) Single(id int) revel.Result

func (*Api) Total

func (c *Api) Total(arg models.Args) revel.Result

func (*Api) Vote

func (c *Api) Vote(id int, typ string) revel.Result

type App

type App struct {
	Base
}

func (*App) AdvSearch

func (c *App) AdvSearch() revel.Result

func (*App) Index

func (c *App) Index(arg models.Args) revel.Result

func (*App) Insert

func (c *App) Insert(quote models.Quote, arg models.Args) revel.Result

func (*App) Quote

func (c *App) Quote(id int) revel.Result

func (*App) Random

func (c *App) Random() revel.Result

func (*App) Vote

func (c *App) Vote(voteId int, voteType string, arg models.Args) revel.Result

type Base

type Base struct {
	GorpController
}

type GorpController

type GorpController struct {
	*r.Controller
	Txn *gorp.Transaction
}

func (*GorpController) Begin

func (c *GorpController) Begin() r.Result

func (*GorpController) Commit

func (c *GorpController) Commit() r.Result

func (*GorpController) Rollback

func (c *GorpController) Rollback() r.Result

type Utf8Result

type Utf8Result string

Helper for sending utf-8 encoded plain text

func (Utf8Result) Apply

func (u Utf8Result) Apply(req *revel.Request, resp *revel.Response)

Jump to

Keyboard shortcuts

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