fcradminmsg

package
v0.0.0-...-7a4b066 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Overview

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Package fcradminmsg - stores all the admin messages.

Index

Constants

View Source
const (
	InitialisationRequestType     = 0
	ListPeersRequestType          = 1
	ListPeersResponseType         = 2
	InspectPeerRequestType        = 3
	InspectPeerResponseType       = 5
	ChangePeerStatusRequestType   = 6
	ListCIDFrequencyRequestType   = 12
	ListCIDFrequencyResponseType  = 13
	GetOfferByCIDRequestType      = 14
	GetOfferByCIDResponseType     = 15
	CacheOfferByDigestRequestType = 16
	ListFilesRequestType          = 17
	ListFilesResponseType         = 18
	PublishOfferRequestType       = 19
	UploadFileRequestType         = 20
	ForceSyncRequestType          = 21
	ACKType                       = 22
)

Variables

This section is empty.

Functions

func DecodeACK

func DecodeACK(data []byte) (
	bool,
	string,
	error,
)

DecodeACK is used to get the fields from byte array of ackJson

func DecodeCacheOfferByDigestRequest

func DecodeCacheOfferByDigestRequest(data []byte) (
	string,
	string,
	error,
)

DecodeCacheOfferByDigestRequest is used to get the fields from byte array of cacheOfferByDigestRequestJson

func DecodeChangePeerStatusRequest

func DecodeChangePeerStatusRequest(data []byte) (
	string,
	bool,
	bool,
	error,
)

DecodeChangePeerStatusRequest is used to get the fields from changePeerStatusRequestJson

func DecodeGetOfferByCIDRequest

func DecodeGetOfferByCIDRequest(data []byte) (
	string,
	error,
)

DecodeGetOfferByCIDRequest is used to get the fields from byte array of getOfferByCIDRequestJson

func DecodeGetOfferByCIDResponse

func DecodeGetOfferByCIDResponse(data []byte) (
	[]string,
	[]string,
	[]string,
	[]int64,
	[]uint64,
	error,
)

DecodeGetOfferByCIDResponse is used to get the fields from byte array of getOfferByCIDResponseJson

func DecodeInitialisationRequest

func DecodeInitialisationRequest(data []byte) (
	string,
	int,
	string,
	string,
	string,
	string,
	string,
	string,
	string,
	string,
	error,
)

DecodeInitialisationRequest is used to get the fields from byte array of initialisationRequestJson

func DecodeInspectPeerRequest

func DecodeInspectPeerRequest(data []byte) (
	string,
	error,
)

DecodeInspectPeerRequest is used to get the fields from byte array of inspectPeerRequestJson

func DecodeInspectPeerResponse

func DecodeInspectPeerResponse(data []byte) (
	int64,
	bool,
	bool,
	[]string,
	error,
)

DecodeInspectPeerResponse is used to get the fields from byte array of inspectPeerResponseJson

func DecodeListCIDFrequencyRequest

func DecodeListCIDFrequencyRequest(data []byte) (
	uint,
	uint,
	error,
)

DecodeListCIDFrequencyRequest is used to get the fields from byte array of listCIDFrequencyRequestJson

func DecodeListCIDFrequencyResponse

func DecodeListCIDFrequencyResponse(data []byte) (
	[]string,
	[]int,
	error,
)

DecodeListCIDFrequencyResponse is used to get the fields from byte array of listCIDFrequencyResponseJson

func DecodeListFilesResponse

func DecodeListFilesResponse(data []byte) (
	[]string,
	[]string,
	[]int64,
	[]bool,
	[]int,
	error,
)

DecodeListFilesResponse is used to get the fields from byte array of listFilesResponseJson

func DecodeListPeersResponse

func DecodeListPeersResponse(data []byte) (
	[]string,
	[]int64,
	[]bool,
	[]bool,
	[]string,
	error,
)

DecodeListPeersResponse is used to get the fields from byte array of listPeersResponseJson

func DecodePublishOfferRequest

func DecodePublishOfferRequest(data []byte) (
	[]string,
	*big.Int,
	int64,
	uint64,
	error,
)

DecodePublishOfferRequest is used to get the fields from byte array of publishOfferRequestJson

func DecodeUploadFileStartRequest

func DecodeUploadFileStartRequest(data []byte) (
	string,
	[]byte,
	error,
)

DecodeUploadFileStartRequest is used to get the fields from byte array of uploadFileStartRequestJson

func EncodeACK

func EncodeACK(
	ack bool,
	data string,
) []byte

EncodeACK is used to get the byte array of ackJson

func EncodeCacheOfferByDigestRequest

func EncodeCacheOfferByDigestRequest(
	digest string,
	cid string,
) ([]byte, error)

EncodeCacheOfferByDigestRequest is used to get the byte array of cacheOfferByDigestRequestJson

func EncodeChangePeerStatusRequest

func EncodeChangePeerStatusRequest(
	nodeID string,
	block bool,
	unblock bool,
) ([]byte, error)

EncodeChangePeerStatusRequest is used to get the byte array of changePeerStatusRequestJson

func EncodeGetOfferByCIDRequest

func EncodeGetOfferByCIDRequest(
	cid string,
) ([]byte, error)

EncodeGetOfferByCIDRequest is used to get the byte array of getOfferByCIDRequestJson

func EncodeGetOfferByCIDResponse

func EncodeGetOfferByCIDResponse(
	digests []string,
	providers []string,
	prices []string,
	expiry []int64,
	qos []uint64,
) ([]byte, error)

EncodeGetOfferByCIDResponse is used to get the byte array of getOfferByCIDResponseJson

func EncodeInitialisationRequest

func EncodeInitialisationRequest(
	p2pPrivKey string,
	p2pPort int,
	networkAddr string,
	rootPrivKey string,
	lotusAPIAddr string,
	lotusAuthToken string,
	registerPrivKey string,
	registerAPIAddr string,
	registerAuthToken string,
	regionCode string,
) ([]byte, error)

EncodeInitialisationRequest is used to get the byte array of initialisationRequestJson

func EncodeInspectPeerRequest

func EncodeInspectPeerRequest(
	nodeID string,
) ([]byte, error)

EncodeInspectPeerRequest is used to get the byte array of inspectPeerRequestJson

func EncodeInspectPeerResponse

func EncodeInspectPeerResponse(
	score int64,
	pending bool,
	blocked bool,
	history []string,
) ([]byte, error)

EncodeInspectPeerResponse is used to get the byte array of inspectPeerResponseJson

func EncodeListCIDFrequencyRequest

func EncodeListCIDFrequencyRequest(
	from uint,
	to uint,
) ([]byte, error)

EncodeListCIDFrequencyRequest is used to get the byte array of listCIDFrequencyRequestJson

func EncodeListCIDFrequencyResponse

func EncodeListCIDFrequencyResponse(
	cids []string,
	count []int,
) ([]byte, error)

EncodeListCIDFrequencyResponse is used to get the byte array of listCIDFrequencyResponseJson

func EncodeListFilesResponse

func EncodeListFilesResponse(
	files []string,
	cids []string,
	sizes []int64,
	published []bool,
	frequency []int,
) ([]byte, error)

EncodeListFilesResponse is used to get the byte array of listFilesResponseJson

func EncodeListPeersResponse

func EncodeListPeersResponse(
	peerIDs []string,
	peerScore []int64,
	peerPending []bool,
	peerBlocked []bool,
	peerRecent []string,
) ([]byte, error)

EncodeListPeersResponse is used to get the byte array of listPeersResponseJson

func EncodePublishOfferRequest

func EncodePublishOfferRequest(
	files []string,
	price *big.Int,
	expiry int64,
	qos uint64,
) ([]byte, error)

EncodePublishOfferRequest is used to get the byte array of publishOfferRequestJson

func EncodeUploadFileStartRequest

func EncodeUploadFileStartRequest(
	tag string,
	data []byte,
) ([]byte, error)

EncodeUploadFileStartRequest is used to get the byte array of uploadFileStartRequestJson

Types

This section is empty.

Jump to

Keyboard shortcuts

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