ctx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Params         httprouter.Params
	BeatmapService cheesegull.BeatmapService
	FileResolver   cheesegull.FileResolver
	ErrorHandler   func(error)
}

Context is the information about the request passed to an handler in the http package, alongside http.ResponseWriter and *http.Request.

func (*Context) HandleError

func (r *Context) HandleError(err error)

HandleError handles an error, passing it to ErrorHandler or printing it and printing the stacktrace.

func (*Context) Param

func (r *Context) Param(s string) string

Param retrieves a parameters from the parameters in the Context

Jump to

Keyboard shortcuts

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