package
Version:
v0.10.2
Opens a new window with list of versions in this module.
Published: Feb 16, 2025
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 3
Opens a new window with list of known importers.
README
¶
HTTP Simple for Go
HTTP Simple Server
AWS Lambda Manual Setup
- AWS Lambda Function Configuration
- Create AWS Lambda function
- Set
SimpleServer.HttpEngine
to awslambda
, e.g. using environment variable
- Set Handler to
main
- API Gateway Configuration
- Create "REST" API
- Select "New API"
- Select "Actions" > "Create Resource"
- Click "Configure as proxy resource"
- Use Resource Path
{proxy+}
- Click "Enable API Gateway CORS"
- Click "Create Resource"
- Leave "Integration Type" as "Lambda Function Proxy"
- In "Lambda Function", paste in your Lamda ARN
- Click "Deploy API" and create stage if necessary
- Test with cURL against Stage Invoke URL
- API Gateway API Key
- Create API Key
- Create Usage Plan
- Add API Stage by Selecting API Gateway, Stage, and clicking checkmark icon.
- Click "Next".
- Add API Key, click checkmark icon, click "Done"
- Click on API Gateway
{proxy+}
endpoint, click on ANY
- Click on "Method Request"
- Click edit icon by "API Key Required", change to true, click checkmark icon
- Select "Deploy API"
- Test with cURL and
X-API-Key
header
Documentation
¶
View Source
const (
EngineAWSLambda = "awslambda"
EngineNetHTTP = "nethttp"
EngineFastHTTP = "fasthttp"
)
type TestResponse struct {
Command string `json:"command"`
RequestURL string `json:"requestURL"`
Time time.Time `json:"time"`
}
Source Files
¶
Directories
¶
examples
|
|
|
|
Click to show internal directories.
Click to hide internal directories.