Documentation
¶
Index ¶
- type AuthenticatedCORSHandler
- type ContentHandler
- type ContentTypeOverrideHandler
- type FileHandler
- type HeadersHandler
- func BrowserHeadersHandler(headers map[string]string) *HeadersHandler
- func CORSHeadersHandler(headers map[string]string) *HeadersHandler
- func DefaultCORSHeadersHandler() *HeadersHandler
- func NewHeadersHandler(headers map[string]string) *HeadersHandler
- func OriginCORSHeadersHandler(origin string) *HeadersHandler
- type LockHandler
- type NestableHandler
- type NestableHandlerFunc
- type NoopHandler
- type PayloadLimitHandler
- type RequestLoggingHandler
- type StatusCodeHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticatedCORSHandler ¶
type AuthenticatedCORSHandler struct {
// contains filtered or unexported fields
}
Designed to allow cross-domain cookies to be sent by the server and accepted by the browser. Whenever a cross-domain request is performed and the response contains a Set-Cookie header, this handler must be registered for that route.
func NewAuthenticatedCORSHandler ¶
func NewAuthenticatedCORSHandler(allowedOrigins ...string) *AuthenticatedCORSHandler
func (*AuthenticatedCORSHandler) AppendAllowedOrigin ¶
func (this *AuthenticatedCORSHandler) AppendAllowedOrigin(allowedOrigins ...string) *AuthenticatedCORSHandler
func (*AuthenticatedCORSHandler) Install ¶
func (this *AuthenticatedCORSHandler) Install(handler http.Handler)
func (*AuthenticatedCORSHandler) ServeHTTP ¶
func (this *AuthenticatedCORSHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
type ContentHandler ¶
type ContentHandler struct {
// contains filtered or unexported fields
}
func NewContentHandler ¶
func NewContentHandler(payload []byte, contentType string) *ContentHandler
func NewContentStringHandler ¶
func NewContentStringHandler(payload, contentType string) *ContentHandler
func NewKeyValueContentHandler ¶ added in v1.1.0
func NewKeyValueContentHandler(pairs ...string) *ContentHandler
func (*ContentHandler) Install ¶ added in v1.2.0
func (this *ContentHandler) Install(inner http.Handler)
func (*ContentHandler) ServeHTTP ¶
func (this *ContentHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
type ContentTypeOverrideHandler ¶
type ContentTypeOverrideHandler struct {
// contains filtered or unexported fields
}
func NewContentTypeOverrideHandler ¶
func NewContentTypeOverrideHandler(overrideType string) *ContentTypeOverrideHandler
func (*ContentTypeOverrideHandler) Install ¶
func (this *ContentTypeOverrideHandler) Install(handler http.Handler)
func (*ContentTypeOverrideHandler) ServeHTTP ¶
func (this *ContentTypeOverrideHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
type FileHandler ¶
type FileHandler struct {
// contains filtered or unexported fields
}
func (*FileHandler) ServeHTTP ¶
func (this *FileHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
type HeadersHandler ¶
type HeadersHandler struct {
// contains filtered or unexported fields
}
func BrowserHeadersHandler ¶
func BrowserHeadersHandler(headers map[string]string) *HeadersHandler
func CORSHeadersHandler ¶
func CORSHeadersHandler(headers map[string]string) *HeadersHandler
func DefaultCORSHeadersHandler ¶
func DefaultCORSHeadersHandler() *HeadersHandler
func NewHeadersHandler ¶
func NewHeadersHandler(headers map[string]string) *HeadersHandler
func OriginCORSHeadersHandler ¶
func OriginCORSHeadersHandler(origin string) *HeadersHandler
func (*HeadersHandler) Install ¶
func (this *HeadersHandler) Install(inner http.Handler)
func (*HeadersHandler) ServeHTTP ¶
func (this *HeadersHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
type LockHandler ¶
type LockHandler struct {
// contains filtered or unexported fields
}
func NewLockHandler ¶
func NewLockHandler(mutex sync.Locker, inner http.Handler) *LockHandler
func (*LockHandler) ServeHTTP ¶
func (this *LockHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
type NestableHandler ¶
type NestableHandler struct {
// contains filtered or unexported fields
}
func NewFileHandler ¶
func NewFileHandler(fullPathToFile, contentType string) *NestableHandler
func NewNestableHandler ¶
func NewNestableHandler(wrapped http.Handler) *NestableHandler
func (*NestableHandler) Install ¶
func (this *NestableHandler) Install(inner http.Handler)
func (*NestableHandler) ServeHTTP ¶
func (this *NestableHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
type NestableHandlerFunc ¶
type NestableHandlerFunc struct {
// contains filtered or unexported fields
}
func NewNestableHandlerFunc ¶
func NewNestableHandlerFunc(wrapped func() http.Handler) *NestableHandlerFunc
func (*NestableHandlerFunc) Install ¶
func (this *NestableHandlerFunc) Install(inner http.Handler)
func (*NestableHandlerFunc) ServeHTTP ¶
func (this *NestableHandlerFunc) ServeHTTP(response http.ResponseWriter, request *http.Request)
type NoopHandler ¶
type NoopHandler struct{}
func (NoopHandler) ServeHTTP ¶
func (this NoopHandler) ServeHTTP(http.ResponseWriter, *http.Request)
type PayloadLimitHandler ¶
type PayloadLimitHandler struct {
// contains filtered or unexported fields
}
func NewPayloadLimitHandler ¶
func NewPayloadLimitHandler(maxSize uint64) *PayloadLimitHandler
func (*PayloadLimitHandler) Install ¶
func (this *PayloadLimitHandler) Install(inner http.Handler)
func (*PayloadLimitHandler) ServeHTTP ¶
func (this *PayloadLimitHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
type RequestLoggingHandler ¶
type RequestLoggingHandler struct {
// contains filtered or unexported fields
}
func NewRequestLoggingHandler ¶
func NewRequestLoggingHandler(inner http.Handler, remoteAddressHeader string) *RequestLoggingHandler
func (*RequestLoggingHandler) ServeHTTP ¶
func (this *RequestLoggingHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
type StatusCodeHandler ¶
type StatusCodeHandler struct {
// contains filtered or unexported fields
}
func NewNotFoundHandler ¶
func NewNotFoundHandler() *StatusCodeHandler
func NewStatusCodeAndTextHandler ¶
func NewStatusCodeAndTextHandler(statusCode int, statusText string) *StatusCodeHandler
func NewStatusCodeHandler ¶
func NewStatusCodeHandler(statusCode int) *StatusCodeHandler
func (*StatusCodeHandler) ServeHTTP ¶
func (this *StatusCodeHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.