Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/twharmon/golamb
Use Go for AWS Lambda & API Gateway HttpApi
https://github.com/twharmon/golamb
api-gateway aws go golang lambda
Last synced: 3 months ago
JSON representation
Use Go for AWS Lambda & API Gateway HttpApi
- Host: GitHub
- URL: https://github.com/twharmon/golamb
- Owner: twharmon
- License: mit
- Created: 2022-03-30T15:50:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-30T16:50:21.000Z (5 months ago)
- Last Synced: 2024-06-19T19:39:16.807Z (5 months ago)
- Topics: api-gateway, aws, go, golang, lambda
- Language: Go
- Homepage:
- Size: 60.5 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go-extra - golamb - 03-30T15:50:14Z|2022-08-24T17:02:33Z| (Web Frameworks / Fail injection)
README
# Golamb
[![Go Reference](https://pkg.go.dev/badge/github.com/twharmon/golamb.svg)](https://pkg.go.dev/github.com/twharmon/golamb) ![](https://github.com/twharmon/golamb/workflows/Test/badge.svg) [![](https://goreportcard.com/badge/github.com/twharmon/golamb)](https://goreportcard.com/report/github.com/twharmon/golamb) [![codecov](https://codecov.io/gh/twharmon/golamb/branch/main/graph/badge.svg?token=K0P59TPRAL)](https://codecov.io/gh/twharmon/golamb)
Golamb makes it easier to write AWS Lambda functions in Go that are invoked by API Gateway Http APIs.
## Documentation
For full documentation see [pkg.go.dev](https://pkg.go.dev/github.com/twharmon/golamb).## Usage
### Basic
```go
package mainimport (
"net/http""github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/twharmon/golamb"
)func handler(c golamb.Context) golamb.Responder {
// Get a query parameter
foo := c.Request().Query("foo")// Get a path parameter
bar := c.Request().Path("bar")return c.Response(http.StatusOK, map[string]any{
"foo": foo,
"bar": bar,
})
}func main() {
golamb.Start(handler)
}
```## Contribute
Make a pull request.