Documentation ¶
Index ¶
- func LookupContact(userID *id.ID, user *xxdk.E2e, udContact contact.Contact) (*contact.Contact, error)
- func LookupContacts(in chan *id.ID, out chan *contact.Contact, failCh chan failure, user *xxdk.E2e, ...)
- func ResetSessions(in, out chan *contact.Contact, failCh chan failure, user *xxdk.E2e, ...)
- func RestoreContactsFromBackup(backupPartnerIDs []byte, user *xxdk.E2e, udManager *ud.Manager, ...) ([]*id.ID, []*id.ID, []error, error)
- type RestoreContactsUpdater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LookupContact ¶
func LookupContact(userID *id.ID, user *xxdk.E2e, udContact contact.Contact) ( *contact.Contact, error)
LookupContact lookups up a contact using the user discovery manager xxDK users should not use this function. This function is used by the mobile phone apps and are not intended to be part of the xxDK. It should be treated as internal functions specific to the phone apps.
func LookupContacts ¶
func LookupContacts(in chan *id.ID, out chan *contact.Contact, failCh chan failure, user *xxdk.E2e, udContact contact.Contact, wg *sync.WaitGroup)
LookupContacts routine looks up contacts xxDK users should not use this function. This function is used by the mobile phone apps and are not intended to be part of the xxDK. It should be treated as internal functions specific to the phone apps.
func ResetSessions ¶
func ResetSessions(in, out chan *contact.Contact, failCh chan failure, user *xxdk.E2e, wg *sync.WaitGroup)
ResetSessions routine reads the in channel, sends a reset session request, then marks it done by sending to the out channel. xxDK users should not use this function. This function is used by the mobile phone apps and are not intended to be part of the xxDK. It should be treated as internal functions specific to the phone apps.
func RestoreContactsFromBackup ¶
func RestoreContactsFromBackup(backupPartnerIDs []byte, user *xxdk.E2e, udManager *ud.Manager, updatesCb RestoreContactsUpdater) ([]*id.ID, []*id.ID, []error, error)
RestoreContactsFromBackup takes as input the jason output of the `NewClientFromBackup` function, unmarshals it into IDs, looks up each ID in user discovery, and initiates a session reset request. This function will not return until every id in the list has been sent a request. It should be called again and again until it completes. xxDK users should not use this function. This function is used by the mobile phone apps and are not intended to be part of the xxDK. It should be treated as internal functions specific to the phone apps.
Types ¶
type RestoreContactsUpdater ¶ added in v4.7.1
type RestoreContactsUpdater interface { // RestoreContactsCallback is called to report the current # of contacts // that have been found and how many have been restored // against the total number that need to be // processed. If an error occurs it it set on the err variable as a // plain string. RestoreContactsCallback(numFound, numRestored, total int, err string) }
RestoreContactsUpdater interface provides a callback function for receiving update information from RestoreContactsFromBackup.