Documentation ¶
Index ¶
- Constants
- func MapUIDsReturnMap(ctx context.Context, u libkb.UIDMapper, g libkb.UIDMapperContext, ...) (res map[keybase1.UID]libkb.UsernamePackage, err error)
- type OfflineUIDMap
- func (o *OfflineUIDMap) CheckUIDAgainstUsername(uid keybase1.UID, un libkb.NormalizedUsername) bool
- func (o *OfflineUIDMap) ClearUIDAtEldestSeqno(ctx context.Context, g libkb.UIDMapperContext, uid keybase1.UID, ...) error
- func (o *OfflineUIDMap) MapUIDsToUsernamePackages(ctx context.Context, g libkb.UIDMapperContext, uids []keybase1.UID, ...) ([]libkb.UsernamePackage, error)
- func (o *OfflineUIDMap) SetTestingNoCachingMode(enabled bool)
- type UIDMap
- func (u *UIDMap) CheckUIDAgainstUsername(uid keybase1.UID, un libkb.NormalizedUsername) bool
- func (u *UIDMap) Clear()
- func (u *UIDMap) ClearUIDAtEldestSeqno(ctx context.Context, g libkb.UIDMapperContext, uid keybase1.UID, ...) error
- func (u *UIDMap) MapUIDsToUsernamePackages(ctx context.Context, g libkb.UIDMapperContext, uids []keybase1.UID, ...) (res []libkb.UsernamePackage, err error)
- func (u *UIDMap) SetTestingNoCachingMode(enabled bool)
Constants ¶
const CurrentFullNamePackageVersion = keybase1.FullNamePackageVersion_V1
Variables ¶
This section is empty.
Functions ¶
func MapUIDsReturnMap ¶ added in v1.0.39
Types ¶
type OfflineUIDMap ¶ added in v1.0.34
type OfflineUIDMap struct{}
func (*OfflineUIDMap) CheckUIDAgainstUsername ¶ added in v1.0.34
func (o *OfflineUIDMap) CheckUIDAgainstUsername(uid keybase1.UID, un libkb.NormalizedUsername) bool
func (*OfflineUIDMap) ClearUIDAtEldestSeqno ¶ added in v1.0.34
func (o *OfflineUIDMap) ClearUIDAtEldestSeqno(ctx context.Context, g libkb.UIDMapperContext, uid keybase1.UID, s keybase1.Seqno) error
func (*OfflineUIDMap) MapUIDsToUsernamePackages ¶ added in v1.0.34
func (o *OfflineUIDMap) MapUIDsToUsernamePackages(ctx context.Context, g libkb.UIDMapperContext, uids []keybase1.UID, fullNameFreshness time.Duration, networktimeBudget time.Duration, forceNetworkForFullNames bool) ([]libkb.UsernamePackage, error)
func (*OfflineUIDMap) SetTestingNoCachingMode ¶ added in v1.0.34
func (o *OfflineUIDMap) SetTestingNoCachingMode(enabled bool)
type UIDMap ¶
func (*UIDMap) CheckUIDAgainstUsername ¶
func (*UIDMap) ClearUIDAtEldestSeqno ¶ added in v1.0.34
func (*UIDMap) MapUIDsToUsernamePackages ¶
func (u *UIDMap) MapUIDsToUsernamePackages(ctx context.Context, g libkb.UIDMapperContext, uids []keybase1.UID, fullNameFreshness time.Duration, networkTimeBudget time.Duration, forceNetworkForFullNames bool) (res []libkb.UsernamePackage, err error)
MapUIDsToUsernamePackages maps the given set of UIDs to the username packages, which include a username and a fullname, and when the mapping was loaded from the server. It blocks on the network until all usernames are known. If the `forceNetworkForFullNames` flag is specified, it will block on the network too. If the flag is not specified, then stale values (or unknown values) are OK, we won't go to network if we lack them. All network calls are limited by the given timeBudget, or if 0 is specified, there is indefinite budget. In the response, a nil FullNamePackage means that the lookup failed. A non-nil FullNamePackage means that some previous lookup worked, but might be arbitrarily out of date (depending on the cachedAt time). A non-nil FullNamePackage with an empty fullName field means that the user just hasn't supplied a fullName. FullNames can be cached bt the UIDMap, but expire after networkTimeBudget duration. If that value is 0, then infinitely stale names are allowed. If non-zero, and some names aren't stale, we'll have to go to the network.
*NOTE* that this function can return useful data and an error. In this regard, the error is more like a warning. But if, for instance, the mapper runs out of time budget, it will return the data it was able to get, and also the error.