Documentation ¶
Index ¶
- Constants
- func ClearExpiredShareLinksData(p2pAddress, walletAddr string, walletPubkey, wsign []byte, reqTime int64) *protos.ReqClearExpiredShareLinks
- func FindFileListData(fileName string, walletAddr, p2pAddress string, pageId uint64, keyword string, ...) *protos.ReqFindMyFileList
- func GetReqIdFromMessage(ctx context.Context) int64
- func GetSliceOffset(sliceNumber, sliceCount, sliceSize, fileSize uint64) *protos.SliceOffset
- func GetSpPubkey(spP2pAddr string) ([]byte, error)
- func PPMsgHeader(dataLen uint32, msgType header.MsgType) header.MessageHead
- func ReqBackupFileSliceData(ctx context.Context, task *task.UploadSliceTask, ...) *protos.ReqBackupFileSlice
- func ReqDeleteFileData(fileHash, p2pAddress string, walletAddr string, walletPubkey, wsign []byte, ...) *protos.ReqDeleteFile
- func ReqDeleteShareData(shareID, walletAddr, p2pAddress string, walletPubkey, wsign []byte, ...) *protos.ReqDeleteShare
- func ReqDowngradeInfo(ctx context.Context) *protos.ReqGetPPDowngradeInfo
- func ReqDownloadFileWrongData(fInfo *protos.RspFileStorageInfo, dTask *task.DownloadTask) *protos.ReqDownloadFileWrong
- func ReqDownloadSliceData(ctx context.Context, target *protos.RspFileStorageInfo, ...) *protos.ReqDownloadSlice
- func ReqFileReplicaInfo(path, walletAddr, p2pAddress string, replicaIncreaseNum uint32, ...) *protos.ReqFileReplicaInfo
- func ReqFileStatus(fileHash, walletAddr string, walletPubkey, walletSign []byte, reqTime int64) *protos.ReqFileStatus
- func ReqFileStorageInfoData(ctx context.Context, path, savePath, saveAs, walletAddr string, ...) *protos.ReqFileStorageInfo
- func ReqGetPPStatusData(ctx context.Context, initPPList bool) *protos.ReqGetPPStatus
- func ReqGetPPlistData(ctx context.Context) *protos.ReqGetPPList
- func ReqGetSPlistData(ctx context.Context, walletAddr string, walletPubkey, wsig []byte, ...) *protos.ReqGetSPList
- func ReqGetShareFileData(keyword, sharePassword, saveAs, walletAddr, p2pAddress string, ...) *protos.ReqGetShareFile
- func ReqGetWalletOzData(walletAddr, reqId string) *protos.ReqGetWalletOz
- func ReqMiningData(ctx context.Context) *protos.ReqMining
- func ReqNodeStatusData(p2pAddress string) *protos.ReqReportNodeStatus
- func ReqRegisterData(ctx context.Context, walletAddr string, walletPubkey, wsig []byte, ...) *protos.ReqRegister
- func ReqRegisterDataTR(ctx context.Context, target *protos.ReqRegister) *msg.RelayMsgBuf
- func ReqRegisterNewPPData(ctx context.Context, walletAddr string, walletPubkey, wsig []byte, ...) *protos.ReqRegisterNewPP
- func ReqReportDownloadResultData(ctx context.Context, target *protos.RspDownloadSlice, costTime int64, ...) *protos.ReqReportDownloadResult
- func ReqReportStreamResultData(ctx context.Context, target *protos.RspDownloadSlice, isPP bool) *protos.ReqReportDownloadResult
- func ReqReportUploadSliceResultData(ctx context.Context, taskId, fileHash, spP2pAddr, opponentP2pAddress string, ...) *protos.ReportUploadSliceResult
- func ReqShareFileData(fileHash, pathHash, walletAddr, p2pAddress string, isPrivate bool, ...) *protos.ReqShareFile
- func ReqShareLinkData(walletAddr, p2pAddress string, page uint64, walletPubkey, wsign []byte, ...) *protos.ReqShareLink
- func ReqStartMaintenance(ctx context.Context, duration uint64) *protos.ReqStartMaintenance
- func ReqStopMaintenance(ctx context.Context) *protos.ReqStopMaintenance
- func ReqTransferDownloadData(ctx context.Context, notice *protos.NoticeFileSliceBackup) *msg.RelayMsgBuf
- func ReqTransferDownloadWrongData(ctx context.Context, notice *protos.NoticeFileSliceBackup) *protos.ReqTransferDownloadWrong
- func ReqUploadFileSliceData(ctx context.Context, task *task.UploadSliceTask, ...) *protos.ReqUploadFileSlice
- func ReqUploadSlicesWrong(ctx context.Context, uploadTask *task.UploadFileTask, spP2pAddress string, ...) *protos.ReqUploadSlicesWrong
- func RequestDownloadFile(ctx context.Context, fileHash, sdmPath, walletAddr string, reqId string, ...) *protos.ReqFileStorageInfo
- func RequestUploadFile(ctx context.Context, fileName, fileHash string, fileSize uint64, ...) (*protos.ReqUploadFile, error)
- func RequestUploadFileData(ctx context.Context, fileInfo *protos.FileInfo, slices []*protos.SliceHashAddr, ...) *protos.ReqUploadFile
- func RspBackupFileSliceData(target *protos.ReqBackupFileSlice) *protos.RspBackupFileSlice
- func RspDownloadSliceData(ctx context.Context, target *protos.ReqDownloadSlice, ...) *protos.RspDownloadSlice
- func RspDownloadSliceDataSplit(rsp *protos.RspDownloadSlice, ...) *protos.RspDownloadSlice
- func RspGetHDInfoData(p2pAddress string) *protos.RspGetHDInfo
- func RspTransferDownload(data []byte, taskId, sliceHash, spP2pAddress, p2pAddress string, ...) *protos.RspTransferDownload
- func RspTransferDownloadResultData(taskId, sliceHash, spP2pAddress string) *protos.RspTransferDownloadResult
- func RspUploadFileSliceData(ctx context.Context, target *protos.ReqUploadFileSlice) *protos.RspUploadFileSlice
- func UnmarshalData(ctx context.Context, target interface{}) bool
- func UnmarshalMessageData(data []byte, target interface{}) bool
- func UploadSpeedOfProgressData(fileHash string, size uint64, start uint64, t int64) *protos.UploadSpeedOfProgress
Constants ¶
View Source
const INVALID_STAT = int64(-1)
Variables ¶
This section is empty.
Functions ¶
func ClearExpiredShareLinksData ¶ added in v0.10.0
func ClearExpiredShareLinksData(p2pAddress, walletAddr string, walletPubkey, wsign []byte, reqTime int64) *protos.ReqClearExpiredShareLinks
func FindFileListData ¶ added in v0.9.0
func GetReqIdFromMessage ¶ added in v0.7.0
func GetSliceOffset ¶ added in v0.10.0
func GetSliceOffset(sliceNumber, sliceCount, sliceSize, fileSize uint64) *protos.SliceOffset
func GetSpPubkey ¶ added in v0.9.0
func PPMsgHeader ¶
func PPMsgHeader(dataLen uint32, msgType header.MsgType) header.MessageHead
func ReqBackupFileSliceData ¶ added in v0.10.0
func ReqBackupFileSliceData(ctx context.Context, task *task.UploadSliceTask, pieceOffset *protos.SliceOffset, data []byte) *protos.ReqBackupFileSlice
func ReqDeleteFileData ¶
func ReqDeleteShareData ¶
func ReqDeleteShareData(shareID, walletAddr, p2pAddress string, walletPubkey, wsign []byte, reqTime int64) *protos.ReqDeleteShare
func ReqDowngradeInfo ¶ added in v0.9.0
func ReqDowngradeInfo(ctx context.Context) *protos.ReqGetPPDowngradeInfo
func ReqDownloadFileWrongData ¶ added in v0.7.0
func ReqDownloadFileWrongData(fInfo *protos.RspFileStorageInfo, dTask *task.DownloadTask) *protos.ReqDownloadFileWrong
func ReqDownloadSliceData ¶
func ReqDownloadSliceData(ctx context.Context, target *protos.RspFileStorageInfo, slice *protos.DownloadSliceInfo) *protos.ReqDownloadSlice
func ReqFileReplicaInfo ¶ added in v0.10.0
func ReqFileStatus ¶ added in v0.10.0
func ReqFileStatus(fileHash, walletAddr string, walletPubkey, walletSign []byte, reqTime int64) *protos.ReqFileStatus
func ReqFileStorageInfoData ¶
func ReqFileStorageInfoData(ctx context.Context, path, savePath, saveAs, walletAddr string, walletPUbkey, wsig []byte, shareRequest *protos.ReqGetShareFile, reqTime int64) *protos.ReqFileStorageInfo
ReqFileStorageInfoData encode ReqFileStorageInfo message. If it's not a "share request", walletAddr should keep the same as the wallet from the "path".
func ReqGetPPStatusData ¶ added in v0.5.1
func ReqGetPPStatusData(ctx context.Context, initPPList bool) *protos.ReqGetPPStatus
func ReqGetPPlistData ¶
func ReqGetPPlistData(ctx context.Context) *protos.ReqGetPPList
func ReqGetSPlistData ¶
func ReqGetShareFileData ¶
func ReqGetWalletOzData ¶ added in v0.6.0
func ReqGetWalletOzData(walletAddr, reqId string) *protos.ReqGetWalletOz
func ReqNodeStatusData ¶
func ReqNodeStatusData(p2pAddress string) *protos.ReqReportNodeStatus
func ReqRegisterData ¶
func ReqRegisterDataTR ¶
func ReqRegisterDataTR(ctx context.Context, target *protos.ReqRegister) *msg.RelayMsgBuf
func ReqRegisterNewPPData ¶
func ReqReportDownloadResultData ¶
func ReqReportDownloadResultData(ctx context.Context, target *protos.RspDownloadSlice, costTime int64, isPP bool) *protos.ReqReportDownloadResult
func ReqReportStreamResultData ¶ added in v0.9.0
func ReqReportStreamResultData(ctx context.Context, target *protos.RspDownloadSlice, isPP bool) *protos.ReqReportDownloadResult
func ReqReportUploadSliceResultData ¶
func ReqReportUploadSliceResultData(ctx context.Context, taskId, fileHash, spP2pAddr, opponentP2pAddress string, isPp bool, slice *protos.SliceHashAddr, costTime int64) *protos.ReportUploadSliceResult
func ReqShareFileData ¶
func ReqShareLinkData ¶
func ReqStartMaintenance ¶ added in v0.9.0
func ReqStartMaintenance(ctx context.Context, duration uint64) *protos.ReqStartMaintenance
func ReqStopMaintenance ¶ added in v0.9.0
func ReqStopMaintenance(ctx context.Context) *protos.ReqStopMaintenance
func ReqTransferDownloadData ¶
func ReqTransferDownloadData(ctx context.Context, notice *protos.NoticeFileSliceBackup) *msg.RelayMsgBuf
func ReqTransferDownloadWrongData ¶ added in v0.9.0
func ReqTransferDownloadWrongData(ctx context.Context, notice *protos.NoticeFileSliceBackup) *protos.ReqTransferDownloadWrong
func ReqUploadFileSliceData ¶
func ReqUploadFileSliceData(ctx context.Context, task *task.UploadSliceTask, pieceOffset *protos.SliceOffset, data []byte) *protos.ReqUploadFileSlice
func ReqUploadSlicesWrong ¶ added in v0.9.0
func ReqUploadSlicesWrong(ctx context.Context, uploadTask *task.UploadFileTask, spP2pAddress string, slicesToDownload []*protos.SliceHashAddr, failedSlices []bool) *protos.ReqUploadSlicesWrong
func RequestDownloadFile ¶ added in v0.9.0
func RequestDownloadFile(ctx context.Context, fileHash, sdmPath, walletAddr string, reqId string, walletSign, walletPubkey []byte, shareRequest *protos.ReqGetShareFile, reqTime int64) *protos.ReqFileStorageInfo
RequestDownloadFile the entry for rpc remote download
func RequestUploadFile ¶ added in v0.9.0
func RequestUploadFile(ctx context.Context, fileName, fileHash string, fileSize uint64, walletAddress, walletPubkey, signature string, reqTime int64, slices []*protos.SliceHashAddr, isEncrypted bool, desiredTier uint32, allowHigherTier bool, duration uint64) (*protos.ReqUploadFile, error)
RequestUploadFile a file from an owner instead from a "path" belongs to PP's default wallet
func RequestUploadFileData ¶
func RequestUploadFileData(ctx context.Context, fileInfo *protos.FileInfo, slices []*protos.SliceHashAddr, desiredTier uint32, allowHigherTier bool, walletAddr string, walletPubkey, walletSign []byte, reqTime int64) *protos.ReqUploadFile
RequestUploadFileData assume the PP's current wallet is the owner, otherwise RequestUploadFile() should be used instead
func RspBackupFileSliceData ¶ added in v0.10.0
func RspBackupFileSliceData(target *protos.ReqBackupFileSlice) *protos.RspBackupFileSlice
func RspDownloadSliceData ¶
func RspDownloadSliceData(ctx context.Context, target *protos.ReqDownloadSlice, slice *protos.DownloadSliceInfo) *protos.RspDownloadSlice
func RspDownloadSliceDataSplit ¶
func RspDownloadSliceDataSplit(rsp *protos.RspDownloadSlice, dataStart, dataEnd, offsetStart, offsetEnd, sliceOffsetStart, sliceOffsetEnd uint64, last bool) *protos.RspDownloadSlice
func RspGetHDInfoData ¶
func RspGetHDInfoData(p2pAddress string) *protos.RspGetHDInfo
func RspTransferDownload ¶
func RspTransferDownload(data []byte, taskId, sliceHash, spP2pAddress, p2pAddress string, offset, sliceSize uint64) *protos.RspTransferDownload
func RspTransferDownloadResultData ¶
func RspTransferDownloadResultData(taskId, sliceHash, spP2pAddress string) *protos.RspTransferDownloadResult
func RspUploadFileSliceData ¶
func RspUploadFileSliceData(ctx context.Context, target *protos.ReqUploadFileSlice) *protos.RspUploadFileSlice
func UnmarshalData ¶
func UnmarshalMessageData ¶ added in v0.7.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.