fcrmessages

package
v0.0.0-...-12ab560 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const (
	ClientEstablishmentRequestType          = 100
	ClientEstablishmentResponseType         = 101
	ClientStandardDiscoverRequestType       = 102
	ClientStandardDiscoverResponseType      = 103
	ClientDHTDiscoverRequestType            = 104
	ClientDHTDiscoverResponseType           = 105
	ClientDHTOfferAckRequestType            = 106
	ClientDHTOfferAckResponseType           = 107
	ClientStandardDiscoverRequestV2Type     = 108
	ClientStandardDiscoverResponseV2Type    = 109
	ClientStandardDiscoverOfferRequestType  = 110
	ClientStandardDiscoverOfferResponseType = 111
	ClientDHTDiscoverRequestV2Type          = 112
	ClientDHTDiscoverResponseV2Type         = 113
	ClientDHTDiscoverOfferRequestType       = 114
	ClientDHTDiscoverOfferResponseType      = 115
)

Message types originating from Retrieval Client

View Source
const (
	GatewayListDHTOfferRequestType                          = 200
	GatewayListDHTOfferResponseType                         = 201
	GatewayListDHTOfferAckType                              = 202
	GatewayDHTDiscoverRequestType                           = 203
	GatewayDHTDiscoverResponseType                          = 204
	GatewayPingRequestType                                  = 205
	GatewayPingResponseType                                 = 206
	GatewayNotifyProviderGroupCIDOfferSupportedRequestType  = 205
	GatewayNotifyProviderGroupCIDOfferSupportedResponseType = 206
	GatewayDHTDiscoverRequestV2Type                         = 207
	GatewayDHTDiscoverResponseV2Type                        = 208
	GatewayDHTDiscoverOfferRequestType                      = 209
	GatewayDHTDiscoverOfferResponseType                     = 210
)

Message types originating from Retrieval Gateway

View Source
const (
	ProviderPublishGroupOfferRequestType  = 300
	ProviderPublishGroupOfferResponseType = 301
	ProviderPublishDHTOfferRequestType    = 302
	ProviderPublishDHTOfferResponseType   = 303
)

Message types originating from Retrieval Provider

View Source
const (
	GatewayAdminInitialiseKeyRequestType                      = 400
	GatewayAdminInitialiseKeyResponseType                     = 401
	GatewayAdminGetReputationRequestType                      = 402
	GatewayAdminGetReputationResponseType                     = 403
	GatewayAdminSetReputationRequestType                      = 404
	GatewayAdminSetReputationResponseType                     = 405
	GatewayAdminForceRefreshRequestType                       = 406
	GatewayAdminForceRefreshResponseType                      = 407
	GatewayAdminUpdateGatewayGroupCIDOfferSupportRequestType  = 408
	GatewayAdminUpdateGatewayGroupCIDOfferSupportResponseType = 409
	GatewayAdminListDHTOfferRequestType                       = 410
	GatewayAdminListDHTOfferResponseType                      = 411
	GatewayAdminInitialiseKeyRequestV2Type                    = 412
)

Message types originating from Retrieval Gateway Admin

View Source
const (
	ProviderAdminInitialiseKeyRequestType      = 500
	ProviderAdminInitialiseKeyResponseType     = 501
	ProviderAdminPublishGroupOfferRequestType  = 502
	ProviderAdminPublishGroupOfferResponseType = 503
	ProviderAdminPublishDHTOfferRequestType    = 504
	ProviderAdminPublishDHTOfferResponseType   = 505
	ProviderAdminGetPublishedOfferRequestType  = 506
	ProviderAdminGetPublishedOfferResponseType = 507
	ProviderAdminForceRefreshRequestType       = 508
	ProviderAdminForceRefreshResponseType      = 509
	ProviderAdminInitialiseKeyRequestV2Type    = 510
)

Message types originating from Retrieval Provider Admin

View Source
const (
	ProtocolChangeRequestType  = 900
	ProtocolChangeResponseType = 901
	InvalidMessageResponseType = 902
)

Messages for basic protocol

Variables

This section is empty.

Functions

func DecodeClientDHTDiscoverOfferRequest

func DecodeClientDHTDiscoverOfferRequest(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	[][][cidoffer.CIDOfferDigestSize]byte,
	[]nodeid.NodeID,
	string,
	string,
	error,
)

DecodeClientDHTDiscoverOfferRequest is used to get the fields from FCRMessage of clientDHTDiscoverOfferRequest

func DecodeClientDHTDiscoverRequest

func DecodeClientDHTDiscoverRequest(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	int64,
	int64,
	bool,
	string,
	string,
	error,
)

DecodeClientDHTDiscoverRequest is used to get the fields from FCRMessage of clientDHTDiscoverRequest

func DecodeClientDHTDiscoverRequestV2

func DecodeClientDHTDiscoverRequestV2(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	int64,
	int64,
	bool,
	string,
	string,
	error,
)

DecodeClientDHTDiscoverRequestV2 is used to get the fields from FCRMessage of clientDHTDiscoverRequestV2

func DecodeClientDHTOfferAckRequest

func DecodeClientDHTOfferAckRequest(fcrMsg *FCRMessage) (
	*cid.ContentID,
	*nodeid.NodeID,
	error,
)

DecodeClientDHTOfferAckRequest is used to get the fields from FCRMessage of clientDHTOfferAckRequest

func DecodeClientDHTOfferAckResponse

func DecodeClientDHTOfferAckResponse(fcrMsg *FCRMessage) (
	*cid.ContentID,
	*nodeid.NodeID,
	bool,
	*FCRMessage,
	*FCRMessage,
	error,
)

DecodeClientDHTOfferAckResponse is used to get the fields from FCRMessage of clientDHTOfferAckResponse

func DecodeClientEstablishmentRequest

func DecodeClientEstablishmentRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	string,
	int64,
	error,
)

DecodeClientEstablishmentRequest is used to get the fields from FCRMessage of clientEstablishmentRequest

func DecodeClientEstablishmentResponse

func DecodeClientEstablishmentResponse(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	string,
	error,
)

DecodeClientEstablishmentResponse is used to get the fields from FCRMessage of ClientEstablishmentResponse

func DecodeClientStandardDiscoverOfferRequest

func DecodeClientStandardDiscoverOfferRequest(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	int64,
	[][cidoffer.CIDOfferDigestSize]byte,
	string,
	string,
	error,
)

DecodeClientStandardDiscoverOfferRequest is used to get the fields from FCRMessage of clientStandardDiscoverOfferRequest

func DecodeClientStandardDiscoverOfferResponse

func DecodeClientStandardDiscoverOfferResponse(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	bool,
	[]cidoffer.SubCIDOffer,
	[]bool,
	bool,
	int64,
	error,
)

DecodeClientStandardDiscoverOfferResponse is used to get the fields from FCRMessage of clientStandardDiscoverOfferResponse

func DecodeClientStandardDiscoverRequest

func DecodeClientStandardDiscoverRequest(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	int64,
	string,
	string,
	error,
)

DecodeClientStandardDiscoverRequest is used to get the fields from FCRMessage of clientStandardDiscoverRequest

func DecodeClientStandardDiscoverRequestV2

func DecodeClientStandardDiscoverRequestV2(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	int64,
	string,
	string,
	error,
)

DecodeClientStandardDiscoverRequestV2 is used to get the fields from FCRMessage of clientStandardDiscoverRequestV2

func DecodeClientStandardDiscoverResponse

func DecodeClientStandardDiscoverResponse(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	bool,
	[]cidoffer.SubCIDOffer,
	[]bool,
	error,
)

DecodeClientStandardDiscoverResponse is used to get the fields from FCRMessage of clientStandardDiscoverResponse

func DecodeClientStandardDiscoverResponseV2

func DecodeClientStandardDiscoverResponseV2(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	bool,
	[][cidoffer.CIDOfferDigestSize]byte,
	[]bool,
	bool,
	int64,
	error,
)

DecodeClientStandardDiscoverResponseV2 is used to get the fields from FCRMessage of clientStandardDiscoverResponseV2

func DecodeGatewayAdminForceRefreshRequest

func DecodeGatewayAdminForceRefreshRequest(fcrMsg *FCRMessage) (
	bool,
	error,
)

DecodeGatewayAdminForceRefreshRequest is used to get the fields from FCRMessage of gatewayAdminForceRefreshRequest

func DecodeGatewayAdminForceRefreshResponse

func DecodeGatewayAdminForceRefreshResponse(fcrMsg *FCRMessage) (
	bool,
	error,
)

DecodeGatewayAdminForceRefreshResponse is used to get the fields from FCRMessage of gatewayAdminForceRefreshResponse

func DecodeGatewayAdminGetReputationRequest

func DecodeGatewayAdminGetReputationRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	error,
)

DecodeGatewayAdminGetReputationRequest is used to get the fields from FCRMessage of gatewayAdminGetReputationRequest

func DecodeGatewayAdminGetReputationResponse

func DecodeGatewayAdminGetReputationResponse(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	int64,
	bool,
	error,
)

DecodeGatewayAdminGetReputationResponse is used to get the fields from FCRMessage of gatewayAdminGetReputationResponse

func DecodeGatewayAdminInitialiseKeyRequest

func DecodeGatewayAdminInitialiseKeyRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	*fcrcrypto.KeyPair,
	*fcrcrypto.KeyVersion,
	error,
)

DecodeGatewayAdminInitialiseKeyRequest is used to get the fields from FCRMessage of gatewayAdminInitialiseKeyRequest

func DecodeGatewayAdminInitialiseKeyRequestV2

func DecodeGatewayAdminInitialiseKeyRequestV2(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	*fcrcrypto.KeyPair,
	*fcrcrypto.KeyVersion,
	string,
	string,
	string,
	error,
)

DecodeGatewayAdminInitialiseKeyRequestV2 is used to get the fields from FCRMessage of gatewayAdminInitialiseKeyRequestV2

func DecodeGatewayAdminInitialiseKeyResponse

func DecodeGatewayAdminInitialiseKeyResponse(fcrMsg *FCRMessage) (
	bool,
	error,
)

DecodeGatewayAdminInitialiseKeyResponse is used to get the fields from FCRMessage of GatewayAdminInitialiseKeyResponse

func DecodeGatewayAdminListDHTOfferRequest

func DecodeGatewayAdminListDHTOfferRequest(fcrMsg *FCRMessage) (
	bool,
	error,
)

DecodeGatewayAdminListDHTOfferRequest is used to get the fields from FCRMessage of gatewayAdminListDHTOfferRequest

func DecodeGatewayAdminListDHTOfferResponse

func DecodeGatewayAdminListDHTOfferResponse(fcrMsg *FCRMessage) (
	bool,
	error,
)

DecodeGatewayAdminListDHTOfferResponse is used to get the fields from FCRMessage of gatewayAdminListDHTOfferResponse

func DecodeGatewayAdminSetReputationRequest

func DecodeGatewayAdminSetReputationRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	int64,
	error,
)

DecodeGatewayAdminSetReputationRequest is used to get the fields from FCRMessage of gatewayAdminSetReputationRequest

func DecodeGatewayAdminSetReputationResponse

func DecodeGatewayAdminSetReputationResponse(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	int64,
	bool,
	error,
)

DecodeGatewayAdminSetReputationResponse is used to get the fields from FCRMessage of gatewayAdminSetReputationResponse

func DecodeGatewayDHTDiscoverOfferRequest

func DecodeGatewayDHTDiscoverOfferRequest(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	[][cidoffer.CIDOfferDigestSize]byte,
	string,
	string,
	error,
)

DecodeGatewayDHTDiscoverOfferRequest is used to get the fields from FCRMessage of gatewayDHTDiscoverOfferRequest

func DecodeGatewayDHTDiscoverOfferResponse

func DecodeGatewayDHTDiscoverOfferResponse(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	bool,
	[]cidoffer.SubCIDOffer,
	[]bool,
	bool,
	int64,
	error,
)

DecodeGatewayDHTDiscoverOfferResponse is used to get the fields from FCRMessage of GatewayDHTDiscoverOfferResponse

func DecodeGatewayDHTDiscoverRequest

func DecodeGatewayDHTDiscoverRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	*cid.ContentID,
	int64,
	int64,
	string,
	string,
	error,
)

DecodeGatewayDHTDiscoverRequest is used to get the fields from FCRMessage of GatewayDHTDiscoverRequest

func DecodeGatewayDHTDiscoverRequestV2

func DecodeGatewayDHTDiscoverRequestV2(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	*cid.ContentID,
	int64,
	int64,
	string,
	string,
	error,
)

DecodeGatewayDHTDiscoverRequestV2 is used to get the fields from FCRMessage of GatewayDHTDiscoverRequestV2

func DecodeGatewayDHTDiscoverResponse

func DecodeGatewayDHTDiscoverResponse(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	bool,
	[]cidoffer.SubCIDOffer,
	[]bool,
	error,
)

DecodeGatewayDHTDiscoverResponse is used to get the fields from FCRMessage of GatewayDHTDiscoverResponse

func DecodeGatewayDHTDiscoverResponseV2

func DecodeGatewayDHTDiscoverResponseV2(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	bool,
	[][cidoffer.CIDOfferDigestSize]byte,
	[]bool,
	bool,
	int64,
	error,
)

DecodeGatewayDHTDiscoverResponseV2 is used to get the fields from FCRMessage of GatewayDHTDiscoverResponseV2

func DecodeGatewayListDHTOfferRequest

func DecodeGatewayListDHTOfferRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	*cid.ContentID,
	*cid.ContentID,
	string,
	string,
	string,
	*fcrmerkletree.FCRMerkleProof,
	error,
)

DecodeGatewayListDHTOfferRequest is used to get the fields from FCRMessage of gatewayListDHTOfferRequest

func DecodeGatewayNotifyProviderGroupCIDOfferSupportRequest

func DecodeGatewayNotifyProviderGroupCIDOfferSupportRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	bool,
	error,
)

func DecodeGatewayNotifyProviderGroupCIDOfferSupportResponse

func DecodeGatewayNotifyProviderGroupCIDOfferSupportResponse(fcrMsg *FCRMessage) (
	bool,
	error,
)

func DecodeGatewayPingRequest

func DecodeGatewayPingRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	int64,
	int64,
	error,
)

DecodeGatewayPingRequest is used to get the fields from FCRMessage of gatewayPingRequest

func DecodeGatewayPingResponse

func DecodeGatewayPingResponse(fcrMsg *FCRMessage) (
	int64,
	bool,
	error,
)

DecodeGatewayPingResponse is used to get the fields from FCRMessage of GatewayPingResponse

func DecodeInvalidMessageResponse

func DecodeInvalidMessageResponse(fcrMsg *FCRMessage) error

DecodeInvalidMessageResponse is used to get the fields from FCRMessage of invalidMessageResponse

func DecodeProtocolChangeRequest

func DecodeProtocolChangeRequest(fcrMsg *FCRMessage) (
	int32,
	error,
)

DecodeProtocolChangeRequest is used to get the fields from FCRMessage of protocolChangeRequest

func DecodeProtocolChangeResponse

func DecodeProtocolChangeResponse(fcrMsg *FCRMessage) (
	bool,
	error,
)

DecodeProtocolChangeResponse is used to get the fields from FCRMessage of protocolChangeResponse

func DecodeProviderAdminForceRefreshRequest

func DecodeProviderAdminForceRefreshRequest(fcrMsg *FCRMessage) (
	bool,
	error,
)

DecodeProviderAdminForceRefreshRequest is used to get the fields from FCRMessage of providerAdminForceRefreshRequest

func DecodeProviderAdminForceRefreshResponse

func DecodeProviderAdminForceRefreshResponse(fcrMsg *FCRMessage) (
	bool,
	error,
)

DecodeProviderAdminForceRefreshResponse is used to get the fields from FCRMessage of providerAdminForceRefreshResponse

func DecodeProviderAdminGetPublishedOfferRequest

func DecodeProviderAdminGetPublishedOfferRequest(fcrMsg *FCRMessage) (
	[]nodeid.NodeID,
	error,
)

DecodeProviderAdminGetPublishedOfferRequest is used to get the fields from FCRMessage of providerAdminGetPublishedOfferRequest

func DecodeProviderAdminGetPublishedOfferResponse

func DecodeProviderAdminGetPublishedOfferResponse(fcrMsg *FCRMessage) (
	bool,
	[]cidoffer.CIDOffer,
	error,
)

DecodeProviderAdminGetPublishedOfferResponse is used to get the fields from FCRMessage of providerAdminGetPublishedOfferResponse

func DecodeProviderAdminInitialiseKeyRequest

func DecodeProviderAdminInitialiseKeyRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	*fcrcrypto.KeyPair,
	*fcrcrypto.KeyVersion,
	error,
)

DecodeProviderAdminInitialiseKeyRequest is used to get the fields from FCRMessage of providerAdminInitialiseKeyRequest

func DecodeProviderAdminInitialiseKeyRequestV2

func DecodeProviderAdminInitialiseKeyRequestV2(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	*fcrcrypto.KeyPair,
	*fcrcrypto.KeyVersion,
	string,
	string,
	string,
	error,
)

DecodeProviderAdminInitialiseKeyRequestV2 is used to get the fields from FCRMessage of providerAdminInitialiseKeyRequestV2

func DecodeProviderAdminInitialiseKeyResponse

func DecodeProviderAdminInitialiseKeyResponse(fcrMsg *FCRMessage) (
	bool,
	error,
)

DecodeProviderAdminInitialiseKeyResponse is used to get the fields from FCRMessage of ProviderAdminInitialiseKeyResponse

func DecodeProviderAdminPublishDHTOfferRequest

func DecodeProviderAdminPublishDHTOfferRequest(fcrMsg *FCRMessage) (
	[]cid.ContentID,
	[]uint64,
	[]int64,
	[]uint64,
	error,
)

DecodeProviderAdminPublishDHTOfferRequest is used to get the fields from FCRMessage of providerAdminPublishDHTOfferRequest

func DecodeProviderAdminPublishDHTOfferResponse

func DecodeProviderAdminPublishDHTOfferResponse(fcrMsg *FCRMessage) (
	bool,
	error,
)

DecodeProviderAdminPublishDHTOfferResponse is used to get the fields from FCRMessage of providerAdminPublishDHTOfferResponse

func DecodeProviderAdminPublishGroupOfferRequest

func DecodeProviderAdminPublishGroupOfferRequest(fcrMsg *FCRMessage) (
	[]cid.ContentID,
	uint64,
	int64,
	uint64,
	error,
)

DecodeProviderAdminPublishGroupOfferRequest is used to get the fields from FCRMessage of providerAdminPublishGroupOfferRequest

func DecodeProviderAdminPublishGroupOfferResponse

func DecodeProviderAdminPublishGroupOfferResponse(fcrMsg *FCRMessage) (
	bool,
	error,
)

DecodeProviderAdminPublishGroupOfferResponse is used to get the fields from FCRMessage of providerAdminPublishGroupOfferResponse

func DecodeProviderPublishDHTOfferRequest

func DecodeProviderPublishDHTOfferRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	int64,
	[]cidoffer.CIDOffer,
	error,
)

DecodeProviderPublishDHTOfferRequest is used to get the fields from FCRMessage of providerPublishDHTOfferRequest

func DecodeProviderPublishDHTOfferResponse

func DecodeProviderPublishDHTOfferResponse(fcrMsg *FCRMessage) (
	int64,
	string,
	error,
)

DecodeProviderPublishDHTOfferResponse is used to get the fields from FCRMessage of ProviderPublishDHTOfferResponse

func DecodeProviderPublishGroupOfferRequest

func DecodeProviderPublishGroupOfferRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	int64,
	*cidoffer.CIDOffer,
	error,
)

DecodeProviderPublishGroupOfferRequest is used to get the fields from FCRMessage of providerPublishGroupOfferRequest

func DecodeProviderPublishGroupOfferResponse

func DecodeProviderPublishGroupOfferResponse(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	[cidoffer.CIDOfferDigestSize]byte,
	error,
)

DecodeProviderPublishGroupOfferResponse is used to get the fields from FCRMessage of ProviderPublishGroupOfferResponse

func DecodeUpdateGatewayGroupCIDOfferSupportRequest

func DecodeUpdateGatewayGroupCIDOfferSupportRequest(fcrMsg *FCRMessage) (
	*nodeid.NodeID,
	[]nodeid.NodeID,
	error,
)

func DecodeUpdateGatewayGroupCIDOfferSupportResponse

func DecodeUpdateGatewayGroupCIDOfferSupportResponse(fcrMsg *FCRMessage) (
	bool,
	error,
)

func GetCurrentProtocolVersion

func GetCurrentProtocolVersion() (int32, []int32)

GetCurrentProtocolVersion gets the current protocol version of all messages.

func SetCurrentProtocolVersion

func SetCurrentProtocolVersion(newProtocolVersion int32, newProtocolSupported []int32)

SetCurrentProtocolVersion sets the current protocol version of all messages.

Types

type FCRMessage

type FCRMessage struct {
	// contains filtered or unexported fields
}

FCRMessage is the message used in communication between filecoin retrieval entities.

func CreateFCRMessage

func CreateFCRMessage(msgType int32, msgBody []byte) *FCRMessage

CreateFCRMessage is used to create an unsigned message

func DecodeClientDHTDiscoverOfferResponse

func DecodeClientDHTDiscoverOfferResponse(fcrMsg *FCRMessage) (
	*cid.ContentID,
	int64,
	[]nodeid.NodeID,
	[]FCRMessage,
	bool,
	int64,
	error,
)

DecodeClientDHTDiscoverOfferResponse is used to get the fields from FCRMessage of clientDHTDiscoverOfferResponse

func DecodeClientDHTDiscoverResponse

func DecodeClientDHTDiscoverResponse(fcrMsg *FCRMessage) (
	[]nodeid.NodeID,
	[]FCRMessage,
	[]nodeid.NodeID,
	int64,
	bool,
	int64,
	error,
)

DecodeClientDHTDiscoverResponse is used to get the fields from FCRMessage of ClientDHTDiscoverResponse

func DecodeClientDHTDiscoverResponseV2

func DecodeClientDHTDiscoverResponseV2(fcrMsg *FCRMessage) (
	[]nodeid.NodeID,
	[]FCRMessage,
	[]nodeid.NodeID,
	int64,
	bool,
	int64,
	error,
)

DecodeClientDHTDiscoverResponseV2 is used to get the fields from FCRMessage of ClientDHTDiscoverResponse

func DecodeGatewayListDHTOfferAck

func DecodeGatewayListDHTOfferAck(fcrMsg *FCRMessage) (
	[]FCRMessage,
	error,
)

DecodeGatewayListDHTOfferAck is used to get the fields from FCRMessage of gatewayListDHTOfferAck

func DecodeGatewayListDHTOfferResponse

func DecodeGatewayListDHTOfferResponse(fcrMsg *FCRMessage) (
	[]FCRMessage,
	error,
)

DecodeGatewayListDHTOfferResponse is used to get the fields from FCRMessage of GatewayListDHTOfferResponse

func EncodeClientDHTDiscoverOfferRequest

func EncodeClientDHTDiscoverOfferRequest(
	pieceCID *cid.ContentID,
	nonce int64,
	gatewaysDigests [][][cidoffer.CIDOfferDigestSize]byte,
	gatewayIDs []nodeid.NodeID,
	paychAddr string,
	voucher string,
) (*FCRMessage, error)

EncodeClientDHTDiscoverOfferRequest is used to get the FCRMessage of clientDHTDiscoverOfferRequest

func EncodeClientDHTDiscoverOfferResponse

func EncodeClientDHTDiscoverOfferResponse(
	pieceCID *cid.ContentID,
	nonce int64,
	gatewayIDs []nodeid.NodeID,
	response []FCRMessage,
	paymentRequired bool,
	paymentChannel int64,
) (*FCRMessage, error)

EncodeClientDHTDiscoverOfferResponse is used to get the FCRMessage of clientDHTDiscoverOfferResponse

func EncodeClientDHTDiscoverRequest

func EncodeClientDHTDiscoverRequest(
	pieceCID *cid.ContentID,
	nonce int64,
	ttl int64,
	numDHT int64,
	incrementalResults bool,
	paychAddr string,
	voucher string,
) (*FCRMessage, error)

EncodeClientDHTDiscoverRequest is used to get the FCRMessage of clientDHTDiscoverRequest

func EncodeClientDHTDiscoverRequestV2

func EncodeClientDHTDiscoverRequestV2(
	pieceCID *cid.ContentID,
	nonce int64,
	ttl int64,
	numDHT int64,
	incrementalResults bool,
	paychAddr string,
	voucher string,
) (*FCRMessage, error)

EncodeClientDHTDiscoverRequestV2 is used to get the FCRMessage of clientDHTDiscoverRequest

func EncodeClientDHTDiscoverResponse

func EncodeClientDHTDiscoverResponse(
	contacted []nodeid.NodeID,
	response []FCRMessage,
	unContactable []nodeid.NodeID,
	nonce int64,
	paymentRequired bool,
	paymentChannel int64,
) (*FCRMessage, error)

EncodeClientDHTDiscoverResponse is used to get the FCRMessage of ClientDHTDiscoverResponse

func EncodeClientDHTDiscoverResponseV2

func EncodeClientDHTDiscoverResponseV2(
	contacted []nodeid.NodeID,
	response []FCRMessage,
	unContactable []nodeid.NodeID,
	nonce int64,
	paymentRequired bool,
	paymentChannel int64,
) (*FCRMessage, error)

EncodeClientDHTDiscoverResponseV2 is used to get the FCRMessage of ClientDHTDiscoverResponse

func EncodeClientDHTOfferAckRequest

func EncodeClientDHTOfferAckRequest(
	pieceCID *cid.ContentID,
	gatewayID *nodeid.NodeID,
) (*FCRMessage, error)

EncodeClientDHTOfferAckRequest is used to get the FCRMessage of clientDHTOfferAckRequest

func EncodeClientDHTOfferAckResponse

func EncodeClientDHTOfferAckResponse(
	pieceCID *cid.ContentID,
	gatewayID *nodeid.NodeID,
	found bool,
	publishDHTOfferRequest *FCRMessage,
	publishDHTOfferResponse *FCRMessage,
) (*FCRMessage, error)

EncodeClientDHTOfferAckResponse is used to get the FCRMessage of clientDHTOfferAckResponse

func EncodeClientEstablishmentRequest

func EncodeClientEstablishmentRequest(
	clientID *nodeid.NodeID,
	challenge string,
	ttl int64,
) (*FCRMessage, error)

EncodeClientEstablishmentRequest is used to get the FCRMessage of clientEstablishmentRequest

func EncodeClientEstablishmentResponse

func EncodeClientEstablishmentResponse(
	gatewayID *nodeid.NodeID,
	challenge string,
) (*FCRMessage, error)

EncodeClientEstablishmentResponse is used to get the FCRMessage of clientEstablishmentResponse

func EncodeClientStandardDiscoverOfferRequest

func EncodeClientStandardDiscoverOfferRequest(
	pieceCID *cid.ContentID,
	nonce int64,
	ttl int64,
	offerDigests [][cidoffer.CIDOfferDigestSize]byte,
	paychAddr string,
	voucher string,
) (*FCRMessage, error)

EncodeClientStandardDiscoverOfferRequest is used to get the FCRMessage of clientStandardDiscoverOfferRequest

func EncodeClientStandardDiscoverOfferResponse

func EncodeClientStandardDiscoverOfferResponse(
	pieceCID *cid.ContentID,
	nonce int64,
	found bool,
	offers []cidoffer.SubCIDOffer,
	fundedPaymentChannel []bool,
	paymentRequired bool,
	paymentChannel int64,
) (*FCRMessage, error)

EncodeClientStandardDiscoverOfferResponse is used to get the FCRMessage of clientStandardDiscoverOfferResponse

func EncodeClientStandardDiscoverRequest

func EncodeClientStandardDiscoverRequest(
	pieceCID *cid.ContentID,
	nonce int64,
	ttl int64,
	paychAddr string,
	voucher string,
) (*FCRMessage, error)

EncodeClientStandardDiscoverRequest is used to get the FCRMessage of clientStandardDiscoverRequest

func EncodeClientStandardDiscoverRequestV2

func EncodeClientStandardDiscoverRequestV2(
	pieceCID *cid.ContentID,
	nonce int64,
	ttl int64,
	paychAddr string,
	voucher string,
) (*FCRMessage, error)

EncodeClientStandardDiscoverRequestV2 is used to get the FCRMessage of clientStandardDiscoverRequestV2

func EncodeClientStandardDiscoverResponse

func EncodeClientStandardDiscoverResponse(
	pieceCID *cid.ContentID,
	nonce int64,
	found bool,
	offers []cidoffer.SubCIDOffer,
	fundedPaymentChannel []bool,
) (*FCRMessage, error)

EncodeClientStandardDiscoverResponse is used to get the FCRMessage of clientStandardDiscoverResponse

func EncodeClientStandardDiscoverResponseV2

func EncodeClientStandardDiscoverResponseV2(
	pieceCID *cid.ContentID,
	nonce int64,
	found bool,
	offersDigests [][cidoffer.CIDOfferDigestSize]byte,
	fundedPaymentChannel []bool,
	paymentRequired bool,
	paymentChannel int64,
) (*FCRMessage, error)

EncodeClientStandardDiscoverResponseV2 is used to get the FCRMessage of clientStandardDiscoverResponseV2

func EncodeGatewayAdminForceRefreshRequest

func EncodeGatewayAdminForceRefreshRequest(refresh bool) (*FCRMessage, error)

EncodeGatewayAdminForceRefreshRequest is used to get the FCRMessage of gatewayAdminForceRefreshRequest

func EncodeGatewayAdminForceRefreshResponse

func EncodeGatewayAdminForceRefreshResponse(
	refreshed bool,
) (*FCRMessage, error)

EncodeGatewayAdminForceRefreshResponse is used to get the FCRMessage of gatewayAdminForceRefreshResponse

func EncodeGatewayAdminGetReputationRequest

func EncodeGatewayAdminGetReputationRequest(
	clientID *nodeid.NodeID,
) (*FCRMessage, error)

EncodeGatewayAdminGetReputationRequest is used to get the FCRMessage of gatewayAdminGetReputationRequest

func EncodeGatewayAdminGetReputationResponse

func EncodeGatewayAdminGetReputationResponse(
	clientID *nodeid.NodeID,
	reputation int64,
	exists bool,
) (*FCRMessage, error)

EncodeGatewayAdminGetReputationResponse is used to get the FCRMessage of gatewayAdminGetReputationResponse

func EncodeGatewayAdminInitialiseKeyRequest

func EncodeGatewayAdminInitialiseKeyRequest(
	nodeID *nodeid.NodeID,
	privateKey *fcrcrypto.KeyPair,
	keyVersion *fcrcrypto.KeyVersion,
) (*FCRMessage, error)

EncodeGatewayAdminInitialiseKeyRequest is used to get the FCRMessage of gatewayAdminInitialiseKeyRequest

func EncodeGatewayAdminInitialiseKeyRequestV2

func EncodeGatewayAdminInitialiseKeyRequestV2(
	nodeID *nodeid.NodeID,
	privateKey *fcrcrypto.KeyPair,
	keyVersion *fcrcrypto.KeyVersion,
	walletPrivateKey string,
	lotusAP string,
	lotusAuthToken string,
) (*FCRMessage, error)

EncodeGatewayAdminInitialiseKeyRequestV2 is used to get the FCRMessage of gatewayAdminInitialiseKeyRequestV2

func EncodeGatewayAdminInitialiseKeyResponse

func EncodeGatewayAdminInitialiseKeyResponse(
	success bool,
) (*FCRMessage, error)

EncodeGatewayAdminInitialiseKeyResponse is used to get the FCRMessage of gatewayAdminInitialiseKeyResponse

func EncodeGatewayAdminListDHTOfferRequest

func EncodeGatewayAdminListDHTOfferRequest(refresh bool) (*FCRMessage, error)

EncodeGatewayAdminListDHTOfferRequest is used to get the FCRMessage of gatewayAdminListDHTOfferRequest

func EncodeGatewayAdminListDHTOfferResponse

func EncodeGatewayAdminListDHTOfferResponse(refreshed bool) (*FCRMessage, error)

EncodeGatewayAdminListDHTOfferResponse is used to get the FCRMessage of gatewayAdminListDHTOfferResponse

func EncodeGatewayAdminSetReputationRequest

func EncodeGatewayAdminSetReputationRequest(
	clientID *nodeid.NodeID,
	reputation int64,
) (*FCRMessage, error)

EncodeGatewayAdminSetReputationRequest is used to get the FCRMessage of gatewayAdminSetReputationRequest

func EncodeGatewayAdminSetReputationResponse

func EncodeGatewayAdminSetReputationResponse(
	clientID *nodeid.NodeID,
	reputation int64,
	exists bool,
) (*FCRMessage, error)

EncodeGatewayAdminSetReputationResponse is used to get the FCRMessage of gatewayAdminSetReputationResponse

func EncodeGatewayDHTDiscoverOfferRequest

func EncodeGatewayDHTDiscoverOfferRequest(
	pieceCID *cid.ContentID,
	nonce int64,
	offerDigests [][cidoffer.CIDOfferDigestSize]byte,
	paychAddr string,
	voucher string,
) (*FCRMessage, error)

EncodeGatewayDHTDiscoverOfferRequest is used to get the FCRMessage of gatewayDHTDiscoverOfferRequest

func EncodeGatewayDHTDiscoverOfferResponse

func EncodeGatewayDHTDiscoverOfferResponse(
	pieceCID *cid.ContentID,
	nonce int64,
	found bool,
	offers []cidoffer.SubCIDOffer,
	fundedPaymentChannel []bool,
	paymentRequired bool,
	paymentChannel int64,
) (*FCRMessage, error)

EncodeGatewayDHTDiscoverOfferResponse is used to get the FCRMessage of gatewayDHTDiscoverOfferResponse

func EncodeGatewayDHTDiscoverRequest

func EncodeGatewayDHTDiscoverRequest(
	gatewayID *nodeid.NodeID,
	pieceCID *cid.ContentID,
	nonce int64,
	ttl int64,
	paychAddr string,
	voucher string,
) (*FCRMessage, error)

EncodeGatewayDHTDiscoverRequest is used to get the FCRMessage of gatewayDHTDiscoverRequest

func EncodeGatewayDHTDiscoverRequestV2

func EncodeGatewayDHTDiscoverRequestV2(
	gatewayID *nodeid.NodeID,
	pieceCID *cid.ContentID,
	nonce int64,
	ttl int64,
	paychAddr string,
	voucher string,
) (*FCRMessage, error)

EncodeGatewayDHTDiscoverRequestV2 is used to get the FCRMessage of gatewayDHTDiscoverRequestV2

func EncodeGatewayDHTDiscoverResponse

func EncodeGatewayDHTDiscoverResponse(
	pieceCID *cid.ContentID,
	nonce int64,
	found bool,
	offers []cidoffer.SubCIDOffer,
	fundedPaymentChannel []bool,
) (*FCRMessage, error)

EncodeGatewayDHTDiscoverResponse is used to get the FCRMessage of gatewayDHTDiscoverResponse

func EncodeGatewayDHTDiscoverResponseV2

func EncodeGatewayDHTDiscoverResponseV2(
	pieceCID *cid.ContentID,
	nonce int64,
	found bool,
	offers [][cidoffer.CIDOfferDigestSize]byte,
	fundedPaymentChannel []bool,
	paymentRequired bool,
	paymentChannel int64,
) (*FCRMessage, error)

EncodeGatewayDHTDiscoverResponseV2 is used to get the FCRMessage of gatewayDHTDiscoverResponseV2

func EncodeGatewayListDHTOfferAck

func EncodeGatewayListDHTOfferAck(
	publishedDHTOffersAck []FCRMessage,
) (*FCRMessage, error)

EncodeGatewayListDHTOfferAck is used to get the FCRMessage of gatewayListDHTOfferAck

func EncodeGatewayListDHTOfferRequest

func EncodeGatewayListDHTOfferRequest(
	gatewayID *nodeid.NodeID,
	cidMin *cid.ContentID,
	cidMax *cid.ContentID,
	blockHash string,
	transactionReceipt string,
	merkleRoot string,
	merkleProof *fcrmerkletree.FCRMerkleProof,
) (*FCRMessage, error)

EncodeGatewayListDHTOfferRequest is used to get the FCRMessage of gatewayListDHTOfferRequest

func EncodeGatewayListDHTOfferResponse

func EncodeGatewayListDHTOfferResponse(
	publishedDHTOffers []FCRMessage,
) (*FCRMessage, error)

EncodeGatewayListDHTOfferResponse is used to get the FCRMessage of GatewayListDHTOfferResponse

func EncodeGatewayNotifyProviderGroupCIDOfferSupportRequest

func EncodeGatewayNotifyProviderGroupCIDOfferSupportRequest(
	gatewayID *nodeid.NodeID,
	groupCIDOfferSupported bool,
) (*FCRMessage, error)

func EncodeGatewayNotifyProviderGroupCIDOfferSupportResponse

func EncodeGatewayNotifyProviderGroupCIDOfferSupportResponse(
	acknowledged bool,
) (*FCRMessage, error)

func EncodeGatewayPingRequest

func EncodeGatewayPingRequest(gatewayID *nodeid.NodeID, nonce, ttl int64) (*FCRMessage, error)

EncodeGatewayPingRequest is used to get the FCRMessage of gatewayPingRequest

func EncodeGatewayPingResponse

func EncodeGatewayPingResponse(
	nonce int64,
	alive bool,
) (*FCRMessage, error)

EncodeGatewayPingResponse is used to get the FCRMessage of gatewayPingResponse

func EncodeInvalidMessageResponse

func EncodeInvalidMessageResponse() (*FCRMessage, error)

EncodeInvalidMessageResponse is used to get the FCRMessage of invalidMessageResponse

func EncodeProtocolChangeRequest

func EncodeProtocolChangeRequest(
	desiredVersion int32,
) (*FCRMessage, error)

EncodeProtocolChangeRequest is used to get the FCRMessage of protocolChangeRequest

func EncodeProtocolChangeResponse

func EncodeProtocolChangeResponse(
	success bool,
) (*FCRMessage, error)

EncodeProtocolChangeResponse is used to get the FCRMessage of protocolChangeResponse

func EncodeProviderAdminForceRefreshRequest

func EncodeProviderAdminForceRefreshRequest(refresh bool) (*FCRMessage, error)

EncodeProviderAdminForceRefreshRequest is used to get the FCRMessage of providerAdminForceRefreshRequest

func EncodeProviderAdminForceRefreshResponse

func EncodeProviderAdminForceRefreshResponse(
	refreshed bool,
) (*FCRMessage, error)

EncodeProviderAdminForceRefreshResponse is used to get the FCRMessage of providerAdminForceRefreshResponse

func EncodeProviderAdminGetPublishedOfferRequest

func EncodeProviderAdminGetPublishedOfferRequest(
	gatewayIDs []nodeid.NodeID,
) (*FCRMessage, error)

EncodeProviderAdminGetPublishedOfferRequest is used to get the FCRMessage of providerAdminGetPublishedOfferRequest

func EncodeProviderAdminGetPublishedOfferResponse

func EncodeProviderAdminGetPublishedOfferResponse(
	exists bool,
	offers []cidoffer.CIDOffer,
) (*FCRMessage, error)

EncodeProviderAdminGetPublishedOfferResponse is used to get the FCRMessage of providerAdminGetPublishedOfferResponse

func EncodeProviderAdminInitialiseKeyRequest

func EncodeProviderAdminInitialiseKeyRequest(
	nodeID *nodeid.NodeID,
	privateKey *fcrcrypto.KeyPair,
	keyVersion *fcrcrypto.KeyVersion,
) (*FCRMessage, error)

EncodeProviderAdminInitialiseKeyRequest is used to get the FCRMessage of providerAdminInitialiseKeyRequest

func EncodeProviderAdminInitialiseKeyRequestV2

func EncodeProviderAdminInitialiseKeyRequestV2(
	nodeID *nodeid.NodeID,
	privateKey *fcrcrypto.KeyPair,
	keyVersion *fcrcrypto.KeyVersion,
	walletPrivateKey string,
	lotusAP string,
	lotusAuthToken string,
) (*FCRMessage, error)

EncodeProviderAdminInitialiseKeyRequestV2 is used to get the FCRMessage of providerAdminInitialiseKeyRequestV2

func EncodeProviderAdminInitialiseKeyResponse

func EncodeProviderAdminInitialiseKeyResponse(
	success bool,
) (*FCRMessage, error)

EncodeProviderAdminInitialiseKeyResponse is used to get the FCRMessage of providerAdminInitialiseKeyResponse

func EncodeProviderAdminPublishDHTOfferRequest

func EncodeProviderAdminPublishDHTOfferRequest(
	cids []cid.ContentID,
	price []uint64,
	expiry []int64,
	qos []uint64,
) (*FCRMessage, error)

EncodeProviderAdminPublishDHTOfferRequest is used to get the FCRMessage of providerAdminPublishDHTOfferRequest

func EncodeProviderAdminPublishDHTOfferResponse

func EncodeProviderAdminPublishDHTOfferResponse(
	received bool,
) (*FCRMessage, error)

EncodeProviderAdminPublishDHTOfferResponse is used to get the FCRMessage of providerAdminPublishDHTOfferResponse

func EncodeProviderAdminPublishGroupOfferRequest

func EncodeProviderAdminPublishGroupOfferRequest(
	cids []cid.ContentID,
	price uint64,
	expiry int64,
	qos uint64,
) (*FCRMessage, error)

EncodeProviderAdminPublishGroupOfferRequest is used to get the FCRMessage of providerAdminPublishGroupOfferRequest

func EncodeProviderAdminPublishGroupOfferResponse

func EncodeProviderAdminPublishGroupOfferResponse(
	received bool,
) (*FCRMessage, error)

EncodeProviderAdminPublishGroupOfferResponse is used to get the FCRMessage of providerAdminPublishGroupOfferResponse

func EncodeProviderPublishDHTOfferRequest

func EncodeProviderPublishDHTOfferRequest(
	providerID *nodeid.NodeID,
	nonce int64,
	offers []cidoffer.CIDOffer,
) (*FCRMessage, error)

EncodeProviderPublishDHTOfferRequest is used to get the FCRMessage of providerPublishDHTOfferRequest

func EncodeProviderPublishDHTOfferResponse

func EncodeProviderPublishDHTOfferResponse(
	nonce int64,
	signature string,
) (*FCRMessage, error)

EncodeProviderPublishDHTOfferResponse is used to get the FCRMessage of ProviderPublishDHTOfferResponse

func EncodeProviderPublishGroupOfferRequest

func EncodeProviderPublishGroupOfferRequest(
	providerID *nodeid.NodeID,
	nonce int64,
	offer *cidoffer.CIDOffer,
) (*FCRMessage, error)

EncodeProviderPublishGroupOfferRequest is used to get the FCRMessage of ProviderPublishGroupCIDRequest

func EncodeProviderPublishGroupOfferResponse

func EncodeProviderPublishGroupOfferResponse(
	gatewayID nodeid.NodeID,
	digest [cidoffer.CIDOfferDigestSize]byte,
) (*FCRMessage, error)

EncodeProviderPublishGroupOfferResponse is used to get the FCRMessage of ProviderPublishGroupOfferResponse

func EncodeUpdateGatewayGroupCIDOfferSupportRequest

func EncodeUpdateGatewayGroupCIDOfferSupportRequest(
	nodeID *nodeid.NodeID,
	providerIDs []nodeid.NodeID,
) (*FCRMessage, error)

func EncodeUpdateGatewayGroupCIDOfferSupportResponse

func EncodeUpdateGatewayGroupCIDOfferSupportResponse(
	success bool,
) (*FCRMessage, error)

func FCRMsgFromBytes

func FCRMsgFromBytes(data []byte) (*FCRMessage, error)

FCRMsgFromBytes converts a bytes to FCRMessage

func (*FCRMessage) DumpMessage

func (fcrMsg *FCRMessage) DumpMessage() string

DumpMessage return a message with ASCII and hex.

func (*FCRMessage) FCRMsgToBytes

func (fcrMsg *FCRMessage) FCRMsgToBytes() ([]byte, error)

FCRMsgToBytes converts a FCRMessage to bytes

func (*FCRMessage) GetMessageBody

func (fcrMsg *FCRMessage) GetMessageBody() []byte

GetMessageBody is used to get the message body.

func (*FCRMessage) GetMessageType

func (fcrMsg *FCRMessage) GetMessageType() int32

GetMessageType is used to get the message type of the message.

func (*FCRMessage) GetProtocolSupported

func (fcrMsg *FCRMessage) GetProtocolSupported() []int32

GetProtocolSupported is used to get the protocol supported of peer.

func (*FCRMessage) GetProtocolVersion

func (fcrMsg *FCRMessage) GetProtocolVersion() int32

GetProtocolVersion is used to get the protocol version of peer.

func (*FCRMessage) GetSignature

func (fcrMsg *FCRMessage) GetSignature() string

GetSignature is used to get the signature.

func (FCRMessage) MarshalJSON

func (fcrMsg FCRMessage) MarshalJSON() ([]byte, error)

MarshalJSON is used to marshal offer into bytes.

func (FCRMessage) MarshalToSign

func (fcrMsg FCRMessage) MarshalToSign() ([]byte, error)

MarshalJSON is used to marshal offer into bytes to sign the message. This not includes the signature field

func (*FCRMessage) Sign

func (fcrMsg *FCRMessage) Sign(privKey *fcrcrypto.KeyPair, keyVer *fcrcrypto.KeyVersion) error

Sign is used to sign the message with a given private key and a key version.

func (*FCRMessage) UnmarshalJSON

func (fcrMsg *FCRMessage) UnmarshalJSON(p []byte) error

UnmarshalJSON is used to unmarshal bytes into offer.

func (*FCRMessage) Verify

func (fcrMsg *FCRMessage) Verify(pubKey *fcrcrypto.KeyPair) error

Verify is used to verify the offer with a given public key.

Source Files

Jump to

Keyboard shortcuts

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