buffer

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

nolint:mnd

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) (int, error)

Jump to

Keyboard shortcuts

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