Version: v0.10.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2021 License: MIT Imports: 7 Imported by: 58




This section is empty.


This section is empty.


func DefaultLinkSystem

func DefaultLinkSystem() ipld.LinkSystem

DefaultLinkSystem returns an ipld.LinkSystem which uses cidlink.Link for ipld.Link. During selection of encoders, decoders, and hashers, it examines the multicodec indicator numbers and multihash indicator numbers from the CID, and uses the default global multicodec registry (see the go-ipld-prime/multicodec package) for resolving codec implementations, and the default global multihash registry (see the go-multihash/core package) for resolving multihash implementations.

No storage functions are present in the returned LinkSystem. The caller can assign those themselves as desired.

func LinkSystemUsingMulticodecRegistry

func LinkSystemUsingMulticodecRegistry(mcReg multicodec.Registry) ipld.LinkSystem

LinkSystemUsingMulticodecRegistry is similar to DefaultLinkSystem, but accepts a multicodec.Registry as a parameter.

This can help create a LinkSystem which uses different multicodec implementations than the global registry. (Sometimes this can be desired if you want some parts of a program to support a more limited suite of codecs than other parts of the program, or needed to use a different multicodec registry than the global one for synchronization purposes, or etc.)


type Link struct {

Link implements the ipld.Link interface using a CID. See for more information about CIDs.

When using this value, typically you'll use it as `Link`, and not `*Link`. This includes when handling the value as an `ipld.Link` interface -- the non-pointer form is typically preferable. This is because the ipld.Link inteface is often desirable to be able to use as a golang map key, and in that context, pointers would not result in the desired behavior.

func (Link) Prototype

func (lnk Link) Prototype() ipld.LinkPrototype

func (Link) String

func (lnk Link) String() string

type LinkPrototype

type LinkPrototype struct {
func (lp LinkPrototype) BuildLink(hashsum []byte) ipld.Link

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to