web

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server serves a library of documents over HTTP.

func NewServer

func NewServer(library *document.Library, logger *log.Logger) *Server

NewServer creates a new server

func (*Server) Mux

func (s *Server) Mux(staticFS fs.FS) *http.ServeMux

Mux creates a new multiplexer, given the filesystem to serve static assets from. If staticFS is nil, it defaults to static.FS.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL