Documentation
¶
Overview ¶
Package merkledag is a generated protocol buffer package.
It is generated from these files:
node.proto
It has these top-level messages:
PBLink PBNode
Index ¶
- type DAGService
- type Link
- type Node
- func (n *Node) AddNodeLink(name string, that *Node) error
- func (n *Node) Encoded(force bool) ([]byte, error)
- func (n *Node) Key() (u.Key, error)
- func (n *Node) Marshal() ([]byte, error)
- func (n *Node) MarshalTo(encoded []byte) error
- func (n *Node) Multihash() (mh.Multihash, error)
- func (n *Node) Size() (uint64, error)
- func (n *Node) Unmarshal(encoded []byte) error
- type NodeMap
- type PBLink
- func (this *PBLink) Equal(that interface{}) bool
- func (m *PBLink) GetHash() []byte
- func (m *PBLink) GetName() string
- func (m *PBLink) GetTsize() uint64
- func (this *PBLink) GoString() string
- func (m *PBLink) Marshal() (data []byte, err error)
- func (m *PBLink) MarshalTo(data []byte) (n int, err error)
- func (*PBLink) ProtoMessage()
- func (m *PBLink) Reset()
- func (m *PBLink) Size() (n int)
- func (this *PBLink) String() string
- func (m *PBLink) Unmarshal(data []byte) error
- func (this *PBLink) VerboseEqual(that interface{}) error
- type PBNode
- func (this *PBNode) Equal(that interface{}) bool
- func (m *PBNode) GetData() []byte
- func (m *PBNode) GetLinks() []*PBLink
- func (this *PBNode) GoString() string
- func (m *PBNode) Marshal() (data []byte, err error)
- func (m *PBNode) MarshalTo(data []byte) (n int, err error)
- func (*PBNode) ProtoMessage()
- func (m *PBNode) Reset()
- func (m *PBNode) Size() (n int)
- func (this *PBNode) String() string
- func (m *PBNode) Unmarshal(data []byte) error
- func (this *PBNode) VerboseEqual(that interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DAGService ¶
type DAGService struct {
Blocks *blocks.BlockService
}
An IPFS Merkle DAG service. the root is virtual (like a forest) stores nodes' data in a blockService
type Link ¶
type Link struct { // utf string name. should be unique per object Name string // utf8 // cumulative size of target object Size uint64 // multihash of the target object Hash mh.Multihash // a ptr to the actual node for graph manipulation Node *Node }
An IPFS Merkle DAG Link
type PBLink ¶
type PBLink struct { // multihash of the target object Hash []byte `protobuf:"bytes,1,opt" json:"Hash,omitempty"` // utf string name. should be unique per object Name *string `protobuf:"bytes,2,opt" json:"Name,omitempty"` // cumulative size of target object Tsize *uint64 `protobuf:"varint,3,opt" json:"Tsize,omitempty"` XXX_unrecognized []byte `json:"-"` }
An IPFS MerkleDAG Link
func NewPopulatedPBLink ¶
func (*PBLink) ProtoMessage ¶
func (*PBLink) ProtoMessage()
func (*PBLink) VerboseEqual ¶
type PBNode ¶
type PBNode struct { // refs to other objects Links []*PBLink `protobuf:"bytes,2,rep" json:"Links,omitempty"` // opaque user data Data []byte `protobuf:"bytes,1,opt" json:"Data,omitempty"` XXX_unrecognized []byte `json:"-"` }
An IPFS MerkleDAG Node
func NewPopulatedPBNode ¶
func (*PBNode) ProtoMessage ¶
func (*PBNode) ProtoMessage()
func (*PBNode) VerboseEqual ¶
Click to show internal directories.
Click to hide internal directories.