Documentation ¶
Index ¶
- Constants
- type ActivateResult
- type ClearExpiredShareLinksResult
- type FileInfo
- type FileListResult
- type FileShareResult
- type FileStatusResult
- type GetOzoneResult
- type ParamDownloadData
- type ParamDownloadFileInfo
- type ParamGetFileStatus
- type ParamReqActivate
- type ParamReqClearExpiredShareLinks
- type ParamReqDeleteFile
- type ParamReqDownloadData
- type ParamReqDownloadFile
- type ParamReqDownloadShared
- type ParamReqFileList
- type ParamReqGetOzone
- type ParamReqGetShared
- type ParamReqListShared
- type ParamReqPrepay
- type ParamReqRP
- type ParamReqSend
- type ParamReqServiceStatus
- type ParamReqShareFile
- type ParamReqStartMining
- type ParamReqStatus
- type ParamReqStopShare
- type ParamReqSync
- type ParamReqUpdatePPInfo
- type ParamReqUploadFile
- type ParamReqWithdraw
- type ParamUploadData
- type PrepayResult
- type RPResult
- type Result
- type SendResult
- type ServiceStatusResult
- type Signature
- type StartMiningResult
- type StatusResult
- type SyncResult
- type UpdatePPInfoResult
- type WithdrawResult
Constants ¶
View Source
const ( GENERIC_ERR string = "-1" SIGNATURE_FAILURE string = "-3" WRONG_FILE_SIZE string = "-4" TIME_OUT string = "-5" FILE_REQ_FAILURE string = "-6" WRONG_INPUT string = "-7" WRONG_PP_ADDRESS string = "-8" INTERNAL_DATA_FAILURE string = "-9" INTERNAL_COMM_FAILURE string = "-10" WRONG_FILE_INFO string = "-11" WRONG_WALLET_ADDRESS string = "-12" CONFLICT_WITH_ANOTHER_SESSION string = "-13" SESSION_STOPPED string = "-14" UPLOAD_DATA string = "1" DOWNLOAD_OK string = "2" DL_OK_ASK_INFO string = "3" SHARED_DL_START string = "4" SUCCESS string = "0" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivateResult ¶ added in v0.10.0
type ClearExpiredShareLinksResult ¶ added in v0.10.0
type ClearExpiredShareLinksResult struct {}
type FileListResult ¶
type FileShareResult ¶
type FileShareResult struct {}
type FileStatusResult ¶ added in v0.10.0
type GetOzoneResult ¶
type GetOzoneResult struct { Return string `json:"return"` Ozone string `json:"ozone,omitempty"` SequenceNumber string `json:"sequencynumber,omitempty"` }
result for getozone
type ParamDownloadData ¶
download: download file data
type ParamDownloadFileInfo ¶
type ParamDownloadFileInfo struct { FileHash string `json:"filehash"` FileSize uint64 `json:"filesize"` ReqId string `json:"reqid"` }
download: downloaded file info
type ParamGetFileStatus ¶ added in v0.10.0
type ParamGetFileStatus struct { FileHash string `json:"filehash"` Signature Signature `json:"signature"` ReqTime int64 `json:"req_time"` }
get current file status
type ParamReqActivate ¶ added in v0.10.0
type ParamReqActivate struct { WalletAddr string `json:"walletaddr"` Deposit string `json:"deposit"` Fee string `json:"fee"` Gas uint64 `json:"gas"` }
activate: request to activate pp node
type ParamReqClearExpiredShareLinks ¶ added in v0.10.0
type ParamReqClearExpiredShareLinks struct {}
share: request to clear expired share links
type ParamReqDeleteFile ¶ added in v0.12.3
type ParamReqDeleteFile struct { FileHash string `json:"filehash"` Signature Signature `json:"signature"` ReqTime int64 `json:"req_time"` }
delete file
type ParamReqDownloadData ¶ added in v0.10.0
type ParamReqDownloadData struct { FileHash string `json:"filehash"` ReqId string `json:"reqid"` SliceHash string `json:"slicehash"` SliceNumber uint64 `json:"slicenumber"` SliceSize uint64 `json:"slicesize"` NetworkAddress string `json:"networkaddress"` P2PAddress string `json:"p2pAddress"` ReqTime int64 `json:"req_time"` }
download: download file data
type ParamReqDownloadFile ¶
type ParamReqDownloadFile struct { FileHandle string `json:"filehandle"` Signature Signature `json:"signature"` ReqTime int64 `json:"req_time"` }
download: request download file
type ParamReqDownloadShared ¶
type ParamReqDownloadShared struct {}
share: request list shared files
type ParamReqFileList ¶
type ParamReqFileList struct { Signature Signature `json:"signature"` PageId uint64 `json:"page"` ReqTime int64 `json:"req_time"` }
list: request file list
type ParamReqGetOzone ¶
type ParamReqGetOzone struct {
WalletAddr string `json:"walletaddr"`
}
ozone: get ozone
type ParamReqPrepay ¶ added in v0.10.0
type ParamReqPrepay struct { Signature Signature `json:"signature"` PrepayAmount string `json:"prepayamount"` Fee string `json:"fee"` Gas uint64 `json:"gas"` ReqTime int64 `json:"req_time"` }
prepay: request to buy ozone using token
type ParamReqRP ¶ added in v0.10.0
type ParamReqRP struct { //P2PAddr string `json:"p2paddr"` Signature Signature `json:"signature"` ReqTime int64 `json:"req_time"` }
rp: request RegisterNewPP
type ParamReqSend ¶ added in v0.10.0
type ParamReqServiceStatus ¶ added in v0.10.0
type ParamReqServiceStatus struct {
WalletAddr string `json:"walletaddr"`
}
type ParamReqStartMining ¶ added in v0.10.0
type ParamReqStartMining struct {
WalletAddr string `json:"walletaddr"`
}
startmining: request to startmining
type ParamReqStatus ¶ added in v0.10.0
type ParamReqStatus struct {
WalletAddr string `json:"walletaddr"`
}
type ParamReqSync ¶ added in v0.11.4
type ParamReqSync struct {
TxHash string `json:"tx_hash"`
}
type ParamReqUpdatePPInfo ¶ added in v0.12.0
type ParamReqUploadFile ¶
type ParamReqUploadFile struct { FileName string `json:"filename"` FileSize int `json:"filesize"` FileHash string `json:"filehash"` Signature Signature `json:"signature"` DesiredTier uint32 `json:"desired_tier"` AllowHigherTier bool `json:"allow_higher_tier"` ReqTime int64 `json:"req_time"` SequenceNumber string `json:"sequencenumber"` }
upload: request upload file
type ParamReqWithdraw ¶ added in v0.10.0
type ParamUploadData ¶
type ParamUploadData struct { FileHash string `json:"filehash"` Data string `json:"data"` Signature Signature `json:"signature"` ReqTime int64 `json:"req_time"` SequenceNumber string `json:"sequencenumber"` Stop bool `json:"stop,omitempty"` }
upload: upload file data
type PrepayResult ¶ added in v0.10.0
type PrepayResult struct {
Return string `json:"return"`
}
type Result ¶
type Result struct { Return string `json:"return"` ReqId string `json:"reqid,omitempty"` OffsetStart *uint64 `json:"offsetstart,omitempty"` OffsetEnd *uint64 `json:"offsetend,omitempty"` FileHash string `json:"filehash,omitempty"` FileName string `json:"filename,omitempty"` FileData string `json:"filedata,omitempty"` SequenceNumber string `json:"sequencenumber,omitempty"` }
result for all upload and download messages
type SendResult ¶ added in v0.10.0
type SendResult struct {
Return string `json:"return"`
}
type ServiceStatusResult ¶ added in v0.10.0
type StartMiningResult ¶ added in v0.10.0
type StartMiningResult struct {
Return string `json:"return"`
}
type StatusResult ¶ added in v0.10.0
type SyncResult ¶ added in v0.11.4
type SyncResult struct {
Return string `json:"return"`
}
type UpdatePPInfoResult ¶ added in v0.12.0
type WithdrawResult ¶ added in v0.10.0
type WithdrawResult struct {
Return string `json:"return"`
}
Click to show internal directories.
Click to hide internal directories.