Documentation ¶
Overview ¶
Package clients provides functions for invoking the APIs of the verification server
Index ¶
- func CheckCodeStatus(ctx context.Context, hostname string, apiKey, uuid string, ...) (*api.CheckCodeStatusRequest, *api.CheckCodeStatusResponse, error)
- func GetCertificate(ctx context.Context, hostname, apikey, token, hmac string, ...) (*api.VerificationCertificateRequest, *api.VerificationCertificateResponse, ...)
- func GetToken(ctx context.Context, hostname, apikey, code string, timeout time.Duration) (*api.VerifyCodeRequest, *api.VerifyCodeResponse, error)
- func IssueCode(ctx context.Context, hostname string, apiKey, testType, symptomDate string, ...) (*api.IssueCodeRequest, *api.IssueCodeResponse, error)
- func RunEndToEnd(ctx context.Context, config *config.E2ETestConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCodeStatus ¶ added in v0.4.0
func CheckCodeStatus(ctx context.Context, hostname string, apiKey, uuid string, timeout time.Duration) (*api.CheckCodeStatusRequest, *api.CheckCodeStatusResponse, error)
CheckCodeStatus uses the ADMIN API to retrieve the status of an OTP code.
func GetCertificate ¶
func GetCertificate(ctx context.Context, hostname, apikey, token, hmac string, timeout time.Duration) (*api.VerificationCertificateRequest, *api.VerificationCertificateResponse, error)
GetCertificate exchanges a verification token + HMAC for a verification certificate.
func GetToken ¶
func GetToken(ctx context.Context, hostname, apikey, code string, timeout time.Duration) (*api.VerifyCodeRequest, *api.VerifyCodeResponse, error)
GetToken makes the API call to exchange a code for a token.
func IssueCode ¶
func IssueCode(ctx context.Context, hostname string, apiKey, testType, symptomDate string, tzMinOffset int, timeout time.Duration) (*api.IssueCodeRequest, *api.IssueCodeResponse, error)
IssueCode uses the ADMIN API to issue a verification code. Currently does not accept the SMS param.
func RunEndToEnd ¶ added in v0.7.0
func RunEndToEnd(ctx context.Context, config *config.E2ETestConfig) error
RunEndToEnd - code that exercises the verification and key server, simulating a mobile device uploading TEKs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.