Documentation ¶
Index ¶
- Constants
- func DecodeClientDHTDiscoverOfferRequest(fcrMsg *FCRMessage) (*cid.ContentID, int64, [][][cidoffer.CIDOfferDigestSize]byte, []nodeid.NodeID, ...)
- func DecodeClientDHTDiscoverRequest(fcrMsg *FCRMessage) (*cid.ContentID, int64, int64, int64, bool, string, string, error)
- func DecodeClientDHTDiscoverRequestV2(fcrMsg *FCRMessage) (*cid.ContentID, int64, int64, int64, bool, string, string, error)
- func DecodeClientDHTOfferAckRequest(fcrMsg *FCRMessage) (*cid.ContentID, *nodeid.NodeID, error)
- func DecodeClientDHTOfferAckResponse(fcrMsg *FCRMessage) (*cid.ContentID, *nodeid.NodeID, bool, *FCRMessage, *FCRMessage, error)
- func DecodeClientEstablishmentRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, string, int64, error)
- func DecodeClientEstablishmentResponse(fcrMsg *FCRMessage) (*nodeid.NodeID, string, error)
- func DecodeClientStandardDiscoverOfferRequest(fcrMsg *FCRMessage) (*cid.ContentID, int64, int64, [][cidoffer.CIDOfferDigestSize]byte, string, ...)
- func DecodeClientStandardDiscoverOfferResponse(fcrMsg *FCRMessage) (*cid.ContentID, int64, bool, []cidoffer.SubCIDOffer, []bool, bool, int64, ...)
- func DecodeClientStandardDiscoverRequest(fcrMsg *FCRMessage) (*cid.ContentID, int64, int64, string, string, error)
- func DecodeClientStandardDiscoverRequestV2(fcrMsg *FCRMessage) (*cid.ContentID, int64, int64, string, string, error)
- func DecodeClientStandardDiscoverResponse(fcrMsg *FCRMessage) (*cid.ContentID, int64, bool, []cidoffer.SubCIDOffer, []bool, error)
- func DecodeClientStandardDiscoverResponseV2(fcrMsg *FCRMessage) (*cid.ContentID, int64, bool, [][cidoffer.CIDOfferDigestSize]byte, []bool, bool, ...)
- func DecodeGatewayAdminForceRefreshRequest(fcrMsg *FCRMessage) (bool, error)
- func DecodeGatewayAdminForceRefreshResponse(fcrMsg *FCRMessage) (bool, error)
- func DecodeGatewayAdminGetReputationRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, error)
- func DecodeGatewayAdminGetReputationResponse(fcrMsg *FCRMessage) (*nodeid.NodeID, int64, bool, error)
- func DecodeGatewayAdminInitialiseKeyRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, *fcrcrypto.KeyPair, *fcrcrypto.KeyVersion, error)
- func DecodeGatewayAdminInitialiseKeyRequestV2(fcrMsg *FCRMessage) (*nodeid.NodeID, *fcrcrypto.KeyPair, *fcrcrypto.KeyVersion, string, string, ...)
- func DecodeGatewayAdminInitialiseKeyResponse(fcrMsg *FCRMessage) (bool, error)
- func DecodeGatewayAdminListDHTOfferRequest(fcrMsg *FCRMessage) (bool, error)
- func DecodeGatewayAdminListDHTOfferResponse(fcrMsg *FCRMessage) (bool, error)
- func DecodeGatewayAdminSetReputationRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, int64, error)
- func DecodeGatewayAdminSetReputationResponse(fcrMsg *FCRMessage) (*nodeid.NodeID, int64, bool, error)
- func DecodeGatewayDHTDiscoverOfferRequest(fcrMsg *FCRMessage) (*cid.ContentID, int64, [][cidoffer.CIDOfferDigestSize]byte, string, string, ...)
- func DecodeGatewayDHTDiscoverOfferResponse(fcrMsg *FCRMessage) (*cid.ContentID, int64, bool, []cidoffer.SubCIDOffer, []bool, bool, int64, ...)
- func DecodeGatewayDHTDiscoverRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, *cid.ContentID, int64, int64, string, string, error)
- func DecodeGatewayDHTDiscoverRequestV2(fcrMsg *FCRMessage) (*nodeid.NodeID, *cid.ContentID, int64, int64, string, string, error)
- func DecodeGatewayDHTDiscoverResponse(fcrMsg *FCRMessage) (*cid.ContentID, int64, bool, []cidoffer.SubCIDOffer, []bool, error)
- func DecodeGatewayDHTDiscoverResponseV2(fcrMsg *FCRMessage) (*cid.ContentID, int64, bool, [][cidoffer.CIDOfferDigestSize]byte, []bool, bool, ...)
- func DecodeGatewayListDHTOfferRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, *cid.ContentID, *cid.ContentID, string, string, string, ...)
- func DecodeGatewayNotifyProviderGroupCIDOfferSupportRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, bool, error)
- func DecodeGatewayNotifyProviderGroupCIDOfferSupportResponse(fcrMsg *FCRMessage) (bool, error)
- func DecodeGatewayPingRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, int64, int64, error)
- func DecodeGatewayPingResponse(fcrMsg *FCRMessage) (int64, bool, error)
- func DecodeInvalidMessageResponse(fcrMsg *FCRMessage) error
- func DecodeProtocolChangeRequest(fcrMsg *FCRMessage) (int32, error)
- func DecodeProtocolChangeResponse(fcrMsg *FCRMessage) (bool, error)
- func DecodeProviderAdminForceRefreshRequest(fcrMsg *FCRMessage) (bool, error)
- func DecodeProviderAdminForceRefreshResponse(fcrMsg *FCRMessage) (bool, error)
- func DecodeProviderAdminGetPublishedOfferRequest(fcrMsg *FCRMessage) ([]nodeid.NodeID, error)
- func DecodeProviderAdminGetPublishedOfferResponse(fcrMsg *FCRMessage) (bool, []cidoffer.CIDOffer, error)
- func DecodeProviderAdminInitialiseKeyRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, *fcrcrypto.KeyPair, *fcrcrypto.KeyVersion, error)
- func DecodeProviderAdminInitialiseKeyRequestV2(fcrMsg *FCRMessage) (*nodeid.NodeID, *fcrcrypto.KeyPair, *fcrcrypto.KeyVersion, string, string, ...)
- func DecodeProviderAdminInitialiseKeyResponse(fcrMsg *FCRMessage) (bool, error)
- func DecodeProviderAdminPublishDHTOfferRequest(fcrMsg *FCRMessage) ([]cid.ContentID, []uint64, []int64, []uint64, error)
- func DecodeProviderAdminPublishDHTOfferResponse(fcrMsg *FCRMessage) (bool, error)
- func DecodeProviderAdminPublishGroupOfferRequest(fcrMsg *FCRMessage) ([]cid.ContentID, uint64, int64, uint64, error)
- func DecodeProviderAdminPublishGroupOfferResponse(fcrMsg *FCRMessage) (bool, error)
- func DecodeProviderPublishDHTOfferRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, int64, []cidoffer.CIDOffer, error)
- func DecodeProviderPublishDHTOfferResponse(fcrMsg *FCRMessage) (int64, string, error)
- func DecodeProviderPublishGroupOfferRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, int64, *cidoffer.CIDOffer, error)
- func DecodeProviderPublishGroupOfferResponse(fcrMsg *FCRMessage) (*nodeid.NodeID, [cidoffer.CIDOfferDigestSize]byte, error)
- func DecodeUpdateGatewayGroupCIDOfferSupportRequest(fcrMsg *FCRMessage) (*nodeid.NodeID, []nodeid.NodeID, error)
- func DecodeUpdateGatewayGroupCIDOfferSupportResponse(fcrMsg *FCRMessage) (bool, error)
- func GetCurrentProtocolVersion() (int32, []int32)
- func SetCurrentProtocolVersion(newProtocolVersion int32, newProtocolSupported []int32)
- type FCRMessage
- func CreateFCRMessage(msgType int32, msgBody []byte) *FCRMessage
- func DecodeClientDHTDiscoverOfferResponse(fcrMsg *FCRMessage) (*cid.ContentID, int64, []nodeid.NodeID, []FCRMessage, bool, int64, error)
- func DecodeClientDHTDiscoverResponse(fcrMsg *FCRMessage) ([]nodeid.NodeID, []FCRMessage, []nodeid.NodeID, int64, bool, int64, error)
- func DecodeClientDHTDiscoverResponseV2(fcrMsg *FCRMessage) ([]nodeid.NodeID, []FCRMessage, []nodeid.NodeID, int64, bool, int64, error)
- func DecodeGatewayListDHTOfferAck(fcrMsg *FCRMessage) ([]FCRMessage, error)
- func DecodeGatewayListDHTOfferResponse(fcrMsg *FCRMessage) ([]FCRMessage, error)
- func EncodeClientDHTDiscoverOfferRequest(pieceCID *cid.ContentID, nonce int64, ...) (*FCRMessage, error)
- func EncodeClientDHTDiscoverOfferResponse(pieceCID *cid.ContentID, nonce int64, gatewayIDs []nodeid.NodeID, ...) (*FCRMessage, error)
- func EncodeClientDHTDiscoverRequest(pieceCID *cid.ContentID, nonce int64, ttl int64, numDHT int64, ...) (*FCRMessage, error)
- func EncodeClientDHTDiscoverRequestV2(pieceCID *cid.ContentID, nonce int64, ttl int64, numDHT int64, ...) (*FCRMessage, error)
- func EncodeClientDHTDiscoverResponse(contacted []nodeid.NodeID, response []FCRMessage, ...) (*FCRMessage, error)
- func EncodeClientDHTDiscoverResponseV2(contacted []nodeid.NodeID, response []FCRMessage, ...) (*FCRMessage, error)
- func EncodeClientDHTOfferAckRequest(pieceCID *cid.ContentID, gatewayID *nodeid.NodeID) (*FCRMessage, error)
- func EncodeClientDHTOfferAckResponse(pieceCID *cid.ContentID, gatewayID *nodeid.NodeID, found bool, ...) (*FCRMessage, error)
- func EncodeClientEstablishmentRequest(clientID *nodeid.NodeID, challenge string, ttl int64) (*FCRMessage, error)
- func EncodeClientEstablishmentResponse(gatewayID *nodeid.NodeID, challenge string) (*FCRMessage, error)
- func EncodeClientStandardDiscoverOfferRequest(pieceCID *cid.ContentID, nonce int64, ttl int64, ...) (*FCRMessage, error)
- func EncodeClientStandardDiscoverOfferResponse(pieceCID *cid.ContentID, nonce int64, found bool, ...) (*FCRMessage, error)
- func EncodeClientStandardDiscoverRequest(pieceCID *cid.ContentID, nonce int64, ttl int64, paychAddr string, ...) (*FCRMessage, error)
- func EncodeClientStandardDiscoverRequestV2(pieceCID *cid.ContentID, nonce int64, ttl int64, paychAddr string, ...) (*FCRMessage, error)
- func EncodeClientStandardDiscoverResponse(pieceCID *cid.ContentID, nonce int64, found bool, ...) (*FCRMessage, error)
- func EncodeClientStandardDiscoverResponseV2(pieceCID *cid.ContentID, nonce int64, found bool, ...) (*FCRMessage, error)
- func EncodeGatewayAdminForceRefreshRequest(refresh bool) (*FCRMessage, error)
- func EncodeGatewayAdminForceRefreshResponse(refreshed bool) (*FCRMessage, error)
- func EncodeGatewayAdminGetReputationRequest(clientID *nodeid.NodeID) (*FCRMessage, error)
- func EncodeGatewayAdminGetReputationResponse(clientID *nodeid.NodeID, reputation int64, exists bool) (*FCRMessage, error)
- func EncodeGatewayAdminInitialiseKeyRequest(nodeID *nodeid.NodeID, privateKey *fcrcrypto.KeyPair, ...) (*FCRMessage, error)
- func EncodeGatewayAdminInitialiseKeyRequestV2(nodeID *nodeid.NodeID, privateKey *fcrcrypto.KeyPair, ...) (*FCRMessage, error)
- func EncodeGatewayAdminInitialiseKeyResponse(success bool) (*FCRMessage, error)
- func EncodeGatewayAdminListDHTOfferRequest(refresh bool) (*FCRMessage, error)
- func EncodeGatewayAdminListDHTOfferResponse(refreshed bool) (*FCRMessage, error)
- func EncodeGatewayAdminSetReputationRequest(clientID *nodeid.NodeID, reputation int64) (*FCRMessage, error)
- func EncodeGatewayAdminSetReputationResponse(clientID *nodeid.NodeID, reputation int64, exists bool) (*FCRMessage, error)
- func EncodeGatewayDHTDiscoverOfferRequest(pieceCID *cid.ContentID, nonce int64, ...) (*FCRMessage, error)
- func EncodeGatewayDHTDiscoverOfferResponse(pieceCID *cid.ContentID, nonce int64, found bool, ...) (*FCRMessage, error)
- func EncodeGatewayDHTDiscoverRequest(gatewayID *nodeid.NodeID, pieceCID *cid.ContentID, nonce int64, ttl int64, ...) (*FCRMessage, error)
- func EncodeGatewayDHTDiscoverRequestV2(gatewayID *nodeid.NodeID, pieceCID *cid.ContentID, nonce int64, ttl int64, ...) (*FCRMessage, error)
- func EncodeGatewayDHTDiscoverResponse(pieceCID *cid.ContentID, nonce int64, found bool, ...) (*FCRMessage, error)
- func EncodeGatewayDHTDiscoverResponseV2(pieceCID *cid.ContentID, nonce int64, found bool, ...) (*FCRMessage, error)
- func EncodeGatewayListDHTOfferAck(publishedDHTOffersAck []FCRMessage) (*FCRMessage, error)
- func EncodeGatewayListDHTOfferRequest(gatewayID *nodeid.NodeID, cidMin *cid.ContentID, cidMax *cid.ContentID, ...) (*FCRMessage, error)
- func EncodeGatewayListDHTOfferResponse(publishedDHTOffers []FCRMessage) (*FCRMessage, error)
- func EncodeGatewayNotifyProviderGroupCIDOfferSupportRequest(gatewayID *nodeid.NodeID, groupCIDOfferSupported bool) (*FCRMessage, error)
- func EncodeGatewayNotifyProviderGroupCIDOfferSupportResponse(acknowledged bool) (*FCRMessage, error)
- func EncodeGatewayPingRequest(gatewayID *nodeid.NodeID, nonce, ttl int64) (*FCRMessage, error)
- func EncodeGatewayPingResponse(nonce int64, alive bool) (*FCRMessage, error)
- func EncodeInvalidMessageResponse() (*FCRMessage, error)
- func EncodeProtocolChangeRequest(desiredVersion int32) (*FCRMessage, error)
- func EncodeProtocolChangeResponse(success bool) (*FCRMessage, error)
- func EncodeProviderAdminForceRefreshRequest(refresh bool) (*FCRMessage, error)
- func EncodeProviderAdminForceRefreshResponse(refreshed bool) (*FCRMessage, error)
- func EncodeProviderAdminGetPublishedOfferRequest(gatewayIDs []nodeid.NodeID) (*FCRMessage, error)
- func EncodeProviderAdminGetPublishedOfferResponse(exists bool, offers []cidoffer.CIDOffer) (*FCRMessage, error)
- func EncodeProviderAdminInitialiseKeyRequest(nodeID *nodeid.NodeID, privateKey *fcrcrypto.KeyPair, ...) (*FCRMessage, error)
- func EncodeProviderAdminInitialiseKeyRequestV2(nodeID *nodeid.NodeID, privateKey *fcrcrypto.KeyPair, ...) (*FCRMessage, error)
- func EncodeProviderAdminInitialiseKeyResponse(success bool) (*FCRMessage, error)
- func EncodeProviderAdminPublishDHTOfferRequest(cids []cid.ContentID, price []uint64, expiry []int64, qos []uint64) (*FCRMessage, error)
- func EncodeProviderAdminPublishDHTOfferResponse(received bool) (*FCRMessage, error)
- func EncodeProviderAdminPublishGroupOfferRequest(cids []cid.ContentID, price uint64, expiry int64, qos uint64) (*FCRMessage, error)
- func EncodeProviderAdminPublishGroupOfferResponse(received bool) (*FCRMessage, error)
- func EncodeProviderPublishDHTOfferRequest(providerID *nodeid.NodeID, nonce int64, offers []cidoffer.CIDOffer) (*FCRMessage, error)
- func EncodeProviderPublishDHTOfferResponse(nonce int64, signature string) (*FCRMessage, error)
- func EncodeProviderPublishGroupOfferRequest(providerID *nodeid.NodeID, nonce int64, offer *cidoffer.CIDOffer) (*FCRMessage, error)
- func EncodeProviderPublishGroupOfferResponse(gatewayID nodeid.NodeID, digest [cidoffer.CIDOfferDigestSize]byte) (*FCRMessage, error)
- func EncodeUpdateGatewayGroupCIDOfferSupportRequest(nodeID *nodeid.NodeID, providerIDs []nodeid.NodeID) (*FCRMessage, error)
- func EncodeUpdateGatewayGroupCIDOfferSupportResponse(success bool) (*FCRMessage, error)
- func FCRMsgFromBytes(data []byte) (*FCRMessage, error)
- func (fcrMsg *FCRMessage) DumpMessage() string
- func (fcrMsg *FCRMessage) FCRMsgToBytes() ([]byte, error)
- func (fcrMsg *FCRMessage) GetMessageBody() []byte
- func (fcrMsg *FCRMessage) GetMessageType() int32
- func (fcrMsg *FCRMessage) GetProtocolSupported() []int32
- func (fcrMsg *FCRMessage) GetProtocolVersion() int32
- func (fcrMsg *FCRMessage) GetSignature() string
- func (fcrMsg FCRMessage) MarshalJSON() ([]byte, error)
- func (fcrMsg FCRMessage) MarshalToSign() ([]byte, error)
- func (fcrMsg *FCRMessage) Sign(privKey *fcrcrypto.KeyPair, keyVer *fcrcrypto.KeyVersion) error
- func (fcrMsg *FCRMessage) UnmarshalJSON(p []byte) error
- func (fcrMsg *FCRMessage) Verify(pubKey *fcrcrypto.KeyPair) error
Constants ¶
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
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
const ( ProviderPublishGroupOfferRequestType = 300 ProviderPublishGroupOfferResponseType = 301 ProviderPublishDHTOfferRequestType = 302 ProviderPublishDHTOfferResponseType = 303 )
Message types originating from Retrieval Provider
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
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
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 ¶
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 ¶
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 ¶
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 DecodeUpdateGatewayGroupCIDOfferSupportResponse ¶
func DecodeUpdateGatewayGroupCIDOfferSupportResponse(fcrMsg *FCRMessage) ( bool, error, )
func GetCurrentProtocolVersion ¶
GetCurrentProtocolVersion gets the current protocol version of all messages.
func SetCurrentProtocolVersion ¶
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 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.
Source Files ¶
- basic_invalid_message_response.go
- basic_protocol_change_request.go
- basic_protocol_change_response.go
- client_dht_discover_offer_request.go
- client_dht_discover_offer_response.go
- client_dht_discover_request.go
- client_dht_discover_request_v2.go
- client_dht_discover_response.go
- client_dht_discover_response_v2.go
- client_dht_offer_ack_request.go
- client_dht_offer_ack_response.go
- client_establishment_request.go
- client_establishment_response.go
- client_standard_discover_offer_request.go
- client_standard_discover_offer_response.go
- client_standard_discover_request.go
- client_standard_discover_request_v2.go
- client_standard_discover_response.go
- client_standard_discover_response_v2.go
- dump.go
- fcrmessage.go
- gateway_dht_discover_offer_request.go
- gateway_dht_discover_offer_response.go
- gateway_dht_discover_request.go
- gateway_dht_discover_request_v2.go
- gateway_dht_discover_response.go
- gateway_dht_discover_response_v2.go
- gateway_list_dht_offer_ack.go
- gateway_list_dht_offer_request.go
- gateway_list_dht_offer_response.go
- gateway_notify_provider_group_cid_offer_supported_request.go
- gateway_notify_provider_group_cid_offer_supported_response.go
- gateway_ping_request.go
- gateway_ping_response.go
- gatewayadmin_force_refresh_request.go
- gatewayadmin_force_refresh_response.go
- gatewayadmin_get_reputation_request.go
- gatewayadmin_get_reputation_response.go
- gatewayadmin_initialise_key_request.go
- gatewayadmin_initialise_key_request_v2.go
- gatewayadmin_initialise_key_response.go
- gatewayadmin_list_dht_offer_request.go
- gatewayadmin_list_dht_offer_response.go
- gatewayadmin_set_reputation_request.go
- gatewayadmin_set_reputation_response.go
- gatewayadmin_update_group_cid_offer_support_request.go
- gatewayadmin_update_group_cid_offer_support_response.go
- provider_publish_dht_offer_request.go
- provider_publish_dht_offer_response.go
- provider_publish_group_offer_request.go
- provider_publish_group_offer_response.go
- provideradmin_force_refresh_request.go
- provideradmin_force_refresh_response.go
- provideradmin_get_published_offer_request.go
- provideradmin_get_published_offer_response.go
- provideradmin_initialise_key_request.go
- provideradmin_initialise_key_request_v2.go
- provideradmin_initialise_key_response.go
- provideradmin_publish_dht_offer_request.go
- provideradmin_publish_dht_offer_response.go
- provideradmin_publish_group_offer_request.go
- provideradmin_publish_group_offer_response.go
- type.go