本文整理匯總了Golang中github.com/keybase/client/go/libkb.TrackChainLink.GetTrackedKeys方法的典型用法代碼示例。如果您正苦於以下問題:Golang TrackChainLink.GetTrackedKeys方法的具體用法?Golang TrackChainLink.GetTrackedKeys怎麽用?Golang TrackChainLink.GetTrackedKeys使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/keybase/client/go/libkb.TrackChainLink
的用法示例。
在下文中一共展示了TrackChainLink.GetTrackedKeys方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: condenseRecord
func condenseRecord(l *libkb.TrackChainLink) (*jsonw.Wrapper, error) {
uid, err := l.GetTrackedUID()
if err != nil {
return nil, err
}
trackedKeys, err := l.GetTrackedKeys()
if err != nil {
return nil, err
}
fpsDisplay := make([]string, len(trackedKeys))
for i, trackedKey := range trackedKeys {
fpsDisplay[i] = strings.ToUpper(trackedKey.Fingerprint.String())
}
un, err := l.GetTrackedUsername()
if err != nil {
return nil, err
}
rp := l.RemoteKeyProofs()
out := jsonw.NewDictionary()
out.SetKey("uid", libkb.UIDWrapper(uid))
out.SetKey("keys", jsonw.NewString(strings.Join(fpsDisplay, ", ")))
out.SetKey("ctime", jsonw.NewInt64(l.GetCTime().Unix()))
out.SetKey("username", jsonw.NewString(un))
out.SetKey("proofs", rp)
return out, nil
}
示例2: linkPGPKeys
func (e *ListTrackingEngine) linkPGPKeys(link *libkb.TrackChainLink) (res []keybase1.PublicKey) {
trackedKeys, err := link.GetTrackedKeys()
if err != nil {
e.G().Log.Warning("Bad track of %s: %s", link.ToDisplayString(), err)
return res
}
for _, trackedKey := range trackedKeys {
res = append(res, keybase1.PublicKey{PGPFingerprint: trackedKey.Fingerprint.String()})
}
return res
}