Documentation
¶
Index ¶
- type Node
- func (n Node) AddChain(c chain.Chain) (rn Node)
- func (n Node) CommonChain(their Node) chain.Chain
- func (n Node) CommonChains(their Node) []chain.Pair
- func (n Node) Invite(inviteesNode Node, invitersKey crypto.Key, inviteesPubKey crypto.PubKey, ...) (rn Node)
- func (n Node) IsInviterFor(their Node) bool
- func (n Node) Len() int
- func (n Node) OneHop(their Node) bool
- func (n Node) WebOfTrustInfo(their Node) WebOfTrust
- type WebOfTrust
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
func NewRootNode ¶
func (Node) CommonChains ¶
CommonChains return slice of chain pairs. If no pairs can be found the slice is empty not nil.
func (Node) IsInviterFor ¶
func (Node) WebOfTrustInfo ¶
func (n Node) WebOfTrustInfo(their Node) WebOfTrust
WebOfTrustInfo returns web-of-trust information of two nodes if they share a trust chain. If not the Hops field is chain.NotConnected.
type WebOfTrust ¶
type WebOfTrust struct {
// Hops tells how far the the other end is when traversing thru the
// CommonInvider
Hops int
// CommonInviter from root, i.e. how far away it's from absolute root
CommonInvider int
// Position of the CommonInvider.
Position int
}
func NewWebOfTrust ¶
func NewWebOfTrust(n1, n2 Node) WebOfTrust
NewWebOfTrust returns web-of-trust information of two nodes if they share a trust chain. If not the Hops field is chain.NotConnected.
Click to show internal directories.
Click to hide internal directories.