Versions in this module Expand all Collapse all v0 v0.9.2 Sep 20, 2016 Changes in this version + const MaxLogBodySize + func RegisterDevDirective(name, before string) v0.9.1 Aug 17, 2016 Changes in this version type Context + func (c Context) Env() map[string]string + func (c Context) Join(a []string, sep string) string v0.9.0 Jul 19, 2016 Changes in this version + const DefaultHost + const DefaultPort + const DefaultRoot + var CaseSensitivePath = true + var EmptyNext = HandlerFunc(func(w http.ResponseWriter, r *http.Request) (int, error) { ... }) + var GracefulTimeout time.Duration + var HTTP2 bool + var Host = DefaultHost + var Port = DefaultPort + var QUIC bool + var Root = DefaultRoot + func ContextInclude(filename string, ctx interface{}, fs http.FileSystem) (string, error) + func DefaultErrorFunc(w http.ResponseWriter, r *http.Request, status int) + func IfMatcherKeyword(k string) bool + func IndexFile(root http.FileSystem, fpath string, indexFiles []string) (string, bool) + func SameNext(next1, next2 Handler) bool + func SetLastModifiedHeader(w http.ResponseWriter, modTime time.Time) + func WriteTextResponse(w http.ResponseWriter, status int, body string) + type Address struct + Host string + Original string + Path string + Port string + Scheme string + func (a Address) String() string + func (a Address) VHost() string + type ConfigSelector []HandlerConfig + func (c ConfigSelector) Select(r *http.Request) (config HandlerConfig) + type Context struct + Req *http.Request + Root http.FileSystem + URL *url.URL + func (c Context) Cookie(name string) string + func (c Context) Ext(pathStr string) string + func (c Context) Header(name string) string + func (c Context) Host() (string, error) + func (c Context) IP() string + func (c Context) Include(filename string) (string, error) + func (c Context) Map(values ...interface{}) (map[string]interface{}, error) + func (c Context) Markdown(filename string) (string, error) + func (c Context) Method() string + func (c Context) Now(format string) string + func (c Context) NowDate() time.Time + func (c Context) PathMatches(pattern string) bool + func (c Context) Port() (string, error) + func (c Context) Replace(input, find, replacement string) string + func (c Context) Slice(elems ...interface{}) []interface{} + func (c Context) Split(s string, sep string) []string + func (c Context) StripExt(path string) string + func (c Context) StripHTML(s string) string + func (c Context) ToLower(s string) string + func (c Context) ToUpper(s string) string + func (c Context) Truncate(input string, length int) string + func (c Context) URI() string + type Handler interface + ServeHTTP func(http.ResponseWriter, *http.Request) (int, error) + type HandlerConfig interface + BasePath func() string + type HandlerFunc func(http.ResponseWriter, *http.Request) (int, error) + func (f HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) + type IfMatcher struct + func (m IfMatcher) And(r *http.Request) bool + func (m IfMatcher) Match(r *http.Request) bool + func (m IfMatcher) Or(r *http.Request) bool + type LogRoller struct + Filename string + LocalTime bool + MaxAge int + MaxBackups int + MaxSize int + func ParseRoller(c *caddy.Controller) (*LogRoller, error) + func (l LogRoller) GetLogWriter() io.Writer + type Middleware func(Handler) Handler + type Path string + func (p Path) Matches(other string) bool + type PathMatcher string + func (p PathMatcher) Match(r *http.Request) bool + type Replacer interface + Replace func(string) string + Set func(key, value string) + func NewReplacer(r *http.Request, rr *ResponseRecorder, emptyValue string) Replacer + type RequestMatcher interface + Match func(r *http.Request) bool + func MergeRequestMatchers(matchers ...RequestMatcher) RequestMatcher + func SetupIfMatcher(c caddyfile.Dispenser) (RequestMatcher, error) + type ResponseRecorder struct + Replacer Replacer + func NewResponseRecorder(w http.ResponseWriter) *ResponseRecorder + func (r *ResponseRecorder) CloseNotify() <-chan bool + func (r *ResponseRecorder) Flush() + func (r *ResponseRecorder) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (r *ResponseRecorder) Size() int + func (r *ResponseRecorder) Status() int + func (r *ResponseRecorder) Write(buf []byte) (int, error) + func (r *ResponseRecorder) WriteHeader(status int) + type Server struct + Server *http.Server + func NewServer(addr string, group []*SiteConfig) (*Server, error) + func (s *Server) Address() string + func (s *Server) Listen() (net.Listener, error) + func (s *Server) ListenPacket() (net.PacketConn, error) + func (s *Server) OnStartupComplete() + func (s *Server) Serve(ln net.Listener) error + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (s *Server) ServePacket(pc net.PacketConn) error + func (s *Server) Stop() (err error) + type SiteConfig struct + Addr Address + HiddenFiles []string + ListenHost string + Root string + TLS *caddytls.Config + func GetConfig(c *caddy.Controller) *SiteConfig + func (s *SiteConfig) AddMiddleware(m Middleware) + func (s SiteConfig) Host() string + func (s SiteConfig) Middleware() []Middleware + func (s SiteConfig) Port() string + func (s SiteConfig) TLSConfig() *caddytls.Config