Skip to content

akihiro-moriwaki/lambda-middleware-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lambda-middleware-go

Lambda用のmiddleware

type EventHandler func(events.APIGatewayProxyRequest, string) (events.APIGatewayProxyResponse, error)

func XxxxxxxxxHandler(h EventHandler) middleware.Handler {
	return func(request events.APIGatewayProxyRequest) (interface{}, error) {
        // 共通な処理をしてEventHandlerの引数として渡す
		return h(request, "world")
	}
}

func main() {
	lambda.Start(
		middleware.Middleware(
			XxxxxxxxxHandler(
				handler,
			),
		),
	)
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages