controllers

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: MIT, MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB *gorm.DB
)

Functions

func InitDB

func InitDB()

Perform automatic migration

Types

type App

type App struct {
	GormController
}

func (App) ForwardAction

func (ctrl App) ForwardAction(methodName string)

func (App) Index

func (ctrl App) Index() revel.Result

type GormController

type GormController struct {
	*revel.Controller
	// contains filtered or unexported fields
}

func (*GormController) Begin

func (ctrl *GormController) Begin() revel.Result

Start a transaction on request

func (*GormController) Commit

func (ctrl *GormController) Commit() revel.Result

Commit the transaction at the end of the request

func (*GormController) Rollback

func (ctrl *GormController) Rollback() revel.Result

Abandon transaction when abnormal

type List

type List struct {
	App
}

func (List) Index

func (ctrl List) Index() revel.Result

Display page list

type Page

type Page struct {
	App
	NeedRecaptcha bool
}

Page is

func (Page) Diff

func (ctrl Page) Diff(pageName string, revisionID string) revel.Result

Diff show difference between specified revision id and previous revision It is assumed to be requested by Ajax

func (Page) Index added in v1.0.2

func (ctrl Page) Index() revel.Result

Index page

func (Page) Modify

func (ctrl Page) Modify(pageName string) revel.Result

Modify is Edit page

func (Page) Revisions

func (ctrl Page) Revisions(pageName string) revel.Result

Revisions display a list of page revisions

func (Page) Save

func (ctrl Page) Save(pageName string) revel.Result

Save is register or update the page

func (Page) Show

func (ctrl Page) Show(pageName string) revel.Result

Show page

Jump to

Keyboard shortcuts

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