Documentation ¶
Overview ¶
Package signal implements event-based signalling interface between status-go and externally linked codebases like status-mobile or status-desktop. Events are send asynchronously using OS-specific linking mechanisms. See sources for implementation details.
Index ¶
- Constants
- func NotifyNode(jsonEvent *C.char)
- func ResetDefaultNodeNotificationHandler()
- func SendBackupPerformed(lastBackup uint64)
- func SendBundleAdded(identity string, installationID string)
- func SendChainDataRemoved()
- func SendCommunityInfoFound(community interface{})
- func SendCreatingHistoryArchives(communityID string)
- func SendDecryptMessageFailed(sender string)
- func SendDiscordCategoriesAndChannelsExtracted(categories []*discord.Category, channels []*discord.Channel, ...)
- func SendDiscordCommunityImportCancelled(communityID string)
- func SendDiscordCommunityImportFinished(communityID string)
- func SendDiscordCommunityImportProgress(importProgress *discord.ImportProgress)
- func SendDiscoveryStarted()
- func SendDiscoveryStopped()
- func SendDiscoverySummary(summary interface{})
- func SendDownloadingHistoryArchivesFinished(communityID string)
- func SendDownloadingHistoryArchivesStarted(communityID string)
- func SendEnodeDiscovered(enode, topic string)
- func SendEnvelopeExpired(identifiers [][]byte, err error)
- func SendEnvelopeSent(identifiers [][]byte)
- func SendHistoricMessagesRequestCompleted()
- func SendHistoricMessagesRequestFailed(requestID []byte, peerID peer.ID, err error)
- func SendHistoricMessagesRequestStarted(numBatches int)
- func SendHistoryArchiveDownloaded(communityID string, from int, to int)
- func SendHistoryArchivesCreated(communityID string, from int, to int)
- func SendHistoryArchivesProtocolDisabled()
- func SendHistoryArchivesProtocolEnabled()
- func SendHistoryArchivesSeeding(communityID string)
- func SendHistoryArchivesUnseeded(communityID string)
- func SendImportingHistoryArchiveMessages(communityID string)
- func SendLocalNotifications(event interface{})
- func SendLocalPairingEvent(event interface{})
- func SendLoggedIn(err error)
- func SendMailServerRequestCompleted(requestID types.Hash, lastEnvelopeHash types.Hash, cursor []byte, err error)
- func SendMailServerRequestExpired(hash types.Hash)
- func SendMailserverAvailable(nodeAddress, id string)
- func SendMailserverChanged(nodeAddress, id string)
- func SendMailserverNotWorking()
- func SendMediaServerStarted(port int)
- func SendMessageDelivered(chatID string, messageID string)
- func SendNewMessages(obj json.Marshaler)
- func SendNoHistoryArchivesCreated(communityID string, from int, to int)
- func SendNodeCrashed(err error)
- func SendNodeReady()
- func SendNodeStarted()
- func SendNodeStopped()
- func SendPeerStats(peerStats interface{})
- func SendSignRequestAdded(event PendingRequestEvent)
- func SendSignRequestFailed(event PendingRequestEvent, err error, errCode int)
- func SendStats(stats interface{})
- func SendStatusUpdatesTimedOut(statusUpdates interface{})
- func SendSubscriptionDataEvent(filterID string, data []interface{})
- func SendSubscriptionErrorEvent(filterID string, err error)
- func SendUpdateAvailable(available bool, latestVersion string, url string)
- func SendWakuBackedUpKeycards(obj json.Marshaler)
- func SendWakuBackedUpProfile(obj json.Marshaler)
- func SendWakuBackedUpSettings(obj json.Marshaler)
- func SendWakuBackedUpWalletAccount(obj json.Marshaler)
- func SendWakuFetchingBackupProgress(obj json.Marshaler)
- func SendWalletEvent(event interface{})
- func SetDefaultNodeNotificationHandler(fn NodeNotificationHandler)
- func SetMobileSignalHandler(handler MobileSignalHandler)
- func SetSignalEventCallback(cb unsafe.Pointer)
- func TriggerDefaultNodeNotificationHandler(jsonEvent string)
- func TriggerTestSignal()
- type BackupPerformedSignal
- type BundleAddedSignal
- type CommunityInfoFoundSignal
- type CreatingHistoryArchivesSignal
- type DecryptMessageFailedSignal
- type DiscordCategoriesAndChannelsExtractedSignal
- type DiscordCommunityImportCancelledSignal
- type DiscordCommunityImportFinishedSignal
- type DiscordCommunityImportProgressSignal
- type DownloadingHistoryArchivesFinishedSignal
- type DownloadingHistoryArchivesStartedSignal
- type EnodeDiscoveredSignal
- type Envelope
- type EnvelopeSignal
- type Filter
- type HistoryArchiveDownloadedSignal
- type HistoryArchivesCreatedSignal
- type HistoryArchivesSeedingSignal
- type HistoryArchivesUnseededSignal
- type HistoryMessagesSignal
- type ImportingHistoryArchiveMessagesSignal
- type MailServerResponseSignal
- type MailserverSignal
- type MediaServerStarted
- type MessageDeliveredSignal
- type MobileSignalHandler
- type NoHistoryArchivesCreatedSignal
- type NodeCrashEvent
- type NodeLoginEvent
- type NodeNotificationHandler
- type PendingRequestErrorEvent
- type PendingRequestEvent
- type SubscriptionDataEvent
- type SubscriptionErrorEvent
- type UpdateAvailableSignal
Constants ¶
const ( // EventHistoryArchivesEnabled triggered when the community history archive protocol // was enabled via the RPC API EventHistoryArchivesProtocolEnabled = "community.historyArchivesProtocolEnabled" // EventHistoryArchivesDisabled triggered when the community history archive protocol // was disabled via the RPC API EventHistoryArchivesProtocolDisabled = "community.historyArchivesProtocolDisabled" // EventCreatingHistoryArchives is triggered when the community owner node // starts to create archives torrents EventCreatingHistoryArchives = "community.creatingHistoryArchives" // EventHistoryArchivesCreated is triggered when the community owner node // has finished to create archives torrents EventHistoryArchivesCreated = "community.historyArchivesCreated" // EventNoHistoryArchivesCreated is triggered when the community owner node // tried to create archives but haven't because there were no new messages // to archive EventNoHistoryArchivesCreated = "community.noHistoryArchivesCreated" // EventHistoryArchivesSeeding is triggered when the community owner node // started seeding archives torrents EventHistoryArchivesSeeding = "community.historyArchivesSeeding" // EventHistoryArchivesUnseeded is triggered when the community owner node // drops a torrent for a particular community EventHistoryArchivesUnseeded = "community.historyArchivesUnseeded" // EventDownloadingHistoryArchivesFinished is triggered when the community member node // has downloaded all archives EventDownloadingHistoryArchivesStarted = "community.downloadingHistoryArchivesStarted" // EventHistoryArchiveDownloaded is triggered when the community member node // has downloaded an individual community archive EventHistoryArchiveDownloaded = "community.historyArchiveDownloaded" // EventImportingHistoryArchiveMessages is triggered when the community member node // has starts importing downloaded archive messages into the database EventImportingHistoryArchiveMessages = "community.importingHistoryArchiveMessages" // EventDownloadingHistoryArchivesFinished is triggered when the community member node // has downloaded all archives EventDownloadingHistoryArchivesFinished = "community.downloadingHistoryArchivesFinished" )
const ( // EventDiscordCategoriesAndChannelsExtracted triggered when categories and // channels for exported discord files have been successfully extracted EventDiscordCategoriesAndChannelsExtracted = "community.discordCategoriesAndChannelsExtracted" // EventDiscordCommunityImportProgress is triggered during the import // of a discord community as it progresses EventDiscordCommunityImportProgress = "community.discordCommunityImportProgress" // EventDiscordCommunityImportFinished triggered when importing // the discord community into status was successful EventDiscordCommunityImportFinished = "community.discordCommunityImportFinished" // EventDiscordCommunityImportCancelled triggered when importing // the discord community was cancelled EventDiscordCommunityImportCancelled = "community.discordCommunityImportCancelled" )
const ( // EventDiscoveryStarted is sent when node discv5 was started. EventDiscoveryStarted = "discovery.started" // EventDiscoveryStopped is sent when discv5 server was stopped. EventDiscoveryStopped = "discovery.stopped" // EventDiscoverySummary is sent when peer is added or removed. // it will be a map with capability=peer count k/v's. EventDiscoverySummary = "discovery.summary" )
const ( // EventMediaServerStarted triggers when the media server successfully binds a new port EventMediaServerStarted = "mediaserver.started" // EventMesssageDelivered triggered when we got acknowledge from datasync level, that means peer got message EventMesssageDelivered = "message.delivered" // EventCommunityInfoFound triggered when user requested info about some community and messenger successfully // retrieved it from mailserver EventCommunityInfoFound = "community.found" // EventStatusUpdatesTimedOut Event Automatic Status Updates Timed out EventStatusUpdatesTimedOut = "status.updates.timedout" )
const ( // EventNodeStarted is triggered when underlying node is started EventNodeStarted = "node.started" // EventNodeReady is triggered when underlying node is fully ready // (consider backend to be fully registered) EventNodeReady = "node.ready" // EventNodeStopped is triggered when underlying node is fully stopped EventNodeStopped = "node.stopped" // EventNodeCrashed is triggered when node crashes EventNodeCrashed = "node.crashed" // EventChainDataRemoved is triggered when node's chain data is removed EventChainDataRemoved = "chaindata.removed" // EventLoggedIn is once node was injected with user account and ready to be used. EventLoggedIn = "node.login" )
const ( // EventEnvelopeSent is triggered when envelope was sent at least to a one peer. EventEnvelopeSent = "envelope.sent" // EventEnvelopeExpired is triggered when envelop was dropped by a whisper without being sent // to any peer EventEnvelopeExpired = "envelope.expired" // EventMailServerRequestCompleted is triggered when whisper receives a message ack from the mailserver EventMailServerRequestCompleted = "mailserver.request.completed" // EventMailServerRequestExpired is triggered when request TTL ends EventMailServerRequestExpired = "mailserver.request.expired" // EventEnodeDiscovered is tiggered when enode has been discovered. EventEnodeDiscovered = "enode.discovered" // EventDecryptMessageFailed is triggered when we receive a message from a bundle we don't have EventDecryptMessageFailed = "messages.decrypt.failed" // EventBundleAdded is triggered when we receive a bundle EventBundleAdded = "bundles.added" // EventNewMessages is triggered when we receive new messages EventNewMessages = "messages.new" // EventHistoryRequestStarted is triggered before processing a store request EventHistoryRequestStarted = "history.request.started" // EventHistoryRequestCompleted is triggered after processing all storenode requests EventHistoryRequestCompleted = "history.request.completed" // EventHistoryRequestFailed is triggered when requesting history messages fails EventHistoryRequestFailed = "history.request.failed" // EventBackupPerformed is triggered when a backup has been performed EventBackupPerformed = "backup.performed" // EventMailserverAvailable is triggered when a mailserver becomes available EventMailserverAvailable = "mailserver.available" // EventMailserverChanged is triggered when switching the active mailserver EventMailserverChanged = "mailserver.changed" // EventMailserverNotWorking is triggered when the mailserver has failed to connect or failed to respond to requests EventMailserverNotWorking = "mailserver.not.working" // EventUpdateAvailable is triggered after a update verification is performed EventUpdateAvailable = "update.available" )
const ( // EventSignRequestAdded is triggered when send transaction request is queued EventSignRequestAdded = "sign-request.queued" // EventSignRequestFailed is triggered when send transaction request fails EventSignRequestFailed = "sign-request.failed" )
const ( // EventSubscriptionsData is triggered when there is new data in any of the subscriptions EventSubscriptionsData = "subscriptions.data" // EventSubscriptionsError is triggered when subscriptions failed to get new data EventSubscriptionsError = "subscriptions.error" )
const ( // EventWakuFetchingBackupProgress is emitted while applying fetched data is ongoing EventWakuFetchingBackupProgress = "waku.fetching.backup.progress" // EventSyncFromWakuProfile is emitted while applying fetched profile data from waku EventWakuBackedUpProfile = "waku.backedup.profile" // EventWakuBackedUpSettings is emitted while applying fetched settings from waku EventWakuBackedUpSettings = "waku.backedup.settings" // EventWakuBackedUpWalletAccount is emitted while applying fetched wallet account data from waku EventWakuBackedUpWalletAccount = "waku.backedup.wallet-account" // #nosec G101 // EventWakuBackedUpKeycards is emitted while applying fetched keycard data from waku EventWakuBackedUpKeycards = "waku.backedup.keycards" )
const ( // EventPeerStats is sent when peer is added or removed. // it will be a map with capability=peer count k/v's. EventPeerStats = "wakuv2.peerstats" )
const (
// EventsStats is sent periodically with stats like upload/download rate
EventStats = "stats"
)
Variables ¶
This section is empty.
Functions ¶
func ResetDefaultNodeNotificationHandler ¶
func ResetDefaultNodeNotificationHandler()
ResetDefaultNodeNotificationHandler sets notification handler to default one
func SendBackupPerformed ¶ added in v0.90.0
func SendBackupPerformed(lastBackup uint64)
func SendBundleAdded ¶ added in v0.16.4
func SendChainDataRemoved ¶
func SendChainDataRemoved()
SendChainDataRemoved emits a signal when node's chain data has been removed.
func SendCommunityInfoFound ¶ added in v0.76.3
func SendCommunityInfoFound(community interface{})
SendMessageDelivered notifies about delivered message
func SendCreatingHistoryArchives ¶ added in v0.98.1
func SendCreatingHistoryArchives(communityID string)
func SendDecryptMessageFailed ¶ added in v0.15.1
func SendDecryptMessageFailed(sender string)
func SendDiscordCategoriesAndChannelsExtracted ¶ added in v0.105.1
func SendDiscordCommunityImportCancelled ¶ added in v0.114.1
func SendDiscordCommunityImportCancelled(communityID string)
func SendDiscordCommunityImportFinished ¶ added in v0.114.1
func SendDiscordCommunityImportFinished(communityID string)
func SendDiscordCommunityImportProgress ¶ added in v0.114.1
func SendDiscordCommunityImportProgress(importProgress *discord.ImportProgress)
func SendDiscoveryStarted ¶
func SendDiscoveryStarted()
SendDiscoveryStarted sends discovery.started signal.
func SendDiscoveryStopped ¶
func SendDiscoveryStopped()
SendDiscoveryStopped sends discovery.stopped signal.
func SendDiscoverySummary ¶
func SendDiscoverySummary(summary interface{})
SendDiscoverySummary sends discovery.summary signal.
func SendDownloadingHistoryArchivesFinished ¶ added in v0.109.4
func SendDownloadingHistoryArchivesFinished(communityID string)
func SendDownloadingHistoryArchivesStarted ¶ added in v0.115.5
func SendDownloadingHistoryArchivesStarted(communityID string)
func SendEnodeDiscovered ¶
func SendEnodeDiscovered(enode, topic string)
SendEnodeDiscovered tiggered when an enode is discovered. finds a new enode.
func SendEnvelopeExpired ¶
SendEnvelopeExpired triggered when envelope delivered at least to 1 peer.
func SendEnvelopeSent ¶
func SendEnvelopeSent(identifiers [][]byte)
SendEnvelopeSent triggered when envelope delivered at least to 1 peer.
func SendHistoricMessagesRequestCompleted ¶ added in v0.89.2
func SendHistoricMessagesRequestCompleted()
func SendHistoricMessagesRequestFailed ¶ added in v0.89.2
func SendHistoricMessagesRequestStarted ¶ added in v0.89.2
func SendHistoricMessagesRequestStarted(numBatches int)
func SendHistoryArchiveDownloaded ¶ added in v0.98.1
func SendHistoryArchivesCreated ¶ added in v0.98.1
func SendHistoryArchivesProtocolDisabled ¶ added in v0.98.1
func SendHistoryArchivesProtocolDisabled()
func SendHistoryArchivesProtocolEnabled ¶ added in v0.98.1
func SendHistoryArchivesProtocolEnabled()
func SendHistoryArchivesSeeding ¶ added in v0.98.1
func SendHistoryArchivesSeeding(communityID string)
func SendHistoryArchivesUnseeded ¶ added in v0.98.1
func SendHistoryArchivesUnseeded(communityID string)
func SendImportingHistoryArchiveMessages ¶ added in v0.115.6
func SendImportingHistoryArchiveMessages(communityID string)
func SendLocalNotifications ¶ added in v0.62.16
func SendLocalNotifications(event interface{})
SendLocalNotifications sends event with a local notification.
func SendLocalPairingEvent ¶ added in v0.109.1
func SendLocalPairingEvent(event interface{})
SendLocalPairingEvent sends event from services/pairing/events.
func SendLoggedIn ¶ added in v0.35.0
func SendLoggedIn(err error)
func SendMailServerRequestCompleted ¶
func SendMailServerRequestCompleted(requestID types.Hash, lastEnvelopeHash types.Hash, cursor []byte, err error)
SendMailServerRequestCompleted triggered when mail server response has been received
func SendMailServerRequestExpired ¶
SendMailServerRequestExpired triggered when mail server request expires
func SendMailserverAvailable ¶ added in v0.93.2
func SendMailserverAvailable(nodeAddress, id string)
func SendMailserverChanged ¶ added in v0.93.2
func SendMailserverChanged(nodeAddress, id string)
func SendMailserverNotWorking ¶ added in v0.96.0
func SendMailserverNotWorking()
func SendMediaServerStarted ¶ added in v0.109.4
func SendMediaServerStarted(port int)
SendMediaServerStarted notifies about restarts of the media server
func SendMessageDelivered ¶ added in v0.71.5
SendMessageDelivered notifies about delivered message
func SendNewMessages ¶ added in v0.35.0
func SendNoHistoryArchivesCreated ¶ added in v0.98.1
func SendNodeCrashed ¶
func SendNodeCrashed(err error)
SendNodeCrashed emits a signal when status node has crashed, and provides error description.
func SendNodeReady ¶
func SendNodeReady()
SendNodeReady emits a signal when status node has started and successfully completed startup.
func SendNodeStarted ¶
func SendNodeStarted()
SendNodeStarted emits a signal when status node has just started (but not finished startup yet).
func SendNodeStopped ¶
func SendNodeStopped()
SendNodeStopped emits a signal when underlying node has stopped.
func SendPeerStats ¶ added in v0.88.1
func SendPeerStats(peerStats interface{})
SendPeerStats sends discovery.summary signal.
func SendSignRequestAdded ¶
func SendSignRequestAdded(event PendingRequestEvent)
SendSignRequestAdded sends a signal when a sign request is added.
func SendSignRequestFailed ¶
func SendSignRequestFailed(event PendingRequestEvent, err error, errCode int)
SendSignRequestFailed sends a signal of failed sign request.
func SendStatusUpdatesTimedOut ¶ added in v0.104.1
func SendStatusUpdatesTimedOut(statusUpdates interface{})
func SendSubscriptionDataEvent ¶ added in v0.35.0
func SendSubscriptionDataEvent(filterID string, data []interface{})
SendSubscriptionDataEvent
func SendSubscriptionErrorEvent ¶ added in v0.35.0
SendSubscriptionErrorEvent
func SendUpdateAvailable ¶ added in v0.101.1
func SendWakuBackedUpKeycards ¶ added in v0.135.0
func SendWakuBackedUpProfile ¶ added in v0.117.3
func SendWakuBackedUpSettings ¶ added in v0.117.3
func SendWakuBackedUpWalletAccount ¶ added in v0.147.0
func SendWakuFetchingBackupProgress ¶ added in v0.117.3
func SendWalletEvent ¶ added in v0.35.0
func SendWalletEvent(event interface{})
SendWalletEvent sends event from services/wallet/events.
func SetDefaultNodeNotificationHandler ¶
func SetDefaultNodeNotificationHandler(fn NodeNotificationHandler)
SetDefaultNodeNotificationHandler sets notification handler to invoke on Send
func SetMobileSignalHandler ¶ added in v0.35.0
func SetMobileSignalHandler(handler MobileSignalHandler)
SetMobileSignalHandler sets new handler for geth events this function uses pure go implementation
func SetSignalEventCallback ¶
SetSignalEventCallback set callback this function uses C implementation (see `signals.c` file)
func TriggerDefaultNodeNotificationHandler ¶
func TriggerDefaultNodeNotificationHandler(jsonEvent string)
TriggerDefaultNodeNotificationHandler triggers default notification handler (helpful in tests)
Types ¶
type BackupPerformedSignal ¶ added in v0.90.0
type BackupPerformedSignal struct {
LastBackup uint64 `json:"lastBackup"`
}
BackupPerformedSignal signals that a backup has been performed
type BundleAddedSignal ¶ added in v0.16.4
type BundleAddedSignal struct { Identity string `json:"identity"` InstallationID string `json:"installationID"` }
BundleAddedSignal holds the identity and installation id of the user
type CommunityInfoFoundSignal ¶ added in v0.76.3
type CommunityInfoFoundSignal struct { Name string `json:"name"` Description string `json:"description"` MembersCount int `json:"membersCount"` Verified bool `json:"verified"` }
MessageDeliveredSignal specifies chat and message that was delivered
type CreatingHistoryArchivesSignal ¶ added in v0.98.1
type CreatingHistoryArchivesSignal struct {
CommunityID string `json:"communityId"`
}
type DecryptMessageFailedSignal ¶ added in v0.15.1
type DecryptMessageFailedSignal struct {
Sender string `json:"sender"`
}
DecryptMessageFailedSignal holds the sender of the message that could not be decrypted
type DiscordCategoriesAndChannelsExtractedSignal ¶ added in v0.105.1
type DiscordCommunityImportCancelledSignal ¶ added in v0.114.1
type DiscordCommunityImportCancelledSignal struct {
CommunityID string `json:"communityId"`
}
type DiscordCommunityImportFinishedSignal ¶ added in v0.114.1
type DiscordCommunityImportFinishedSignal struct {
CommunityID string `json:"communityId"`
}
type DiscordCommunityImportProgressSignal ¶ added in v0.114.1
type DiscordCommunityImportProgressSignal struct {
ImportProgress *discord.ImportProgress `json:"importProgress"`
}
type DownloadingHistoryArchivesFinishedSignal ¶ added in v0.109.4
type DownloadingHistoryArchivesFinishedSignal struct {
CommunityID string `json:"communityId"`
}
type DownloadingHistoryArchivesStartedSignal ¶ added in v0.115.5
type DownloadingHistoryArchivesStartedSignal struct {
CommunityID string `json:"communityId"`
}
type EnodeDiscoveredSignal ¶
EnodeDiscoveredSignal includes enode address and topic
type Envelope ¶
type Envelope struct { Type string `json:"type"` Event interface{} `json:"event"` }
Envelope is a general signal sent upward from node to RN app
func NewEnvelope ¶
NewEnvelope creates new envlope of given type and event payload.
type EnvelopeSignal ¶
type EnvelopeSignal struct { IDs []hexutil.Bytes `json:"ids"` Hash types.Hash `json:"hash"` Message string `json:"message"` }
EnvelopeSignal includes hash of the envelope.
type Filter ¶ added in v0.35.0
type Filter struct { // ChatID is the identifier of the chat ChatID string `json:"chatId"` // SymKeyID is the symmetric key id used for symmetric chats SymKeyID string `json:"symKeyId"` // OneToOne tells us if we need to use asymmetric encryption for this chat Listen bool `json:"listen"` // FilterID the whisper filter id generated FilterID string `json:"filterId"` // Identity is the public key of the other recipient for non-public chats Identity string `json:"identity"` // Topic is the whisper topic Topic types.TopicType `json:"topic"` }
type HistoryArchiveDownloadedSignal ¶ added in v0.98.1
type HistoryArchivesCreatedSignal ¶ added in v0.98.1
type HistoryArchivesSeedingSignal ¶ added in v0.98.1
type HistoryArchivesSeedingSignal struct {
CommunityID string `json:"communityId"`
}
type HistoryArchivesUnseededSignal ¶ added in v0.98.1
type HistoryArchivesUnseededSignal struct {
CommunityID string `json:"communityId"`
}
type HistoryMessagesSignal ¶ added in v0.89.2
type ImportingHistoryArchiveMessagesSignal ¶ added in v0.115.6
type ImportingHistoryArchiveMessagesSignal struct {
CommunityID string `json:"communityId"`
}
type MailServerResponseSignal ¶
type MailServerResponseSignal struct { RequestID types.Hash `json:"requestID"` LastEnvelopeHash types.Hash `json:"lastEnvelopeHash"` Cursor string `json:"cursor"` ErrorMsg string `json:"errorMessage"` }
MailServerResponseSignal holds the data received in the response from the mailserver.
type MailserverSignal ¶ added in v0.93.2
type MediaServerStarted ¶ added in v0.109.4
type MediaServerStarted struct {
Port int `json:"port"`
}
MediaServerStarted specifies chat and message that was delivered
type MessageDeliveredSignal ¶ added in v0.71.5
type MessageDeliveredSignal struct { ChatID string `json:"chatID"` MessageID string `json:"messageID"` }
MessageDeliveredSignal specifies chat and message that was delivered
type MobileSignalHandler ¶ added in v0.35.0
type MobileSignalHandler func([]byte)
MobileSignalHandler is a simple callback function that gets called when any signal is received
type NoHistoryArchivesCreatedSignal ¶ added in v0.98.1
type NodeCrashEvent ¶
type NodeCrashEvent struct {
Error string `json:"error"`
}
NodeCrashEvent is special kind of error, used to report node crashes
type NodeLoginEvent ¶ added in v0.35.0
type NodeLoginEvent struct {
Error string `json:"error,omitempty"`
}
NodeLoginEvent returns the result of the login event
type NodeNotificationHandler ¶
type NodeNotificationHandler func(jsonEvent string)
NodeNotificationHandler defines a handler able to process incoming node events. Events are encoded as JSON strings.
type PendingRequestErrorEvent ¶
type PendingRequestErrorEvent struct { PendingRequestEvent ErrorMessage string `json:"error_message"` ErrorCode int `json:"error_code,string"` }
PendingRequestErrorEvent is a signal sent when sign request has failed
type PendingRequestEvent ¶
type PendingRequestEvent struct { ID string `json:"id"` Method string `json:"method"` Args interface{} `json:"args"` MessageID string `json:"message_id"` }
PendingRequestEvent is a signal sent when a sign request is added
type SubscriptionDataEvent ¶ added in v0.35.0
type SubscriptionDataEvent struct { FilterID string `json:"subscription_id"` Data []interface{} `json:"data"` }