handler

package
v0.0.0-...-8ed464c Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ALogger

type ALogger interface {
	Println(v ...interface{})
	Printf(format string, v ...interface{})
}

ALogger interface

type Idempotent

type Idempotent struct{}

func NewIdempotent

func NewIdempotent() *Idempotent

Retrieve an instance of Idempotent handler

func (*Idempotent) ServeHTTP

func (idem *Idempotent) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

func (*Idempotent) ValidateRequestId

func (idem *Idempotent) ValidateRequestId(reqid string) (bool, error)

func (*Idempotent) ValidateRequestIdFromHeaders

func (idem *Idempotent) ValidateRequestIdFromHeaders(r *http.Request) (bool, error)

type Logger

type Logger struct {
	// ALogger implements just enough log.Logger interface to be compatible with other implementations
	ALogger
}

Logger is a middleware handler that logs the request as it goes in and the response as it goes out.

func NewLogger

func NewLogger() *Logger

NewLogger returns a new Logger instance

func (*Logger) ServeHTTP

func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

Jump to

Keyboard shortcuts

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