ipldbind

package
v0.13.12 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Prototype struct {
	Message schema.TypedPrototype
}

Functions

This section is empty.

Types

type GraphSyncBlock

type GraphSyncBlock struct {
	Prefix []byte
	Data   []byte
}

GraphSyncBlock is a container for representing extension data for bindnode, it's converted to a block.Block by the message translation layer

type GraphSyncExtensions

type GraphSyncExtensions struct {
	Keys   []string
	Values map[string]*datamodel.Node
}

GraphSyncExtensions is a container for representing extension data for bindnode, it's converted to a graphsync.ExtensionData list by ToExtensionsList()

func NewGraphSyncExtensions

func NewGraphSyncExtensions(part message.MessagePartWithExtensions) *GraphSyncExtensions

NewGraphSyncExtensions creates GraphSyncExtensions from either a request or response object

func (GraphSyncExtensions) ToExtensionsList

func (gse GraphSyncExtensions) ToExtensionsList() []graphsync.ExtensionData

ToExtensionsList creates a list of graphsync.ExtensionData objects from a GraphSyncExtensions

type GraphSyncMessage

type GraphSyncMessage struct {
	Requests  *[]GraphSyncRequest
	Responses *[]GraphSyncResponse
	Blocks    *[]GraphSyncBlock
}

GraphSyncMessage is a container for representing extension data for bindnode, it's converted to a message.GraphSyncMessage by the message translation layer

type GraphSyncMessageRoot

type GraphSyncMessageRoot struct {
	Gs2 *GraphSyncMessage
}

type GraphSyncRequest

type GraphSyncRequest struct {
	Id          []byte
	RequestType graphsync.RequestType
	Priority    *graphsync.Priority
	Root        *cid.Cid
	Selector    *datamodel.Node
	Extensions  *GraphSyncExtensions
}

GraphSyncRequest is a struct to capture data on a request contained in a GraphSyncMessage.

type GraphSyncResponse

type GraphSyncResponse struct {
	Id         []byte
	Status     graphsync.ResponseStatusCode
	Metadata   *[]message.GraphSyncLinkMetadatum
	Extensions *GraphSyncExtensions
}

GraphSyncResponse is an struct to capture data on a response sent back in a GraphSyncMessage.

type NamedExtension

type NamedExtension struct {
	Name graphsync.ExtensionName
	Data datamodel.Node
}

NamedExtension exists just for the purpose of the constructors

Jump to

Keyboard shortcuts

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