-
Notifications
You must be signed in to change notification settings - Fork 61
/
market.go
34 lines (28 loc) · 1.03 KB
/
market.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package api
import (
"context"
smtypes "github.com/filecoin-project/boost/storagemarket/types"
"github.com/google/uuid"
)
// MODIFYING THE API INTERFACE
//
// When adding / changing methods in this file:
// * Do the change here
// * Adjust implementation in `node/impl/`
// * Run `make gen` - this will:
// * Generate proxy structs
// * Generate mocks
// * Generate markdown docs
// * Generate openrpc blobs
type Market interface {
// MethodGroup: Market
MarketDummyDeal(context.Context, smtypes.DealParams) (*ProviderDealRejectionInfo, error) //perm:admin
Deal(ctx context.Context, dealUuid uuid.UUID) (*smtypes.ProviderDealState, error) //perm:admin
IndexerAnnounceAllDeals(ctx context.Context) error //perm:admin
}
// ProviderDealRejectionInfo is the information sent by the Storage Provider
// to the Client when it accepts or rejects a deal.
type ProviderDealRejectionInfo struct {
Accepted bool
Reason string // The rejection reason, if the deal is rejected
}