Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Serve ¶
func Serve(hosts []string, handlers []Handler, port int, authenticated func(*http.Request) bool) error
Serve starts a new TLS 1.3 server on the specified host addresses/names and handles each handler on the specified port. The server will only respond to requests that are authenticated by the provided function.
Types ¶
type Handler ¶
type Handler struct { Func HandlerFunc Path string }
func NewHandler ¶
func NewHandler(p string, f HandlerFunc) Handler
NewHandler creates a handler object which forces a relationship between a handler and a path
type HandlerFunc ¶
type HandlerFunc func(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.