server

package
v0.0.0-...-0d6bb38 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTP

func HTTP(addr string, conf config.HTTP)

func HTTPS

func HTTPS(addr string, conf config.HTTPS)

func ListingEnabled

func ListingEnabled(opts *config.DirOpts, name string) bool

func Raw

func Raw(addr string, conf config.Raw)

func SetHeader

func SetHeader(parent http.Handler, hdrs map[string]string) http.Handler

func WithLogging

func WithLogging(parent http.Handler) http.Handler

func WithReqLog

func WithReqLog(parent http.Handler, rl *reqlog.Log) http.Handler

func WithTrace

func WithTrace(name string, parent http.Handler) http.Handler

Types

type AuthDB

type AuthDB struct {
	Plain  map[string]string
	SHA256 map[string]string
}

func LoadAuthFile

func LoadAuthFile(path string) (*AuthDB, error)

type AuthWrapper

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

func (*AuthWrapper) ServeHTTP

func (a *AuthWrapper) ServeHTTP(w http.ResponseWriter, r *http.Request)

type FileSystem

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

func NewFS

func NewFS(fs http.FileSystem, opts config.DirOpts) *FileSystem

func (*FileSystem) Open

func (fs *FileSystem) Open(name string) (http.File, error)

Jump to

Keyboard shortcuts

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