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

response

package
v0.0.2 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

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