go-ipfs: github.com/ipfs/go-ipfs/core/coredag Index | Files

package coredag

import "github.com/ipfs/go-ipfs/core/coredag"

Index

Package Files

cbor.go dagpb.go dagtransl.go raw.go

Variables

var DefaultInputEncParsers = InputEncParsers{
    "json":     defaultJSONParsers,
    "raw":      defaultRawParsers,
    "cbor":     defaultCborParsers,
    "protobuf": defaultProtobufParsers,
}

DefaultInputEncParsers is InputEncParser that is used everywhere

func ParseInputs Uses

func ParseInputs(ienc, format string, r io.Reader, mhType uint64, mhLen int) ([]ipld.Node, error)

ParseInputs uses DefaultInputEncParsers to parse io.Reader described by input encoding and format to an instance of ipld Node

type DagParser Uses

type DagParser func(r io.Reader, mhType uint64, mhLen int) ([]ipld.Node, error)

DagParser is function used for parsing stream into Node

type FormatParsers Uses

type FormatParsers map[string]DagParser

FormatParsers is used for mapping format descriptors to DagParsers

type InputEncParsers Uses

type InputEncParsers map[string]FormatParsers

InputEncParsers is used for mapping input encodings to FormatParsers

func (InputEncParsers) AddParser Uses

func (iep InputEncParsers) AddParser(ienc, format string, f DagParser)

AddParser adds DagParser under give input encoding and format

func (InputEncParsers) ParseInputs Uses

func (iep InputEncParsers) ParseInputs(ienc, format string, r io.Reader, mhType uint64, mhLen int) ([]ipld.Node, error)

ParseInputs parses io.Reader described by input encoding and format to an instance of ipld Node

Package coredag imports 10 packages (graph) and is imported by 68 packages. Updated 2019-03-06. Refresh now. Tools for package owners.