Versions in this module Expand all Collapse all v0 v0.1.0 Oct 12, 2026 Changes in this version + var ErrInvalidResponse = errors.New("aut2fa: invalid API response") + type ApiError struct + Code string + Detail string + Errors map[string]string + RetryAfter string + Status int + func (err *ApiError) Error() string + type Client struct + func New(apiKey string, options ...Option) (*Client, error) + func (c *Client) Send(ctx context.Context, params SendParams) (*SendResponse, error) + func (c *Client) Status(ctx context.Context, id string) (*SendResponse, error) + func (c *Client) Verify(ctx context.Context, id, code string) (*VerifyResponse, error) + type Option func(*configuration) error + func WithBaseURL(baseURL string) Option + func WithHTTPClient(client *http.Client) Option + func WithTimeout(timeout time.Duration) Option + type SendParams struct + Code string + IdempotencyKey string + Locale string + To string + type SendResponse struct + Channel *string + CreatedAt time.Time + DeliveredAt *time.Time + ExpiresAt time.Time + FailedAt *time.Time + FailureReason *string + From *string + ID string + Mode string + ReadAt *time.Time + SentAt *time.Time + Status string + Verification string + VerifiedAt *time.Time + type VerifyResponse struct + AttemptsLeft int + Valid bool + Verification string