Unverified Commit 035ab815 authored by Rod Vagg's avatar Rod Vagg

s/dag-cbor/dag-pb/gi

parent f75a516a
......@@ -19,10 +19,10 @@ type pbLink struct {
hasTsize bool
}
// Marshal provides an IPLD codec encode interface for DAG-CBOR data. Provide a
// conforming Node and a destination for bytes to marshal a DAG-CBOR IPLD Node.
// The Node must strictly conform to the DAG-CBOR schema
// (https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md).
// Marshal provides an IPLD codec encode interface for DAG-PB data. Provide a
// conforming Node and a destination for bytes to marshal a DAG-PB IPLD Node.
// The Node must strictly conform to the DAG-PB schema
// (https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md).
// For safest use, build Nodes using the Type.PBNode type.
func Marshal(inNode ipld.Node, out io.Writer) error {
// Wrap in a typed node for some basic schema form checking
......
......@@ -17,8 +17,8 @@ func init() {
cidlink.RegisterMulticodecEncoder(0x70, Encoder)
}
// Decoder provides an IPLD codec decode interface for DAG-CBOR data. Provide a
// compatible NodeAssembler and a byte source to unmarshal a DAG-CBOR IPLD Node.
// Decoder provides an IPLD codec decode interface for DAG-PB data. Provide a
// compatible NodeAssembler and a byte source to unmarshal a DAG-PB IPLD Node.
// Use the NodeAssembler from the PBNode type for safest construction
// (Type.PBNode.NewBuilder()). A Map assembler will also work.
// This function is registered via the go-ipld-prime link loader for multicodec
......@@ -27,10 +27,10 @@ func Decoder(na ipld.NodeAssembler, r io.Reader) error {
return Unmarshal(na, r)
}
// Encoder provides an IPLD codec encode interface for DAG-CBOR data. Provide a
// conforming Node and a destination for bytes to marshal a DAG-CBOR IPLD Node.
// The Node must strictly conform to the DAG-CBOR schema
// (https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md).
// Encoder provides an IPLD codec encode interface for DAG-PB data. Provide a
// conforming Node and a destination for bytes to marshal a DAG-PB IPLD Node.
// The Node must strictly conform to the DAG-PB schema
// (https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md).
// For safest use, build Nodes using the Type.PBNode type.
// This function is registered via the go-ipld-prime link loader for multicodec
// code 0x70 when this package is invoked via init.
......
......@@ -14,8 +14,8 @@ import (
// malformed data
var ErrIntOverflow = xerrors.Errorf("protobuf: varint overflow")
// Unmarshal provides an IPLD codec decode interface for DAG-CBOR data. Provide
// a compatible NodeAssembler and a byte source to unmarshal a DAG-CBOR IPLD
// Unmarshal provides an IPLD codec decode interface for DAG-PB data. Provide
// a compatible NodeAssembler and a byte source to unmarshal a DAG-PB IPLD
// Node. Use the NodeAssembler from the PBNode type for safest construction
// (Type.PBNode.NewBuilder()). A Map assembler will also work.
func Unmarshal(na ipld.NodeAssembler, in io.Reader) error {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment