events

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: MIT Imports: 6 Imported by: 11 modules, 12 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 Params

type Params struct {
	Request  *Request
	Defaults map[string]string
}

Params allows looking up parameters from Stage Variables, Path Parameters, and the Lambda environment variables

func (*Params) Lookup

func (p *Params) Lookup(name string) string

Lookup returns a value for the parameter, if it's set in an available field

type Request

Request aliases the API GW Request type

func (*Request) BodyAsParams

func (r *Request) BodyAsParams() (map[string]string, error)

BodyAsParams attempts to parse the request body as URL parameters

func (*Request) DecodedBody added in v0.4.0

func (r *Request) DecodedBody() (string, error)

DecodedBody returns the body as plaintext

func (*Request) ToHTTP

func (r *Request) ToHTTP() (*http.Request, error)

ToHTTP returns the API Gateway request as an HTTP Request object

type Response

Response aliases the API GW Response type

func Fail

func Fail(msg string) (Response, error)

Fail returns a message with an HTTP 500

func Redirect

func Redirect(url string, code int) (Response, error)

Redirect returns a redirect to a new URL

func Reject

func Reject(msg string) (Response, error)

Reject returns a message with an HTTP 403

func Respond

func Respond(code int, msg string) (Response, error)

Respond builds a response with a given HTTP code and text message

func Succeed

func Succeed(msg string) (Response, error)

Succeed returns a message with an HTTP 200

Jump to

Keyboard shortcuts

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