You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 21, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+49Lines changed: 49 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,55 @@ func main() {
84
84
}
85
85
```
86
86
87
+
### Fiber
88
+
89
+
To use with the Fiber framework, following the instructions from the [Lambda documentation](https://docs.aws.amazon.com/lambda/latest/dg/go-programming-model-handler-types.html), declare a `Handler` method for the main package.
90
+
91
+
Declare a `fiberadapter.FiberLambda` object in the global scope, and initialize it in the `init` function, adding all API methods.
92
+
93
+
The `ProxyWithContext` method is then used to translate requests and responses.
// If no name is provided in the HTTP request body, throw an error
127
+
return fiberLambda.ProxyWithContext(ctx, req)
128
+
}
129
+
130
+
funcmain() {
131
+
// Make the handler available for Remote Procedure Call by AWS Lambda
132
+
lambda.Start(Handler)
133
+
}
134
+
```
135
+
87
136
## Other frameworks
88
137
This package also supports [Negroni](https://github.com/urfave/negroni), [GorillaMux](https://github.com/gorilla/mux), and plain old `HandlerFunc` - take a look at the code in their respective sub-directories. All packages implement the `Proxy` method exactly like our Gin sample above.
0 commit comments