package
0.0.0-20240215190618-908f27575419
Repository: https://github.com/micromdm/go4.git
Documentation: pkg.go.dev

# Functions

Chain is a helper function for composing middlewares.
ChainFrom wraps an HTTP Handler with the provided Middlewares.
HTTPDebugMiddleware is a Middleware which prints the HTTP request and response to out.
ListenAndServe starts an HTTP server and runs until it receives an Interrupt signal or an error.
Simple returns a slice of ListenAndServe options that are most common for a micromdm server project's main.go.
WithACMEHosts configures a list of domains to whitelist for Let's Encrypt.
WithAddress configures the server listening port and address.
WithAutocertCache configures a custom autocert.Cache for Let's Encrypt Certificates.
WithCertCache configures a directory to store Let's Encrypt certificates.
WithDisableRedirect configures whether a listener will be started on :80 to redirect requests to :443.
WithHTTPHandler configures the server to use a custom HTTP Handler.
WithKeyPair configures a TLS certificate to be used in the server TLS Config.
WithLogger provides a logger for ListenAndServe.
WithMiddlewareChain chains Middleware for http.DefaultServeMux.

# Structs

BasicAuth implements Middleware for HTTP Basic Auth.

# Type aliases

Middleware is a chainable decorator for HTTP Handlers.
Option configures the ListenAndServe function.