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 ErrorCognitoResourceNotFound = 400 ErrorCognitoInvalidParameter = 401 ErrorCognitoUserLambdaValidation = 402 ErrorCognitoNotAuthorized = 403 ErrorCognitoInvalidPassword = 404 ErrorCognitoUsernameExists = 405 ErrorCognitoTooManyRequests = 406 ErrorCognitoLimitExceeded = 407 ErrorCognitoForbidden = 408 ErrorCognitoPasswordResetRequired = 410 ErrorCognitoUserNotConfirmed = 411 ErrorCognitoUnexpected = 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.