Documentation
¶
Index ¶
- Constants
- func CreateResponseError(e error) (events.APIGatewayProxyResponse, error)
- func GenerateSecretHash(username, clientId, clientSecret string) (string, error)
- func LogRequest(event events.APIGatewayProxyRequest)
- func LogRequestPretty(event events.APIGatewayProxyRequest)
- func MarshalResponse(payload any) (string, error)
- func UnmarshalRequest(req events.APIGatewayProxyRequest, payload any) error
- type ApiError
- type ApiErrorBody
- type ApiSuccess
Constants ¶
View Source
const ( ErrorFailedToUnmarshal = 100 ErrorFailedToMarshal = 200 ErrorFailedToHashSecret = 300 ErrorCognitoResourceNotFoundException = 400 ErrorCognitoInvalidParameterException = 401 ErrorCognitoUserLambdaValidationException = 402 ErrorCognitoNotAuthorizedException = 404 ErrorCognitoInvalidPasswordException = 405 ErrorCognitoUsernameExistsException = 406 ErrorCognitoTooManyRequestsException = 407 ErrorCognitoLimitExceededException = 408 ErrorCognitoForbiddenException = 409 ErrorCognitoUnexpectedException = 499 )
Variables ¶
This section is empty.
Functions ¶
func CreateResponseError ¶
func CreateResponseError(e error) (events.APIGatewayProxyResponse, error)
func GenerateSecretHash ¶ added in v1.2.0
func LogRequest ¶ added in v1.2.0
func LogRequest(event events.APIGatewayProxyRequest)
func LogRequestPretty ¶ added in v1.2.0
func LogRequestPretty(event events.APIGatewayProxyRequest)
func MarshalResponse ¶ added in v1.2.0
func UnmarshalRequest ¶ added in v1.2.0
func UnmarshalRequest(req events.APIGatewayProxyRequest, payload any) error
Types ¶
type ApiError ¶
type ApiError struct {
Id int
Body ApiErrorBody
Err error
StatusCode int
}
func HandleCognitoError ¶ added in v1.4.0
type ApiErrorBody ¶
type ApiSuccess ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.