Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Files ¶
type Files struct {
// contains filtered or unexported fields
}
Files is a handler for reading and writing files
func (*Files) SaveFileREST ¶
func (f *Files) SaveFileREST(rw http.ResponseWriter, r *http.Request)
SaveFileREST saves the contents of the request to a file from the request
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
func NewMiddleware ¶
func NewMiddleware(maxContentLength int64, logger hclog.Logger) *Middleware
NewMiddleware creates a new middleware handlers
func (*Middleware) CheckContentLengthMiddleware ¶
func (mw *Middleware) CheckContentLengthMiddleware(next http.Handler) http.Handler
CheckContentLengthMiddleware ensures that the content length is not greater than our allowed max. This can not be 100% depended on as Content-Length might be reported incorrectly however it is a fast first pass check.
func (*Middleware) GZipResponseMiddleware ¶
func (mw *Middleware) GZipResponseMiddleware(next http.Handler) http.Handler
GZipResponseMiddleware detects if the client can handle zipped content and if so returns the response in GZipped format
type WrappedResponseWriter ¶
type WrappedResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
WrappedResponseWriter wrapps the default http.ResponseWriter in a GZip stream
func NewWrappedResponseWriter ¶
func NewWrappedResponseWriter(rw http.ResponseWriter) *WrappedResponseWriter
NewWrappedResponseWriter returns a new wrapped response writer
func (*WrappedResponseWriter) Flush ¶
func (wr *WrappedResponseWriter) Flush()
Flush implements the Flusher interface which allows ResponseWriters