Documentation
¶
Index ¶
Constants ¶
View Source
const (
// ExtensionDataTransfer is the identifier for the data transfer extension to graphsync
ExtensionDataTransfer = graphsync.ExtensionName("fil/data-transfer")
)
Variables ¶
This section is empty.
Functions ¶
func GetTransferData ¶
func GetTransferData(extendedData GsExtended) (datatransfer.Message, error)
GetTransferData unmarshals extension data. Returns:
- nil + nil if the extension is not found
- nil + error if the extendedData fails to unmarshal
- unmarshaled ExtensionDataTransferData + nil if all goes well
func ToExtensionData ¶
func ToExtensionData(msg datatransfer.Message) (graphsync.ExtensionData, error)
ToExtensionData converts a message to a graphsync extension
Types ¶
type GsExtended ¶
GsExtended is a small interface used by getExtensionData
Click to show internal directories.
Click to hide internal directories.