Documentation ¶
Index ¶
- func ResolveContacts(mctx libkb.MetaContext, provider ContactsProvider, contacts []keybase1.Contact, ...) (res []keybase1.ProcessedContact, err error)
- type CachedContactsProvider
- func (c *CachedContactsProvider) FillFollowing(mctx libkb.MetaContext, res []keybase1.ProcessedContact)
- func (c *CachedContactsProvider) FillUsernames(mctx libkb.MetaContext, res []keybase1.ProcessedContact)
- func (c *CachedContactsProvider) LookupAll(mctx libkb.MetaContext, emails []keybase1.EmailAddress, ...) (res ContactLookupMap, err error)
- type ContactCacheStore
- type ContactLookupMap
- type ContactLookupResult
- type ContactsProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveContacts ¶
func ResolveContacts(mctx libkb.MetaContext, provider ContactsProvider, contacts []keybase1.Contact, regionCode keybase1.RegionCode) (res []keybase1.ProcessedContact, err error)
ResolveContacts resolves contacts with cache for UI. See API documentation in phone_numbers.avdl
regionCode is optional, user region should be provided if it's known. It's used when resolving local phone numbers, they are assumed to be local to the user, so in the same region.
Types ¶
type CachedContactsProvider ¶
type CachedContactsProvider struct { Provider ContactsProvider Store *ContactCacheStore // contains filtered or unexported fields }
func (*CachedContactsProvider) FillFollowing ¶
func (c *CachedContactsProvider) FillFollowing(mctx libkb.MetaContext, res []keybase1.ProcessedContact)
func (*CachedContactsProvider) FillUsernames ¶
func (c *CachedContactsProvider) FillUsernames(mctx libkb.MetaContext, res []keybase1.ProcessedContact)
func (*CachedContactsProvider) LookupAll ¶
func (c *CachedContactsProvider) LookupAll(mctx libkb.MetaContext, emails []keybase1.EmailAddress, numbers []keybase1.RawPhoneNumber, userRegion keybase1.RegionCode) (res ContactLookupMap, err error)
type ContactCacheStore ¶
type ContactCacheStore struct {
// contains filtered or unexported fields
}
ContactCacheStore is used by CachedContactsProvider to store contact cache encrypted with device key.
func NewContactCacheStore ¶
func NewContactCacheStore(g *libkb.GlobalContext) *ContactCacheStore
NewContactCacheStore creates new ContactCacheStore for given global context.
type ContactLookupMap ¶
type ContactLookupMap map[string]ContactLookupResult
func BulkLookupContacts ¶
func BulkLookupContacts(mctx libkb.MetaContext, emailsContacts []keybase1.EmailAddress, phoneNumberContacts []keybase1.RawPhoneNumber, userRegionCode keybase1.RegionCode) (ContactLookupMap, error)
func (ContactLookupMap) FindComponent ¶
func (r ContactLookupMap) FindComponent(component keybase1.ContactComponent) (res ContactLookupResult, found bool)
type ContactLookupResult ¶
type ContactsProvider ¶
type ContactsProvider interface { LookupAll(libkb.MetaContext, []keybase1.EmailAddress, []keybase1.RawPhoneNumber, keybase1.RegionCode) (ContactLookupMap, error) FillUsernames(libkb.MetaContext, []keybase1.ProcessedContact) FillFollowing(libkb.MetaContext, []keybase1.ProcessedContact) }
Click to show internal directories.
Click to hide internal directories.