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