Documentation ¶
Index ¶
- type Config
- type ListDealRecordsConfig
- type ListDealRecordsOption
- func WithAscending(ascending bool) ListDealRecordsOption
- func WithDataCids(cids ...string) ListDealRecordsOption
- func WithFromAddrs(addrs ...string) ListDealRecordsOption
- func WithIncludeFinal(includeFinal bool) ListDealRecordsOption
- func WithIncludePending(includePending bool) ListDealRecordsOption
- type Option
- type RetrievalDealInfo
- type RetrievalDealRecord
- type StorageDealConfig
- type StorageDealInfo
- type StorageDealRecord
- type StoreResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ImportPath string
}
Config contains configuration for storing deals.
type ListDealRecordsConfig ¶
type ListDealRecordsConfig struct { FromAddrs []string DataCids []string IncludePending bool IncludeFinal bool Ascending bool }
ListDealRecordsConfig specifies the options for DealsManager.List.
type ListDealRecordsOption ¶
type ListDealRecordsOption func(*ListDealRecordsConfig)
ListDealRecordsOption updates a ListDealRecordsConfig.
func WithAscending ¶
func WithAscending(ascending bool) ListDealRecordsOption
WithAscending specifies to sort the results in ascending order. Default is descending order. Records are sorted by timestamp.
func WithDataCids ¶
func WithDataCids(cids ...string) ListDealRecordsOption
WithDataCids limits the results to deals for the provided data cids. If WithFromAddrs is also provided, this is an AND operation.
func WithFromAddrs ¶
func WithFromAddrs(addrs ...string) ListDealRecordsOption
WithFromAddrs limits the results deals initiated from the provided wallet addresses. If WithDataCids is also provided, this is an AND operation.
func WithIncludeFinal ¶
func WithIncludeFinal(includeFinal bool) ListDealRecordsOption
WithIncludeFinal specifies whether or not to include final deals in the results. Default is false. Ignored for ListRetrievalDealRecords.
func WithIncludePending ¶
func WithIncludePending(includePending bool) ListDealRecordsOption
WithIncludePending specifies whether or not to include pending deals in the results. Default is false. Ignored for ListRetrievalDealRecords.
type Option ¶
Option sets values on a Config.
func WithImportPath ¶
WithImportPath indicates the import path that will be used to store data to later be imported to Lotus.
type RetrievalDealInfo ¶
type RetrievalDealInfo struct { RootCid cid.Cid Size uint64 MinPrice uint64 PaymentInterval uint64 PaymentIntervalIncrease uint64 Miner string MinerPeerID string }
RetrievalDealInfo contains information about a retrieval deal.
type RetrievalDealRecord ¶
type RetrievalDealRecord struct { Addr string DealInfo RetrievalDealInfo Time int64 }
RetrievalDealRecord represents a retrieval deal log record.
type StorageDealConfig ¶
type StorageDealConfig struct { Miner string EpochPrice uint64 FastRetrieval bool DealStartOffset int64 }
StorageDealConfig contains information about a storage proposal for a miner.
type StorageDealInfo ¶
type StorageDealInfo struct { ProposalCid cid.Cid StateID uint64 StateName string Miner string PieceCID cid.Cid Size uint64 PricePerEpoch uint64 StartEpoch uint64 Duration uint64 DealID uint64 ActivationEpoch int64 Message string }
StorageDealInfo contains information about a proposed storage deal.
type StorageDealRecord ¶
type StorageDealRecord struct { RootCid cid.Cid Addr string DealInfo StorageDealInfo Time int64 Pending bool }
StorageDealRecord represents a storage deal log record.
type StoreResult ¶
type StoreResult struct { ProposalCid cid.Cid Config StorageDealConfig Success bool Message string }
StoreResult contains information about Executing deals.