Documentation
¶
Index ¶
- Variables
- func SafeUnwrap(node datamodel.Node) (_ interface{}, err error)
- func SafeWrap(ptr interface{}, typ schema.Type) (_ schema.TypedNode, err error)
- type GraphSyncBlock
- type GraphSyncExtensions
- type GraphSyncMessage
- type GraphSyncMessageRoot
- type GraphSyncRequest
- type GraphSyncResponse
- type NamedExtension
Constants ¶
This section is empty.
Variables ¶
var Prototype struct { Message schema.TypedPrototype }
Functions ¶
func SafeUnwrap ¶ added in v0.13.1
Types ¶
type GraphSyncBlock ¶
GraphSyncBlock is a container for representing extension data for bindnode, it's converted to a block.Block by the message translation layer
type GraphSyncExtensions ¶
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 ¶
NamedExtension exists just for the purpose of the constructors