awslambda

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 9 Imported by: 1

README

Go AWS Lambda Utils

Build Status Go Report Card Docs License

Overview

awslambda is helper package for AWS Lambda on Go.

See the docs on pkg.go.dev.

Installation

$ go get github.com/grokify/go-awslambda/...

Usage

  • NewHTTPRequest() can be used to create an *http.Request given an events.APIGatewayProxyRequest.
  • NewReaderMultipart() can be used to create an *multipart.Reader given an events.APIGatewayProxyRequest.

See the multipart example here:

examples/multipart/main.go

A description is available on Stack Overflow here:

https://stackoverflow.com/a/68496889/1908967

Contributing

Features, Issues, and Pull Requests are always welcome.

To contribute:

  1. Fork it ( http://github.com/grokify/go-awslambda/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Please report issues and feature requests on Github.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrContentTypeHeaderMissing         = errors.New("content type header missing")
	ErrContentTypeHeaderNotMultipart    = errors.New("content type header not multipart error")
	ErrContentTypeHeaderMissingBoundary = errors.New("content type header missing boundary error")
)

Functions

func NewHTTPRequest added in v0.2.0

func NewHTTPRequest(ctx context.Context, req events.APIGatewayProxyRequest) (*http.Request, error)

NewHTTPRequest returns an `*http.Request` given an `events.APIGatewayProxyRequest`.

func NewReaderMultipart

func NewReaderMultipart(req events.APIGatewayProxyRequest) (*multipart.Reader, error)

NewReaderMultipart returns a `*multipart.Reader` given an API Gateway Proxy Request.

func StandardHeader added in v0.1.3

func StandardHeader(header map[string]string) http.Header

StandardHeader converts a AWS Lambda header to a stdlib `http.Header`.

Types

This section is empty.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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