Documentation ¶
Index ¶
- Constants
- func GetLambdaRequest(ctx context.Context) (req *events.APIGatewayV2HTTPRequest)
- func IsLambdaRuntime() bool
- func NewHTTPRequest(ctx context.Context, from *events.APIGatewayV2HTTPRequest) (req *http.Request, err error)
- func StartLambdaWithAPIGateway(handler http.Handler)
- type APIGatewayV2HTTPResponseBuilder
- func (w *APIGatewayV2HTTPResponseBuilder) Build() (*events.APIGatewayV2HTTPResponse, error)
- func (w *APIGatewayV2HTTPResponseBuilder) Header() http.Header
- func (w *APIGatewayV2HTTPResponseBuilder) Hijack() (net.Conn, *bufio.ReadWriter, error)
- func (w *APIGatewayV2HTTPResponseBuilder) IsDone() bool
- func (w *APIGatewayV2HTTPResponseBuilder) SetCookie(cookie *http.Cookie)
- func (w *APIGatewayV2HTTPResponseBuilder) Write(bytes []byte) (int, error)
- func (w *APIGatewayV2HTTPResponseBuilder) WriteHeader(statusCode int)
Constants ¶
View Source
const ( MIMEApplicationJSON = "application/json" MIMEApplicationJSONCharsetUTF8 = MIMEApplicationJSON + "; " + charsetUTF8 MIMEApplicationXML = "application/xml" MIMEApplicationXMLCharsetUTF8 = MIMEApplicationXML + "; " + charsetUTF8 MIMETextHTML = "text/html" MIMETextHTMLCharsetUTF8 = MIMETextHTML + "; " + charsetUTF8 MIMETextPlain = "text/plain" MIMETextPlainCharsetUTF8 = MIMETextPlain + "; " + charsetUTF8 )
View Source
const ( HeaderContentType = "Content-Type" HeaderSetCookie = "Set-Cookie" HeaderXForwardedProto = "X-Forwarded-Proto" HeaderXForwardedProtocol = "X-Forwarded-Protocol" HeaderXForwardedSsl = "X-Forwarded-Ssl" HeaderXUrlScheme = "X-Url-Scheme" HeaderHost = "Host" )
Variables ¶
This section is empty.
Functions ¶
func GetLambdaRequest ¶
func GetLambdaRequest(ctx context.Context) (req *events.APIGatewayV2HTTPRequest)
func IsLambdaRuntime ¶
func IsLambdaRuntime() bool
func NewHTTPRequest ¶
Types ¶
type APIGatewayV2HTTPResponseBuilder ¶
type APIGatewayV2HTTPResponseBuilder struct {
// contains filtered or unexported fields
}
func NewAPIGatewayV2HTTPResponseBuilder ¶
func NewAPIGatewayV2HTTPResponseBuilder(target *events.APIGatewayV2HTTPResponse) (res *APIGatewayV2HTTPResponseBuilder)
func (*APIGatewayV2HTTPResponseBuilder) Build ¶
func (w *APIGatewayV2HTTPResponseBuilder) Build() (*events.APIGatewayV2HTTPResponse, error)
func (*APIGatewayV2HTTPResponseBuilder) Header ¶
func (w *APIGatewayV2HTTPResponseBuilder) Header() http.Header
func (*APIGatewayV2HTTPResponseBuilder) Hijack ¶
func (w *APIGatewayV2HTTPResponseBuilder) Hijack() (net.Conn, *bufio.ReadWriter, error)
func (*APIGatewayV2HTTPResponseBuilder) IsDone ¶
func (w *APIGatewayV2HTTPResponseBuilder) IsDone() bool
func (*APIGatewayV2HTTPResponseBuilder) SetCookie ¶
func (w *APIGatewayV2HTTPResponseBuilder) SetCookie(cookie *http.Cookie)
func (*APIGatewayV2HTTPResponseBuilder) Write ¶
func (w *APIGatewayV2HTTPResponseBuilder) Write(bytes []byte) (int, error)
func (*APIGatewayV2HTTPResponseBuilder) WriteHeader ¶
func (w *APIGatewayV2HTTPResponseBuilder) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.