Documentation
¶
Index ¶
- Constants
- func DeriveGateAgentTokenEnvKey(serviceID string) (string, error)
- func ExportDeliveryPrivateKeyPKCS8(privateKey any) (string, error)
- func ImportDeliveryPrivateKeyPKCS8(value string) (*ecdh.PrivateKey, error)
- func IsBlockedGateEnvVarKey(key string) bool
- func IsGateManagedEnvVarKey(key string) bool
- func KeyIDForRawX25519PublicKey(rawPublicKey []byte) (string, error)
- func VerifyGateWebhookSignature(input VerifyGateWebhookSignatureInput) bool
- type APIError
- type APIKey
- type APIKeyListParams
- type APIKeysService
- func (s *APIKeysService) Create(ctx context.Context, organizationID string, params CreateAPIKeyParams) (IssuedAPIKey, error)
- func (s *APIKeysService) List(ctx context.Context, organizationID string, params APIKeyListParams) (ListResult[APIKey], error)
- func (s *APIKeysService) Revoke(ctx context.Context, organizationID string, keyID string) (APIKey, error)
- func (s *APIKeysService) Rotate(ctx context.Context, organizationID string, keyID string) (IssuedAPIKey, error)
- func (s *APIKeysService) Update(ctx context.Context, organizationID string, keyID string, ...) (APIKey, error)
- type AcknowledgeGateSessionDeliveryParams
- type AgentTokenVerification
- type ApiErrorBody
- type Attribution
- type Client
- type ConfigurationError
- type ConsumeGateLoginSessionParams
- type CreateAPIKeyParams
- type CreateGateLoginSessionParams
- type CreateGateServiceParams
- type CreateGateSessionParams
- type CreateOrganizationParams
- type CreateWebhookEndpointParams
- type Decision
- type ErrorDetails
- type Event
- type EventListParams
- type EventSubject
- type FieldError
- type FingerprintListParams
- type FingerprintsService
- func (s *FingerprintsService) Get(ctx context.Context, visitorID string) (VisitorFingerprintDetail, error)
- func (s *FingerprintsService) Iter(ctx context.Context, params FingerprintListParams, ...) error
- func (s *FingerprintsService) List(ctx context.Context, params FingerprintListParams) (ListResult[VisitorFingerprintSummary], error)
- type GateAgentTokensService
- type GateApprovedWebhookFoil
- type GateApprovedWebhookPayload
- type GateDashboardLogin
- type GateDeliveryBundle
- type GateDeliveryEnvelope
- type GateDeliveryHelperInput
- type GateDeliveryPayload
- type GateDeliveryRequest
- type GateEncryptedDeliveryResponse
- type GateLoginSession
- type GateLoginSessionsService
- type GateManagedService
- type GateManagedServicesService
- func (s *GateManagedServicesService) Create(ctx context.Context, params CreateGateServiceParams) (GateManagedService, error)
- func (s *GateManagedServicesService) Disable(ctx context.Context, serviceID string) (GateManagedService, error)
- func (s *GateManagedServicesService) Get(ctx context.Context, serviceID string) (GateManagedService, error)
- func (s *GateManagedServicesService) List(ctx context.Context) ([]GateManagedService, error)
- func (s *GateManagedServicesService) Update(ctx context.Context, serviceID string, params UpdateGateServiceParams) (GateManagedService, error)
- type GateRegistryEntry
- type GateRegistryService
- type GateService
- type GateServiceBranding
- type GateServiceBrandingInput
- type GateServiceConsent
- type GateServiceEnvVar
- type GateServiceSDKInstall
- type GateServiceStatus
- type GateSessionCreate
- type GateSessionDeliveryAcknowledgement
- type GateSessionPollData
- type GateSessionsService
- func (s *GateSessionsService) Acknowledge(ctx context.Context, gateSessionID string, ...) (GateSessionDeliveryAcknowledgement, error)
- func (s *GateSessionsService) Create(ctx context.Context, params CreateGateSessionParams) (GateSessionCreate, error)
- func (s *GateSessionsService) Poll(ctx context.Context, gateSessionID string, pollToken string) (GateSessionPollData, error)
- type GeneratedDeliveryKeyPair
- type IssuedAPIKey
- type ListResult
- type Manipulation
- type Option
- type Organization
- type OrganizationsService
- func (s *OrganizationsService) Create(ctx context.Context, params CreateOrganizationParams) (Organization, error)
- func (s *OrganizationsService) Get(ctx context.Context, organizationID string) (Organization, error)
- func (s *OrganizationsService) Update(ctx context.Context, organizationID string, params UpdateOrganizationParams) (Organization, error)
- type RequestContext
- type RevokeGateAgentTokenParams
- type ScoreBreakdown
- type SessionAnalysisCoverage
- type SessionAttribution
- type SessionAttributionBehavior
- type SessionAttributionLabel
- type SessionBrowser
- type SessionClientTelemetry
- type SessionConnectionFingerprint
- type SessionConnectionFingerprintHTTP2
- type SessionConnectionFingerprintJA4
- type SessionDecision
- type SessionDetail
- type SessionDetailRequest
- type SessionDetailVisitorFingerprint
- type SessionDetailVisitorFingerprintLifecycle
- type SessionDevice
- type SessionDeviceAvailabilityCapability
- type SessionDeviceCapabilities
- type SessionDeviceLocale
- type SessionDeviceOperatingSystem
- type SessionDevicePlatformAuthenticatorCapabilities
- type SessionDeviceScreen
- type SessionDeviceStorageCapabilities
- type SessionDeviceTouchCapabilities
- type SessionHighlight
- type SessionHighlightEvidence
- type SessionListParams
- type SessionNetwork
- type SessionNetworkAnonymity
- type SessionNetworkEvidence
- type SessionNetworkLocation
- type SessionNetworkReputation
- type SessionNetworkRouting
- type SessionRawDeviceAudio
- type SessionRawDeviceCanvas
- type SessionRawDeviceFonts
- type SessionRawDeviceGraphics
- type SessionRawDeviceGraphicsWebGL
- type SessionRawDeviceGraphicsWebGPU
- type SessionRawDeviceMedia
- type SessionRawDeviceNavigator
- type SessionRawDeviceStorage
- type SessionRuntimeIntegrity
- type SessionSignalFired
- type SessionSummary
- type SessionWebBotAuth
- type SessionsService
- type TokenVerificationError
- type UpdateAPIKeyParams
- type UpdateGateServiceParams
- type UpdateOrganizationParams
- type UpdateWebhookEndpointParams
- type VerificationResult
- type VerifiedFoilSignal
- type VerifiedFoilToken
- type VerifyGateAgentTokenParams
- type VerifyGateWebhookSignatureInput
- type VisitorFingerprintActivity
- type VisitorFingerprintAnchors
- type VisitorFingerprintComponents
- type VisitorFingerprintDetail
- type VisitorFingerprintLatestRequest
- type VisitorFingerprintLifecycle
- type VisitorFingerprintLink
- type VisitorFingerprintSessionSummary
- type VisitorFingerprintStorage
- type VisitorFingerprintSummary
- type WebhookDelivery
- type WebhookEndpoint
- type WebhookEventEnvelope
- type WebhookTest
- type WebhooksService
- func (s *WebhooksService) CreateEndpoint(ctx context.Context, organizationID string, params CreateWebhookEndpointParams) (WebhookEndpoint, error)
- func (s *WebhooksService) DisableEndpoint(ctx context.Context, organizationID string, endpointID string) (WebhookEndpoint, error)
- func (s *WebhooksService) ListEndpoints(ctx context.Context, organizationID string) (ListResult[WebhookEndpoint], error)
- func (s *WebhooksService) ListEvents(ctx context.Context, organizationID string, params EventListParams) (ListResult[Event], error)
- func (s *WebhooksService) RetrieveEvent(ctx context.Context, organizationID string, eventID string) (Event, error)
- func (s *WebhooksService) RotateSecret(ctx context.Context, organizationID string, endpointID string) (WebhookEndpoint, error)
- func (s *WebhooksService) SendTest(ctx context.Context, organizationID string, endpointID string) (WebhookTest, error)
- func (s *WebhooksService) UpdateEndpoint(ctx context.Context, organizationID string, endpointID string, ...) (WebhookEndpoint, error)
Constants ¶
View Source
const ( GateDeliveryVersion = 1 GateDeliveryAlgorithm = "x25519-hkdf-sha256/aes-256-gcm" GateAgentTokenEnvSuffix = "_GATE_AGENT_TOKEN" )
Variables ¶
This section is empty.
Functions ¶
func ImportDeliveryPrivateKeyPKCS8 ¶
func ImportDeliveryPrivateKeyPKCS8(value string) (*ecdh.PrivateKey, error)
func IsBlockedGateEnvVarKey ¶
func IsGateManagedEnvVarKey ¶
func VerifyGateWebhookSignature ¶
func VerifyGateWebhookSignature(input VerifyGateWebhookSignatureInput) bool
Types ¶
type APIError ¶
type APIKey ¶
type APIKey struct {
Object string `json:"object"`
ID string `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
Environment string `json:"environment"`
AllowedOrigins []string `json:"allowed_origins,omitempty"`
Scopes []string `json:"scopes,omitempty"`
RateLimit *int `json:"rate_limit,omitempty"`
Status string `json:"status"`
KeyPreview string `json:"key_preview"`
DisplayKey *string `json:"display_key,omitempty"`
LastUsedAt *string `json:"last_used_at,omitempty"`
CreatedAt string `json:"created_at"`
RotatedAt *string `json:"rotated_at,omitempty"`
RevokedAt *string `json:"revoked_at,omitempty"`
GraceExpiresAt *string `json:"grace_expires_at,omitempty"`
}
type APIKeyListParams ¶
type APIKeysService ¶
type APIKeysService struct {
// contains filtered or unexported fields
}
func (*APIKeysService) Create ¶
func (s *APIKeysService) Create(ctx context.Context, organizationID string, params CreateAPIKeyParams) (IssuedAPIKey, error)
func (*APIKeysService) List ¶
func (s *APIKeysService) List(ctx context.Context, organizationID string, params APIKeyListParams) (ListResult[APIKey], error)
func (*APIKeysService) Rotate ¶
func (s *APIKeysService) Rotate(ctx context.Context, organizationID string, keyID string) (IssuedAPIKey, error)
func (*APIKeysService) Update ¶
func (s *APIKeysService) Update(ctx context.Context, organizationID string, keyID string, params UpdateAPIKeyParams) (APIKey, error)
type AgentTokenVerification ¶
type ApiErrorBody ¶
type Attribution ¶
type Client ¶
type Client struct {
Sessions *SessionsService
Fingerprints *FingerprintsService
Organizations *OrganizationsService
Gate *GateService
Webhooks *WebhooksService
// contains filtered or unexported fields
}
type ConfigurationError ¶
type ConfigurationError struct {
Message string
}
func (*ConfigurationError) Error ¶
func (e *ConfigurationError) Error() string
type ConsumeGateLoginSessionParams ¶
type ConsumeGateLoginSessionParams struct {
Code string `json:"code"`
}
type CreateAPIKeyParams ¶
type CreateGateServiceParams ¶
type CreateGateServiceParams struct {
ID string `json:"id"`
Discoverable *bool `json:"discoverable,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
Website string `json:"website"`
DashboardLoginURL string `json:"dashboard_login_url,omitempty"`
WebhookEndpointID string `json:"webhook_endpoint_id"`
EnvVars []GateServiceEnvVar `json:"env_vars,omitempty"`
DocsURL string `json:"docs_url,omitempty"`
SDKs []GateServiceSDKInstall `json:"sdks,omitempty"`
Branding *GateServiceBrandingInput `json:"branding,omitempty"`
Consent *GateServiceConsent `json:"consent,omitempty"`
}
type CreateGateSessionParams ¶
type CreateGateSessionParams struct {
ServiceID string `json:"service_id"`
AccountName string `json:"account_name"`
Metadata map[string]any `json:"metadata,omitempty"`
Delivery GateDeliveryRequest `json:"delivery"`
}
type Decision ¶
type Decision struct {
EventID string `json:"event_id"`
Verdict string `json:"verdict"`
RiskScore int `json:"risk_score"`
Phase string `json:"phase,omitempty"`
IsProvisional *bool `json:"is_provisional,omitempty"`
Manipulation *Manipulation `json:"manipulation,omitempty"`
EvaluationDurationMS *int `json:"evaluation_duration_ms,omitempty"`
EvaluatedAt string `json:"evaluated_at"`
}
type ErrorDetails ¶
type ErrorDetails struct {
Fields []FieldError `json:"fields,omitempty"`
}
type Event ¶
type Event struct {
Object string `json:"object"`
ID string `json:"id"`
Type string `json:"type"`
Subject EventSubject `json:"subject"`
Data map[string]any `json:"data"`
WebhookDeliveries []WebhookDelivery `json:"webhook_deliveries"`
CreatedAt string `json:"created_at"`
}
type EventListParams ¶
type EventSubject ¶
type FieldError ¶
type FingerprintListParams ¶
type FingerprintsService ¶
type FingerprintsService struct {
// contains filtered or unexported fields
}
func (*FingerprintsService) Get ¶
func (s *FingerprintsService) Get(ctx context.Context, visitorID string) (VisitorFingerprintDetail, error)
func (*FingerprintsService) Iter ¶
func (s *FingerprintsService) Iter(ctx context.Context, params FingerprintListParams, yield func(VisitorFingerprintSummary) error) error
func (*FingerprintsService) List ¶
func (s *FingerprintsService) List(ctx context.Context, params FingerprintListParams) (ListResult[VisitorFingerprintSummary], error)
type GateAgentTokensService ¶
type GateAgentTokensService struct {
// contains filtered or unexported fields
}
func (*GateAgentTokensService) Revoke ¶
func (s *GateAgentTokensService) Revoke(ctx context.Context, params RevokeGateAgentTokenParams) error
func (*GateAgentTokensService) Verify ¶
func (s *GateAgentTokensService) Verify(ctx context.Context, params VerifyGateAgentTokenParams) (AgentTokenVerification, error)
type GateApprovedWebhookFoil ¶
type GateApprovedWebhookPayload ¶
type GateApprovedWebhookPayload struct {
ServiceID string `json:"service_id"`
GateSessionID string `json:"gate_session_id"`
GateAccountID string `json:"gate_account_id"`
AccountName string `json:"account_name"`
Metadata map[string]any `json:"metadata"`
Foil GateApprovedWebhookFoil `json:"foil"`
Delivery GateDeliveryRequest `json:"delivery"`
}
func ValidateGateApprovedWebhookPayload ¶
func ValidateGateApprovedWebhookPayload(value GateApprovedWebhookPayload) (*GateApprovedWebhookPayload, error)
type GateDashboardLogin ¶
type GateDeliveryBundle ¶
type GateDeliveryBundle struct {
Integrator GateDeliveryEnvelope `json:"integrator"`
Gate GateDeliveryEnvelope `json:"gate"`
}
type GateDeliveryEnvelope ¶
type GateDeliveryEnvelope struct {
Version int `json:"version"`
Algorithm string `json:"algorithm"`
KeyID string `json:"key_id"`
EphemeralPublicKey string `json:"ephemeral_public_key"`
Salt string `json:"salt"`
IV string `json:"iv"`
Ciphertext string `json:"ciphertext"`
Tag string `json:"tag"`
}
func EncryptGateDeliveryPayload ¶
func EncryptGateDeliveryPayload(delivery GateDeliveryRequest, payload GateDeliveryPayload) (*GateDeliveryEnvelope, error)
func ValidateEncryptedGateDeliveryEnvelope ¶
func ValidateEncryptedGateDeliveryEnvelope(value GateDeliveryEnvelope) (*GateDeliveryEnvelope, error)
type GateDeliveryHelperInput ¶
type GateDeliveryHelperInput struct {
Delivery GateDeliveryRequest `json:"delivery"`
Outputs map[string]string `json:"outputs"`
}
type GateDeliveryPayload ¶
type GateDeliveryPayload struct {
Version int `json:"version"`
Outputs map[string]string `json:"outputs"`
AckToken string `json:"ack_token,omitempty"`
}
func DecryptGateDeliveryEnvelope ¶
func DecryptGateDeliveryEnvelope(privateKey any, envelope GateDeliveryEnvelope) (*GateDeliveryPayload, error)
type GateDeliveryRequest ¶
type GateDeliveryRequest struct {
Version int `json:"version"`
Algorithm string `json:"algorithm"`
KeyID string `json:"key_id"`
PublicKey string `json:"public_key"`
}
func ValidateGateDeliveryRequest ¶
func ValidateGateDeliveryRequest(value GateDeliveryRequest) (*GateDeliveryRequest, error)
type GateEncryptedDeliveryResponse ¶
type GateEncryptedDeliveryResponse struct {
EncryptedDelivery GateDeliveryEnvelope `json:"encrypted_delivery"`
}
func CreateEncryptedDeliveryResponse ¶
func CreateEncryptedDeliveryResponse(input GateDeliveryHelperInput) (*GateEncryptedDeliveryResponse, error)
func CreateGateApprovedWebhookResponse ¶
func CreateGateApprovedWebhookResponse(input GateDeliveryHelperInput) (*GateEncryptedDeliveryResponse, error)
type GateLoginSession ¶
type GateLoginSessionsService ¶
type GateLoginSessionsService struct {
// contains filtered or unexported fields
}
func (*GateLoginSessionsService) Consume ¶
func (s *GateLoginSessionsService) Consume(ctx context.Context, params ConsumeGateLoginSessionParams) (GateDashboardLogin, error)
func (*GateLoginSessionsService) Create ¶
func (s *GateLoginSessionsService) Create(ctx context.Context, params CreateGateLoginSessionParams) (GateLoginSession, error)
type GateManagedService ¶
type GateManagedService struct {
Object string `json:"object"`
ID string `json:"id"`
Status GateServiceStatus `json:"status"`
Discoverable bool `json:"discoverable"`
Name string `json:"name"`
Description string `json:"description"`
Website string `json:"website"`
DashboardLoginURL string `json:"dashboard_login_url,omitempty"`
WebhookEndpointID *string `json:"webhook_endpoint_id"`
EnvVars []GateServiceEnvVar `json:"env_vars"`
DocsURL string `json:"docs_url"`
SDKs []GateServiceSDKInstall `json:"sdks"`
Branding GateServiceBranding `json:"branding"`
Consent GateServiceConsent `json:"consent"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type GateManagedServicesService ¶
type GateManagedServicesService struct {
// contains filtered or unexported fields
}
func (*GateManagedServicesService) Create ¶
func (s *GateManagedServicesService) Create(ctx context.Context, params CreateGateServiceParams) (GateManagedService, error)
func (*GateManagedServicesService) Disable ¶
func (s *GateManagedServicesService) Disable(ctx context.Context, serviceID string) (GateManagedService, error)
func (*GateManagedServicesService) Get ¶
func (s *GateManagedServicesService) Get(ctx context.Context, serviceID string) (GateManagedService, error)
func (*GateManagedServicesService) List ¶
func (s *GateManagedServicesService) List(ctx context.Context) ([]GateManagedService, error)
func (*GateManagedServicesService) Update ¶
func (s *GateManagedServicesService) Update(ctx context.Context, serviceID string, params UpdateGateServiceParams) (GateManagedService, error)
type GateRegistryEntry ¶
type GateRegistryEntry struct {
ID string `json:"id"`
Status GateServiceStatus `json:"status"`
Discoverable bool `json:"discoverable"`
Name string `json:"name"`
Description string `json:"description"`
Website string `json:"website"`
DashboardLoginURL string `json:"dashboard_login_url,omitempty"`
EnvVars []GateServiceEnvVar `json:"env_vars"`
DocsURL string `json:"docs_url"`
SDKs []GateServiceSDKInstall `json:"sdks"`
Branding GateServiceBranding `json:"branding"`
Consent GateServiceConsent `json:"consent"`
}
type GateRegistryService ¶
type GateRegistryService struct {
// contains filtered or unexported fields
}
func (*GateRegistryService) Get ¶
func (s *GateRegistryService) Get(ctx context.Context, serviceID string) (GateRegistryEntry, error)
func (*GateRegistryService) List ¶
func (s *GateRegistryService) List(ctx context.Context) ([]GateRegistryEntry, error)
type GateService ¶
type GateService struct {
Registry *GateRegistryService
Services *GateManagedServicesService
Sessions *GateSessionsService
LoginSessions *GateLoginSessionsService
AgentTokens *GateAgentTokensService
// contains filtered or unexported fields
}
type GateServiceBranding ¶
type GateServiceConsent ¶
type GateServiceEnvVar ¶
type GateServiceSDKInstall ¶
type GateServiceStatus ¶
type GateServiceStatus string
const ( GateServiceStatusActive GateServiceStatus = "active" GateServiceStatusDisabled GateServiceStatus = "disabled" )
type GateSessionCreate ¶
type GateSessionPollData ¶
type GateSessionPollData struct {
Object string `json:"object"`
ID string `json:"id"`
Status string `json:"status"`
ExpiresAt string `json:"expires_at,omitempty"`
GateAccountID string `json:"gate_account_id,omitempty"`
AccountName string `json:"account_name,omitempty"`
DeliveryBundle *GateDeliveryBundle `json:"delivery_bundle,omitempty"`
DocsURL string `json:"docs_url,omitempty"`
}
type GateSessionsService ¶
type GateSessionsService struct {
// contains filtered or unexported fields
}
func (*GateSessionsService) Acknowledge ¶
func (s *GateSessionsService) Acknowledge(ctx context.Context, gateSessionID string, params AcknowledgeGateSessionDeliveryParams) (GateSessionDeliveryAcknowledgement, error)
func (*GateSessionsService) Create ¶
func (s *GateSessionsService) Create(ctx context.Context, params CreateGateSessionParams) (GateSessionCreate, error)
func (*GateSessionsService) Poll ¶
func (s *GateSessionsService) Poll(ctx context.Context, gateSessionID string, pollToken string) (GateSessionPollData, error)
type GeneratedDeliveryKeyPair ¶
type GeneratedDeliveryKeyPair struct {
Delivery GateDeliveryRequest
PrivateKey *ecdh.PrivateKey
}
func CreateDeliveryKeyPair ¶
func CreateDeliveryKeyPair() (*GeneratedDeliveryKeyPair, error)
type IssuedAPIKey ¶
type ListResult ¶
type Manipulation ¶
type Option ¶
type Option func(*clientConfig)
func WithBaseURL ¶
func WithHTTPClient ¶
func WithSecretKey ¶
func WithTimeout ¶
func WithUserAgent ¶
type Organization ¶
type OrganizationsService ¶
type OrganizationsService struct {
APIKeys *APIKeysService
// contains filtered or unexported fields
}
func (*OrganizationsService) Create ¶
func (s *OrganizationsService) Create(ctx context.Context, params CreateOrganizationParams) (Organization, error)
func (*OrganizationsService) Get ¶
func (s *OrganizationsService) Get(ctx context.Context, organizationID string) (Organization, error)
func (*OrganizationsService) Update ¶
func (s *OrganizationsService) Update(ctx context.Context, organizationID string, params UpdateOrganizationParams) (Organization, error)
type RequestContext ¶
type RevokeGateAgentTokenParams ¶
type RevokeGateAgentTokenParams struct {
AgentToken string `json:"agent_token"`
}
type ScoreBreakdown ¶
type SessionAnalysisCoverage ¶
type SessionAttribution ¶
type SessionAttribution struct {
Labels []SessionAttributionLabel `json:"labels"`
Behaviors []SessionAttributionBehavior `json:"behaviors"`
}
type SessionAttributionLabel ¶
type SessionBrowser ¶
type SessionClientTelemetry ¶
type SessionClientTelemetry struct {
Storage SessionRawDeviceStorage `json:"storage"`
Canvas SessionRawDeviceCanvas `json:"canvas"`
Graphics SessionRawDeviceGraphics `json:"graphics"`
Audio SessionRawDeviceAudio `json:"audio"`
Fonts SessionRawDeviceFonts `json:"fonts"`
Media SessionRawDeviceMedia `json:"media"`
}
type SessionConnectionFingerprint ¶
type SessionConnectionFingerprint struct {
JA4 SessionConnectionFingerprintJA4 `json:"ja4"`
HTTP2 SessionConnectionFingerprintHTTP2 `json:"http2"`
UserAgentAlignment *string `json:"user_agent_alignment,omitempty"`
}
type SessionConnectionFingerprintJA4 ¶
type SessionConnectionFingerprintJA4 struct {
Hash *string `json:"hash,omitempty"`
Profile *string `json:"profile,omitempty"`
Family *string `json:"family,omitempty"`
Product *string `json:"product,omitempty"`
Confidence *string `json:"confidence,omitempty"`
Deterministic *bool `json:"deterministic,omitempty"`
}
type SessionDecision ¶
type SessionDetail ¶
type SessionDetail struct {
Object string `json:"object"`
ID string `json:"id"`
CreatedAt *string `json:"created_at,omitempty"`
Decision SessionDecision `json:"decision"`
Highlights []SessionHighlight `json:"highlights"`
Attribution *SessionAttribution `json:"attribution,omitempty"`
WebBotAuth *SessionWebBotAuth `json:"web_bot_auth,omitempty"`
Network SessionNetwork `json:"network"`
RuntimeIntegrity SessionRuntimeIntegrity `json:"runtime_integrity"`
NativeRuntimeIntegrity map[string]any `json:"native_runtime_integrity,omitempty"`
NativeApp map[string]any `json:"native_app,omitempty"`
NativeCarrier map[string]any `json:"native_carrier,omitempty"`
NativeMotionPrint map[string]any `json:"native_motion_print,omitempty"`
DeviceIdentity map[string]any `json:"device_identity,omitempty"`
InstallID *string `json:"install_id,omitempty"`
VisitorFingerprint *SessionDetailVisitorFingerprint `json:"visitor_fingerprint,omitempty"`
ConnectionFingerprint SessionConnectionFingerprint `json:"connection_fingerprint"`
PreviousDecisions []SessionDecision `json:"previous_decisions"`
Request SessionDetailRequest `json:"request"`
Browser SessionBrowser `json:"browser"`
Device SessionDevice `json:"device"`
AnalysisCoverage SessionAnalysisCoverage `json:"analysis_coverage"`
SignalsFired []SessionSignalFired `json:"signals_fired"`
ClientTelemetry SessionClientTelemetry `json:"client_telemetry"`
}
type SessionDetailRequest ¶
type SessionDetailVisitorFingerprint ¶
type SessionDetailVisitorFingerprint struct {
Object string `json:"object"`
ID string `json:"id"`
Confidence *int `json:"confidence,omitempty"`
IdentifiedAt *string `json:"identified_at,omitempty"`
Lifecycle SessionDetailVisitorFingerprintLifecycle `json:"lifecycle"`
}
type SessionDevice ¶
type SessionDevice struct {
FormFactor string `json:"form_factor"`
OperatingSystem SessionDeviceOperatingSystem `json:"operating_system"`
Architecture *string `json:"architecture,omitempty"`
Screen SessionDeviceScreen `json:"screen"`
Locale SessionDeviceLocale `json:"locale"`
Capabilities SessionDeviceCapabilities `json:"capabilities"`
}
type SessionDeviceAvailabilityCapability ¶
type SessionDeviceAvailabilityCapability struct {
Available *bool `json:"available,omitempty"`
}
type SessionDeviceCapabilities ¶
type SessionDeviceCapabilities struct {
Touch SessionDeviceTouchCapabilities `json:"touch"`
Storage SessionDeviceStorageCapabilities `json:"storage"`
WebGPU SessionDeviceAvailabilityCapability `json:"webgpu"`
PlatformAuthenticator SessionDevicePlatformAuthenticatorCapabilities `json:"platform_authenticator"`
MediaDevices SessionDeviceAvailabilityCapability `json:"media_devices"`
SpeechSynthesis SessionDeviceAvailabilityCapability `json:"speech_synthesis"`
}
type SessionDeviceLocale ¶
type SessionDeviceScreen ¶
type SessionHighlight ¶
type SessionHighlight struct {
Key string `json:"key"`
Effect string `json:"effect"`
Importance string `json:"importance"`
Summary string `json:"summary"`
Evidence []SessionHighlightEvidence `json:"evidence,omitempty"`
}
type SessionListParams ¶
type SessionNetwork ¶
type SessionNetwork struct {
IPAddress *string `json:"ip_address,omitempty"`
IPVersion *string `json:"ip_version,omitempty"`
Status string `json:"status"`
Summary *string `json:"summary,omitempty"`
Location *SessionNetworkLocation `json:"location,omitempty"`
Routing SessionNetworkRouting `json:"routing"`
Anonymity SessionNetworkAnonymity `json:"anonymity"`
Reputation SessionNetworkReputation `json:"reputation"`
Evidence SessionNetworkEvidence `json:"evidence"`
EvaluatedAt *string `json:"evaluated_at,omitempty"`
}
type SessionNetworkAnonymity ¶
type SessionNetworkAnonymity struct {
VPN bool `json:"vpn"`
Proxy bool `json:"proxy"`
Tor bool `json:"tor"`
Relay bool `json:"relay"`
Hosting bool `json:"hosting"`
ResidentialProxy bool `json:"residential_proxy"`
CallbackProxy bool `json:"callback_proxy"`
Provider *string `json:"provider,omitempty"`
}
type SessionNetworkEvidence ¶
type SessionNetworkLocation ¶
type SessionNetworkLocation struct {
City *string `json:"city,omitempty"`
Region *string `json:"region,omitempty"`
Country *string `json:"country,omitempty"`
CountryCode *string `json:"country_code,omitempty"`
Latitude *float64 `json:"latitude,omitempty"`
Longitude *float64 `json:"longitude,omitempty"`
Timezone *string `json:"timezone,omitempty"`
PostalCode *string `json:"postal_code,omitempty"`
AccuracyRadiusKm *float64 `json:"accuracy_radius_km,omitempty"`
}
type SessionNetworkRouting ¶
type SessionRawDeviceAudio ¶
type SessionRawDeviceAudio struct {
Hash any `json:"hash"`
SampleRate *float64 `json:"sample_rate,omitempty"`
ChannelCount *int `json:"channel_count,omitempty"`
VoiceCount *int `json:"voice_count,omitempty"`
LocalVoiceCount *int `json:"local_voice_count,omitempty"`
DefaultVoiceLang *string `json:"default_voice_lang,omitempty"`
NoiseDetected *bool `json:"noise_detected,omitempty"`
}
type SessionRawDeviceCanvas ¶
type SessionRawDeviceFonts ¶
type SessionRawDeviceFonts struct {
DetectedCount *int `json:"detected_count,omitempty"`
TestedCount *int `json:"tested_count,omitempty"`
EnumerationHash any `json:"enumeration_hash"`
MetricsHash any `json:"metrics_hash"`
PreferencesHash any `json:"preferences_hash"`
EmojiHash any `json:"emoji_hash"`
}
type SessionRawDeviceGraphics ¶
type SessionRawDeviceGraphics struct {
WebGL SessionRawDeviceGraphicsWebGL `json:"webgl"`
WebGPU SessionRawDeviceGraphicsWebGPU `json:"webgpu"`
}
type SessionRawDeviceGraphicsWebGL ¶
type SessionRawDeviceGraphicsWebGL struct {
Vendor *string `json:"vendor,omitempty"`
Renderer *string `json:"renderer,omitempty"`
Version *string `json:"version,omitempty"`
ShadingLanguageVersion *string `json:"shading_language_version,omitempty"`
ParametersHash any `json:"parameters_hash"`
ExtensionsHash any `json:"extensions_hash"`
ExtensionParametersHash any `json:"extension_parameters_hash"`
ShaderPrecisionHash any `json:"shader_precision_hash"`
}
type SessionRawDeviceGraphicsWebGPU ¶
type SessionRawDeviceGraphicsWebGPU struct {
Available *bool `json:"available,omitempty"`
AdapterVendor *string `json:"adapter_vendor,omitempty"`
AdapterArchitecture *string `json:"adapter_architecture,omitempty"`
FallbackAdapter *bool `json:"fallback_adapter,omitempty"`
FeaturesHash any `json:"features_hash"`
LimitsHash any `json:"limits_hash"`
}
type SessionRawDeviceMedia ¶
type SessionRawDeviceNavigator ¶
type SessionRawDeviceNavigator struct {
}
type SessionRawDeviceStorage ¶
type SessionRawDeviceStorage struct {
Cookies *bool `json:"cookies,omitempty"`
LocalStorage *bool `json:"local_storage,omitempty"`
SessionStorage *bool `json:"session_storage,omitempty"`
IndexedDB *bool `json:"indexed_db,omitempty"`
ServiceWorker *bool `json:"service_worker,omitempty"`
WindowName *bool `json:"window_name,omitempty"`
}
type SessionRuntimeIntegrity ¶
type SessionRuntimeIntegrity struct {
Tampering string `json:"tampering"`
DeveloperTools string `json:"developer_tools"`
Emulation string `json:"emulation"`
Virtualization string `json:"virtualization"`
PrivacyHardening string `json:"privacy_hardening"`
IdentitySpoofing string `json:"identity_spoofing"`
Replay string `json:"replay"`
OutdatedEnvironment string `json:"outdated_environment"`
}
type SessionSignalFired ¶
type SessionSummary ¶
type SessionSummary struct {
Object string `json:"object"`
ID string `json:"id"`
CreatedAt *string `json:"created_at,omitempty"`
LatestDecision Decision `json:"latest_decision"`
VisitorFingerprint *VisitorFingerprintLink `json:"visitor_fingerprint,omitempty"`
}
type SessionWebBotAuth ¶
type SessionsService ¶
type SessionsService struct {
// contains filtered or unexported fields
}
func (*SessionsService) Get ¶
func (s *SessionsService) Get(ctx context.Context, sessionID string) (SessionDetail, error)
func (*SessionsService) Iter ¶
func (s *SessionsService) Iter(ctx context.Context, params SessionListParams, yield func(SessionSummary) error) error
func (*SessionsService) List ¶
func (s *SessionsService) List(ctx context.Context, params SessionListParams) (ListResult[SessionSummary], error)
type TokenVerificationError ¶
func (*TokenVerificationError) Error ¶
func (e *TokenVerificationError) Error() string
func (*TokenVerificationError) Unwrap ¶
func (e *TokenVerificationError) Unwrap() error
type UpdateAPIKeyParams ¶
type UpdateGateServiceParams ¶
type UpdateGateServiceParams struct {
Discoverable *bool `json:"discoverable,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Website string `json:"website,omitempty"`
DashboardLoginURL string `json:"dashboard_login_url,omitempty"`
WebhookEndpointID string `json:"webhook_endpoint_id,omitempty"`
EnvVars []GateServiceEnvVar `json:"env_vars,omitempty"`
DocsURL string `json:"docs_url,omitempty"`
SDKs []GateServiceSDKInstall `json:"sdks,omitempty"`
Branding *GateServiceBrandingInput `json:"branding,omitempty"`
Consent *GateServiceConsent `json:"consent,omitempty"`
}
type VerificationResult ¶
type VerificationResult struct {
OK bool
Data *VerifiedFoilToken
Error error
}
func SafeVerifyFoilToken ¶
func SafeVerifyFoilToken(sealedToken string, secretKey string) VerificationResult
type VerifiedFoilSignal ¶
type VerifiedFoilToken ¶
type VerifiedFoilToken struct {
Object string `json:"object"`
SessionID string `json:"session_id"`
Decision Decision `json:"decision"`
Request RequestContext `json:"request"`
VisitorFingerprint *VisitorFingerprintLink `json:"visitor_fingerprint,omitempty"`
Signals []VerifiedFoilSignal `json:"signals"`
ScoreBreakdown ScoreBreakdown `json:"score_breakdown"`
Attribution Attribution `json:"attribution"`
Embed map[string]any `json:"embed,omitempty"`
Raw map[string]any `json:"raw,omitempty"`
}
func VerifyFoilToken ¶
func VerifyFoilToken(sealedToken string, secretKey string) (*VerifiedFoilToken, error)
type VerifyGateAgentTokenParams ¶
type VerifyGateAgentTokenParams struct {
AgentToken string `json:"agent_token"`
}
type VisitorFingerprintActivity ¶
type VisitorFingerprintActivity struct {
Sessions []VisitorFingerprintSessionSummary `json:"sessions"`
}
type VisitorFingerprintComponents ¶
type VisitorFingerprintComponents struct {
Vector []int `json:"vector"`
}
type VisitorFingerprintDetail ¶
type VisitorFingerprintDetail struct {
VisitorFingerprintSummary
Components VisitorFingerprintComponents `json:"components"`
Activity VisitorFingerprintActivity `json:"activity"`
}
type VisitorFingerprintLink ¶
type VisitorFingerprintSessionSummary ¶
type VisitorFingerprintSessionSummary struct {
SessionID string `json:"session_id"`
Decision Decision `json:"decision"`
Request RequestContext `json:"request"`
ScoreBreakdown ScoreBreakdown `json:"score_breakdown"`
}
type VisitorFingerprintSummary ¶
type VisitorFingerprintSummary struct {
Object string `json:"object"`
ID string `json:"id"`
Lifecycle VisitorFingerprintLifecycle `json:"lifecycle"`
LatestRequest VisitorFingerprintLatestRequest `json:"latest_request"`
Storage VisitorFingerprintStorage `json:"storage"`
Anchors VisitorFingerprintAnchors `json:"anchors"`
}
type WebhookDelivery ¶
type WebhookDelivery struct {
Object string `json:"object"`
ID string `json:"id"`
EventID string `json:"event_id"`
EndpointID string `json:"endpoint_id"`
EventType string `json:"event_type"`
Status string `json:"status"`
Attempts int `json:"attempts"`
ResponseStatus *int `json:"response_status"`
ResponseBody *string `json:"response_body"`
Error *string `json:"error"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type WebhookEndpoint ¶
type WebhookEndpoint struct {
Object string `json:"object"`
ID string `json:"id"`
Name string `json:"name"`
URL string `json:"url"`
Status string `json:"status"`
EventTypes []string `json:"event_types"`
SigningSecret string `json:"signing_secret,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type WebhookEventEnvelope ¶
type WebhookEventEnvelope struct {
ID string `json:"id"`
Object string `json:"object"`
Type string `json:"type"`
Created string `json:"created"`
Data json.RawMessage `json:"data"`
}
func ParseWebhookEvent ¶
func ParseWebhookEvent(rawBody []byte) (*WebhookEventEnvelope, any, error)
func VerifyAndParseWebhookEvent ¶
func VerifyAndParseWebhookEvent(input VerifyGateWebhookSignatureInput) (*WebhookEventEnvelope, any, error)
type WebhookTest ¶
type WebhookTest struct {
Object string `json:"object"`
EventID string `json:"event_id"`
DeliveryIDs []string `json:"delivery_ids"`
LatestDelivery *WebhookDelivery `json:"latest_delivery"`
}
type WebhooksService ¶
type WebhooksService struct {
// contains filtered or unexported fields
}
func (*WebhooksService) CreateEndpoint ¶
func (s *WebhooksService) CreateEndpoint(ctx context.Context, organizationID string, params CreateWebhookEndpointParams) (WebhookEndpoint, error)
func (*WebhooksService) DisableEndpoint ¶
func (s *WebhooksService) DisableEndpoint(ctx context.Context, organizationID string, endpointID string) (WebhookEndpoint, error)
func (*WebhooksService) ListEndpoints ¶
func (s *WebhooksService) ListEndpoints(ctx context.Context, organizationID string) (ListResult[WebhookEndpoint], error)
func (*WebhooksService) ListEvents ¶
func (s *WebhooksService) ListEvents(ctx context.Context, organizationID string, params EventListParams) (ListResult[Event], error)
func (*WebhooksService) RetrieveEvent ¶
func (*WebhooksService) RotateSecret ¶
func (s *WebhooksService) RotateSecret(ctx context.Context, organizationID string, endpointID string) (WebhookEndpoint, error)
func (*WebhooksService) SendTest ¶
func (s *WebhooksService) SendTest(ctx context.Context, organizationID string, endpointID string) (WebhookTest, error)
func (*WebhooksService) UpdateEndpoint ¶
func (s *WebhooksService) UpdateEndpoint(ctx context.Context, organizationID string, endpointID string, params UpdateWebhookEndpointParams) (WebhookEndpoint, error)
Click to show internal directories.
Click to hide internal directories.