Help us shape the future of Go! Take the 2026 Go Developer Survey

buffer

package
v1.50.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Release

func Release(w *Buffer)

Types

type Buffer

type Buffer struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

func Acquire

func Acquire(w http.ResponseWriter) *Buffer

func New

func New() *Buffer

func (*Buffer) ReadRequestBody

func (m *Buffer) ReadRequestBody(r io.Reader) error

func (*Buffer) RequestBody

func (m *Buffer) RequestBody() []byte

func (*Buffer) Reset

func (m *Buffer) Reset(w http.ResponseWriter)

func (*Buffer) ResponseBody

func (m *Buffer) ResponseBody() []byte

func (*Buffer) StatusCode

func (m *Buffer) StatusCode() int

func (*Buffer) Write

func (m *Buffer) Write(b []byte) (int, error)

func (*Buffer) WriteHeader

func (m *Buffer) WriteHeader(statusCode int)

type RequestBody

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

func NewRequestBody

func NewRequestBody(body []byte) RequestBody

func (RequestBody) Close

func (r RequestBody) Close() error

func (RequestBody) Read

func (r RequestBody) Read(p []byte) (n int, err error)

nolint:nonamedreturns

Jump to

Keyboard shortcuts

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