Documentation
¶
Index ¶
- Variables
- func DecodeData[T any](event Event) (T, error)
- func Dispatch(ctx context.Context, event Event, handlers map[string]Handler, custom Handler) (bool, error)
- func Verify(body []byte, header, secret string, now time.Time, tolerance time.Duration) error
- type ApplicationLifecycleData
- type BillingLifecycleData
- type ControlInvitationData
- type ControlUserIdentityData
- type DelegationCreatedData
- type DelegationExchangedData
- type DelegationRevokedData
- type EntitlementGrantedData
- type EntitlementLifecycleData
- type Event
- type Handler
- type InvitationLifecycleData
- type LocalEntitlementRequestApprovedData
- type LocalEntitlementRequestCreatedData
- type NamedData
- type OAuthConsentRevokedData
- type OrganizationRestoredData
- type OrganizationRetiredData
- type PermissionGrantLifecycleData
- type StorageObjectData
- type StorageProviderData
- type UserCreatedData
- type UserIDData
- type UserStateData
- type UserVerificationData
- type WebhookTestData
- type WorkspaceInvitationAcceptedData
- type WorkspaceInvitationCreatedData
- type WorkspaceOwnerTransferredData
Constants ¶
This section is empty.
Variables ¶
View Source
var PlatformEventVersions = map[string]string{
"organization.created": "1.0", "organization.retired": "1.0", "organization.restored": "1.0",
"application.created": "1.0", "application.retired": "1.0", "application.restored": "1.0",
"authorization.permission_grant.created": "1.0", "authorization.permission_grant.revoked": "1.0",
"control_user.identity_linked": "1.0", "control_user.identity_unlinked": "1.0",
"control_user.invitation_created": "1.0", "control_user.invitation_resent": "1.0",
"control_user.invitation_revoked": "1.0", "control_user.invitation_accepted": "1.0",
"control_auth.policy_updated": "1.0", "control_auth.provider_login_enabled": "1.0", "control_auth.provider_login_disabled": "1.0",
"delegation.created": "1.0", "delegation.exchanged": "1.0", "delegation.revoked": "1.0",
"entitlement.granted": "1.0", "local_entitlement_request.created": "1.0", "local_entitlement_request.approved": "1.0",
"oauth.consent_revoked": "1.0", "platform93.webhook.test": "1.0", "user.created": "1.0",
"storage.object.upload_requested": "1.0", "storage.object.ready": "1.0", "storage.object.deleted": "1.0",
"storage.provider.verified": "1.0", "storage.provider.disabled": "1.0",
"user.email_verified": "1.0", "user.email_unverified": "1.0", "user.organization_verified": "1.0",
"user.organization_unverified": "1.0", "user.email_changed": "1.0", "user.password_reset": "1.0",
"user.pending_deletion": "1.0", "user.anonymized": "1.0", "user.deleted": "1.0",
"user.suspended": "1.0", "user.restored": "1.0", "workspace.invitation_created": "1.0",
"workspace.invitation_accepted": "1.0", "workspace.owner_transferred": "1.0",
"application_invitation.created": "1.0", "application_invitation.resent": "1.0", "application_invitation.revoked": "1.0",
"application_invitation.accepted": "1.0", "application_invitation.expired": "1.0", "user.updated": "1.0",
"workspace.created": "1.0", "workspace.updated": "1.0", "workspace.archived": "1.0", "workspace.member_added": "1.0",
"workspace.member_updated": "1.0", "workspace.member_removed": "1.0", "entitlement.adjusted": "1.0",
"entitlement.revoked": "1.0", "entitlement.restored": "1.0", "entitlement.expired": "1.0", "entitlement.effective_changed": "1.0",
"billing.subscription.updated": "1.0", "billing.invoice.updated": "1.0", "billing.payment.updated": "1.0",
"billing.refund.updated": "1.0", "billing.dispute.updated": "1.0",
}
Functions ¶
func DecodeData ¶
Types ¶
type BillingLifecycleData ¶
type BillingLifecycleData struct {
SubscriptionID string `json:"subscription_id,omitempty"`
InvoiceID string `json:"invoice_id,omitempty"`
PaymentID string `json:"payment_id,omitempty"`
RefundID string `json:"refund_id,omitempty"`
DisputeID string `json:"dispute_id,omitempty"`
Status string `json:"status"`
SubjectType string `json:"subject_type,omitempty"`
SubjectID string `json:"subject_id,omitempty"`
ExternalReference *string `json:"external_reference"`
}
type ControlInvitationData ¶
type ControlInvitationData struct {
InvitationID string `json:"invitation_id"`
OrganizationID *string `json:"organization_id,omitempty"`
ControlUserID *string `json:"control_user_id,omitempty"`
Role string `json:"role"`
OnboardingMethod string `json:"onboarding_method"`
Status string `json:"status"`
}
type ControlUserIdentityData ¶
type DelegationCreatedData ¶
type DelegationExchangedData ¶
type DelegationRevokedData ¶
type DelegationRevokedData struct {
DelegationID string `json:"delegation_id"`
}
type EntitlementGrantedData ¶
type EntitlementLifecycleData ¶
type EntitlementLifecycleData struct {
GrantID string `json:"grant_id"`
Status string `json:"status,omitempty"`
SubjectType string `json:"subject_type,omitempty"`
SubjectID string `json:"subject_id,omitempty"`
ExternalReference *string `json:"external_reference,omitempty"`
ExpiresAt *string `json:"expires_at,omitempty"`
Reason string `json:"reason,omitempty"`
}
type Event ¶
type Event struct {
SpecVersion string `json:"specversion"`
ID string `json:"id"`
Source string `json:"source"`
Type string `json:"type"`
ContractSource string `json:"contract_source"`
Time time.Time `json:"time"`
ApplicationID string `json:"application_id"`
SchemaVersion string `json:"schema_version"`
Subject *string `json:"subject"`
Actor json.RawMessage `json:"actor"`
CorrelationID *string `json:"correlation_id"`
CausationID *string `json:"causation_id"`
Data json.RawMessage `json:"data"`
}
func VerifyAndDecode ¶
func (Event) IsPlatform ¶
func (Event) SupportsKnownVersion ¶
type InvitationLifecycleData ¶
type OAuthConsentRevokedData ¶
type OrganizationRestoredData ¶
type OrganizationRestoredData struct {
DescendantsRestored bool `json:"descendants_restored"`
}
type OrganizationRetiredData ¶
type OrganizationRetiredData struct {
ApplicationCount int `json:"application_count"`
}
type StorageObjectData ¶
type StorageProviderData ¶
type UserCreatedData ¶
type UserIDData ¶
type UserIDData struct {
UserID string `json:"user_id"`
}
type UserStateData ¶
type UserVerificationData ¶
type WebhookTestData ¶
Click to show internal directories.
Click to hide internal directories.