Documentation
¶
Index ¶
- func AddHeadersMiddleware(next http.Handler, config *cfg.Config) http.Handler
- func NewMux(cfg *config.Config, options *Options, log *log.Logger, liveReload bool) (*http.ServeMux, error)
- type FileWatcher
- type GlobalHandler
- func (g *GlobalHandler) Asset(w http.ResponseWriter, r *http.Request)
- func (g *GlobalHandler) CombinedSearch(w http.ResponseWriter, r *http.Request)
- func (g *GlobalHandler) ManualPage(w http.ResponseWriter, r *http.Request)
- func (g *GlobalHandler) NewSourceHandler(source config.Source) *SourceHandler
- func (g *GlobalHandler) RootOpenSearch(w http.ResponseWriter, _ *http.Request)
- func (g *GlobalHandler) Search(source config.Source, w http.ResponseWriter, r *http.Request)
- func (g *GlobalHandler) StaticFile(w http.ResponseWriter, r *http.Request)
- type HTTPError
- type LoggingResponseWriter
- type Options
- type Server
- type SourceHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHeadersMiddleware ¶
Types ¶
type FileWatcher ¶
type FileWatcher struct {
// contains filtered or unexported fields
}
func NewFileWatcher ¶
func NewFileWatcher(log *log.Logger, rootDir string) (*FileWatcher, error)
func (FileWatcher) Add ¶ added in v0.2.0
func (i FileWatcher) Add(path string) error
func (FileWatcher) AddRecursive ¶
func (i FileWatcher) AddRecursive(from string) error
func (FileWatcher) Start ¶
func (i FileWatcher) Start(callback func(string))
type GlobalHandler ¶ added in v0.3.0
type GlobalHandler struct {
// contains filtered or unexported fields
}
func (*GlobalHandler) Asset ¶ added in v0.3.0
func (g *GlobalHandler) Asset(w http.ResponseWriter, r *http.Request)
func (*GlobalHandler) CombinedSearch ¶ added in v0.3.0
func (g *GlobalHandler) CombinedSearch(w http.ResponseWriter, r *http.Request)
func (*GlobalHandler) ManualPage ¶ added in v0.3.0
func (g *GlobalHandler) ManualPage(w http.ResponseWriter, r *http.Request)
func (*GlobalHandler) NewSourceHandler ¶ added in v0.3.0
func (g *GlobalHandler) NewSourceHandler(source config.Source) *SourceHandler
func (*GlobalHandler) RootOpenSearch ¶ added in v0.3.0
func (g *GlobalHandler) RootOpenSearch(w http.ResponseWriter, _ *http.Request)
func (*GlobalHandler) Search ¶ added in v0.3.0
func (g *GlobalHandler) Search(source config.Source, w http.ResponseWriter, r *http.Request)
func (*GlobalHandler) StaticFile ¶ added in v0.3.0
func (g *GlobalHandler) StaticFile(w http.ResponseWriter, r *http.Request)
type LoggingResponseWriter ¶
type LoggingResponseWriter struct {
http.ResponseWriter
// contains filtered or unexported fields
}
func NewLoggingResponseWriter ¶
func NewLoggingResponseWriter(w http.ResponseWriter) *LoggingResponseWriter
func (*LoggingResponseWriter) Write ¶
func (lrw *LoggingResponseWriter) Write(b []byte) (int, error)
func (*LoggingResponseWriter) WriteHeader ¶
func (lrw *LoggingResponseWriter) WriteHeader(code int)
type SourceHandler ¶ added in v0.3.0
type SourceHandler struct {
// contains filtered or unexported fields
}
func (*SourceHandler) Detail ¶ added in v0.3.0
func (h *SourceHandler) Detail(w http.ResponseWriter, r *http.Request)
func (*SourceHandler) OpenSearchXML ¶ added in v0.3.0
func (h *SourceHandler) OpenSearchXML(w http.ResponseWriter, _ *http.Request)
func (*SourceHandler) Search ¶ added in v0.3.0
func (h *SourceHandler) Search(w http.ResponseWriter, r *http.Request)
func (*SourceHandler) ServeHTTP ¶ added in v0.3.0
func (h *SourceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.