Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Add the string literal adapter, which requires us to add exported
// functions to the end of index.js. These NodeJS exports will be
// linked to the AWS Lambda NodeJS function name, and are basically
// automatically generated pass through proxies to the golang HTTP handler.
nodeJSWriter, err := lambdaArchive.Create("index.js")
if err != nil {
return nil, errors.New("Failed to create ZIP entry: index.js")
}
nodeJSSource := _escFSMustString(false, "/resources/index.js")
nodeJSSource += "\n// DO NOT EDIT - CONTENT UNTIL EOF IS AUTOMATICALLY GENERATED\n"
for _, eachLambda := range ctx.lambdaAWSInfos {
nodeJSSource += createNewNodeJSProxyEntry(eachLambda, ctx.logger)
}
// SPARTA CUSTOM RESOURCES
for _, eachCustomResourceName := range golangCustomResourceTypes {
nodeJSSource += createNewSpartaCustomResourceEntry(eachCustomResourceName, ctx.logger)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.