Versions in this module Expand all Collapse all v0 v0.2.0 Nov 12, 2026 Changes in this version type Event + IPNetwork string + ProjectID string v0.1.1 Nov 10, 2026 Changes in this version + var ErrInvalidRequestID = errors.New("fingerly: request id is not a Fingerly request id") v0.1.0 Nov 10, 2026 Changes in this version + const DefaultWebhookTolerance + const Version + var ErrEventNotFound = errors.New("fingerly: event not found") + var ErrEventPending = errors.New("fingerly: event pending") + var ErrResponseTooLarge = errors.New("fingerly: response body exceeds 4 MiB") + var ErrTimeout = errors.New("fingerly: request timed out") + func VerifyWebhook(secret string, payload []byte, timestamp, signature string, ...) bool + type APIError struct + Code string + Details any + RequestID string + RetryAfter *int + Status int + func (e *APIError) Error() string + func (e *APIError) Is(target error) bool + type Client struct + Events *EventsService + func New(secretKey string, opts ...Option) *Client + func (c Client) Format(f fmt.State, _ rune) + type ConnectionError struct + Timeout bool + func (e *ConnectionError) Error() string + func (e *ConnectionError) Is(target error) bool + func (e *ConnectionError) Unwrap() error + type Event struct + ASN string + ASNName string + Agent string + AgentVersion string + AnonymityNetwork string + CountryCode string + CountryName string + DeferredSignals json.RawMessage + DeviceKind string + Document json.RawMessage + Environment string + HasDocument bool + IPAddress string + OS string + OccurredAt time.Time + Origin string + Platform string + Raw json.RawMessage + RequestID string + SDKPlatform string + SDKVersion string + State string + SuspectLevel string + SuspectScore *int + Tag string + Triggers []EventTrigger + URLHost string + URLPath string + VisitorID string + VisitorKind string + func (e *Event) Score() (int, bool) + func (e *Event) Scored() bool + type EventListParams struct + From time.Time + Level string + Limit int + Page int + To time.Time + Visitor string + type EventPage struct + Page int + PageSize int + Raw json.RawMessage + Rows []Event + type EventTrigger struct + Confidence string + Signal string + Weight int + type EventsService struct + func (s *EventsService) Get(ctx context.Context, requestID string) (*Event, error) + func (s *EventsService) List(ctx context.Context, params *EventListParams) (*EventPage, error) + func (s EventsService) Format(f fmt.State, _ rune) + type Option func(*clientConfig) + func WithAPIVersion(version string) Option + func WithEndpoint(endpoint string) Option + func WithHTTPClient(httpClient *http.Client) Option + func WithTimeout(timeout time.Duration) Option + type Proxy struct + func NewProxy(options ProxyOptions) (*Proxy, error) + func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (p Proxy) Format(f fmt.State, _ rune) + type ProxyError struct + Err error + Status int + func (e *ProxyError) Error() string + func (e *ProxyError) Unwrap() error + type ProxyOptions struct + APIVersion string + ClientIP func(*http.Request) string + MaxBodyBytes int64 + OnError func(*http.Request, *ProxyError) + Path string + ProxyKey string + SecretKey string + Timeout time.Duration + Transport http.RoundTripper + Upstream string + func (o ProxyOptions) Format(f fmt.State, _ rune) + func (o ProxyOptions) GobEncode() ([]byte, error) + func (o ProxyOptions) MarshalJSON() ([]byte, error) + type WebhookEvent struct + CreatedAt time.Time + Data json.RawMessage + Environment string + ID string + OrganizationID string + Type string + Version int + type WebhookOption func(*webhookConfig) + func WithWebhookTime(now time.Time) WebhookOption + func WithWebhookTolerance(tolerance time.Duration) WebhookOption