Versions in this module Expand all Collapse all v0 v0.0.2 Apr 20, 2023 Changes in this version + var ErrInvalidLogLayout = errors.New("Invalid log layout") + func Error(w http.ResponseWriter, code int) int64 + func ErrorEx(w http.ResponseWriter, code int, title, msg string) int64 + func ErrorFile404(w http.ResponseWriter, abspath string) (int64, error) + type Auth struct + Method AuthMethod + Password string + Paths []string + Username string + type AuthMethod string + const BasicMethod + const DigestMethod + type Config struct + Auth *Auth + CORS bool + Gzip bool + IndexName Index + ListDir bool + NoCache bool + Path401 *ErrorFilePath + Path404 *ErrorFilePath + Root string + ServeAll bool + type ErrorFilePath struct + Abs string + Rel string + type Header http.Header + func (this Header) String() string + type Index []string + func (this *Index) Set(value string) error + func (this *Index) String() string + type LogLayout string + var LogLayoutMin LogLayout = `Access #%i: [%s] [%a] [%m] [%l] [%n]` + var LogLayoutNormal LogLayout = `Access #%i: [Status: %s] [Host: %h] [IP: %a] [Method: %m] [Scheme: %S] [URL: %l] [Referer: %r] [UA: %u] [Size: %n] [Time: %t] [Compression: %c]` + var LogLayoutShort LogLayout = `Access #%i: [%s] [%h] [%a] [%m] [%S] [%l] [%r] [%u] [%n] [%t] [%c]` + func (this *LogLayout) IsLegal() bool + type RanServer struct + func NewRanServer(c Config, logger *log.Logger) *RanServer + func (this *RanServer) RedirectToHTTPS(port uint) http.HandlerFunc + func (this *RanServer) Serve() http.HandlerFunc