Popularity
0.9
Growing
Activity
4.7
-
7
3
0

Programming language: Go
License: MIT License
Tags: Web Frameworks    

golamb alternatives and similar packages

Based on the "Web Frameworks" category.
Alternatively, view golamb alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of golamb or a related project?

Add another 'Web Frameworks' Package

README

Golamb

codecov

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.

Usage

Basic

package main

import (
    "net/http"

    "github.com/aws/aws-sdk-go/service/dynamodb"
    "github.com/twharmon/golamb"
)

func handler(c golamb.Context) golamb.Responder {
    // AWS clients are lazy loaded.
    ddb := c.AWS().DynamoDB()

    output, err := ddb.GetItem(&dynamodb.GetItemInput{...})
    if err != nil {
        c.LogError("unable to get item: %s", err)
        return c.Response(http.StatusInternalServerError)
    }

    if len(output.Item) == 0 {
        c.LogWarning("item not found")
        return c.Response(http.StatusNotFound)
    }

    return c.Response(http.StatusOK, output.Item)
}

func main() {
    golamb.Start(handler)
}

Contribute

Make a pull request.