contacts

package
v4.2.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2019 License: BSD-3-Clause, BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

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 ContactLookupResult struct {
	UID     keybase1.UID `json:"uid,omitempty"`
	Coerced string       `json:"coerced,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL