http

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCryptoFailure = errors.New("crypto failure")

ErrCryptoFailure represents an error caused by a crypto fault while encrypting or decrypting data

View Source
var ErrInvalidHeader = errors.New("header contains invalid contents")

ErrInvalidHeader represents an error for a header that has an unexpected value

View Source
var ErrInvalidInput = errors.New("invalid input received")

ErrInvalidInput represents an error when invalid input is encountered and can't be processed

View Source
var ErrMissingHeader = errors.New("expected header not found")

ErrMissingHeader represents an error for an expected/required header that was not found

View Source
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

View Source
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

ExtractJwt Parses the given lambda event and extracts the JWT token details from the request

func ExtractPayload

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL