top

Package handlers define reusable handler components that focus on offering a single well-defined feature. Note that any http.Handler implementation can be used with Ghost's chainable or wrappable handlers design.

Go's standard library provides a number of such useful handlers in net/http:

- FileServer(http.FileSystem) - NotFoundHandler() - RedirectHandler(string, int) - StripPrefix(string, http.Handler) - TimeoutHandler(http.Handler, time.Duration, string)

This package adds the following list of handlers:

- BasicAuthHandler(http.Handler, func(string, string) (interface{}, bool), string) a Basic Authentication handler. - ContextHandler(http.Handler, int) : a volatile storage map valid only for the duration of the request, with no locking required. - FaviconHandler(http.Handler, string, time.Duration) : an efficient favicon handler. - GZIPHandler(http.Handler) : compress the content of the body if the client accepts gzip compression. - LogHandler(http.Handler, *LogOptions) : customizable request logger. - PanicHandler(http.Handler) : handle panics gracefully so that the client receives a response (status code 500). - SessionHandler(http.Handler, *SessionOptions) : a cookie-based, store-agnostic persistent session handler. - StaticFileHandler(string) : serve the contents of a specific file.

Imported by 25 package(s)

  1. github.com/PuerkitoBio/ghost/ghostest
  2. github.com/PuerkitoBio/qs
  3. github.com/PuerkitoBio/renku/cache
  4. github.com/PuerkitoBio/renku/web
  5. github.com/PuerkitoBio/trofaf
  6. github.com/Superordinate/scope/app
  7. github.com/akademic/trofaf
  8. github.com/akavel/trofaf
  9. github.com/baijum/trofaf
  10. github.com/bearbin/bearbot
  11. github.com/bearbin/bearbot-ng
  12. github.com/bearbin/go-mcaccutils-server
  13. github.com/bytepark/bytefile/transfersh-server
  14. github.com/dutchcoders/ghost/ghostest
  15. github.com/dutchcoders/transfer.sh/server
  16. github.com/dutchcoders/transfer.sh/transfersh-server
  17. github.com/helmi03/ghost/ghostest
  18. github.com/liamstask/trofaf
  19. github.com/matthias-margush/hut/mux
  20. github.com/puerkitoBio/ghost/ghostest
  21. github.com/puerkitobio/ghost/ghostest
  22. github.com/superordinate/scope/app
  23. github.com/weaveworks/ghost/ghostest
  24. github.com/weaveworks/scope/app
  25. github.com/yaotian/trofaf

Imports 4 package(s)

  1. github.com/nu7hatch/gouuid
  2. github.com/garyburd/redigo/redis
  3. github.com/gorilla/securecookie
  4. github.com/PuerkitoBio/ghost