filebrowser/hugo.go
Henrique Dias b43d8e2465 clean
2016-06-21 15:28:15 +01:00

26 lines
702 B
Go

// Package hugo makes the bridge between the static website generator Hugo
// and the webserver Caddy, also providing an administrative user interface.
package hugo
import (
"net/http"
"github.com/hacdias/caddy-filemanager"
"github.com/mholt/caddy/caddyhttp/httpserver"
)
// Hugo contais the next middleware to be run and the configuration
// of the current one.
type Hugo struct {
FileManager *filemanager.FileManager
Next httpserver.Handler
Config *Config
}
// ServeHTTP is the main function of the whole plugin that routes every single
// request to its function.
func (h Hugo) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
return h.Next.ServeHTTP(w, r)
}