Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var COMPRESS = true
View Source
var DefaultIndexNames []string = []string{"index.html"}
View Source
var DefaultMimeTypes map[string]string = map[string]string{
".bin": "application/octet-stream",
".css": "text/css",
".gif": "image/gif",
".html": "text/html",
".js": "application/javascript",
".json": "application/json",
".png": "image/png",
".svg": "image/svg+xml",
".txt": "text/plain",
".wasm": "application/wasm",
".woff2": "font/woff2",
}
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
FileData
}
func (*File) ServeStatus ¶
type FileData ¶
type FileData struct {
// contains filtered or unexported fields
}
func (*FileData) ServeFrozen ¶
func (f *FileData) ServeFrozen(resp *ResponseWriter, req *http.Request) error
func (*FileData) ServeStatus ¶
type HTML ¶
type HTML struct { FileData // contains filtered or unexported fields }
func Default503 ¶
func Default503() *HTML
func (*HTML) ServeStatus ¶
type Resource ¶
type Resource interface { Serve(resp *ResponseWriter, req *http.Request) error ServeFrozen(resp *ResponseWriter, req *http.Request) error Freeze() error }
type ResponseWriter ¶
type ResponseWriter struct {
// contains filtered or unexported fields
}
func NewResponseWriter ¶
func NewResponseWriter(resp http.ResponseWriter) *ResponseWriter
func (*ResponseWriter) Header ¶
func (r *ResponseWriter) Header() http.Header
func (*ResponseWriter) Size ¶
func (r *ResponseWriter) Size() int64
func (*ResponseWriter) Status ¶
func (r *ResponseWriter) Status() int
func (*ResponseWriter) WriteError ¶
func (r *ResponseWriter) WriteError(msg string)
func (*ResponseWriter) WriteHeader ¶
func (r *ResponseWriter) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.