controllers

package
v0.0.0-...-f18cc39 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2013 License: BSD-3-Clause, MIT 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 {
	Dev     *filters.DevContext
	Session *filters.SessionContext
	Flash   *filters.FlashContext
	Auth    *filters.AuthContext

	Out web.Renderer
}

An embeddable controller which implements the default context. This controller is capable of handling: (DevContext), (SessionContext), (FlashContext)

func (*App) Dispatch

func (ac *App) Dispatch(action, accept string) (web.Controller, web.Action)

Default dispatcher This will be called unless your controller provides its own impl. of a dispatcher.

Other controllers have no obligation to call or delegate this dispatcher; it simply provides a default route.

func (*App) SetAuthContext

func (ac *App) SetAuthContext(context *filters.AuthContext) error

func (*App) SetContext

func (ac *App) SetContext(context *filters.DevContext) error

Sets the ParameterContext which contains GET/POST data. Also sets up the template rendering for this application.

func (*App) SetFlashContext

func (ac *App) SetFlashContext(context *filters.FlashContext) error

Sets the FlashContext which will display a message at the earliest opportunity. (Usually on the next controller/action that is FlashContext aware.)

func (*App) SetSessionContext

func (ac *App) SetSessionContext(context *filters.SessionContext) error

Sets the SessionContext which provides session storage for this request.

func (*App) TestContext

func (ac *App) TestContext(chain []web.ChainableContext) error

type UsersController

type UsersController struct {
	*App
	Auth *filters.AuthContext
}

func (*UsersController) Delete

func (au *UsersController) Delete() *web.Result

func (*UsersController) Dispatch

func (au *UsersController) Dispatch(action, accept string) (web.Controller, web.Action)

func (*UsersController) Index

func (au *UsersController) Index() *web.Result

func (*UsersController) SetAuthContext

func (uc *UsersController) SetAuthContext(context *filters.AuthContext) error

Jump to

Keyboard shortcuts

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