metadata

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeMetadata

func EncodeMetadata(entries Metadata, ipldBridge ipldbridge.IPLDBridge) ([]byte, error)

EncodeMetadata encodes metadata to an IPLD node then serializes to raw bytes

Types

type Item

type Item struct {
	Link         ipld.Link
	BlockPresent bool
}

Item is a single link traversed in a repsonse

type Metadata

type Metadata []Item

Metadata is information about metadata contained in a response, which can be serialized back and forth to bytes

func DecodeMetadata

func DecodeMetadata(data []byte, ipldBridge ipldbridge.IPLDBridge) (Metadata, error)

DecodeMetadata assembles metadata from a raw byte array, first deserializing as a node and then assembling into a metadata struct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL