Versions in this module Expand all Collapse all v1 v1.0.0 Sep 18, 2026 Changes in this version + const DefaultEndpoint + const DefaultTimeout + var ErrInvalidStatus = errors.New("turnstile: verification returned non-200 status") + var ErrMissingSecret = errors.New("turnstile: secret key is required") + var ErrMissingToken = errors.New("turnstile: response token is required") + var ErrTokenTooLarge = errors.New("turnstile: token is too large") + type Client struct + func New(secret string, opts ...Option) *Client + func (c *Client) Verify(ctx context.Context, token string, params ...VerifyParams) (*Result, error) + type Option func(*Client) + func WithEndpoint(endpoint string) Option + func WithHTTPClient(client *http.Client) Option + func WithTimeout(timeout time.Duration) Option + type Result struct + Action string + CData string + ChallengeTS time.Time + ErrorCodes []string + Hostname string + Success bool + func Verify(ctx context.Context, secret, token string, params ...VerifyParams) (*Result, error) + type VerifyParams struct + IdempotencyKey string + RemoteIP string