response

package
v0.1.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const CacheStatusHeader = "X-Go-Proxy-Cache-Status"

CacheStatusHeader - HTTP Header for showing cache status

View Source
const CacheStatusHeaderHit = "HIT"

CacheStatusHeaderHit - Cache status HIT for HTTP Header X-Go-Proxy-Cache-Status

View Source
const CacheStatusHeaderMiss = "MISS"

CacheStatusHeaderMiss - Cache status MISS for HTTP Header X-Go-Proxy-Cache-Status

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggedResponseWriter

type LoggedResponseWriter struct {
	http.ResponseWriter
	StatusCode int
	Content    [][]byte
}

LoggedResponseWriter - Decorator for http.ResponseWriter

func NewLoggedResponseWriter

func NewLoggedResponseWriter(w http.ResponseWriter) *LoggedResponseWriter

NewLoggedResponseWriter - Creates new instance of ResponseWriter.

func (*LoggedResponseWriter) CopyHeaders

func (lwr *LoggedResponseWriter) CopyHeaders(src http.Header)

CopyHeaders - Adds the headers to the response.

func (*LoggedResponseWriter) Reset

func (lwr *LoggedResponseWriter) Reset()

Reset - Reset the stored content of LoggedResponseWriter.

func (*LoggedResponseWriter) Write

func (lwr *LoggedResponseWriter) Write(p []byte) (int, error)

Write - ResponseWriter's Write method decorator.

func (*LoggedResponseWriter) WriteBody

func (lwr *LoggedResponseWriter) WriteBody(page string) bool

WriteBody - Sends the body to the client.

func (*LoggedResponseWriter) WriteHeader

func (lwr *LoggedResponseWriter) WriteHeader(statusCode int)

WriteHeader - ResponseWriter's WriteHeader method decorator.

Jump to

Keyboard shortcuts

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