MCPcopy Create free account
hub / github.com/EwanValentine/serverless-api-example / Router

Function Router

pkg/helpers/router.go:21–57  ·  view source on GitHub ↗

Router takes a lambda handler and returns a higher order function which can route each request using the HTTP verb and path params.

(handler handler)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 6

TestCanCreateFunction · 0.92
TestCanGetAllUsersFunction · 0.92
TestCanGetUserFunction · 0.92
TestCanUpdateUserFunction · 0.92
TestCanDeleteUserFunction · 0.92
mainFunction · 0.92

Calls 5

GetAllMethod · 0.65
GetMethod · 0.65
CreateMethod · 0.65
UpdateMethod · 0.65
DeleteMethod · 0.65

Tested by 5

TestCanCreateFunction · 0.74
TestCanGetAllUsersFunction · 0.74
TestCanGetUserFunction · 0.74
TestCanUpdateUserFunction · 0.74
TestCanDeleteUserFunction · 0.74