server

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileServer

func FileServer(r chi.Router, fullPath, subPath string, root http.FileSystem)

func InjectLogger

func InjectLogger(next http.Handler) http.Handler

func RequestLogger added in v0.5.0

func RequestLogger(next http.Handler) http.Handler

Types

type Handler added in v0.13.0

type Handler interface {
	http.Handler
	Setup(path string)
}

type Server

type Server struct {
	Scanner *scanner.Scanner
	// contains filtered or unexported fields
}

func New

func New(scanner *scanner.Scanner, ds model.DataStore) *Server

func (*Server) MountRouter

func (a *Server) MountRouter(urlPath string, subRouter Handler)

func (*Server) Run

func (a *Server) Run(addr string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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