Documentation ¶
Index ¶
Constants ¶
View Source
const ( CONTENTTYPE_HTML = "text/html; charset=utf-8" CONTENTTYPE_TEXT = "text/plain; charset=utf-8" CONTENTTYPE_XML = "text/xml; charset=utf-8" CONTENTTYPE_JSON = "application/json; charset=utf-8" CONTENTTYPE_DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document; charset=utf-8" )
Variables ¶
This section is empty.
Functions ¶
func Cache ¶
func Cache(w http.ResponseWriter, seconds int)
func ContentType ¶
func ContentType(w http.ResponseWriter, contentType string)
func ETag ¶
func ETag(w http.ResponseWriter, hash string)
func NoCache ¶
func NoCache(w http.ResponseWriter)
func VaryAcceptEncoding ¶
func VaryAcceptEncoding(w http.ResponseWriter)
Types ¶
type HeaderWriter ¶
type HeaderWriter interface {
Write(w http.ResponseWriter, contentType string)
}
type WriterFactory ¶
type WriterFactory struct {
// contains filtered or unexported fields
}
func NewHeaderWriterFactory ¶
func NewHeaderWriterFactory(reindexIntervalInSeconds int) WriterFactory
HeaderWriter factory
func (*WriterFactory) Dynamic ¶
func (writerFactory *WriterFactory) Dynamic() HeaderWriter
func (*WriterFactory) NoCache ¶
func (writerFactory *WriterFactory) NoCache() HeaderWriter
func (*WriterFactory) Static ¶
func (writerFactory *WriterFactory) Static() HeaderWriter
Click to show internal directories.
Click to hide internal directories.