# Functions

Error wraps the error into an API error.
Errorf creates an ErrorReturn w/ the formateed message.
InternalError constructs a generic internal error.

# Constants

ErrHMACInvalid indicates that the HMAC that is being signed is invalid (wrong length).
ErrInternal indicates some server-side error whose details are opaque to the caller.
ErrInvalidDate indicates the realm requires a date, but the supplied date was older or newer than the allowed date range.
ErrInvalidTestType indicates the client says it supports a test type this server doesn't know about.
ErrMaintenanceMode indicates that the server is read-only for maintenance.
ErrMissingDate indicates the realm requires a date, but none was supplied.
ErrMissingNonce indicates a UserReport request is missing the nonce value.
ErrMissingPhone indicates a UserReport request is missing the phone number.
ErrPhoneNumberInvalid indicates the phone number could not be parsed, details in the error message.
ErrQuotaExceeded indicates the realm has exceeded its daily allotment of codes.
ErrSMSFailure indicates that Twilio's responded with a failure.
ErrSMSQueueFull indicates that Twilio's SMS queue is full and may not accept more SMS messages to send.
ErrTokenExpired indicates that the token provided is known but expired.
ErrTokenInvalid indicates the token provided is unknown or already used.
ErrUnparsableRequest indicates that the request could not be correctly parsed.
ErrUnsupportedTestType indicates the client is unable to process the appropriate test type in this case, the user should be directed to upgrade their app / operating system.
User report specific responses ErrUserReportTryLater indicates that user report is not allowed right now, which could be for several reasons: phone number already used, PHA hit self report quota, PHA disabled self report.
ErrUUIDAlreadyExists indicates that the UUID has already been used for an issued code.
ErrVerifyCodeExpired indicates the code provided is known to the server, but expired.
ErrVerifyCodeInvalid indicates the code entered is unknown or already used.
ErrVerifyCodeNotFound indicates the code does not exist on the server/realm.
ErrVerifyCodeUserUnauth indicates the code does not belong to the requesting user.
TestTypeConfirmed is the string that represents a confirmed COVID-19 test.
TestTypeLikely is the string that represents a clinical diagnosis.
TestTypeNegative is the string that represents a negative test.
TestTypeUserReport is the string that represents a user initiated report.

# Structs

AndroidDataResponse is the structure returned from Android assetlinks.
No description provided by the author
BatchIssueCodeRequest defines the request for issuing many codes at once.
BatchIssueCodeResponse defines the response for BatchIssueCodeRequest.
BatchUser represents a single user's email/name.
CheckCodeStatusRequest defines the parameters to request the status for a previously issued OTP code.
CheckCodeStatusResponse defines the response type for CheckCodeStatusRequest.
ErrorReturn defines the common error type.
ExpireCodeRequest defines the parameters to request that a code be expired now.
ExpireCodeResponse defines the response type for ExpireCodeRequest.
No description provided by the author
No description provided by the author
IOSDataResponse is the iOS format is specified by: https://developer.apple.com/documentation/safariservices/supporting_associated_domains.
No description provided by the author
IssueCodeRequest defines the parameters to request an new OTP (short term) code.
IssueCodeResponse defines the response type for IssueCodeRequest.
UserBatchRequest is a request for bulk creation of users.
UserBatchResponse defines the response type for UserBatchRequest.
UserReportRequest defines the structure for a user initiated report.
UserReportResponse is the reply from a UserReportRequest.
VerificationCertificateRequest is used to accept a long term token and an HMAC of the TEKs.
VerificationCertificateResponse either contains an error or contains a signed certificate that can be presented to the configured exposure notifications server to publish keys along w/ the certified diagnosis.
VerifyCodeRequest is the request structure for exchanging a short term Verification Code (OTP) for a long term token (a JWT) that can later be used to sign TEKs.
VerifyCodeResponse either contains an error, or contains the test parameters (type and [optional] date) as well as the verification token.

# Type aliases

AcceptTypes is a map of string to struct.
Padding is an optional field to change the size of the request or response.