Documentation ¶
Index ¶
- Variables
- func EncodeResponse(code int, msg string) *events.LambdaFunctionURLResponse
- func ExtractJwt(event events.LambdaFunctionURLRequest) (*jwt.VerifiableJwt, error)
- func ExtractPayload(event events.LambdaFunctionURLRequest) (*payload.EncryptedPayload, error)
- func ExtractTargets(event events.LambdaFunctionURLRequest) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
var ErrCryptoFailure = errors.New("crypto failure")
ErrCryptoFailure represents an error caused by a crypto fault while encrypting or decrypting data
var ErrInvalidHeader = errors.New("header contains invalid contents")
ErrInvalidHeader represents an error for a header that has an unexpected value
var ErrInvalidInput = errors.New("invalid input received")
ErrInvalidInput represents an error when invalid input is encountered and can't be processed
var ErrMissingHeader = errors.New("expected header not found")
ErrMissingHeader represents an error for an expected/required header that was not found
var ErrNotBase64Encoded = errors.New("input is not base64 encoded")
ErrNotBase64Encoded represent an error caused when input received is expected to be base64 encoded but is not
var ErrTargetDecode = errors.New("target decode failed")
ErrTargetDecode represents an error caused by a target in the request path that could not be decoded (usually not base64 encoded)
Functions ¶
func EncodeResponse ¶
func EncodeResponse(code int, msg string) *events.LambdaFunctionURLResponse
EncodeResponse generates an event response using the given HTTP status code and message
func ExtractJwt ¶
func ExtractJwt(event events.LambdaFunctionURLRequest) (*jwt.VerifiableJwt, error)
ExtractJwt Parses the given lambda event and extracts the JWT token details from the request
func ExtractPayload ¶
func ExtractPayload(event events.LambdaFunctionURLRequest) (*payload.EncryptedPayload, error)
ExtractPayload Parses the lambda event and extracts the aesgcm encrypted payload; the payload is NOT decrypted by this function
func ExtractTargets ¶
func ExtractTargets(event events.LambdaFunctionURLRequest) ([]string, error)
ExtractTargets parses the given lambda event and decodes the targets from the request path
Types ¶
This section is empty.