Documentation ¶
Index ¶
- Variables
- func CreateAllBoostTables(ctx context.Context, mainDB *sql.DB, logsDB *sql.DB) error
- func CreateTestTmpDB(t *testing.T) *sql.DB
- func GenerateDeals() ([]types.ProviderDealState, error)
- func SqlDB(dbPath string) (*sql.DB, error)
- type DealLog
- type DealsDB
- func (d *DealsDB) ByID(ctx context.Context, id uuid.UUID) (*types.ProviderDealState, error)
- func (d *DealsDB) ByPieceCID(ctx context.Context, pieceCid cid.Cid) ([]*types.ProviderDealState, error)
- func (d *DealsDB) ByPublishCID(ctx context.Context, publishCid string) ([]*types.ProviderDealState, error)
- func (d *DealsDB) ByRootPayloadCID(ctx context.Context, payloadCid cid.Cid) ([]*types.ProviderDealState, error)
- func (d *DealsDB) BySignedProposalCID(ctx context.Context, proposalCid cid.Cid) (*types.ProviderDealState, error)
- func (d *DealsDB) Count(ctx context.Context, query string) (int, error)
- func (d *DealsDB) Insert(ctx context.Context, deal *types.ProviderDealState) error
- func (d *DealsDB) List(ctx context.Context, query string, cursor *graphql.ID, offset int, limit int) ([]*types.ProviderDealState, error)
- func (d *DealsDB) ListActive(ctx context.Context) ([]*types.ProviderDealState, error)
- func (d *DealsDB) ListCompleted(ctx context.Context) ([]*types.ProviderDealState, error)
- func (d *DealsDB) Update(ctx context.Context, deal *types.ProviderDealState) error
- type FundsDB
- func (f *FundsDB) InsertLog(ctx context.Context, logs ...*FundsLog) error
- func (f *FundsDB) Logs(ctx context.Context, cursor *time.Time, offset int, limit int) ([]FundsLog, error)
- func (f *FundsDB) LogsCount(ctx context.Context) (int, error)
- func (f *FundsDB) Tag(ctx context.Context, dealUuid uuid.UUID, collateral abi.TokenAmount, ...) error
- func (f *FundsDB) TotalTagged(ctx context.Context) (*TotalTagged, error)
- func (f *FundsDB) Untag(ctx context.Context, dealUuid uuid.UUID) (clt abi.TokenAmount, pub abi.TokenAmount, e error)
- type FundsLog
- type LogsDB
- type ProposalLog
- type ProposalLogsDB
- func (p *ProposalLogsDB) Count(ctx context.Context, accepted *bool) (int, error)
- func (p *ProposalLogsDB) DeleteOlderThan(ctx context.Context, at time.Time) (int64, error)
- func (p *ProposalLogsDB) InsertLog(ctx context.Context, deal types.DealParams, accepted bool, reason string) error
- func (p *ProposalLogsDB) List(ctx context.Context, accepted *bool, cursor *time.Time, offset int, limit int) ([]ProposalLog, error)
- type Scannable
- type StorageDB
- func (s *StorageDB) InsertLog(ctx context.Context, logs ...*StorageLog) error
- func (s *StorageDB) Logs(ctx context.Context) ([]StorageLog, error)
- func (s *StorageDB) Tag(ctx context.Context, dealUuid uuid.UUID, size uint64) error
- func (s *StorageDB) TotalTagged(ctx context.Context) (uint64, error)
- func (s *StorageDB) Untag(ctx context.Context, dealUuid uuid.UUID) (uint64, error)
- type StorageLog
- type TotalTagged
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func CreateAllBoostTables ¶
func GenerateDeals ¶
func GenerateDeals() ([]types.ProviderDealState, error)
Types ¶
type DealsDB ¶
type DealsDB struct {
// contains filtered or unexported fields
}
func NewDealsDB ¶
func (*DealsDB) ByPieceCID ¶ added in v1.2.0
func (*DealsDB) ByPublishCID ¶
func (*DealsDB) ByRootPayloadCID ¶ added in v1.2.0
func (*DealsDB) BySignedProposalCID ¶
func (*DealsDB) ListActive ¶
func (*DealsDB) ListCompleted ¶
type FundsDB ¶
type FundsDB struct {
// contains filtered or unexported fields
}
func NewFundsDB ¶
func (*FundsDB) Tag ¶
func (f *FundsDB) Tag(ctx context.Context, dealUuid uuid.UUID, collateral abi.TokenAmount, pubMsg abi.TokenAmount) error
func (*FundsDB) TotalTagged ¶
func (f *FundsDB) TotalTagged(ctx context.Context) (*TotalTagged, error)
type ProposalLog ¶
type ProposalLogsDB ¶
type ProposalLogsDB struct {
// contains filtered or unexported fields
}
func NewProposalLogsDB ¶
func NewProposalLogsDB(db *sql.DB) *ProposalLogsDB
func (*ProposalLogsDB) DeleteOlderThan ¶
func (*ProposalLogsDB) InsertLog ¶
func (p *ProposalLogsDB) InsertLog(ctx context.Context, deal types.DealParams, accepted bool, reason string) error
type StorageDB ¶
type StorageDB struct {
// contains filtered or unexported fields
}
func NewStorageDB ¶
func (*StorageDB) InsertLog ¶
func (s *StorageDB) InsertLog(ctx context.Context, logs ...*StorageLog) error
func (*StorageDB) TotalTagged ¶
type StorageLog ¶
type TotalTagged ¶
type TotalTagged struct { Collateral abi.TokenAmount PubMsg abi.TokenAmount }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.