Documentation ¶
Index ¶
- type Caller
- type CallerError
- type CallerOption
- type DoFunc
- type Factory
- type Handler
- type HandlerOption
- func WithAllowEncoding(allowEncoding bool) HandlerOption
- func WithMaxRequestBodySize(maxRequestBodySize int64) HandlerOption
- func WithMiddleware(middleware ...MiddlewareFunc) HandlerOption
- func WithOnError(onError func(error, *http.Request)) HandlerOption
- func WithRequestTimeout(requestTimeout time.Duration) HandlerOption
- func WithResponseTimeout(responseTimeout time.Duration) HandlerOption
- type HeaderOption
- type HeaderOptionKeyVal
- type MiddlewareFunc
- type PatternHandler
- type Request
- type Response
- type SendFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallerError ¶ added in v0.4.0
type CallerError struct {
// contains filtered or unexported fields
}
type CallerOption ¶ added in v0.2.0
type CallerOption interface {
// contains filtered or unexported methods
}
func WithAdditionalRequestHeader ¶ added in v0.2.0
func WithAdditionalRequestHeader(header ...http.Header) CallerOption
func WithErrOut ¶ added in v0.3.0
func WithErrOut(errOut error) CallerOption
func WithForceBody ¶ added in v0.5.0
func WithForceBody(forceBody bool) CallerOption
func WithMaxResponseBodySize ¶ added in v0.2.0
func WithMaxResponseBodySize(maxResponseBodySize int64) CallerOption
func WithRequestHeader ¶ added in v0.2.0
func WithRequestHeader(header ...http.Header) CallerOption
type Factory ¶ added in v0.2.0
type Factory struct {
// contains filtered or unexported fields
}
func NewFactory ¶ added in v0.2.0
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(opts ...HandlerOption) (h *Handler)
func (*Handler) Handle ¶
func (h *Handler) Handle(pattern string, opts ...HandlerOption) *PatternHandler
type HandlerOption ¶
type HandlerOption interface {
// contains filtered or unexported methods
}
func WithAllowEncoding ¶ added in v0.2.0
func WithAllowEncoding(allowEncoding bool) HandlerOption
func WithMaxRequestBodySize ¶
func WithMaxRequestBodySize(maxRequestBodySize int64) HandlerOption
func WithMiddleware ¶
func WithMiddleware(middleware ...MiddlewareFunc) HandlerOption
func WithOnError ¶
func WithOnError(onError func(error, *http.Request)) HandlerOption
func WithRequestTimeout ¶ added in v0.2.0
func WithRequestTimeout(requestTimeout time.Duration) HandlerOption
func WithResponseTimeout ¶ added in v0.5.0
func WithResponseTimeout(responseTimeout time.Duration) HandlerOption
type HeaderOption ¶ added in v0.2.0
type HeaderOption struct { KeyVals []HeaderOptionKeyVal Map map[string]string }
func ParseHeaderOptions ¶ added in v0.2.0
func ParseHeaderOptions(directive string) (options []HeaderOption)
type HeaderOptionKeyVal ¶ added in v0.2.0
type MiddlewareFunc ¶ added in v0.2.0
type PatternHandler ¶
type PatternHandler struct {
// contains filtered or unexported fields
}
func (*PatternHandler) Register ¶
func (h *PatternHandler) Register(method string, in interface{}, do DoFunc, opts ...HandlerOption) *PatternHandler
func (*PatternHandler) ServeHTTP ¶
func (h *PatternHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.