Hegel
AWS HTTP API Gateway Payload for Lambda
Installation
[]
= "0.1.1"
Document
Introduction
Hegel provides the lightest AWS HTTP API Gateway Payload for Lambda
It's recommended to use hegel with lambda_runtime
Hegel has two publicly accessible modules:
hegel::auth
and hegel::http
hegel::auth
This module is used for building API Gateway Lambda Authorizers for HTTP APIs
The payloads are all designed for format 2.0
example code:
use HashMap;
use ;
use serde_json;
use auth;
async
async
The code is available under folder src/bin/auth-example.rs
To avoid the heavy dependency tokio
as default, remember to add --features binary
param when building the binary in this crate
hegel::http
This module is used for building API Gateway Lambda proxy integrations for HTTP APIs
The payloads are all designed for format 2.0
example:
use ;
use serde_json;
use http;
async
async
The code is available under folder src/bin/http-echo.rs
To avoid the heavy dependency tokio
as default, remember to add --features binary
param when building the binary in this crate
Optional features
chrono
Enable it when you want to get user request datetime in chrono::DateTime
type
binary
Pass --features binary
to cargo when you want to build or check codes under folder src/bin/
example:
$ cd ${the path to this repo}
$ cargo check --features binary
$ cargo lambda build --release --features binary
$ cargo lambda build --release --arm64 --features binary
LICENSE
MIT LICENSE