Versions in this module Expand all Collapse all v1 v1.6.2 Jan 15, 2024 v1.6.1 Nov 15, 2023 v1.6.0 Nov 14, 2023 Changes in this version + type ServerProtocol = types.ServerProtocol v1.5.0 Oct 30, 2023 Changes in this version type Client + func (c Client) Upload(url string, contents *io.LimitedReader) (*Response, error) v1.4.1 Oct 9, 2023 v1.4.0 Oct 9, 2023 Changes in this version + var RouteParamsKey = routeParamsKeyType type Router + func (r Router) Handle(ctx context.Context, request *Request) *Response v1.3.3 Sep 16, 2023 v1.3.2 Sep 7, 2023 v1.3.1 Sep 7, 2023 v1.3.0 Sep 7, 2023 v1.2.0 Aug 26, 2023 v1.1.0 Aug 25, 2023 Changes in this version + const DefaultMaxRedirects + var ExceededMaxRedirects = errors.New("Client: exceeded MaxRedirects") + type Client struct + MaxRedirects int + func NewClient(tlsConf *tls.Config) Client + func (c Client) Fetch(url string) (*Response, error) + func (c Client) RoundTrip(request *Request) (*Response, error) type Handler + func VirtualHosts(hosts map[string]Handler, catchall Handler) Handler v1.0.0 May 1, 2023 Changes in this version + func RouteParams(ctx context.Context) map[string]string + type Handler interface + Handle func(context.Context, *Request) *Response + func FallthroughHandler(handlers ...Handler) Handler + func HandlerFunc(f func(context.Context, *Request) *Response) Handler + type Middleware func(Handler) Handler + func Filter(condition func(context.Context, *Request) bool, failure Handler) Middleware + type Request struct + Meta any + RemoteAddr net.Addr + Server Server + TLSState *tls.ConnectionState + func (req Request) UnescapedQuery() string + type Response struct + Body io.Reader + Meta any + Status Status + func (response *Response) Close() error + type ResponseReader interface + type Router struct + func (r *Router) Mount(prefix string, subrouter *Router) + func (r *Router) Route(pattern string, handler Handler) + func (r *Router) Use(mw Middleware) + func (r Router) Handler(ctx context.Context, request *Request) *Response + func (r Router) Match(request *Request) (Handler, map[string]string) + type Server interface + Address func() string + Close func() + Closed func() bool + Hostname func() string + LogError func(keyvals ...any) error + Network func() string + Port func() string + Protocol func() string + Serve func() error + type Status int