header

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2017 License: BSD-3-Clause Imports: 2 Imported by: 8

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL