Documentation ¶
Index ¶
- type AuthorizerError
- type Error
- type ErrorDecodeError
- type ErrorMessage
- type Gateway
- type GatewayOption
- func AddFunction(path, method, lambdaArn string, id string) GatewayOption
- func SetBasePath(basePath string) GatewayOption
- func SetFunctionErrorHandler(h func(*LambdaError) error) GatewayOption
- func SetLogger(logger Logger) GatewayOption
- func WithAPIRequestID(apiRequestIdField string) GatewayOption
- func WithClaimSubID(field string) GatewayOption
- type LambdaError
- type Logger
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizerError ¶
type AuthorizerError struct { Message string `json:"message"` RequestContext *events.APIGatewayV2HTTPRequestContext `json:"request_context"` }
func (*AuthorizerError) Error ¶
func (e *AuthorizerError) Error() string
type Error ¶
type Error interface { Error() string // contains filtered or unexported methods }
func ClientError ¶
func ServerError ¶
func ServerError() Error
type ErrorDecodeError ¶
type ErrorDecodeError struct { OriginalErrorMessage *ErrorMessage `json:"original_error_message"` Err error `json:"err"` }
func (*ErrorDecodeError) Error ¶
func (e *ErrorDecodeError) Error() string
type ErrorMessage ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
func NewLambdaGateway ¶
func NewLambdaGateway( lambdaClient *lambda.Lambda, opts ...GatewayOption, ) *Gateway
type GatewayOption ¶
type GatewayOption func(*Gateway)
func AddFunction ¶
func AddFunction(path, method, lambdaArn string, id string) GatewayOption
func SetBasePath ¶
func SetBasePath(basePath string) GatewayOption
func SetFunctionErrorHandler ¶
func SetFunctionErrorHandler(h func(*LambdaError) error) GatewayOption
func SetLogger ¶
func SetLogger(logger Logger) GatewayOption
func WithAPIRequestID ¶
func WithAPIRequestID(apiRequestIdField string) GatewayOption
func WithClaimSubID ¶
func WithClaimSubID(field string) GatewayOption
type LambdaError ¶
type LambdaError struct { ErrorType string `json:"errorType"` ErrorMessage string `json:"errorMessage"` }
func (*LambdaError) Error ¶
func (e *LambdaError) Error() string
type Request ¶
type Request events.APIGatewayV2HTTPRequest
type Response ¶
type Response events.APIGatewayV2HTTPResponse
Click to show internal directories.
Click to hide internal directories.