handlers

package
v0.0.0-...-0dd3649 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(addr string) error

func WithRequest

func WithRequest(f RequestFunc) http.HandlerFunc

func WithTransaction

func WithTransaction(f RequestFunc) http.HandlerFunc

Types

type Request

type Request struct {
	http.ResponseWriter
	*http.Request
	db.Transaction
}

func (*Request) Error

func (r *Request) Error(status int, err error)

func (*Request) Redirect

func (r *Request) Redirect(url string, status int)

func (*Request) Render

func (r *Request) Render(raw string)

func (*Request) RenderFile

func (r *Request) RenderFile(filename string)

func (*Request) RenderTemplate

func (r *Request) RenderTemplate(templatePath string, data interface{})

type RequestFunc

type RequestFunc func(*Request)

Jump to

Keyboard shortcuts

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