writer

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SecureCookiesStrip = "strip"
	SecureCookieAV     = "Secure"
)
View Source
const (
	AcceptEncodingHeader  = "Accept-Encoding"
	ContentEncodingHeader = "Content-Encoding"
	ContentLengthHeader   = "Content-Length"
	GzipName              = "gzip"
	VaryHeader            = "Vary"
)

Variables

This section is empty.

Functions

func ModifyAcceptEncoding

func ModifyAcceptEncoding(header http.Header)

Types

type Gzip

type Gzip struct {
	// contains filtered or unexported fields
}

func NewGzipWriter

func NewGzipWriter(rw http.ResponseWriter, header http.Header) *Gzip

func (*Gzip) Close

func (g *Gzip) Close() (err error)

func (*Gzip) Flush

func (g *Gzip) Flush()

func (*Gzip) Header

func (g *Gzip) Header() http.Header

func (*Gzip) Hijack

func (g *Gzip) Hijack() (net.Conn, *bufio.ReadWriter, error)

func (*Gzip) Write

func (g *Gzip) Write(p []byte) (n int, err error)

Write fills a small buffer first to determine if a compression is required or not.

func (*Gzip) WriteHeader

func (g *Gzip) WriteHeader(statusCode int)

type Response

type Response struct {
	// contains filtered or unexported fields
}

Response wraps the http.ResponseWriter.

func NewResponseWriter

func NewResponseWriter(rw http.ResponseWriter, secureCookies string) *Response

NewResponseWriter creates a new Response object.

func (*Response) AddModifier

func (r *Response) AddModifier(evalCtx *hcl.EvalContext, modifier ...hcl.Body)

func (*Response) AddPrivateCC added in v1.8.0

func (r *Response) AddPrivateCC()

func (*Response) Flush

func (r *Response) Flush()

Flush implements the <http.Flusher> interface.

func (*Response) Header

func (r *Response) Header() http.Header

Header wraps the Header method of the <http.ResponseWriter>.

func (*Response) Hijack

func (r *Response) Hijack() (net.Conn, *bufio.ReadWriter, error)

func (*Response) IsHijacked

func (r *Response) IsHijacked() bool

func (*Response) StatusCode

func (r *Response) StatusCode() int

func (*Response) Write

func (r *Response) Write(p []byte) (int, error)

Write wraps the Write method of the <http.ResponseWriter>.

func (*Response) WriteHeader

func (r *Response) WriteHeader(statusCode int)

WriteHeader wraps the WriteHeader method of the <http.ResponseWriter>.

func (*Response) WrittenBytes

func (r *Response) WrittenBytes() int

Jump to

Keyboard shortcuts

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