controllers

package
v0.0.0-...-5a1941a Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2016 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*Controllers
}

App is a sample controller.

func (*App) Before

func (c *App) Before() http.Handler

Before is a magic action that is started before every other action of the App controller to render current year.

func (*App) Index

func (c *App) Index() http.Handler

Index is an action that renders a home page. @get /

type Controllers

type Controllers struct {
	*requests.Requests
	*templates.Templates
	*sessions.Sessions
	*static.Static `@get:"/"`
}

Controllers is a struct that should be embedded into every controller of your app to make methods and fields provided by standard controllers available.

func (*Controllers) Before

func (c *Controllers) Before() http.Handler

Before is a magic action that is executed on every request before any other action.

Only structures with at least one action are treated as controllers. So, do not delete this method.

Jump to

Keyboard shortcuts

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