Documentation
¶
Index ¶
- type ClientOfflineDeal
- type CommPRet
- type DagSpec
- type DataCIDSize
- type DataSelector
- type DataSize
- type DealDistribution
- type DealInfo
- type DealParams
- type DealResult
- type DealResults
- type ExportRef
- type FileRef
- type Import
- type ImportID
- type ImportRes
- type ProviderDistribution
- type QueryOffer
- type RemoteStoreID
- type ReplicaDistribution
- type RestrievalRes
- type RetrievalInfo
- type RetrievalOrder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOfflineDeal ¶ added in v1.12.0
type ClientOfflineDeal struct {
types.ClientDealProposal
ProposalCID cid.Cid
DataRef *storagemarket.DataRef
Message string
State uint64
DealID uint64
AddFundsCid *cid.Cid
PublishMessage *cid.Cid
FastRetrieval bool
SlashEpoch abi.ChainEpoch
CreatedAt time.Time
UpdatedAt time.Time
}
func (*ClientOfflineDeal) DealInfo ¶ added in v1.12.0
func (d *ClientOfflineDeal) DealInfo() *DealInfo
type DagSpec ¶
type DagSpec struct {
// DataSelector matches data to be retrieved
// - when using textselector, the path specifies subtree
// - the matched graph must have a single root
DataSelector *DataSelector
// ExportMerkleProof is applicable only when exporting to a CAR file via a path textselector
// When true, in addition to the selection target, the resulting CAR will contain every block along the
// path back to, and including the original root
// When false the resulting CAR contains only the blocks of the target subdag
ExportMerkleProof bool
}
type DataCIDSize ¶
type DataCIDSize struct {
PayloadSize int64
PieceSize abi.PaddedPieceSize
PieceCID cid.Cid
}
type DataSelector ¶
type DataSelector string
DataSelector specifies ipld selector string
- if the string starts with '{', it's interpreted as json selector string see https://ipld.io/specs/selectors/ and https://ipld.io/specs/selectors/fixtures/selector-fixtures-1/
- otherwise the string is interpreted as ipld-selector-text-lite (simple ipld path) see https://github.com/ipld/go-ipld-selector-text-lite
type DataSize ¶
type DataSize struct {
PayloadSize int64
PieceSize abi.PaddedPieceSize
}
type DealDistribution ¶ added in v1.12.0
type DealDistribution struct {
ProvidersDistribution []*ProviderDistribution
ReplicasDistribution []*ReplicaDistribution
}
type DealInfo ¶
type DealInfo struct {
ProposalCid cid.Cid
State storagemarket.StorageDealStatus
Message string // more information about deal state, particularly errors
DealStages *storagemarket.DealStages
Provider address.Address
DataRef *storagemarket.DataRef
PieceCID cid.Cid
Size uint64
PricePerEpoch types.BigInt
Duration uint64
DealID abi.DealID
CreationTime time.Time
Verified bool
TransferChannelID *datatransfer.ChannelID
DataTransfer *market.DataTransferChannel
}
type DealParams ¶ added in v1.12.0
type DealResult ¶ added in v1.12.0
type DealResults ¶ added in v1.12.0
type DealResults struct {
Results []*DealResult
}
type ExportRef ¶
type ExportRef struct {
Root cid.Cid
// DAGs array specifies a list of DAGs to export
// - If exporting into unixfs files, only one DAG is supported, DataSelector is only used to find the targeted root node
// - If exporting into a car file
// - When exactly one text-path DataSelector is specified exports the subgraph and its full merkle-path from the original root
// - Otherwise ( multiple paths and/or JSON selector specs) determines each individual subroot and exports the subtrees as a multi-root car
// - When not specified defaults to a single DAG:
// - Data - the entire DAG: `{"R":{"l":{"none":{}},":>":{"a":{">":{"@":{}}}}}}`
DAGs []DagSpec
FromLocalCAR string // if specified, get data from a local CARv2 file.
DealID retrievalmarket.DealID
}
type Import ¶
type Import struct {
Key ImportID
Err string
Root *cid.Cid
// Source is the provenance of the import, e.g. "import", "unknown", else.
// Currently useless but may be used in the future.
Source string
// FilePath is the path of the original file. It is important that the file
// is retained at this path, because it will be referenced during
// the transfer (when we do the UnixFS chunking, we don't duplicate the
// leaves, but rather point to chunks of the original data through
// positional references).
FilePath string
// CARPath is the path of the CAR file containing the DAG for this import.
CARPath string
}
type ProviderDistribution ¶ added in v1.12.0
type QueryOffer ¶
type QueryOffer struct {
Err string
Root cid.Cid
Piece *cid.Cid
Size uint64
MinPrice types.BigInt
UnsealPrice types.BigInt
PricePerByte abi.TokenAmount
PaymentInterval uint64
PaymentIntervalIncrease uint64
Miner address.Address
MinerPeer retrievalmarket.RetrievalPeer
}
func (*QueryOffer) Order ¶
func (o *QueryOffer) Order(client address.Address) RetrievalOrder
type RemoteStoreID ¶ added in v1.9.0
type ReplicaDistribution ¶ added in v1.12.0
type RestrievalRes ¶
type RestrievalRes struct {
DealID retrievalmarket.DealID
}
type RetrievalInfo ¶
type RetrievalInfo struct {
PayloadCID cid.Cid
ID retrievalmarket.DealID
PieceCID *cid.Cid
PricePerByte abi.TokenAmount
UnsealPrice abi.TokenAmount
Status retrievalmarket.DealStatus
Message string // more information about deal state, particularly errors
Provider peer.ID
BytesReceived uint64
BytesPaidFor uint64
TotalPaid abi.TokenAmount
TransferChannelID *datatransfer.ChannelID
DataTransfer *market.DataTransferChannel
// optional event if part of ClientGetRetrievalUpdates
Event *retrievalmarket.ClientEvent
}
type RetrievalOrder ¶
type RetrievalOrder struct {
// TODO: make this less unixfs specific
Root cid.Cid
Piece *cid.Cid
DataSelector *DataSelector
Size uint64
Total types.BigInt
UnsealPrice types.BigInt
PaymentInterval uint64
PaymentIntervalIncrease uint64
Client address.Address
Miner address.Address
MinerPeer *retrievalmarket.RetrievalPeer
RemoteStore *RemoteStoreID `json:"RemoteStore,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.