baseController

package
v0.0.0-...-59e9b52 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2014 License: BSD-2-Clause-Views Imports: 6 Imported by: 0

Documentation

Overview

Implements boilerplate code for all controllers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseController

type BaseController struct {
	beego.Controller
	services.Service
}

BaseController composes all required types and behavior

func (*BaseController) AjaxResponse

func (this *BaseController) AjaxResponse(resultCode int, resultString string, data interface{})

AjaxResponse returns a standard ajax response

func (*BaseController) CatchPanic

func (this *BaseController) CatchPanic(functionName string)

CatchPanic is used to catch any Panic and log exceptions. Returns a 500 as the response

func (*BaseController) Finish

func (this *BaseController) Finish()

Finish is called once the controller method completes

func (*BaseController) Prepare

func (this *BaseController) Prepare()

Prepare is called prior to the controller method

func (*BaseController) ServeError

func (this *BaseController) ServeError(err error)

ServeError prepares and serves an error exception

Jump to

Keyboard shortcuts

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