request

package
v0.0.0-...-9fc8a72 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2015 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRequest = errors.New("bad request)")
)

Functions

func Display

func Display(w http.ResponseWriter, req *http.Request)

func Error

func Error(err error, w http.ResponseWriter)

func InitWorkers

func InitWorkers(n int)

func Work

func Work(j Job) (img.Img, error)

Types

type Job

type Job struct {
	Ctx         context.Context
	Image       img.Img
	FilterChain filter.Chain
	// contains filtered or unexported fields
}

type JobResponse

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

type Logger

type Logger struct {
	StackSize int
}

Recovery is a Negroni middleware that recovers from any panics and writes a 500 if there was one.

func NewLogger

func NewLogger() *Logger

NewRecovery returns a new instance of Recovery

func (*Logger) ServeHTTP

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

type Request

type Request struct {
	FilterChain filter.Chain
	Storage     string
	File        string
	Format      string
	Quality     int
}

func ParseRequest

func ParseRequest(ctx context.Context, q url.Values, url string) (*Request, error)

Jump to

Keyboard shortcuts

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