server

package
v2.0.0-...-398017a Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuth

func BasicAuth(w http.ResponseWriter, r *http.Request, username, password, realm string) bool

Types

type Server

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

func NewServer

func NewServer(service, addr, addrExt, name, password string, log *logging.Logger, accessLog io.Writer, fs filesystem.FileSystem, db *badger.DB, buckets, templateFiles map[string]string) (*Server, error)

func (*Server) BookHandler

func (s *Server) BookHandler(w http.ResponseWriter, req *http.Request)

func (*Server) BookPageHandler

func (s *Server) BookPageHandler(w http.ResponseWriter, req *http.Request)

func (*Server) IndexHandler

func (s *Server) IndexHandler(w http.ResponseWriter, req *http.Request)

func (*Server) InitTemplates

func (s *Server) InitTemplates() error

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(cert, key string) (err error)

func (*Server) MasterHandler

func (s *Server) MasterHandler(w http.ResponseWriter, req *http.Request)

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) ThumbHandler

func (s *Server) ThumbHandler(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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