context

package
v0.0.0-...-ea61863 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(key interface{})

func Get

func Get(key interface{}) interface{}

func Set

func Set(key interface{}, value interface{})

Types

type Context

type Context map[interface{}]interface{}

func NewContext

func NewContext() Context

func (Context) Delete

func (c Context) Delete(key interface{})

func (Context) Get

func (c Context) Get(key interface{}) interface{}

func (Context) Set

func (c Context) Set(key interface{}, value interface{})

type Env

type Env struct {
	Request *http.Request
	Status  int

	//context for current request
	Ctx Context

	//session for current request,
	Session *session.Session
	// contains filtered or unexported fields
}

func NewEnv

func NewEnv(w http.ResponseWriter, r *http.Request) *Env

func (*Env) Finish

func (e *Env) Finish()

func (*Env) Header

func (e *Env) Header() http.Header

func (*Env) IsFinished

func (e *Env) IsFinished() bool

func (*Env) Redirect

func (e *Env) Redirect(url string, status int)

func (*Env) SetContentJson

func (e *Env) SetContentJson()

func (*Env) SetContentType

func (e *Env) SetContentType(tp string)

func (*Env) SetCookie

func (e *Env) SetCookie(c *http.Cookie)

func (*Env) SetStatus

func (e *Env) SetStatus(status int)

func (*Env) Write

func (e *Env) Write(v interface{})

func (*Env) WriteBuffer

func (e *Env) WriteBuffer(data []byte)

func (*Env) WriteError

func (e *Env) WriteError(status int, err error)

func (*Env) WriteString

func (e *Env) WriteString(data string)

Jump to

Keyboard shortcuts

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