Documentation ¶
Index ¶
- Constants
- func UnmarshalEventPayload[M any](ctx context.Context, evt *Event, f func(ctx context.Context, payload M) error) error
- type AppPermissionAddedPayload
- type AppSubscriptionAddedPayload
- type CircleAppDisabledPayload
- type CircleAppEnabledPayload
- type CircleChatMessageSentEmbed
- type CircleChatMessageSentPayload
- type CircleDiscordWebhookConfiguredPayload
- type CircleDiscordWebhookRevokedPayload
- type CircleGroupChangedPayload
- type CircleInvitationSentPayload
- type CircleMemberRoleUpdatedPayload
- type CircleModerationActionContext
- type CircleNewModerationActionPayload
- type CircleReportCreatedPayload
- type CircleReportResolvedPayload
- type CircleUserBannedContext
- type CircleUserBannedPayload
- type ContentDeletion
- type CreateCirclePayload
- type DefaultAppCreatedPayload
- type DeleteCirclePayload
- type Event
- type JoinCirclePayload
- type LeaveCirclePayload
- type LegacyUpdateProfilePayload
- type LikePostPayload
- type MessageSentPayload
- type ModerationActionCategory
- type NewCommentPayload
- type NewPostPayload
- type NewUserPayload
- type PostClassifiedPayload
- type PostSavedPayload
- type PostSharedPayload
- type PostUnremovedPayload
- type RemoveCommentPayload
- type RemovePostPayload
- type RenameCirclePayload
- type SingleContentDeletion
- type SingleContentDeletionComment
- type SingleContentDeletionMessage
- type SingleContentDeletionPost
- type StorageAudioTranscriptPayload
- type StorageImageUploadedPayload
- type StorageVideoUploadedPayload
- type TranscoderImageThumbnailCreatedPayload
- type TranscoderVideoDurationDefinedPayload
- type TranscoderVideoThumbnailCreatedPayload
- type TranscoderVideoWatermarkedCreatedPayload
- type Typed
- type UserBannedContext
- type UserBannedPayload
- type UserBlockedPayload
- type UserFeedGenerationRequestedPayload
- type UserFollowedPayload
- type UserMentionedPayload
- type UserOpenedAppPayload
- type UserReactedToPostPayload
- type UserUnbannedPayload
- type UserUnblockedPayload
- type UserUnfollowedPayload
- type UserUnreactedToPostPayload
- type UserUnverifiedPayload
- type UserUpdatedPayload
- type UserVerifiedPayload
- type ViewPostPayload
- type WordsBannedContext
- type WordsBannedPayload
Constants ¶
const ( TypeNewPost = "NEW_POST" TypeNewView = "NEW_VIEW" TypeNewLike = "NEW_LIKE" TypeRemovePost = "REMOVE_POST" TypeCircleNew = "NEW_CIRCLE" TypeCircleRename = "RENAME_CIRCLE" TypeCircleJoin = "JOIN_CIRCLE" TypeCircleLeave = "LEAVE_CIRCLE" TypeCircleDelete = "DELETE_CIRCLE" CircleGroupChanged = "CIRCLE_GROUP_CHANGED" CircleUserBanned = "CIRCLE_USER_BANNED" CircleNewModerationAction = "CIRCLE_NEW_MODERATION_ACTION" TypeCommentNew = "NEW_COMMENT" TypeCommentRemove = "REMOVE_COMMENT" TypeLegacyUpdateProfile = "LEGACY_UPDATE_PROFILE" TypeUserNew = "NEW_USER" UserUpdated = "USER_UPDATED" UserFollowed = "USER_FOLLOWED" UserUnfollowed = "USER_UNFOLLOWED" UserBlocked = "USER_BLOCKED" UserUnblocked = "USER_UNBLOCKED" UserBanned = "USER_BANNED" UserUnbanned = "USER_UNBANNED" UserVerified = "USER_VERIFIED" UserUnverified = "USER_UNVERIFIED" UserOpenedApp = "USER_OPENED_APP" UserReactedToPost = "USER_REACTED_TO_POST" UserUnreactedToPost = "USER_UNREACTED_TO_POST" CircleInvitationSent = "CIRCLE_INVITATION_SENT" CircleReportResolved = "CIRCLE_REPORT_RESOLVED" CircleMemberRoleUpdated = "CIRCLE_MEMBER_ROLE_UPDATED" CircleReportCreated = "CIRCLE_REPORT_CREATED" CircleDiscordWebhookConfigured = "CIRCLE_DISCORD_WEBHOOK_CONFIGURED" CircleDiscordWebhookRevoked = "CIRCLE_DISCORD_WEBHOOK_REVOKED" CircleAppEnabled = "CIRCLE_APP_ENABLED" CircleAppDisabled = "CIRCLE_APP_DISABLED" PostSaved = "POST_SAVED" UserFeedGenerationRequested = "USER_FEED_GENERATION_REQUESTED" StorageImageUploaded = "STORAGE_IMAGE_UPLOADED" StorageVideoUploaded = "STORAGE_VIDEO_UPLOADED" TranscoderImageThumbnailCreated = "TRANSCODER_IMAGE_THUMBNAIL_CREATED" TranscoderVideoDurationDefined = "TRANSCODER_VIDEO_DURATION_DEFINED" TranscoderVideoThumbnailCreated = "TRANSCODER_VIDEO_THUMBNAIL_CREATED" TranscoderVideoWatermarkedCreated = "TRANSCODER_VIDEO_WATERMARKED_CREATED" PostUnremoved = "POST_UNREMOVED" UserMentioned = "USER_MENTIONED" MessageSent = "MESSAGE_SENT" WordsBanned = "WORDS_BANNED" CircleChatMessageSent = "CIRCLE_CHAT_MESSAGE_SENT" DefaultAppCreated = "DEFAULT_APP_CREATED" AppPermissionAdded = "APP_PERMISSION_ADDED" AppSubscriptionAdded = "APP_SUBSCRIPTION_ADDED" AppSubscriptionEvent = "APP_SUBSCRIPTION_EVENT" AudioTranscriptPayload = "AUDIO_TRANSCRIPT_PAYLOAD" PostClassified = "POST_CLASSIFIED" )
types of events
const ( // ModerationActionCategoryOther default category if no others fit. ModerationActionCategoryOther = iota ModerationActionCategorySpam ModerationActionCategorySexualContent ModerationActionCategoryGraphicContent )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppPermissionAddedPayload ¶ added in v0.6.4
type AppPermissionAddedPayload struct { AppID string `json:"app_id"` UserID string `json:"user_id"` PermissionID string `json:"permission_id"` }
AppPermissionAddedPayload ...
type AppSubscriptionAddedPayload ¶ added in v0.6.4
type AppSubscriptionAddedPayload struct { AppID string `json:"app_id"` UserID string `json:"user_id"` SubscriptionID string `json:"subscription_id"` }
AppSubscriptionAddedPayload ...
type CircleAppDisabledPayload ¶
type CircleAppDisabledPayload struct { CircleID string `json:"circle_id"` AppID string `json:"app_id"` }
CircleAppDisabledPayload ...
type CircleAppEnabledPayload ¶
type CircleAppEnabledPayload struct { CircleID string `json:"circle_id"` AppID string `json:"app_id"` }
CircleAppEnabledPayload ...
type CircleChatMessageSentEmbed ¶
type CircleChatMessageSentEmbed struct { EmbedID string `json:"embed_id"` URL string `json:"url"` Title string `json:"title"` Description string `json:"description"` }
CircleChatMessageSentEmbed ...
type CircleChatMessageSentPayload ¶
type CircleChatMessageSentPayload struct { MessageID string `json:"message_id"` CircleID string `json:"circle_id"` AuthorID string `json:"author_id"` ReplyTo *string `json:"reply_to,omitempty"` Content string `json:"content"` CreatedAt string `json:"created_at"` }
CircleChatMessageSentPayload ...
type CircleDiscordWebhookConfiguredPayload ¶
type CircleDiscordWebhookConfiguredPayload struct {
CircleID string `json:"circle_id"`
}
CircleDiscordWebhookConfiguredPayload ...
type CircleDiscordWebhookRevokedPayload ¶
type CircleDiscordWebhookRevokedPayload struct {
CircleID string `json:"circle_id"`
}
CircleDiscordWebhookRevokedPayload ...
type CircleGroupChangedPayload ¶
type CircleGroupChangedPayload struct { CircleID string `json:"circle_id"` GroupID string `json:"group_id"` }
CircleGroupChangedPayload ...
type CircleInvitationSentPayload ¶
type CircleInvitationSentPayload struct { UserID string `json:"user_id"` InvitedUserID string `json:"invited_user_id"` CircleID string `json:"circle_id"` }
CircleInvitationSentPayload ...
type CircleMemberRoleUpdatedPayload ¶
type CircleMemberRoleUpdatedPayload struct { UserID string `json:"user_id"` MemberUserID string `json:"member_user_id"` CircleID string `json:"circle_id"` Role int64 `json:"role"` }
CircleMemberRoleUpdatedPayload ...
type CircleModerationActionContext ¶
type CircleModerationActionContext struct {
ContentDeletion *ContentDeletion `json:"contentDeletion,omitempty"`
}
CircleModerationActionContext ...
type CircleNewModerationActionPayload ¶
type CircleNewModerationActionPayload struct { ID string `json:"id"` CircleID string `json:"circleID"` ModeratorID string `json:"moderatorID"` CreatedAt string `json:"createdAt"` UserIDToModerate string `json:"userIDToModerate"` Category ModerationActionCategory `json:"category"` Message string `json:"message"` Context CircleModerationActionContext `json:"context"` }
CircleNewModerationActionPayload ...
type CircleReportCreatedPayload ¶
type CircleReportCreatedPayload struct { UserID string `json:"user_id"` CircleID string `json:"circle_id"` AnyID string `json:"any_id"` Type int32 `json:"type"` Comment string `json:"comment"` Reason string `json:"reason"` ContentAuthorID string `json:"content_author_id"` }
CircleReportCreatedPayload ...
type CircleReportResolvedPayload ¶
type CircleReportResolvedPayload struct { UserID string `json:"user_id"` ReportType string `json:"report_type"` ReportedEntityID string `json:"reported_entity_id"` ReportID string `json:"report_id"` FullFill int32 `json:"full_fill"` }
CircleReportResolvedPayload ...
type CircleUserBannedContext ¶
type CircleUserBannedContext struct { PurgePosts bool `json:"purge_posts"` PurgeComments bool `json:"purge_comments"` PurgeMessages bool `json:"purge_messages"` }
CircleUserBannedContext ...
type CircleUserBannedPayload ¶
type CircleUserBannedPayload struct { UserID string `json:"user_id"` CircleID string `json:"circle_id"` BannedByUserID string `json:"banned_by_user_id"` BannedAt string `json:"banned_at"` Context CircleUserBannedContext `json:"context"` }
CircleUserBannedPayload ...
type ContentDeletion ¶
type ContentDeletion struct {
Single *SingleContentDeletion `json:"single,omitempty"`
}
ContentDeletion request to delete content.
Must be one of: SingleContentDeletion.
type CreateCirclePayload ¶
type CreateCirclePayload struct { CircleID string `json:"circle_id"` Name string `json:"name"` DirectorID string `json:"director_id"` GroupID string `json:"group_id"` }
CreateCirclePayload ...
type DefaultAppCreatedPayload ¶ added in v0.6.4
type DefaultAppCreatedPayload struct { AppID string `json:"app_id"` UserID string `json:"user_id"` }
DefaultAppCreatedPayload ...
type DeleteCirclePayload ¶
type DeleteCirclePayload struct { CircleID string `json:"circle_id"` DeletedBy string `json:"deleted_by"` DeletedAt string `json:"deleted_at"` }
DeleteCirclePayload ...
type Event ¶
type Event struct { EvtID string `json:"event_id"` EvtType string `json:"event_type"` Timestamp uint64 `json:"timestamp"` Payload any `json:"data"` }
Event ...
type JoinCirclePayload ¶
type JoinCirclePayload struct { CallerID string `json:"caller_id"` UserID string `json:"user_id"` CircleID string `json:"circle_id"` Role int64 `json:"role"` }
JoinCirclePayload ...
type LeaveCirclePayload ¶
type LeaveCirclePayload struct { CallerID string `json:"caller_id"` UserID string `json:"user_id"` CircleID string `json:"circle_id"` }
LeaveCirclePayload ...
type LegacyUpdateProfilePayload ¶
type LegacyUpdateProfilePayload struct { Username string `json:"username"` Name string `json:"name"` Bio string `json:"bio"` CountryCode string `json:"country_code"` LanguageCodes []string `json:"language_codes"` Age int64 `json:"age"` NotificationsEnabled bool `json:"notification_enabled"` PhoneNumber string `json:"phone_number"` Email string `json:"email"` ProfileImageURL string `json:"profile_image_url"` }
LegacyUpdateProfilePayload ...
type LikePostPayload ¶
type LikePostPayload struct { PostID string `json:"post_id"` UserID string `json:"user_id"` Total int64 `json:"likes_total"` }
LikePostPayload ...
type MessageSentPayload ¶
type MessageSentPayload struct { UserID string `json:"user_id"` ChatID string `json:"chat_id"` Content string `json:"content"` CircleID string `json:"circle_id"` }
MessageSentPayload ...
type ModerationActionCategory ¶
type ModerationActionCategory uint8
ModerationActionCategory moderation category.
type NewCommentPayload ¶
type NewCommentPayload struct { CircleID string `json:"circle_id"` PostID string `json:"post_id"` UserID string `json:"user_id"` CommentID string `json:"comment_id"` Total int64 `json:"comments_total"` }
NewCommentPayload ...
type NewPostPayload ¶
type NewPostPayload struct { PostID string `json:"post_id"` UserID string `json:"user_id"` CircleID string `json:"circle_id"` CreatedAt string `json:"created_at"` Type uint8 `json:"type"` LanguageCode string `json:"language_code"` ContentURL string `json:"content_url"` }
NewPostPayload ...
type NewUserPayload ¶
type NewUserPayload struct { UserID string `json:"user_id"` Username string `json:"username"` Email string `json:"email"` Phone *string `json:"phone"` LanguageCodes []string `json:"language_codes"` AffiliateCodeOwner *string `json:"affiliate_code_owner"` CreatedAt string `json:"created_at"` }
NewUserPayload ...
type PostClassifiedPayload ¶ added in v0.6.9
type PostClassifiedPayload struct { PostID string `json:"post_id"` PostType string `json:"post_type"` ClassificationTags []string `json:"classification_tags"` }
PostClassifiedPayload ...
type PostSavedPayload ¶
type PostSavedPayload struct { UserID string `json:"user_id"` PostID string `json:"post_id"` SavedAt string `json:"saved_at"` }
PostSavedPayload ...
type PostUnremovedPayload ¶
type PostUnremovedPayload struct { PostID string `json:"post_id"` CircleID string `json:"circle_id"` UserID string `json:"user_id"` }
PostUnremovedPayload ...
type RemoveCommentPayload ¶
type RemoveCommentPayload struct { PostID string `json:"post_id"` UserID string `json:"user_id"` CommentID string `json:"comment_id"` Total int64 `json:"comments_total"` }
RemoveCommentPayload ...
type RemovePostPayload ¶
type RemovePostPayload struct { PostID string `json:"post_id"` CircleID string `json:"circle_id"` UserID string `json:"user_id"` }
RemovePostPayload ...
type RenameCirclePayload ¶
RenameCirclePayload ...
type SingleContentDeletion ¶
type SingleContentDeletion struct { Post *SingleContentDeletionPost `json:"post,omitempty"` Comment *SingleContentDeletionComment `json:"comment,omitempty"` Message *SingleContentDeletionMessage `json:"message,omitempty"` }
SingleContentDeletion request to remove the specified content.
Must be one of: SingleContentDeletionPost, SingleContentDeletionComment, SingleContentDeletionMessage.
type SingleContentDeletionComment ¶
type SingleContentDeletionComment struct {
CommentID string `json:"commentID"`
}
SingleContentDeletionComment request to remove the specified comment.
type SingleContentDeletionMessage ¶
type SingleContentDeletionMessage struct {
MessageID string `json:"messageID"`
}
SingleContentDeletionMessage request to remove the specified message.
type SingleContentDeletionPost ¶
type SingleContentDeletionPost struct {
PostID string `json:"postID"`
}
SingleContentDeletionPost request to remove the specified post.
type StorageAudioTranscriptPayload ¶ added in v0.6.1
type StorageAudioTranscriptPayload struct { FileID string `json:"file_id"` OwnerID string `json:"owner_id"` Transcript string `json:"transcript"` }
StorageAudioTranscriptPayload ...
type StorageImageUploadedPayload ¶
type StorageImageUploadedPayload struct { FileID string `json:"file_id"` BucketLocation string `json:"bucket_location"` }
StorageImageUploadedPayload ...
type StorageVideoUploadedPayload ¶
type StorageVideoUploadedPayload struct { FileID string `json:"file_id"` FileOwnerUsername string `json:"file_owner_username"` BucketLocation string `json:"bucket_location"` }
StorageVideoUploadedPayload ...
type TranscoderImageThumbnailCreatedPayload ¶
type TranscoderImageThumbnailCreatedPayload struct { FileID string `json:"file_id"` BucketLocation string `json:"bucket_location"` }
TranscoderImageThumbnailCreatedPayload ...
type TranscoderVideoDurationDefinedPayload ¶
type TranscoderVideoDurationDefinedPayload struct { FileID string `json:"file_id"` DurationMilliseconds int `json:"duration_ms"` }
TranscoderVideoDurationDefinedPayload ...
type TranscoderVideoThumbnailCreatedPayload ¶
type TranscoderVideoThumbnailCreatedPayload struct { FileID string `json:"file_id"` BucketLocation string `json:"bucket_location"` }
TranscoderVideoThumbnailCreatedPayload ...
type TranscoderVideoWatermarkedCreatedPayload ¶
type TranscoderVideoWatermarkedCreatedPayload struct { FileID string `json:"file_id"` BucketLocation string `json:"bucket_location"` }
TranscoderVideoWatermarkedCreatedPayload ...
type UserBannedContext ¶
type UserBannedContext struct { PurgePosts bool `json:"purge_posts"` PurgeComments bool `json:"purge_comments"` PurgeCollections bool `json:"purge_collections"` PurgePublicMessages bool `json:"purge_public_messages"` PurgePrivateMessages bool `json:"purge_private_messages"` }
UserBannedContext ...
type UserBannedPayload ¶
type UserBannedPayload struct { UserID string `json:"user_id"` BannedByUserID string `json:"banned_by_user_id"` BannedAt string `json:"banned_at"` Context UserBannedContext `json:"context"` }
UserBannedPayload ..
type UserBlockedPayload ¶
type UserBlockedPayload struct { UserID string `json:"user_id"` BlockedUserID string `json:"blocked_user_id"` BlockedAt string `json:"blocked_at"` }
UserBlockedPayload ..
type UserFeedGenerationRequestedPayload ¶ added in v0.6.7
type UserFeedGenerationRequestedPayload struct {
UserID string `json:"user_id"`
}
UserFeedGenerationRequestedPayload ...
type UserFollowedPayload ¶
type UserFollowedPayload struct { UserID string `json:"user_id"` FollowedUserID string `json:"followed_user_id"` FollowedAt string `json:"followed_at"` }
UserFollowedPayload ..
type UserMentionedPayload ¶
type UserMentionedPayload struct { UserID string `json:"user_id"` PostID string `json:"post_id"` MentionedUserID string `json:"mentioned_user_id_id"` }
UserMentionedPayload ...
type UserOpenedAppPayload ¶ added in v0.6.11
type UserOpenedAppPayload struct {
UserID string `json:"user_id"`
}
UserOpenedAppPayload ...
type UserReactedToPostPayload ¶
type UserReactedToPostPayload struct { UserID string `json:"user_id"` PostID string `json:"post_id"` Reaction string `json:"reaction"` }
UserReactedToPostPayload ..
type UserUnbannedPayload ¶
type UserUnbannedPayload struct { UserID string `json:"user_id"` UnbannedAt string `json:"unbanned_at"` }
UserUnbannedPayload ..
type UserUnblockedPayload ¶
type UserUnblockedPayload struct { UserID string `json:"user_id"` UnblockedUserID string `json:"unblocked_user_id"` UnblockedAt string `json:"unblocked_at"` }
UserUnblockedPayload ..
type UserUnfollowedPayload ¶
type UserUnfollowedPayload struct { UserID string `json:"user_id"` UnfollowedUserID string `json:"unfollowed_user_id"` UnfollowedAt string `json:"unfollowed_at"` }
UserUnfollowedPayload ..
type UserUnreactedToPostPayload ¶
type UserUnreactedToPostPayload struct { UserID string `json:"user_id"` PostID string `json:"post_id"` Reaction string `json:"reaction"` }
UserUnreactedToPostPayload ..
type UserUnverifiedPayload ¶
type UserUnverifiedPayload struct { UserID string `json:"user_id"` UnverifiedAt string `json:"unverified_at"` }
UserUnverifiedPayload ..
type UserUpdatedPayload ¶
type UserUpdatedPayload struct { UserID string `json:"user_id"` Username *string `json:"username"` Email *string `json:"email"` Phone *string `json:"phone"` LanguageCodes []string `json:"language_codes"` UpdatedAt string `json:"updated_at"` }
UserUpdatedPayload ..
type UserVerifiedPayload ¶
type UserVerifiedPayload struct { UserID string `json:"user_id"` VerifiedAt string `json:"verified_at"` }
UserVerifiedPayload ..
type ViewPostPayload ¶
type ViewPostPayload struct { PostID string `json:"post_id"` UserID string `json:"user_id"` CircleID string `json:"circle_id"` Total int64 `json:"views_total"` }
ViewPostPayload ...
type WordsBannedContext ¶
type WordsBannedContext struct { PurgePosts bool `json:"purge_posts"` PurgeComments bool `json:"purge_comments"` PurgeCollections bool `json:"purge_collections"` PurgePublicMessages bool `json:"purge_public_messages"` PurgePrivateMessages bool `json:"purge_private_messages"` }
WordsBannedContext ...
type WordsBannedPayload ¶
type WordsBannedPayload struct { BlockedByUserID string `json:"blocked_by_user_id"` Words []string `json:"words"` Context WordsBannedContext `json:"context"` }
WordsBannedPayload ...