response

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 5 Imported by: 0 modules, 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

This section is empty.

Types

type Out

type Out interface {
	SetStatusCode(int)
	SetHeaders(map[string]string)
	SetMultiValueHeaders(map[string][]string)
	SetBody(string)
	SetIsBase64Encoded(bool)
	SetCookies([]string)
}

type Writer

type Writer[R Out] struct {
	// contains filtered or unexported fields
}

Writer implements the http.ResponseWriter interface in order to support the API Gateway Lambda HTTP "protocol".

func New

func New[R Out](out R) *Writer[R]

New returns a new response writer to capture http output.

func (*Writer[R]) CloseNotify

func (w *Writer[R]) CloseNotify() <-chan bool

CloseNotify notify when the response is closed

func (*Writer[R]) End

func (w *Writer[R]) End() R

End the request.

func (*Writer[R]) Header

func (w *Writer[R]) Header() http.Header

Header implementation.

func (*Writer[R]) Write

func (w *Writer[R]) Write(b []byte) (int, error)

Write implementation.

func (*Writer[R]) WriteHeader

func (w *Writer[R]) WriteHeader(status int)

WriteHeader implementation.

Jump to

Keyboard shortcuts

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