stack

package module
v0.0.0-...-cf2f47f Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2014 License: MIT Imports: 6 Imported by: 14

README

stack

Golang http.Handler and middleware library

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompatibleHandler

func CompatibleHandler(handler http.Handler) compatibleHandler

func NewContext

func NewContext() *context

func Recover

func Recover(w http.ResponseWriter, req *http.Request, callback *RecoverCallback, context Context)

Types

type Context

type Context interface {
	Keys() []string
	Get(string) interface{}
	Set(string, interface{})
}

type Handler

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

type Logging

type Logging struct {
	// contains filtered or unexported fields
}

func NewLogging

func NewLogging(logger *log.Logger) Logging

func (Logging) ServeHTTP

func (ware Logging) ServeHTTP(w http.ResponseWriter, req *http.Request, context Context) bool

type Middleware

type Middleware interface {
	ServeHTTP(http.ResponseWriter, *http.Request, Context) bool
}

type RecoverCallback

type RecoverCallback func(http.ResponseWriter, *http.Request, Context, interface{})

type Response

type Response struct {
	// contains filtered or unexported fields
}

type Stack

type Stack struct {
	Handler         Handler
	Middleware      []Middleware
	RecoverCallback *RecoverCallback
}

func NewStack

func NewStack(handler Handler) Stack

func (Stack) ServeHTTP

func (s Stack) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (Stack) Use

func (s Stack) Use(wares ...Middleware) Stack

func (*Stack) Write

func (s *Stack) Write(response *Response, rec *httptest.ResponseRecorder)

Directories

Path Synopsis
Godeps
_workspace/src/github.com/onsi/ginkgo
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
_workspace/src/github.com/onsi/ginkgo/config
Ginkgo accepts a number of configuration options.
Ginkgo accepts a number of configuration options.
_workspace/src/github.com/onsi/ginkgo/ginkgo
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To run tests in parallel ginkgo -nodes=N where N is the number of nodes.
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To run tests in parallel ginkgo -nodes=N where N is the number of nodes.
_workspace/src/github.com/onsi/ginkgo/ginkgo/aggregator
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output as one coherent stream.
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output as one coherent stream.
_workspace/src/github.com/onsi/ginkgo/ginkgo/support/fsnotify
Package fsnotify implements filesystem notification.
Package fsnotify implements filesystem notification.
_workspace/src/github.com/onsi/ginkgo/reporters
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
_workspace/src/github.com/onsi/ginkgo/thirdparty/gomocktestreporter
The gomocktestreporter package provides a Ginkgo friendly implementation of [Gomock's](https://code.google.com/p/gomock/) `TestReporter` interface.
The gomocktestreporter package provides a Ginkgo friendly implementation of [Gomock's](https://code.google.com/p/gomock/) `TestReporter` interface.
_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
_workspace/src/github.com/onsi/gomega/matchers
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.

Jump to

Keyboard shortcuts

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