Skip to content

Conversation

@shirakiya
Copy link
Contributor

Add event struct for IoT 1-Click ( https://docs.aws.amazon.com/iot-1-click/latest/developerguide/1click-programming.html ).
I assume that we can type the event for lambda handler using this event struct.

import (
  	"github.com/aws/aws-lambda-go/lambda"
	"github.com/aws/aws-lambda-go/events"
)

func handleRequest(ctx context.Context, event events.IoTOneClickEvent) {
	...
}

func main() {
	lambda.Start(handleRequest)
}

I used the sample JSON on the below page to specify the JSON structure.
https://docs.aws.amazon.com/iot-1-click/latest/developerguide/1click-programming.html#1click-events

@bmoffatt
Copy link
Collaborator

lgtm, thanks!

@bmoffatt bmoffatt merged commit e0b9a6c into aws:master May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants