context

package
v0.0.0-...-e692288 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2013 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package context allows for storing values on a *Request and is a middleware implementation of github.com/gorilla/context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear(r *http.Request)

Clear removes all values stored for a given request.

This is usually called by a handler wrapper to clean up request variables at the end of a request lifetime. See ClearHandler().

func Delete

func Delete(r *http.Request, key interface{})

Delete removes a value stored for a given key in a given request.

func Get

func Get(r *http.Request, key interface{}) interface{}

Get returns a value stored for a given key in a given request.

func GetOk

func GetOk(r *http.Request, key interface{}) (interface{}, bool)

GetOk returns stored value and presence state like multi-value return of map access.

func Initialize

func Initialize() func(http.ResponseWriter, *http.Request, http.HandlerFunc)

Scopes the Request context so that Set, Get, GetOk, Delete and Clear may be used.

func Set

func Set(r *http.Request, key, val interface{})

Set stores a value for a given key in a given request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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