Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DocsCacheMaxAge is the cache max age used when serving the docs. DocsCacheMaxAge = 15 * time.Minute // StaticCacheMaxAge is the cache max age used when serving static assets. StaticCacheMaxAge = 365 * 24 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers represents a group of http handlers in charge of handling static files operations.
func NewHandlers ¶
NewHandlers creates a new Handlers instance.
func (*Handlers) Image ¶
func (h *Handlers) Image(w http.ResponseWriter, r *http.Request)
Image is an http handler that serves images stored in the database.
func (*Handlers) SaveImage ¶
func (h *Handlers) SaveImage(w http.ResponseWriter, r *http.Request)
SaveImage is an http handler that stores the provided image returning its id.
func (*Handlers) ServeIndex ¶
func (h *Handlers) ServeIndex(w http.ResponseWriter, r *http.Request)
ServeIndex is an http handler that serves the index.html file.
Click to show internal directories.
Click to hide internal directories.