-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added a fire-once entrypoint template for the go-lambda template
- Loading branch information
Showing
2 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
internal/templates/templates/go-lambda/cmd__[lambda]__main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/ALT-F4-LLC/quirk-service-kit/config" | ||
"github.com/ALT-F4-LLC/quirk-service-kit/lambda" | ||
"github.com/ALT-F4-LLC/quirk-service-kit/telemetry" | ||
"github.com/ALT-F4-LLC/quirk-service-kit/aws" | ||
"github.com/aws/aws-lambda-go/events" | ||
) | ||
|
||
type Config struct { | ||
*config.BaseConfig | ||
} | ||
|
||
var cfg Config | ||
|
||
func Handler(ctx context.Context, req events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error) { | ||
// l := telemetry.GetLogger(ctx) | ||
// awsCfg := aws.GetConfig(ctx) | ||
// env := cfg.BaseConfig.Environment | ||
|
||
return lambda.NewOkResponse(), nil | ||
} | ||
|
||
func main() { | ||
if err := lambda.Start(Handler, &Config{}); err != nil { | ||
panic(err) | ||
} | ||
} |