Documentation
¶
Index ¶
- func APIGatewayEventToCheckResourcesRequest(event events.APIGatewayV2HTTPRequest) (*requestv1.CheckResourcesRequest, error)
- func APIGatewayEventToPlanResourcesRequest(event events.APIGatewayV2HTTPRequest) (*requestv1.PlanResourcesRequest, error)
- func CheckResourcesResponseToAPIGateway(resp *responsev1.CheckResourcesResponse) (events.APIGatewayV2HTTPResponse, error)
- func ErrorToAPIGateway(message string, statusCode int) events.APIGatewayV2HTTPResponse
- func GetConfOverrides(confOverrides map[string]any) error
- func HubStorageDriver(confOverrides map[string]any) bool
- func MkConfStorageOverrides(cwd string, confOverrides map[string]any) error
- func PlanResourcesResponseToAPIGateway(resp *responsev1.PlanResourcesResponse) (events.APIGatewayV2HTTPResponse, error)
- func RegisterNewExtension(ctx context.Context, runtimeAPI string) (*lambdaExt, error)
- func ResponseToAPIGateway[T proto.Message](resp T) (events.APIGatewayV2HTTPResponse, error)
- func RouteRequest(ctx context.Context, event events.APIGatewayV2HTTPRequest, ...) (events.APIGatewayV2HTTPResponse, error)
- func WaitForReady(ctx context.Context) error
- type EventResponse
- type FunctionHandler
- type RegisterRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIGatewayEventToCheckResourcesRequest ¶
func APIGatewayEventToCheckResourcesRequest(event events.APIGatewayV2HTTPRequest) (*requestv1.CheckResourcesRequest, error)
APIGatewayEventToCheckResourcesRequest converts an API Gateway event to a CheckResourcesRequest.
func APIGatewayEventToPlanResourcesRequest ¶
func APIGatewayEventToPlanResourcesRequest(event events.APIGatewayV2HTTPRequest) (*requestv1.PlanResourcesRequest, error)
APIGatewayEventToPlanResourcesRequest converts an API Gateway event to a PlanResourcesRequest.
func CheckResourcesResponseToAPIGateway ¶
func CheckResourcesResponseToAPIGateway(resp *responsev1.CheckResourcesResponse) (events.APIGatewayV2HTTPResponse, error)
func ErrorToAPIGateway ¶
func ErrorToAPIGateway(message string, statusCode int) events.APIGatewayV2HTTPResponse
func GetConfOverrides ¶
func HubStorageDriver ¶
func MkConfStorageOverrides ¶
func PlanResourcesResponseToAPIGateway ¶
func PlanResourcesResponseToAPIGateway(resp *responsev1.PlanResourcesResponse) (events.APIGatewayV2HTTPResponse, error)
func RegisterNewExtension ¶
func ResponseToAPIGateway ¶
func ResponseToAPIGateway[T proto.Message](resp T) (events.APIGatewayV2HTTPResponse, error)
ResponseToAPIGateway converts a protobuf response to an API Gateway response.
func RouteRequest ¶
func RouteRequest(ctx context.Context, event events.APIGatewayV2HTTPRequest, svc *svc.CerbosService) (events.APIGatewayV2HTTPResponse, error)
RouteRequest routes the API Gateway request to the appropriate handler.
func WaitForReady ¶
Types ¶
type EventResponse ¶
type EventResponse struct {
Tracing struct {
Type string `json:"type"`
Value string `json:"value"`
} `json:"tracing"`
EventType string `json:"eventType"`
RequestID string `json:"requestId"` //nolint:tagliatelle
InvokedFunctionArn string `json:"invokedFunctionArn"`
DeadlineMs int64 `json:"deadlineMs"`
}
type FunctionHandler ¶
type FunctionHandler struct {
// contains filtered or unexported fields
}
FunctionHandler handles AWS Lambda function invocations.
func NewFunctionHandler ¶
func NewFunctionHandler(ctx context.Context) (*FunctionHandler, error)
func (*FunctionHandler) Close ¶
func (h *FunctionHandler) Close() error
func (*FunctionHandler) Handle ¶
func (h *FunctionHandler) Handle(ctx context.Context, event events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error)
type RegisterRequest ¶
type RegisterRequest struct {
Events []string `json:"events"`
}
Click to show internal directories.
Click to hide internal directories.