Documentation ¶
Overview ¶
upload implements the Archon upload protocol
Index ¶
Constants ¶
View Source
const ( EncodingNone = "none" EncodingMxor = "mxor" EncodingRSa = "RSa" // archive-optimized EncodingRSb = "RSb" // browser-optimized )
Variables ¶
This section is empty.
Functions ¶
func GetUploadSps ¶
func GetUploadSps(needed int, acc interfaces.IAccount) (sps StorageProviders, err error)
GetUploadSps returns up to needed SP profiles, after marketplace filtering
func GetUploadSpsLocal ¶
func GetUploadSpsLocal(acc interfaces.IAccount) (sps StorageProviders, err error)
GetUploadSpsLocal is for debugging only, using as SP on localhost
Types ¶
type Messages ¶
type Messages struct {
// contains filtered or unexported fields
}
Messages collects completion messages (or errors) to be displayed at the end
type Request ¶
type Request struct { FilePath string CloudDir string Encoding string NumTotal int // needed only when EncodingRSx NumRequired int // needed only when EncodingRSx Overwrite bool HashUrl bool // user wants a hash URL, not a named URL PreferHttp bool // user prefers using http, if available UploaderAccount interfaces.IAccount Batch bool // operate in batch mode - no user interaction // If 0, any payment is valid, otherwise in units of blockchain // Eth: Wei, Neo: Gas* (10**8) MaxPayment int64 }
func (*Request) Upload ¶
Upload uploads the file (sharded or not) Returned price unit depends on the blockchain Eth=Wei, Neo=CGas*(10^8) The smallest unit of CGAS is 0.00000001
func (*Request) UploaderPath ¶
Click to show internal directories.
Click to hide internal directories.