Documentation
¶
Index ¶
- Constants
- type AddFilterKeywordEvent
- type BlockEvent
- type BookmarkEvent
- type BookmarkItem
- type ChallengeEvent
- type ChallengeResponse
- type ChallengeSample
- type ChallengeSolution
- type ChatCreatedResponse
- type ChatMessageResponse
- type ChatMessagesResponse
- type ChatsResponse
- type CopyBuyerResponse
- type DeleteChatEvent
- type DeleteDeviceEvent
- type DeleteFilterEvent
- type DeleteFilterKeywordEvent
- type DeleteMessageEvent
- type DeleteTweetEvent
- type DeviceInfo
- type EditTweetEvent
- type EditTweetResponse
- type ErrorEvent
- type FollowRequestActionEvent
- type FollowersResponse
- type FollowingsResponse
- type GetAllChatsEvent
- type GetAllMessagesEvent
- type GetAllTweetsEvent
- type GetAllUsersEvent
- type GetBlocksEvent
- type GetBlocksResponse
- type GetBookmarksEvent
- type GetBookmarksResponse
- type GetChatEvent
- type GetChatResponse
- type GetCopyBuyerEvent
- type GetDevicesResponse
- type GetFilterEvent
- type GetFilterResponse
- type GetFiltersEvent
- type GetFiltersResponse
- type GetFollowRequestsEvent
- type GetFollowRequestsResponse
- type GetFollowersEvent
- type GetFollowingsEvent
- type GetGatewaySettingsEvent
- type GetGatewaySettingsResponse
- type GetImageEvent
- type GetImageResponse
- type GetIsFollowerEvent
- type GetIsFollowingEvent
- type GetMessageEvent
- type GetMutesEvent
- type GetMutesResponse
- type GetNotificationEvent
- type GetNotificationResponse
- type GetNotificationSettingsEvent
- type GetNotificationSettingsResponse
- type GetNotificationsEvent
- type GetNotificationsResponse
- type GetOrderQuoteEvent
- type GetPollEvent
- type GetRatingEvent
- type GetRatingResponse
- type GetReTweetsCountEvent
- type GetReactionsCountEvent
- type GetReactionsEvent
- type GetReactionsResponse
- type GetReactorsResponse
- type GetRetweetersResponse
- type GetSponsoredSettingsEvent
- type GetSponsoredSettingsResponse
- type GetTimelineEvent
- type GetTweetEvent
- type GetTweetReactorsEvent
- type GetTweetRetweetersEvent
- type GetTweetStatsEvent
- type GetUserEvent
- type GetVideoEvent
- type GetVideoResponse
- type IDsResponse
- type ImportTweetEvent
- type ImportTwitterArchiveResponse
- type IsFollowerResponse
- type IsFollowingResponse
- type LoginEvent
- type LoginResponse
- type LogoutEvent
- type MarkNotificationReadEvent
- type Message
- type MessageBody
- type ModerationEvent
- type ModerationVerdictEvent
- type MuteEvent
- type NewChatEvent
- type NewFilterEvent
- type NewFollowEvent
- type NewMessageEvent
- type NewMessageResponse
- type NewOrderEvent
- type NewRetweetEvent
- type NewTweetEvent
- type NewUnfollowEvent
- type NewUserEvent
- type OrderQuoteResponse
- type OrderQuoteStep
- type OrderResponse
- type Owner
- type PinTweetEvent
- type PollResultsResponse
- type PollVoteEvent
- type ReTweetsCountResponse
- type ReactionEvent
- type ReactionsCountResponse
- type ReportEvent
- type ResponseError
- type SearchUsersEvent
- type SearchUsersResponse
- type SubscribeUserEvent
- type TweetStatsResponse
- type TweetsResponse
- type UnblockEvent
- type UnbookmarkEvent
- type UnmuteEvent
- type UnpinTweetEvent
- type UnreactionEvent
- type UnretweetEvent
- type UnsubscribeUserEvent
- type UpdateEvent
- type UpdateFilterEvent
- type UpdateFilterKeywordEvent
- type UpdateGatewaySettingsEvent
- type UpdateNotificationSettingsEvent
- type UpdateResponse
- type UpdateSponsoredSettingsEvent
- type UploadImageEvent
- type UploadImageResponse
- type UploadVideoEvent
- type UploadVideoResponse
- type UserStatusResponse
- type UsersResponse
- type ValidationEvent
- type ValidationResult
- type ValidationResultEvent
- type VerifyOrderEvent
- type ViewEvent
- type ViewsCountResponse
- type WalletAddressEvent
- type WalletAddressResponse
- type WalletContact
- type WalletContactsEvent
- type WalletContactsResponse
- type WalletEvent
- type WalletHistoryItem
- type WalletHistoryResponse
- type WalletKeyResponse
- type WalletOwnAddressResponse
- type WalletResponse
- type WalletSendEvent
- type WalletSendResponse
- type WalletStakeEvent
- type WalletStakeResponse
- type WalletUnstaking
Constants ¶
const ( // Accepted is the verbatim JSON body the middleware writes when a // handler signals plain success. Plain string (not a named type) so // the middleware's response type switch hits the `case string` arm // and writes the bytes as-is; with a named type it would fall through // to the JSON encoder and be re-emitted as a quoted string literal. Accepted string = `{"code":0,"message":"Accepted"}` InternalRoutePrefix string = "/internal" EndCursor string = "end" RateLimitErrorCode int = 5001 )
const ( // admin PRIVATE_POST_PAIR = "/private/post/admin/pair/0.0.0" PRIVATE_GET_DEVICES = "/private/get/admin/devices/0.0.0" PRIVATE_DELETE_DEVICE = "/private/delete/admin/device/0.0.0" PUBLIC_POST_NODE_CHALLENGE = "/public/post/admin/challenge/0.0.0" PRIVATE_GET_STATS = "/private/get/admin/stats/0.0.0" PRIVATE_GET_RATING = "/private/get/admin/rating/0.0.0" PUBLIC_GET_RATING = "/public/get/admin/rating/0.0.0" // moderation PUBLIC_POST_MODERATION_RESULT = "/public/post/moderate/result/0.0.0" PUBLIC_POST_REPORT = "/public/post/report/0.0.0" // sponsored PRIVATE_POST_SPONSORED_TWEET = "/private/post/sponsored/tweet/0.0.0" PUBLIC_GET_SPONSORED_TWEET = "/public/get/sponsored/tweet/0.0.0" PRIVATE_POST_SPONSORED_ORDER = "/private/post/sponsored/order/0.0.0" PRIVATE_GET_SPONSORED_QUOTE = "/private/get/sponsored/quote/0.0.0" PUBLIC_POST_SPONSORED_ORDER = "/public/post/sponsored/order/0.0.0" PRIVATE_GET_SPONSORED_BUYER = "/private/get/sponsored/buyer/0.0.0" PUBLIC_GET_SPONSORED_IMAGE = "/public/get/sponsored/image/0.0.0" PUBLIC_GET_SPONSORED_VIDEO = "/public/get/sponsored/video/0.0.0" // application PRIVATE_DELETE_CHAT = "/private/delete/chat/0.0.0" PRIVATE_DELETE_MESSAGE = "/private/delete/message/0.0.0" PRIVATE_DELETE_TWEET = "/private/delete/tweet/0.0.0" PRIVATE_GET_CHAT = "/private/get/chat/0.0.0" PRIVATE_GET_CHATS = "/private/get/chats/0.0.0" PRIVATE_GET_NOTIFICATION = "/private/get/notification/0.0.0" PRIVATE_GET_NOTIFICATIONS = "/private/get/notifications/0.0.0" PRIVATE_GET_PUSHES = "/private/get/pushes/0.0.0" PRIVATE_POST_NOTIFICATION_READ = "/private/post/notification/read/0.0.0" PRIVATE_POST_NOTIFICATIONS_READ = "/private/post/notifications/read/0.0.0" PRIVATE_GET_SETTINGS_NOTIFICATION = "/private/get/settings/notification/0.0.0" PRIVATE_POST_SETTINGS_NOTIFICATION = "/private/post/settings/notification/0.0.0" PRIVATE_GET_SETTINGS_GATEWAY = "/private/get/settings/gateway/0.0.0" PRIVATE_POST_SETTINGS_GATEWAY = "/private/post/settings/gateway/0.0.0" PRIVATE_GET_SETTINGS_RATELIMIT = "/private/get/settings/ratelimit/0.0.0" PRIVATE_POST_SETTINGS_RATELIMIT = "/private/post/settings/ratelimit/0.0.0" PRIVATE_GET_SETTINGS_SPONSORED = "/private/get/settings/sponsored/0.0.0" PRIVATE_POST_SETTINGS_SPONSORED = "/private/post/settings/sponsored/0.0.0" PRIVATE_GET_MESSAGE = "/private/get/message/0.0.0" PRIVATE_GET_MESSAGES = "/private/get/messages/0.0.0" PRIVATE_GET_TIMELINE = "/private/get/timeline/0.0.0" PRIVATE_POST_LOGIN = "/private/post/login/0.0.0" PRIVATE_POST_LOGOUT = "/private/post/logout/0.0.0" PRIVATE_GET_UPDATE = "/private/get/update/0.0.0" PRIVATE_POST_UPDATE = "/private/post/update/0.0.0" PRIVATE_POST_TWEET = "/private/post/tweet/0.0.0" PRIVATE_GET_WALLET = "/private/get/wallet/0.0.0" PRIVATE_GET_WALLET_ADDRESS = "/private/get/wallet/address/0.0.0" PRIVATE_GET_WALLET_CONTACTS = "/private/get/wallet/contacts/0.0.0" PRIVATE_GET_WALLET_HISTORY = "/private/get/wallet/history/0.0.0" PRIVATE_GET_WALLET_KEY = "/private/get/wallet/key/0.0.0" PRIVATE_POST_WALLET_SEND = "/private/post/wallet/send/0.0.0" PRIVATE_POST_WALLET_STAKE = "/private/post/wallet/stake/0.0.0" PRIVATE_POST_WALLET_UNSTAKE = "/private/post/wallet/unstake/0.0.0" PRIVATE_POST_WALLET_WITHDRAW = "/private/post/wallet/withdraw/0.0.0" PUBLIC_POST_TIMELINE = "/public/post/timeline/0.0.0" PUBLIC_DELETE_TIMELINE = "/public/delete/timeline/0.0.0" PUBLIC_POST_REPLY = "/public/post/reply/0.0.0" PRIVATE_POST_IMPORT_TWITTER_TWEET = "/private/post/import/twitter/tweet/0.0.0" PRIVATE_POST_USER = "/private/post/user/0.0.0" PRIVATE_GET_USER_STATUS = "/private/get/user/status/0.0.0" PUBLIC_GET_FOLLOWINGS = "/public/get/followings/0.0.0" PUBLIC_GET_WALLET_ADDRESS = "/public/get/wallet/address/0.0.0" PUBLIC_GET_FOLLOWERS = "/public/get/followers/0.0.0" PUBLIC_GET_INFO = "/public/get/info/0.0.0" PUBLIC_GET_TWEET = "/public/get/tweet/0.0.0" PUBLIC_GET_TWEET_STATS = "/public/get/tweetstats/0.0.0" PUBLIC_GET_TWEETS = "/public/get/tweets/0.0.0" PUBLIC_GET_USER = "/public/get/user/0.0.0" PUBLIC_GET_USERS = "/public/get/users/0.0.0" PUBLIC_GET_WHOTOFOLLOW = "/public/get/whotofollow/0.0.0" PUBLIC_POST_CHAT = "/public/post/chat/0.0.0" PUBLIC_POST_FOLLOW = "/public/post/follow/0.0.0" PUBLIC_POST_REACT = "/public/post/react/0.0.0" PUBLIC_POST_MESSAGE = "/public/post/message/0.0.0" PUBLIC_POST_RETWEET = "/public/post/retweet/0.0.0" PUBLIC_POST_IS_FOLLOWING = "/public/post/isfollowing/0.0.0" PUBLIC_POST_IS_FOLLOWER = "/public/post/isfollower/0.0.0" PUBLIC_POST_UNFOLLOW = "/public/post/unfollow/0.0.0" PUBLIC_POST_UNREACT = "/public/post/unreact/0.0.0" PUBLIC_POST_UNRETWEET = "/public/post/unretweet/0.0.0" PUBLIC_POST_VIEW = "/public/post/view/0.0.0" PRIVATE_POST_UPLOAD_IMAGE = "/private/post/image/0.0.0" PUBLIC_GET_IMAGE = "/public/get/image/0.0.0" PRIVATE_POST_UPLOAD_VIDEO = "/private/post/video/0.0.0" PUBLIC_GET_VIDEO = "/public/get/video/0.0.0" PRIVATE_POST_UPLOAD_CHAT_IMAGE = "/private/post/chat/image/0.0.0" PUBLIC_GET_CHAT_IMAGE = "/public/get/chat/image/0.0.0" PRIVATE_POST_UPLOAD_CHAT_VIDEO = "/private/post/chat/video/0.0.0" PUBLIC_GET_CHAT_VIDEO = "/public/get/chat/video/0.0.0" PRIVATE_POST_BOOKMARK = "/private/post/bookmark/0.0.0" PRIVATE_POST_UNBOOKMARK = "/private/post/unbookmark/0.0.0" PRIVATE_GET_BOOKMARKS = "/private/get/bookmarks/0.0.0" PUBLIC_POST_PIN = "/public/post/pin/0.0.0" PUBLIC_POST_UNPIN = "/public/post/unpin/0.0.0" PRIVATE_POST_SETTINGS_BLOCK = "/private/post/settings/block/0.0.0" PRIVATE_POST_SETTINGS_UNBLOCK = "/private/post/settings/unblock/0.0.0" PRIVATE_GET_SETTINGS_BLOCKS = "/private/get/settings/blocks/0.0.0" PRIVATE_POST_SETTINGS_MUTE = "/private/post/settings/mute/0.0.0" PRIVATE_POST_SETTINGS_UNMUTE = "/private/post/settings/unmute/0.0.0" PRIVATE_GET_SETTINGS_MUTES = "/private/get/settings/mutes/0.0.0" PUBLIC_GET_TWEET_REACTORS = "/public/get/tweet/reactors/0.0.0" PUBLIC_GET_TWEET_RETWEETERS = "/public/get/tweet/retweeters/0.0.0" PRIVATE_GET_REACTIONS = "/private/get/reactions/0.0.0" PUBLIC_POST_POLL_VOTE = "/public/post/poll/vote/0.0.0" PUBLIC_GET_POLL = "/public/get/poll/0.0.0" PRIVATE_POST_SUBSCRIBE_USER = "/private/post/subscribe/user/0.0.0" PRIVATE_POST_UNSUBSCRIBE_USER = "/private/post/unsubscribe/user/0.0.0" PUBLIC_GET_USERS_SEARCH = "/public/get/users/search/0.0.0" PRIVATE_POST_TWEET_EDIT = "/private/post/tweet/edit/0.0.0" PRIVATE_GET_FOLLOW_REQUESTS = "/private/get/follow/requests/0.0.0" PRIVATE_POST_FOLLOW_REQUEST_AUTHORIZE = "/private/post/follow/request/authorize/0.0.0" PRIVATE_POST_FOLLOW_REQUEST_REJECT = "/private/post/follow/request/reject/0.0.0" PRIVATE_GET_SETTINGS_FILTER = "/private/get/settings/filter/0.0.0" PRIVATE_GET_SETTINGS_FILTERS = "/private/get/settings/filters/0.0.0" PRIVATE_POST_SETTINGS_FILTER = "/private/post/settings/filter/0.0.0" PRIVATE_POST_SETTINGS_FILTER_UPDATE = "/private/post/settings/filter/update/0.0.0" PRIVATE_DELETE_SETTINGS_FILTER = "/private/delete/settings/filter/0.0.0" PRIVATE_POST_SETTINGS_FILTER_KEYWORD = "/private/post/settings/filter/keyword/0.0.0" PRIVATE_POST_SETTINGS_FILTER_KEYWORD_UPDATE = "/private/post/settings/filter/keyword/update/0.0.0" PRIVATE_DELETE_SETTINGS_FILTER_KEYWORD = "/private/delete/settings/filter/keyword/0.0.0" )
const ErrVerdictSignatureInvalid warpnet.WarpError = "moderation verdict signature invalid"
const ModerationVotesTopic = "/warpnet/moderation/votes/1.0.0"
const ReportsTopic = "/warpnet/reports/1.0.0"
ReportsTopic is the global gossip topic that carries Report events from members to moderators. Single source of truth: both cmd/node/member/pubsub and cmd/node/moderator/pubsub must use this constant so they cannot drift.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddFilterKeywordEvent ¶ added in v0.7.26
type AddFilterKeywordEvent struct {
UserId domain.ID `json:"user_id"`
FilterId domain.ID `json:"filter_id"`
Keyword string `json:"keyword"`
WholeWord bool `json:"whole_word"`
}
AddFilterKeywordEvent defines model for AddFilterKeywordEvent.
type BlockEvent ¶ added in v0.7.26
type BlockEvent struct {
BlockerId domain.ID `json:"blocker_id"`
BlockeeId domain.ID `json:"blockee_id"`
}
BlockEvent defines model for BlockEvent.
type BookmarkEvent ¶ added in v0.7.26
type BookmarkEvent struct {
UserId domain.ID `json:"user_id"`
TweetId domain.ID `json:"tweet_id"`
OwnerUserId domain.ID `json:"owner_user_id"`
}
BookmarkEvent defines model for BookmarkEvent.
type BookmarkItem ¶ added in v0.7.26
type BookmarkItem struct {
UserId domain.ID `json:"user_id"`
TweetId domain.ID `json:"tweet_id"`
OwnerUserId domain.ID `json:"owner_user_id"`
CreatedAt time.Time `json:"created_at"`
}
BookmarkItem mirrors domain.Bookmark on the wire.
type ChallengeEvent ¶ added in v0.5.2
type ChallengeEvent struct {
Coordinates []ChallengeSample `json:"samples"`
}
type ChallengeResponse ¶ added in v0.5.2
type ChallengeResponse struct {
Solutions []ChallengeSolution `json:"solutions"`
}
type ChallengeSample ¶ added in v0.5.129
type ChallengeSolution ¶ added in v0.5.129
type ChatCreatedResponse ¶
ChatCreatedResponse defines model for ChatCreatedResponse.
type ChatMessageResponse ¶
type ChatMessageResponse = domain.ChatMessage
ChatMessageResponse defines model for ChatMessageResponse.
type ChatMessagesResponse ¶
type ChatMessagesResponse struct {
ChatId domain.ID `json:"chat_id"`
Cursor string `json:"cursor"`
Messages []domain.ChatMessage `json:"messages"`
}
ChatMessagesResponse defines model for ChatMessagesResponse.
type ChatsResponse ¶
type ChatsResponse struct {
Chats []domain.Chat `json:"chats"`
Cursor string `json:"cursor"`
UserId domain.ID `json:"user_id"`
}
ChatsResponse defines model for ChatsResponse.
type CopyBuyerResponse ¶ added in v0.8.77
type CopyBuyerResponse struct {
TweetId domain.ID `json:"tweet_id"`
BuyerId domain.ID `json:"buyer_id"`
OrderId string `json:"order_id"`
TxId string `json:"tx_id"`
SoldAt time.Time `json:"sold_at"`
DailyOrdersCount int `json:"daily_orders_count"`
IsPixelMatch bool `json:"is_pixel_match"`
PixelScore float64 `json:"pixel_score"`
}
CopyBuyerResponse defines model for CopyBuyerResponse.
type DeleteChatEvent ¶
DeleteChatEvent defines model for DeleteChatEvent.
type DeleteDeviceEvent ¶ added in v0.8.77
DeleteDeviceEvent defines model for DeleteDeviceEvent.
type DeleteFilterEvent ¶ added in v0.7.26
type DeleteFilterEvent struct {
UserId domain.ID `json:"user_id"`
FilterId domain.ID `json:"filter_id"`
}
DeleteFilterEvent defines model for DeleteFilterEvent.
type DeleteFilterKeywordEvent ¶ added in v0.7.26
type DeleteFilterKeywordEvent struct {
UserId domain.ID `json:"user_id"`
KeywordId domain.ID `json:"keyword_id"`
}
DeleteFilterKeywordEvent defines model for DeleteFilterKeywordEvent.
type DeleteMessageEvent ¶
type DeleteMessageEvent = GetMessageEvent
DeleteMessageEvent defines model for DeleteMessageEvent.
type DeleteTweetEvent ¶
type DeleteTweetEvent = GetTweetEvent
DeleteTweetEvent defines model for DeleteTweetEvent.
type DeviceInfo ¶ added in v0.8.77
type DeviceInfo struct {
NodeId string `json:"node_id"`
Platform string `json:"platform"`
CreatedAt time.Time `json:"created_at"`
LastActive time.Time `json:"last_active"`
}
DeviceInfo is the wire-safe view of a paired device for the Settings screen: no pairing token, so an already-paired device reading its sibling list cannot learn another device's credential.
type EditTweetEvent ¶ added in v0.7.26
type EditTweetEvent struct {
TweetId domain.ID `json:"tweet_id"`
UserId domain.ID `json:"user_id"`
Text string `json:"text"`
}
EditTweetEvent defines model for EditTweetEvent.
type EditTweetResponse ¶ added in v0.7.26
EditTweetResponse defines model for EditTweetResponse.
type ErrorEvent ¶
ErrorEvent defines model for ErrorEvent.
type FollowRequestActionEvent ¶ added in v0.7.26
type FollowRequestActionEvent struct {
UserId domain.ID `json:"user_id"`
FollowerId domain.ID `json:"follower_id"`
}
FollowRequestActionEvent defines model for FollowRequestActionEvent. Used for both authorize and reject — the verb is in the path.
type FollowersResponse ¶
type FollowingsResponse ¶ added in v0.5.83
type FollowingsResponse struct {
Cursor string `json:"cursor"`
Followings []domain.ID `json:"followings"`
FollowerId domain.ID `json:"follower_id"`
}
FollowingsResponse defines model for FollowingsResponse.
type GetAllChatsEvent ¶
type GetAllChatsEvent struct {
Cursor *string `json:"cursor,omitempty"`
Limit *uint64 `json:"limit,omitempty"`
UserId domain.ID `json:"user_id"`
}
GetAllChatsEvent defines model for GetAllChatsEvent.
type GetAllMessagesEvent ¶
type GetAllMessagesEvent struct {
OwnerId domain.ID `json:"owner_id"`
ChatId domain.ID `json:"chat_id"`
Cursor *string `json:"cursor,omitempty"`
Limit *uint64 `json:"limit,omitempty"`
}
GetAllMessagesEvent defines model for GetAllMessagesEvent.
type GetAllTweetsEvent ¶
type GetAllTweetsEvent struct {
Cursor *string `json:"cursor,omitempty"`
Limit *uint64 `json:"limit,omitempty"`
UserId domain.ID `json:"user_id"`
RootId domain.ID `json:"root_id,omitempty"`
ParentId domain.ID `json:"parent_id,omitempty"`
RootUserId domain.ID `json:"root_user_id,omitempty"`
}
GetAllTweetsEvent defines model for GetAllTweetsEvent.
Two shapes share this event, dispatched on RootId:
- timeline/profile: UserId set, RootId empty — returns the user's tweets.
- thread replies: RootId set — returns the replies (tweets with a parent) under ParentId within that thread; empty ParentId means the replies hanging directly off RootId. RootUserId is the root tweet author, used to forward the request to their home node when the thread isn't local.
type GetAllUsersEvent ¶
type GetAllUsersEvent struct {
Cursor *string `json:"cursor,omitempty"`
Limit *uint64 `json:"limit,omitempty"`
// UserId default owner
UserId domain.ID `json:"user_id"`
}
GetAllUsersEvent defines model for GetAllUsersEvent.
type GetBlocksEvent ¶ added in v0.7.26
type GetBlocksEvent struct {
UserId domain.ID `json:"user_id"`
Cursor *string `json:"cursor,omitempty"`
Limit *uint64 `json:"limit,omitempty"`
}
GetBlocksEvent defines model for GetBlocksEvent.
type GetBlocksResponse ¶ added in v0.7.26
GetBlocksResponse defines model for GetBlocksResponse.
type GetBookmarksEvent ¶ added in v0.7.26
type GetBookmarksEvent struct {
UserId domain.ID `json:"user_id"`
Cursor *string `json:"cursor,omitempty"`
Limit *uint64 `json:"limit,omitempty"`
}
GetBookmarksEvent defines model for GetBookmarksEvent.
type GetBookmarksResponse ¶ added in v0.7.26
type GetBookmarksResponse struct {
Items []BookmarkItem `json:"items"`
Cursor string `json:"cursor"`
}
GetBookmarksResponse defines model for GetBookmarksResponse.
type GetChatEvent ¶
GetChatEvent defines model for GetChatEvent.
type GetChatResponse ¶
type GetCopyBuyerEvent ¶ added in v0.8.77
type GetCopyBuyerEvent struct {
File string `json:"file"`
TweetId string `json:"tweet_id,omitempty"`
}
GetCopyBuyerEvent defines model for GetCopyBuyerEvent.
type GetDevicesResponse ¶ added in v0.8.77
type GetDevicesResponse struct {
Devices []DeviceInfo `json:"devices"`
}
GetDevicesResponse defines model for GetDevicesResponse.
type GetFilterEvent ¶ added in v0.7.26
type GetFilterEvent struct {
UserId domain.ID `json:"user_id"`
FilterId domain.ID `json:"filter_id"`
}
GetFilterEvent defines model for GetFilterEvent.
type GetFilterResponse ¶ added in v0.7.26
GetFilterResponse defines model for GetFilterResponse.
type GetFiltersEvent ¶ added in v0.7.26
type GetFiltersEvent struct {
UserId domain.ID `json:"user_id"`
Cursor *string `json:"cursor,omitempty"`
Limit *uint64 `json:"limit,omitempty"`
}
GetFiltersEvent defines model for GetFiltersEvent.
type GetFiltersResponse ¶ added in v0.7.26
type GetFiltersResponse struct {
Filters []domain.Filter `json:"filters"`
Cursor string `json:"cursor"`
}
GetFiltersResponse defines model for GetFiltersResponse.
type GetFollowRequestsEvent ¶ added in v0.7.26
type GetFollowRequestsEvent struct {
UserId domain.ID `json:"user_id"`
Cursor *string `json:"cursor,omitempty"`
Limit *uint64 `json:"limit,omitempty"`
}
GetFollowRequestsEvent defines model for GetFollowRequestsEvent.
type GetFollowRequestsResponse ¶ added in v0.7.26
type GetFollowRequestsResponse struct {
FollowerIds []domain.ID `json:"follower_ids"`
Cursor string `json:"cursor"`
}
GetFollowRequestsResponse defines model for GetFollowRequestsResponse.
type GetFollowersEvent ¶
type GetFollowersEvent struct {
Cursor *string `json:"cursor,omitempty"`
Limit *uint64 `json:"limit,omitempty"`
UserId domain.ID `json:"user_id"`
}
GetFollowersEvent defines model for GetFollowersEvent.
type GetFollowingsEvent ¶ added in v0.5.83
type GetFollowingsEvent = GetFollowersEvent
GetFollowingsEvent defines model for GetFollowingsEvent.
type GetGatewaySettingsEvent ¶ added in v0.8.77
type GetGatewaySettingsEvent struct{}
GetGatewaySettingsEvent defines model for GetGatewaySettingsEvent.
type GetGatewaySettingsResponse ¶ added in v0.8.77
type GetGatewaySettingsResponse = domain.GatewaySettings
GetGatewaySettingsResponse defines model for GetGatewaySettingsResponse.
type GetImageEvent ¶
type GetImageResponse ¶
type GetImageResponse struct {
// Image mime type + "," + base64
File string `json:"file"`
}
type GetIsFollowerEvent ¶ added in v0.5.83
type GetIsFollowerEvent = GetIsFollowingEvent
type GetIsFollowingEvent ¶ added in v0.5.83
type GetMessageEvent ¶
GetMessageEvent defines model for GetMessageEvent.
type GetMutesEvent ¶ added in v0.7.26
type GetMutesEvent = GetBlocksEvent
GetMutesEvent defines model for GetMutesEvent.
type GetMutesResponse ¶ added in v0.7.26
type GetMutesResponse = GetBlocksResponse
GetMutesResponse defines model for GetMutesResponse.
type GetNotificationEvent ¶ added in v0.7.26
GetNotificationEvent defines model for GetNotificationEvent.
type GetNotificationResponse ¶ added in v0.7.26
type GetNotificationResponse = domain.Notification
GetNotificationResponse defines model for GetNotificationResponse.
type GetNotificationSettingsEvent ¶ added in v0.7.483
type GetNotificationSettingsEvent struct{}
GetNotificationSettingsEvent defines model for GetNotificationSettingsEvent.
type GetNotificationSettingsResponse ¶ added in v0.7.483
type GetNotificationSettingsResponse = domain.NotificationSettings
GetNotificationSettingsResponse defines model for GetNotificationSettingsResponse.
type GetNotificationsEvent ¶ added in v0.5.30
type GetNotificationsResponse ¶ added in v0.5.30
type GetNotificationsResponse struct {
Cursor string `json:"cursor"`
UnreadCount uint64 `json:"unread_count"`
Notifications []domain.Notification `json:"notifications"`
}
type GetOrderQuoteEvent ¶ added in v0.8.77
type GetOrderQuoteEvent = NewOrderEvent
GetOrderQuoteEvent defines model for GetOrderQuoteEvent.
type GetPollEvent ¶ added in v0.8.77
type GetPollEvent struct {
TweetId domain.ID `json:"tweet_id"`
UserId domain.ID `json:"user_id"`
OwnerId domain.ID `json:"owner_id"`
// OptionsNum is how many options the caller's copy of the tweet shows.
// The vote counters are stored per option index, so the reader needs it
// to know how many to fetch.
OptionsNum int `json:"options_num"`
}
GetPollEvent defines model for GetPollEvent.
type GetRatingEvent ¶ added in v0.8.77
GetRatingEvent defines model for GetRatingEvent.
type GetRatingResponse ¶ added in v0.8.77
type GetRatingResponse = domain.NodeRating
GetRatingResponse defines model for GetRatingResponse.
type GetReTweetsCountEvent ¶
type GetReTweetsCountEvent = GetReactionsCountEvent
GetReTweetsCountEvent defines model for GetReTweetsCountEvent.
type GetReactionsCountEvent ¶ added in v0.8.77
GetReactionsCountEvent defines model for GetReactionsCountEvent.
type GetReactionsEvent ¶ added in v0.8.77
type GetReactionsEvent = GetBookmarksEvent
GetReactionsEvent defines model for GetReactionsEvent.
type GetReactionsResponse ¶ added in v0.8.77
type GetReactionsResponse = GetBookmarksResponse
GetReactionsResponse defines model for GetReactionsResponse.
type GetReactorsResponse ¶ added in v0.8.77
type GetReactorsResponse = UsersResponse
GetReactorsResponse defines model for GetReactorsResponse.
type GetRetweetersResponse ¶
type GetRetweetersResponse = UsersResponse
GetRetweetersResponse defines model for GetRetweetersResponse.
type GetSponsoredSettingsEvent ¶ added in v0.8.83
type GetSponsoredSettingsEvent struct{}
GetSponsoredSettingsEvent defines model for GetSponsoredSettingsEvent.
type GetSponsoredSettingsResponse ¶ added in v0.8.83
type GetSponsoredSettingsResponse = domain.SponsoredSettings
GetSponsoredSettingsResponse defines model for GetSponsoredSettingsResponse.
type GetTimelineEvent ¶
type GetTimelineEvent = GetAllTweetsEvent
GetTimelineEvent defines model for GetTimelineEvent.
type GetTweetEvent ¶
type GetTweetEvent struct {
TweetId domain.ID `json:"tweet_id"`
UserId domain.ID `json:"user_id"`
ParentId domain.ID `json:"parent_id,omitempty"`
RootId domain.ID `json:"root_id,omitempty"`
}
GetTweetEvent defines model for GetTweetEvent.
For a reply, the target is stored under its parent tweet's partition. The handler resolves it by ParentId, falling back to RootId (they coincide for a direct reply to the thread root). Both empty means a top-level tweet.
type GetTweetReactorsEvent ¶ added in v0.8.77
type GetTweetReactorsEvent struct {
TweetId domain.ID `json:"tweet_id"`
OwnerUserId domain.ID `json:"owner_user_id"`
Cursor *string `json:"cursor,omitempty"`
Limit *uint64 `json:"limit,omitempty"`
}
GetTweetReactorsEvent defines model for GetTweetReactorsEvent.
type GetTweetRetweetersEvent ¶ added in v0.7.26
type GetTweetRetweetersEvent = GetTweetReactorsEvent
GetTweetRetweetersEvent defines model for GetTweetRetweetersEvent.
type GetTweetStatsEvent ¶
type GetUserEvent ¶
type GetUserEvent struct {
UserId domain.ID `json:"user_id"`
// NodeId optionally names the node to resolve the user from when it is
// unknown locally (e.g. the node that produced the list the user came from).
NodeId string `json:"node_id,omitempty"`
}
GetUserEvent defines model for GetUserEvent.
type GetVideoEvent ¶ added in v0.8.77
type GetVideoEvent struct {
UserId string `json:"user_id"`
Key string `json:"key"`
Deferred bool `json:"deferred,omitempty"`
}
GetVideoEvent defines model for GetVideoEvent.
type GetVideoResponse ¶ added in v0.8.77
type GetVideoResponse struct {
File string `json:"file"`
Size int64 `json:"size,omitempty"`
Deferred bool `json:"deferred,omitempty"`
}
GetVideoResponse defines model for GetVideoResponse.
type IDsResponse ¶
type ImportTweetEvent ¶ added in v0.7.206
type ImportTweetEvent struct {
Id string `json:"id"`
Text string `json:"text"`
CreatedAt string `json:"created_at"`
Images []string `json:"images,omitempty"`
}
ImportTweetEvent defines model for ImportTweetEvent.
One pre-parsed original tweet streamed from the remote browser dashboard. The browser unzips and filters the X archive client-side (dropping retweets, replies, GIFs and videos) and streams only the kept tweets, so the node never buffers the whole archive. Images are raw base64 of the still photos (at most four), without a data-URL prefix.
type ImportTwitterArchiveResponse ¶ added in v0.7.194
type ImportTwitterArchiveResponse struct {
ImportedTweets int `json:"imported_tweets"`
ImportedImages int `json:"imported_images"`
SkippedTweets int `json:"skipped_tweets"`
}
ImportTwitterArchiveResponse defines model for ImportTwitterArchiveResponse.
type IsFollowerResponse ¶ added in v0.5.83
type IsFollowerResponse struct {
IsFollower bool `json:"is_follower"`
}
type IsFollowingResponse ¶ added in v0.5.83
type IsFollowingResponse struct {
IsFollowing bool `json:"is_following"`
}
type LoginEvent ¶
type LoginEvent struct {
Password string `json:"password"` //nolint:gosec
Username string `json:"username"`
}
LoginEvent defines model for LoginEvent.
type LoginResponse ¶
type LoginResponse = domain.AuthNodeInfo
LoginResponse defines model for LoginResponse.
type LogoutEvent ¶
type LogoutEvent struct {
Token string `json:"token"`
}
LogoutEvent defines model for LogoutEvent.
type MarkNotificationReadEvent ¶ added in v0.7.26
MarkNotificationReadEvent flips a single notification's read flag.
type Message ¶
type Message struct {
Body json.RawMessage `json:"body"`
MessageId domain.ID `json:"message_id"`
NodeId domain.ID `json:"node_id"`
Destination string `json:"path"` // TODO change to 'destination'
Timestamp time.Time `json:"timestamp"`
Version string `json:"version"`
Signature string `json:"signature"`
}
Message defines model for Message.
func (Message) SigningBytes ¶ added in v0.7.490
SigningBytes returns the bytes an ed25519 signature covers: the raw body, the timestamp as decimal Unix nanoseconds, then the destination route. Senders must set Timestamp and Destination first.
type ModerationEvent ¶ added in v0.3.129
type ModerationVerdictEvent ¶ added in v0.8.77
type ModerationVerdictEvent struct {
Type domain.ModerationObjectType `json:"type"`
Verdict domain.ModerationResult `json:"verdict"`
Reason *string `json:"reason,omitempty"`
Model domain.ModelType `json:"model"`
UserID domain.ID `json:"user_id"`
ObjectID *domain.ID `json:"object_id,omitempty"`
// ModeratorID is the peer id of the moderator that issued this
// verdict. Carried inside the payload (rather than read from the
// stream connection) because the verdict reaches the receiver via
// pubsub → SelfStream, and the loopback connection's RemotePeer
// would be the local node, not the moderator.
ModeratorID domain.ID `json:"moderator_id,omitempty"`
// ReporterID is set only on the reporter-bound delivery; empty on the
// isolation broadcast. The handler keys on it to notify only the reporter.
ReporterID domain.ID `json:"reporter_id,omitempty"`
// Voters lists every moderator whose vote entered the round's tally.
// Informational for now: receivers verify the chair's signature only.
Voters []domain.ID `json:"voters,omitempty"`
TimeAt time.Time `json:"time_at,omitzero"`
// Signature is base64(ed25519) over SigningBytes, produced with the
// chair moderator's node key. The verifying pubkey is recovered from
// ModeratorID, so a verdict is only valid for the peer that claims it.
Signature string `json:"signature,omitempty"`
}
func (ModerationVerdictEvent) Signed ¶ added in v0.8.77
func (e ModerationVerdictEvent) Signed(privKey ed25519.PrivateKey) ModerationVerdictEvent
Signed returns a stamped and signed copy of the verdict. It returns the verdict rather than mutating one in place so a caller cannot end up shipping an unsigned event by dropping the result on the floor.
type NewChatEvent ¶
type NewChatEvent struct {
ChatId *domain.ID `json:"chat_id,omitempty"`
OtherUserId domain.ID `json:"other_user_id"`
OwnerId domain.ID `json:"owner_id"`
}
NewChatEvent defines model for NewChatEvent.
type NewFilterEvent ¶ added in v0.7.26
NewFilterEvent defines model for NewFilterEvent.
type NewFollowEvent ¶
type NewFollowEvent = struct {
FollowerId domain.ID `json:"follower_id"`
FollowingId domain.ID `json:"following_id"`
}
NewFollowEvent defines model for NewFollowEvent.
type NewMessageEvent ¶
type NewMessageEvent = domain.ChatMessage
NewMessageEvent defines model for NewMessageEvent.
type NewMessageResponse ¶
type NewMessageResponse = domain.ChatMessage
NewMessageResponse defines model for NewMessageResponse.
type NewOrderEvent ¶ added in v0.8.77
type NewOrderEvent struct {
TweetId domain.ID `json:"tweet_id"`
UserId domain.ID `json:"user_id"`
Amount string `json:"amount,omitempty"`
}
NewOrderEvent defines model for NewOrderEvent.
type NewRetweetEvent ¶
NewRetweetEvent defines model for NewRetweetEvent.
type NewTweetEvent ¶
NewTweetEvent defines model for NewTweetEvent.
type NewUnfollowEvent ¶
type NewUnfollowEvent = NewFollowEvent
NewUnfollowEvent defines model for NewUnfollowEvent.
type OrderQuoteResponse ¶ added in v0.8.77
type OrderQuoteResponse struct {
Token string `json:"token"`
FeePercent uint64 `json:"fee_percent"`
Fee string `json:"fee"`
Total string `json:"total"`
Balance string `json:"balance"`
TRX string `json:"trx"`
EnergyPrice int64 `json:"energy_price"`
BandwidthPrice int64 `json:"bandwidth_price"`
NetworkFee string `json:"network_fee"`
Steps []OrderQuoteStep `json:"steps"`
}
OrderQuoteResponse defines model for OrderQuoteResponse.
type OrderQuoteStep ¶ added in v0.8.77
type OrderQuoteStep struct {
Kind string `json:"kind"`
Energy int64 `json:"energy"`
Bandwidth int64 `json:"bandwidth"`
Burn string `json:"burn"`
Approximate bool `json:"approximate"`
}
OrderQuoteStep defines model for OrderQuoteStep.
type OrderResponse ¶ added in v0.8.77
type OrderResponse struct {
TweetId domain.ID `json:"tweet_id"`
TxId string `json:"tx_id"`
Confirmed bool `json:"confirmed"`
}
OrderResponse defines model for OrderResponse.
type PinTweetEvent ¶ added in v0.7.26
PinTweetEvent defines model for PinTweetEvent.
type PollResultsResponse ¶ added in v0.8.77
type PollResultsResponse struct {
TweetId domain.ID `json:"tweet_id"`
// Votes holds the vote count per option, in option order.
Votes []uint64 `json:"votes"`
TotalVotes uint64 `json:"total_votes"`
// VotedOption is the option the requesting user picked, nil if they
// haven't voted.
VotedOption *int `json:"voted_option,omitempty"`
}
PollResultsResponse defines model for PollResultsResponse.
type PollVoteEvent ¶ added in v0.8.77
type PollVoteEvent struct {
TweetId domain.ID `json:"tweet_id"`
UserId domain.ID `json:"user_id"`
OwnerId domain.ID `json:"owner_id"`
Option int `json:"option"`
// OptionsNum is how many options the voter's copy of the tweet shows.
// The counters are stored per option index, so it sizes the results the
// vote replies with on a node that doesn't hold the tweet itself.
OptionsNum int `json:"options_num"`
}
PollVoteEvent defines model for PollVoteEvent.
Same actor/target convention as ReactionEvent: UserId is the tweet author (the routing key), OwnerId is the voter. Option is the zero-based index into the tweet's poll options.
type ReTweetsCountResponse ¶
type ReTweetsCountResponse = ReactionsCountResponse
ReTweetsCountResponse defines model for ReTweetsCountResponse.
type ReactionEvent ¶ added in v0.8.77
type ReactionEvent struct {
TweetId domain.ID `json:"tweet_id"`
UserId domain.ID `json:"user_id"`
OwnerId domain.ID `json:"owner_id"`
Emoji string `json:"emoji,omitempty"`
}
ReactionEvent defines model for ReactionEvent.
Emoji names the reaction. Clients that predate reactions omit it and the node reads them as domain.DefaultReaction.
type ReactionsCountResponse ¶ added in v0.8.77
type ReactionsCountResponse struct {
Count uint64 `json:"count"`
Reactions map[string]uint64 `json:"reactions,omitempty"`
}
ReactionsCountResponse defines model for ReactionsCountResponse.
Count is the total across every reaction; Reactions breaks it down per emoji so a client can repaint the chips without a second round-trip.
type ReportEvent ¶ added in v0.7.59
type ReportEvent struct {
Type domain.ModerationObjectType `json:"type"`
TargetUserID domain.ID `json:"target_user_id"`
TargetNodeID domain.ID `json:"target_node_id"`
ObjectID *domain.ID `json:"object_id,omitempty"`
Reason string `json:"reason"`
// Reporter identity, stamped by the reporter's node at publish time so
// the moderator can return the verdict to it.
ReporterID domain.ID `json:"reporter_id,omitempty"`
ReporterNodeID domain.ID `json:"reporter_node_id,omitempty"`
}
ReportEvent is published by a member node on the reports pubsub topic when a user clicks Report in the UI. It carries enough for a moderator to fetch the actual offending content (TargetNodeID is a routing hint so the moderator can hit the owner's node directly instead of looking it up via PUBLIC_GET_USER).
ObjectID is the tweet id for Type == ModerationTweetType and is nil when Type == ModerationUserType (the user itself is the target).
func (ReportEvent) ReportID ¶ added in v0.8.77
func (e ReportEvent) ReportID() string
ReportID derives a stable identifier of this report from its content, so independent moderators correlate their votes on the same round without any new wire field. Identical re-reports collapse into one round by construction.
type ResponseError ¶ added in v0.5.140
ErrorResponse defines model for ErrorResponse.
func (ResponseError) Error ¶ added in v0.5.140
func (e ResponseError) Error() string
type SearchUsersEvent ¶ added in v0.7.26
type SearchUsersEvent struct {
Query string `json:"query"`
Cursor *string `json:"cursor,omitempty"`
Limit *uint64 `json:"limit,omitempty"`
}
SearchUsersEvent defines model for SearchUsersEvent.
type SearchUsersResponse ¶ added in v0.7.26
type SearchUsersResponse = UsersResponse
SearchUsersResponse defines model for SearchUsersResponse.
type SubscribeUserEvent ¶ added in v0.7.26
type SubscribeUserEvent struct {
SelfId domain.ID `json:"self_id"`
TargetId domain.ID `json:"target_id"`
}
SubscribeUserEvent defines model for SubscribeUserEvent.
type TweetStatsResponse ¶
type TweetStatsResponse struct {
TweetId domain.ID `json:"tweet_id"`
RetweetsCount uint64 `json:"retweets_count"`
ReactionsCount uint64 `json:"reactions_count"`
RepliesCount uint64 `json:"replies_count"`
ViewsCount uint64 `json:"views_count"`
Reactions map[string]uint64 `json:"reactions,omitempty"`
// Always emitted, empty string included: an absent key is how a client
// tells an old node (which knows nothing of reactions) from this node
// saying "you haven't reacted".
MyReaction string `json:"my_reaction"`
}
TweetStatsResponse defines model for TweetStatsResponse.
Reactions is the per-emoji breakdown of ReactionsCount. MyReaction is the emoji the node's own owner put on the tweet ("" when they haven't reacted) — it is always answered from the local store, so it stays correct even when the counts come from the author's node.
type TweetsResponse ¶
type TweetsResponse struct {
Cursor string `json:"cursor"`
Tweets []domain.Tweet `json:"tweets"`
UserId domain.ID `json:"user_id"`
}
TweetsResponse defines model for TweetsResponse.
type UnblockEvent ¶ added in v0.7.26
type UnblockEvent = BlockEvent
UnblockEvent defines model for UnblockEvent.
type UnbookmarkEvent ¶ added in v0.7.26
type UnbookmarkEvent struct {
UserId domain.ID `json:"user_id"`
TweetId domain.ID `json:"tweet_id"`
}
UnbookmarkEvent defines model for UnbookmarkEvent.
type UnmuteEvent ¶ added in v0.7.26
type UnmuteEvent = MuteEvent
UnmuteEvent defines model for UnmuteEvent.
type UnpinTweetEvent ¶ added in v0.7.26
type UnpinTweetEvent = PinTweetEvent
UnpinTweetEvent defines model for UnpinTweetEvent.
type UnreactionEvent ¶ added in v0.8.77
type UnreactionEvent = ReactionEvent
UnreactionEvent defines model for UnreactionEvent.
type UnretweetEvent ¶
type UnretweetEvent struct {
TweetId domain.ID `json:"tweet_id"`
RetweeterId domain.ID `json:"retweeter_id"`
}
UnretweetEvent defines model for UnretweetEvent.
type UnsubscribeUserEvent ¶ added in v0.7.26
type UnsubscribeUserEvent = SubscribeUserEvent
UnsubscribeUserEvent defines model for UnsubscribeUserEvent.
type UpdateEvent ¶ added in v0.8.77
type UpdateEvent struct {
IsAllowed bool `json:"is_allowed"`
}
UpdateEvent defines model for UpdateEvent.
type UpdateFilterEvent ¶ added in v0.7.26
UpdateFilterEvent defines model for UpdateFilterEvent.
type UpdateFilterKeywordEvent ¶ added in v0.7.26
type UpdateFilterKeywordEvent struct {
UserId domain.ID `json:"user_id"`
KeywordId domain.ID `json:"keyword_id"`
Keyword string `json:"keyword"`
WholeWord bool `json:"whole_word"`
}
UpdateFilterKeywordEvent defines model for UpdateFilterKeywordEvent.
type UpdateGatewaySettingsEvent ¶ added in v0.8.77
type UpdateGatewaySettingsEvent = domain.GatewaySettings
UpdateGatewaySettingsEvent defines model for UpdateGatewaySettingsEvent.
type UpdateNotificationSettingsEvent ¶ added in v0.7.483
type UpdateNotificationSettingsEvent = domain.NotificationSettings
UpdateNotificationSettingsEvent defines model for UpdateNotificationSettingsEvent.
type UpdateResponse ¶ added in v0.8.77
type UpdateResponse = domain.UpdateInfo
UpdateResponse defines model for UpdateResponse.
type UpdateSponsoredSettingsEvent ¶ added in v0.8.83
type UpdateSponsoredSettingsEvent = domain.SponsoredSettings
UpdateSponsoredSettingsEvent defines model for UpdateSponsoredSettingsEvent.
type UploadImageEvent ¶
type UploadImageResponse ¶
type UploadVideoEvent ¶ added in v0.8.77
type UploadVideoEvent struct {
Video string `json:"video"`
}
UploadVideoEvent defines model for UploadVideoEvent.
type UploadVideoResponse ¶ added in v0.8.77
type UploadVideoResponse struct {
Key string `json:"key"`
}
UploadVideoResponse defines model for UploadVideoResponse.
type UserStatusResponse ¶ added in v0.8.77
type UserStatusResponse struct {
UserId domain.ID `json:"user_id"`
IsOnline bool `json:"is_online"`
LastSeen *time.Time `json:"last_seen,omitempty"`
}
UserStatusResponse defines model for UserStatusResponse.
type UsersResponse ¶
UsersResponse defines model for UsersResponse.
type ValidationEvent ¶ added in v0.3.75
type ValidationResult ¶ added in v0.3.75
type ValidationResult int
const ( Invalid ValidationResult = iota Valid )
func (ValidationResult) String ¶ added in v0.3.141
func (vr ValidationResult) String() string
type ValidationResultEvent ¶ added in v0.3.116
type VerifyOrderEvent ¶ added in v0.8.77
type VerifyOrderEvent struct {
TweetId domain.ID `json:"tweet_id"`
UserId domain.ID `json:"user_id"`
TxId string `json:"tx_id"`
Nonce string `json:"nonce"`
Payer string `json:"payer,omitempty"`
}
VerifyOrderEvent defines model for VerifyOrderEvent.
type ViewEvent ¶ added in v0.6.316
type ViewEvent struct {
TweetId domain.ID `json:"tweet_id"`
UserId domain.ID `json:"user_id"`
ViewerId domain.ID `json:"viewer_id"`
}
ViewEvent defines model for ViewEvent. UserId is the tweet author's id; ViewerId is the viewer's id.
type ViewsCountResponse ¶ added in v0.6.316
type ViewsCountResponse = ReactionsCountResponse
ViewsCountResponse defines model for ViewsCountResponse.
type WalletAddressEvent ¶ added in v0.8.77
type WalletAddressEvent struct {
Chain string `json:"chain"`
Payer string `json:"payer,omitempty"`
}
WalletAddressEvent defines model for WalletAddressEvent.
type WalletAddressResponse ¶ added in v0.8.77
type WalletAddressResponse struct {
Address string `json:"address"`
Chain string `json:"chain"`
UserId string `json:"user_id"`
Splitter string `json:"splitter,omitempty"`
}
WalletAddressResponse defines model for WalletAddressResponse.
type WalletContact ¶ added in v0.8.77
type WalletContact struct {
Address string `json:"address"`
UserId string `json:"user_id"`
Username string `json:"username"`
AvatarKey string `json:"avatar_key,omitempty"`
}
WalletContact defines model for WalletContact.
type WalletContactsEvent ¶ added in v0.8.77
type WalletContactsEvent struct {
Force bool `json:"force"`
}
WalletContactsEvent defines model for WalletContactsEvent.
type WalletContactsResponse ¶ added in v0.8.77
type WalletContactsResponse struct {
Contacts []WalletContact `json:"contacts"`
}
WalletContactsResponse defines model for WalletContactsResponse.
type WalletEvent ¶ added in v0.8.77
type WalletEvent struct {
Limit int `json:"limit,omitempty"`
Asset string `json:"asset,omitempty"`
}
WalletEvent defines model for WalletEvent.
type WalletHistoryItem ¶ added in v0.8.77
type WalletHistoryItem struct {
Tx string `json:"tx"`
Asset string `json:"asset"`
From string `json:"from"`
To string `json:"to"`
Value string `json:"value"`
Timestamp int64 `json:"timestamp"`
Incoming bool `json:"incoming"`
}
WalletHistoryItem defines model for WalletHistoryItem.
type WalletHistoryResponse ¶ added in v0.8.77
type WalletHistoryResponse struct {
Transfers []WalletHistoryItem `json:"transfers"`
}
WalletHistoryResponse defines model for WalletHistoryResponse.
type WalletKeyResponse ¶ added in v0.8.77
type WalletKeyResponse struct {
Address string `json:"address"`
PrivateKey string `json:"private_key"`
}
WalletKeyResponse defines model for WalletKeyResponse.
type WalletOwnAddressResponse ¶ added in v0.8.77
type WalletOwnAddressResponse struct {
Address string `json:"address"`
Token string `json:"token"`
Decimals uint8 `json:"decimals"`
Network string `json:"network"`
}
WalletOwnAddressResponse defines model for WalletOwnAddressResponse.
type WalletResponse ¶ added in v0.8.77
type WalletResponse struct {
Address string `json:"address"`
Token string `json:"token"`
UsdtBalance string `json:"usdt_balance"`
TrxBalance string `json:"trx_balance"`
Staked string `json:"staked"`
Unstaking []WalletUnstaking `json:"unstaking"`
Activated bool `json:"activated"`
CreatedAt int64 `json:"created_at,omitempty"`
Derivation string `json:"derivation"`
Decimals uint8 `json:"decimals"`
Network string `json:"network"`
}
WalletResponse defines model for WalletResponse.
type WalletSendEvent ¶ added in v0.8.77
type WalletSendEvent struct {
To string `json:"to"`
Amount string `json:"amount"`
Asset string `json:"asset,omitempty"`
}
WalletSendEvent defines model for WalletSendEvent.
type WalletSendResponse ¶ added in v0.8.77
type WalletSendResponse struct {
Tx string `json:"tx"`
To string `json:"to"`
Amount string `json:"amount"`
Asset string `json:"asset"`
}
WalletSendResponse defines model for WalletSendResponse.
type WalletStakeEvent ¶ added in v0.8.83
type WalletStakeEvent struct {
Amount string `json:"amount"`
}
WalletStakeEvent defines model for WalletStakeEvent.
type WalletStakeResponse ¶ added in v0.8.83
type WalletStakeResponse struct {
Tx string `json:"tx"`
}
WalletStakeResponse defines model for WalletStakeResponse.
type WalletUnstaking ¶ added in v0.8.83
type WalletUnstaking struct {
Amount string `json:"amount"`
AvailableAt int64 `json:"available_at"`
}
WalletUnstaking defines model for WalletUnstaking.