Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opts Options) (iris.Runner, iris.Configurator)
New returns a pair of iris Runner and Configurator to convert the http application to a lambda function using the Apex Gateway. That allows Iris-powered web application to be deployed and ran on host services like Netlify and Amazon AWS.
Usage: app := iris.New() [...routes] runner, configurator := gateway.New(gateway.Options{URLPathParameter: "path"}) app.Run(runner, configurator)
Get the original API Gateway Request object through: req, ok := gateway.GetRequest(ctx.Request().Context())
Types ¶
type Options ¶
type Options struct {
// When not empty then a URL parameter of that key will be used to route the requests,
// changes the default Iris Router behavior based on the Request's URI's Path, e.g. "path".
//
// This is extremely useful when the deployment allows only one request path to be ran
// under a particular lambda function.
//
// Defaults to empty.
URLPathParameter string
// When not empty then a URL parameter of that key will be used
// to route the requests based on the given method.
//
// Defaults to empty.
URLMethodParameter string
}
Options holds the gateway options. All fields are optional.
Click to show internal directories.
Click to hide internal directories.