Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessRequest ¶
func ProcessRequest(handler ProcessedHandlerFunc) http.HandlerFunc
ProcessRequest reads in the json body of the request if it exists
Types ¶
type ProcessedHandlerFunc ¶
type ProcessedHandlerFunc func(http.ResponseWriter, *ProcessedRequest)
ProcessedHandlerFunc function type for handlers
func Cache ¶
func Cache(handler ProcessedHandlerFunc, mc *cache.ImageCache) ProcessedHandlerFunc
Cache implements a memcache layer for storing processed images
func Validator ¶
func Validator(handler ProcessedHandlerFunc, schemaPath string) ProcessedHandlerFunc
Validator performs a json schema validation on an request body
type ProcessedRequest ¶
type ProcessedRequest struct { RawRequest *http.Request // TODO: Explore a better solution for this, ideally we would pass an // unmarshalled object here so the handler didn't have to unmarshal itself JSON []byte }
ProcessedRequest adds the validated json object to the incoming request body
Click to show internal directories.
Click to hide internal directories.