controllers

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Dbm *gorp.DbMap
)

Functions

func InitDB

func InitDB()

Types

type App

type App struct {
	*revel.Controller
	GorpController
}

func (App) AddConfig

func (c App) AddConfig() revel.Result

func (App) AddUser

func (c App) AddUser() revel.Result

func (App) Index

func (c App) Index() revel.Result

Index

func (App) Login

func (c App) Login(username, password string) revel.Result

func (App) Logout

func (c App) Logout() revel.Result

func (App) ShowLogin

func (c App) ShowLogin() revel.Result

Show login form

type GorpController

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

func (*GorpController) Begin

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

func (*GorpController) Commit

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

func (*GorpController) Rollback

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

type Settings

type Settings struct {
	App
	*revel.Controller
}

func (Settings) Index

func (c Settings) Index() revel.Result

func (Settings) Save

func (c Settings) Save(name string) revel.Result

type SortPosts

type SortPosts []*models.Post

Set up sorting for Posts

func (SortPosts) Len

func (s SortPosts) Len() int

func (SortPosts) Less

func (s SortPosts) Less(i, j int) bool

func (SortPosts) Swap

func (s SortPosts) Swap(i, j int)

type SortThreads

type SortThreads []*models.Thread

Set up sorting for threads

func (SortThreads) Len

func (s SortThreads) Len() int

func (SortThreads) Less

func (s SortThreads) Less(i, j int) bool

func (SortThreads) Swap

func (s SortThreads) Swap(i, j int)

type Threads

type Threads struct {
	App
	*revel.Controller
}

func (Threads) DeletePost

func (c Threads) DeletePost(id, postId int) revel.Result

func (Threads) Index

func (c Threads) Index() revel.Result

Index shows all threads

func (Threads) New

func (c Threads) New(topic string) revel.Result

New creates a new thread

func (Threads) Post

func (c Threads) Post(id int, body string) revel.Result

func (Threads) Show

func (c Threads) Show(id int) revel.Result

func (Threads) ShowNew

func (c Threads) ShowNew() revel.Result

ShowNew shows the form for new threads

Jump to

Keyboard shortcuts

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