【文件属性】:
文件名称:agw:使用标准路由器(例如mux)将AWS APIGateway路由到lambda
文件大小:10KB
文件格式:ZIP
更新时间:2021-02-10 03:34:30
aws lambda serverless amazon aws-apigateway
轻松路由AWS APIGateway请求
AGW将AWS lambda事件消息转换为标准的http.Request,可以轻松使用现有的http路由器和链接库。 借助AWS对golang包装器的本机支持,不再需要像nodejs或python这样的垫片。
简而言之,用法是
//your standard http handler
func testhandler ( w http. ResponseWriter , r * http. Request ) {
w . Header (). Add ( "test" , "test header" )
w .( * agw. LPResponse ). WriteBody ( map [ string ] string {
"test" : "test body" ,
"funcArn" :
【文件预览】:
agw-master
----.gitignore(0B)
----LICSENSE(1KB)
----event.go(2KB)
----adapt_test.go(6KB)
----entry.go(1011B)
----handler.go(1KB)
----README.md(5KB)
----event_test.go(4KB)
----adapt.go(4KB)