powergate: github.com/textileio/powergate/deals Index | Files | Directories

package deals

import "github.com/textileio/powergate/deals"

Index

Package Files

options.go types.go

type Config Uses

type Config struct {
    ImportPath string
}

Config contains configuration for storing deals.

type ListDealRecordsConfig Uses

type ListDealRecordsConfig struct {
    FromAddrs      []string
    DataCids       []string
    IncludePending bool
    IncludeFinal   bool
    Ascending      bool
}

ListDealRecordsConfig specifies the options for DealsManager.List.

type ListDealRecordsOption Uses

type ListDealRecordsOption func(*ListDealRecordsConfig)

ListDealRecordsOption updates a ListDealRecordsConfig.

func WithAscending Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

type Option func(*Config) error

Option sets values on a Config.

func WithImportPath Uses

func WithImportPath(path string) Option

WithImportPath indicates the import path that will be used to store data to later be imported to Lotus.

type RetrievalDealInfo Uses

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 Uses

type RetrievalDealRecord struct {
    Addr     string
    DealInfo RetrievalDealInfo
    Time     int64
}

RetrievalDealRecord represents a retrieval deal log record.

type StorageDealConfig Uses

type StorageDealConfig struct {
    Miner           string
    EpochPrice      uint64
    FastRetrieval   bool
    DealStartOffset int64
}

StorageDealConfig contains information about a storage proposal for a miner.

type StorageDealInfo Uses

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 Uses

type StorageDealRecord struct {
    RootCid  cid.Cid
    Addr     string
    DealInfo StorageDealInfo
    Time     int64
    Pending  bool
}

StorageDealRecord represents a storage deal log record.

type StoreResult Uses

type StoreResult struct {
    ProposalCid cid.Cid
    Config      StorageDealConfig
    Success     bool
    Message     string
}

StoreResult contains information about Executing deals.

Directories

PathSynopsis
module

Package deals imports 2 packages (graph) and is imported by 25 packages. Updated 2020-09-23. Refresh now. Tools for package owners.