linelambda

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: BSD-2-Clause Imports: 5 Imported by: 1

Documentation

Overview

Package linelambda implements helper functions that make it easier to use the Line Bot Go SDK in AWS Lambda, as a serverless API function.

Line Bot Go SDK: https://github.com/line/line-bot-sdk-go/

Example code and an AWS SAM deployment template for a simple "echo" Line Bot are here: https://github.com/JamesJJ/line-bot-demo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIEventToHTTPRequest

func APIEventToHTTPRequest(event events.APIGatewayProxyRequest) (*http.Request, error)

Takes the `APIGatewayProxyRequest` event provided by AWS Lambda and returns a pointer to a http.Request that is compatible with the Line Bot SDK's `ParseRequest` function. https://pkg.go.dev/github.com/line/line-bot-sdk-go@v1.3.0/linebot#Client.ParseRequest

func Finished

func Finished(msg string, e error) (events.APIGatewayProxyResponse, error)

A helper that returns a standard response for the API Gateway (A http/200 response is usually suitable for web hook calls) The string and error parameters are logged if non-empty/non-nil

Types

This section is empty.

Jump to

Keyboard shortcuts

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