view

package
v0.0.0-...-50fae98 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2013 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CookieSecret = "7C19QRmwf3mHZ9CPAaPQ0hsWeufKd"
)

template config

Functions

func CountHandler

func CountHandler(w http.ResponseWriter, r *http.Request)

func GetCookie

func GetCookie(w http.ResponseWriter, r *http.Request, name string) (string, bool)

func GetSecureCookie

func GetSecureCookie(w http.ResponseWriter, r *http.Request, name string) (string, bool)

func HandleForm

func HandleForm(r *http.Request)

func HelloHandler

func HelloHandler(w http.ResponseWriter, r *http.Request)

func JSONHandler

func JSONHandler(m interface{}, w http.ResponseWriter, r *http.Request)

func MakeHandler

func MakeHandler(fn func(http.ResponseWriter, *http.Request)) http.HandlerFunc

func NewPostHandler

func NewPostHandler(w http.ResponseWriter, r *http.Request)

func ParseTemplateGlob

func ParseTemplateGlob(pattern string, cache bool)

func PostHandler

func PostHandler(w http.ResponseWriter, r *http.Request)

func PostJSONHandler

func PostJSONHandler(w http.ResponseWriter, r *http.Request)

func RenderTemplate

func RenderTemplate(w http.ResponseWriter, tmpl string, context m)

func SetCookie

func SetCookie(w http.ResponseWriter, r *http.Request, name string, value string, age int64)

Sets a cookie -- duration is the amount of time in seconds. 0 = forever

func SetSecureCookie

func SetSecureCookie(w http.ResponseWriter, r *http.Request, name string, val string, age int64)

func TestCookieGetHandler

func TestCookieGetHandler(w http.ResponseWriter, r *http.Request)

func TestCookieSetHandler

func TestCookieSetHandler(w http.ResponseWriter, r *http.Request)

Types

type Handler

type Handler interface {
	ServeHTTP(http.ResponseWriter, *http.Request)
}

Jump to

Keyboard shortcuts

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