Documentation ¶
Index ¶
- Constants
- func AccessLog() func(next http.Handler) http.Handler
- func BasicAuth(realm string, creds map[string]string) func(next http.Handler) http.Handler
- func CORS(origin string) func(next http.Handler) http.Handler
- func HTTPHeader(key, value string) func(next http.Handler) http.Handler
- func NewSelfSignedCert(sans []string) (tls.Certificate, error)
- func NoCache() func(next http.Handler) http.Handler
- func NoDot(err string, code int) func(next http.Handler) http.Handler
- type Fileserve
- type LogEntry
- type Options
- type Root
- type RootOptions
Constants ¶
View Source
const DefaultIndexPage = "index.html"
View Source
const DefaultPort = 8000
Variables ¶
This section is empty.
Functions ¶
func HTTPHeader ¶
HTTPHeader is a handler to set a response header key/value
func NewSelfSignedCert ¶
func NewSelfSignedCert(sans []string) (tls.Certificate, error)
Types ¶
type Fileserve ¶
type Fileserve struct {
// contains filtered or unexported fields
}
func (*Fileserve) ListenAndServe ¶
type LogEntry ¶
type LogEntry struct {
// contains filtered or unexported fields
}
func NewLogEntry ¶
type Root ¶ added in v0.0.8
type Root interface { http.FileSystem }
func NewDirRoot ¶ added in v0.0.7
func NewDirRoot(dir string, optFns ...func(o *RootOptions)) (Root, error)
type RootOptions ¶ added in v0.0.8
Source Files ¶
Click to show internal directories.
Click to hide internal directories.