web

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2014 License: Apache-2.0 Imports: 11 Imported by: 0

README

Go Incremental - Web

General purpose web interface library for use by goincremental projects, loosely wrapping best in class go web libraries

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContext

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

func LoadEnv

func LoadEnv()

func Params

func Params(req *http.Request) map[string]string

func SetContext

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

Types

type Environment

type Environment interface {
	Load(filenames ...string) error
}

type Middleware

type Middleware interface {
	ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
}

type Renderer

type Renderer interface {
	XML(w http.ResponseWriter, status int, v interface{})
	HTML(w http.ResponseWriter, status int, name string, binding interface{})
}

func NewRenderer

func NewRenderer() Renderer

type Route

type Route interface {
	Methods(s ...string) Route
}

type Router

type Router interface {
	http.Handler
	HandleFunc(s string, f func(http.ResponseWriter, *http.Request)) Route
}

func NewRouter

func NewRouter() Router

type Server

type Server interface {
	Run(port string)
	Use(handler Middleware)
	UseHandler(http.Handler)
}

func NewServer

func NewServer() Server

Jump to

Keyboard shortcuts

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