client

package
v1.11.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2023 License: Apache-2.0, MIT Imports: 14 Imported by: 8

Documentation

Overview

Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen. DO NOT EDIT.

Index

Constants

View Source
const APINamespace = "client.IMarketClient"
View Source
const MajorVersion = 0
View Source
const MethodNamespace = "VENUS_MARKET_CLIENT"

Variables

This section is empty.

Functions

This section is empty.

Types

type IMarketClient

type IMarketClient interface {
	// ClientImport imports file under the specified path into filestore.
	ClientImport(ctx context.Context, ref client.FileRef) (*client.ImportRes, error) //perm:admin
	// ClientRemoveImport removes file import
	ClientRemoveImport(ctx context.Context, importID client.ImportID) error //perm:admin
	// ClientStartDeal proposes a deal with a miner.
	ClientStartDeal(ctx context.Context, params *client.StartDealParams) (*cid.Cid, error) //perm:admin
	// ClientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking.
	ClientStatelessDeal(ctx context.Context, params *client.StartDealParams) (*cid.Cid, error) //perm:write
	// ClientGetDealInfo returns the latest information about a given deal.
	ClientGetDealInfo(context.Context, cid.Cid) (*client.DealInfo, error) //perm:read
	// ClientListDeals returns information about the deals made by the local client.
	ClientListDeals(ctx context.Context) ([]client.DealInfo, error) //perm:write
	// ClientGetDealUpdates returns the status of updated deals
	ClientGetDealUpdates(ctx context.Context) (<-chan client.DealInfo, error) //perm:write
	// ClientGetDealStatus returns status given a code
	ClientGetDealStatus(ctx context.Context, statusCode uint64) (string, error) //perm:read
	// ClientHasLocal indicates whether a certain CID is locally stored.
	ClientHasLocal(ctx context.Context, root cid.Cid) (bool, error) //perm:write
	// ClientFindData identifies peers that have a certain file, and returns QueryOffers (one per peer).
	ClientFindData(ctx context.Context, root cid.Cid, piece *cid.Cid) ([]client.QueryOffer, error) //perm:read
	// ClientMinerQueryOffer returns a QueryOffer for the specific miner and file.
	ClientMinerQueryOffer(ctx context.Context, miner address.Address, root cid.Cid, piece *cid.Cid) (client.QueryOffer, error) //perm:read
	// ClientRetrieve initiates the retrieval of a file, as specified in the order.
	ClientRetrieve(ctx context.Context, params client.RetrievalOrder) (*client.RestrievalRes, error) //perm:admin
	// ClientRetrieveWait waits for retrieval to be complete
	ClientRetrieveWait(ctx context.Context, deal retrievalmarket.DealID) error //perm:admin
	// ClientExport exports a file stored in the local filestore to a system file
	ClientExport(ctx context.Context, exportRef client.ExportRef, fileRef client.FileRef) error //perm:admin
	ClientListRetrievals(ctx context.Context) ([]client.RetrievalInfo, error)                   //perm:write
	// ClientGetRetrievalUpdates returns status of updated retrieval deals
	ClientGetRetrievalUpdates(ctx context.Context) (<-chan client.RetrievalInfo, error) //perm:write
	// ClientQueryAsk returns a signed StorageAsk from the specified miner.
	ClientQueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*storagemarket.StorageAsk, error) //perm:read
	// ClientCalcCommP calculates the CommP and data size of the specified CID
	ClientDealPieceCID(ctx context.Context, root cid.Cid) (client.DataCIDSize, error) //perm:read
	// ClientCalcCommP calculates the CommP for a specified file
	ClientCalcCommP(ctx context.Context, inpath string) (*client.CommPRet, error) //perm:write
	// ClientGenCar generates a CAR file for the specified file.
	ClientGenCar(ctx context.Context, ref client.FileRef, outpath string) error //perm:write
	// ClientDealSize calculates real deal data size
	ClientDealSize(ctx context.Context, root cid.Cid) (client.DataSize, error) //perm:read
	// ClientListTransfers returns the status of all ongoing transfers of data
	ClientListDataTransfers(ctx context.Context) ([]market.DataTransferChannel, error)        //perm:write
	ClientDataTransferUpdates(ctx context.Context) (<-chan market.DataTransferChannel, error) //perm:write
	// ClientRestartDataTransfer attempts to restart a data transfer with the given transfer ID and other peer
	ClientRestartDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error //perm:write
	// ClientCancelDataTransfer cancels a data transfer with the given transfer ID and other peer
	ClientCancelDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error //perm:write
	// ClientRetrieveTryRestartInsufficientFunds attempts to restart stalled retrievals on a given payment channel
	// which are stuck due to insufficient funds
	ClientRetrieveTryRestartInsufficientFunds(ctx context.Context, paymentChannel address.Address) error //perm:write

	// ClientCancelRetrievalDeal cancels an ongoing retrieval deal based on DealID
	ClientCancelRetrievalDeal(ctx context.Context, dealid retrievalmarket.DealID) error //perm:write

	// ClientListImports lists imported files and their root CIDs
	ClientListImports(ctx context.Context) ([]client.Import, error) //perm:write
	DefaultAddress(ctx context.Context) (address.Address, error)    //perm:read

	MarketAddBalance(ctx context.Context, wallet, addr address.Address, amt types.BigInt) (cid.Cid, error)                   //perm:write
	MarketGetReserved(ctx context.Context, addr address.Address) (types.BigInt, error)                                       //perm:read
	MarketReserveFunds(ctx context.Context, wallet address.Address, addr address.Address, amt types.BigInt) (cid.Cid, error) //perm:write
	MarketReleaseFunds(ctx context.Context, addr address.Address, amt types.BigInt) error                                    //perm:write
	MarketWithdraw(ctx context.Context, wallet, addr address.Address, amt types.BigInt) (cid.Cid, error)                     //perm:write

	MessagerWaitMessage(ctx context.Context, mid cid.Cid) (*types.MsgLookup, error)                            //perm:read
	MessagerPushMessage(ctx context.Context, msg *types.Message, meta *types.MessageSendSpec) (cid.Cid, error) //perm:write
	MessagerGetMessage(ctx context.Context, mid cid.Cid) (*types.Message, error)                               //perm:read

	api.Version
}

func DialIMarketClientRPC added in v1.2.2

func DialIMarketClientRPC(ctx context.Context, addr string, token string, requestHeader http.Header, opts ...jsonrpc.Option) (IMarketClient, jsonrpc.ClientCloser, error)

DialIMarketClientRPC is a more convinient way of building client, as it resolves any format (url, multiaddr) of addr string.

func NewIMarketClientRPC

func NewIMarketClientRPC(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (IMarketClient, jsonrpc.ClientCloser, error)

NewIMarketClientRPC creates a new httpparse jsonrpc remotecli.

type IMarketClientStruct

type IMarketClientStruct struct {
	Internal struct {
		ClientCalcCommP                           func(ctx context.Context, inpath string) (*client.CommPRet, error)                                         `perm:"write"`
		ClientCancelDataTransfer                  func(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error   `perm:"write"`
		ClientCancelRetrievalDeal                 func(ctx context.Context, dealid retrievalmarket.DealID) error                                             `perm:"write"`
		ClientDataTransferUpdates                 func(ctx context.Context) (<-chan market.DataTransferChannel, error)                                       `perm:"write"`
		ClientDealPieceCID                        func(ctx context.Context, root cid.Cid) (client.DataCIDSize, error)                                        `perm:"read"`
		ClientDealSize                            func(ctx context.Context, root cid.Cid) (client.DataSize, error)                                           `perm:"read"`
		ClientExport                              func(ctx context.Context, exportRef client.ExportRef, fileRef client.FileRef) error                        `perm:"admin"`
		ClientFindData                            func(ctx context.Context, root cid.Cid, piece *cid.Cid) ([]client.QueryOffer, error)                       `perm:"read"`
		ClientGenCar                              func(ctx context.Context, ref client.FileRef, outpath string) error                                        `perm:"write"`
		ClientGetDealInfo                         func(context.Context, cid.Cid) (*client.DealInfo, error)                                                   `perm:"read"`
		ClientGetDealStatus                       func(ctx context.Context, statusCode uint64) (string, error)                                               `perm:"read"`
		ClientGetDealUpdates                      func(ctx context.Context) (<-chan client.DealInfo, error)                                                  `perm:"write"`
		ClientGetRetrievalUpdates                 func(ctx context.Context) (<-chan client.RetrievalInfo, error)                                             `perm:"write"`
		ClientHasLocal                            func(ctx context.Context, root cid.Cid) (bool, error)                                                      `perm:"write"`
		ClientImport                              func(ctx context.Context, ref client.FileRef) (*client.ImportRes, error)                                   `perm:"admin"`
		ClientListDataTransfers                   func(ctx context.Context) ([]market.DataTransferChannel, error)                                            `perm:"write"`
		ClientListDeals                           func(ctx context.Context) ([]client.DealInfo, error)                                                       `perm:"write"`
		ClientListImports                         func(ctx context.Context) ([]client.Import, error)                                                         `perm:"write"`
		ClientListRetrievals                      func(ctx context.Context) ([]client.RetrievalInfo, error)                                                  `perm:"write"`
		ClientMinerQueryOffer                     func(ctx context.Context, miner address.Address, root cid.Cid, piece *cid.Cid) (client.QueryOffer, error)  `perm:"read"`
		ClientQueryAsk                            func(ctx context.Context, p peer.ID, miner address.Address) (*storagemarket.StorageAsk, error)             `perm:"read"`
		ClientRemoveImport                        func(ctx context.Context, importID client.ImportID) error                                                  `perm:"admin"`
		ClientRestartDataTransfer                 func(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error   `perm:"write"`
		ClientRetrieve                            func(ctx context.Context, params client.RetrievalOrder) (*client.RestrievalRes, error)                     `perm:"admin"`
		ClientRetrieveTryRestartInsufficientFunds func(ctx context.Context, paymentChannel address.Address) error                                            `perm:"write"`
		ClientRetrieveWait                        func(ctx context.Context, deal retrievalmarket.DealID) error                                               `perm:"admin"`
		ClientStartDeal                           func(ctx context.Context, params *client.StartDealParams) (*cid.Cid, error)                                `perm:"admin"`
		ClientStatelessDeal                       func(ctx context.Context, params *client.StartDealParams) (*cid.Cid, error)                                `perm:"write"`
		DefaultAddress                            func(ctx context.Context) (address.Address, error)                                                         `perm:"read"`
		MarketAddBalance                          func(ctx context.Context, wallet, addr address.Address, amt types.BigInt) (cid.Cid, error)                 `perm:"write"`
		MarketGetReserved                         func(ctx context.Context, addr address.Address) (types.BigInt, error)                                      `perm:"read"`
		MarketReleaseFunds                        func(ctx context.Context, addr address.Address, amt types.BigInt) error                                    `perm:"write"`
		MarketReserveFunds                        func(ctx context.Context, wallet address.Address, addr address.Address, amt types.BigInt) (cid.Cid, error) `perm:"write"`
		MarketWithdraw                            func(ctx context.Context, wallet, addr address.Address, amt types.BigInt) (cid.Cid, error)                 `perm:"write"`
		MessagerGetMessage                        func(ctx context.Context, mid cid.Cid) (*types.Message, error)                                             `perm:"read"`
		MessagerPushMessage                       func(ctx context.Context, msg *types.Message, meta *types.MessageSendSpec) (cid.Cid, error)                `perm:"write"`
		MessagerWaitMessage                       func(ctx context.Context, mid cid.Cid) (*types.MsgLookup, error)                                           `perm:"read"`
		Version                                   func(ctx context.Context) (types.Version, error)                                                           `perm:"read"`
	}
}

func (*IMarketClientStruct) ClientCalcCommP

func (s *IMarketClientStruct) ClientCalcCommP(p0 context.Context, p1 string) (*client.CommPRet, error)

func (*IMarketClientStruct) ClientCancelDataTransfer

func (s *IMarketClientStruct) ClientCancelDataTransfer(p0 context.Context, p1 datatransfer.TransferID, p2 peer.ID, p3 bool) error

func (*IMarketClientStruct) ClientCancelRetrievalDeal

func (s *IMarketClientStruct) ClientCancelRetrievalDeal(p0 context.Context, p1 retrievalmarket.DealID) error

func (*IMarketClientStruct) ClientDataTransferUpdates

func (s *IMarketClientStruct) ClientDataTransferUpdates(p0 context.Context) (<-chan market.DataTransferChannel, error)

func (*IMarketClientStruct) ClientDealPieceCID

func (s *IMarketClientStruct) ClientDealPieceCID(p0 context.Context, p1 cid.Cid) (client.DataCIDSize, error)

func (*IMarketClientStruct) ClientDealSize

func (s *IMarketClientStruct) ClientDealSize(p0 context.Context, p1 cid.Cid) (client.DataSize, error)

func (*IMarketClientStruct) ClientExport

func (s *IMarketClientStruct) ClientExport(p0 context.Context, p1 client.ExportRef, p2 client.FileRef) error

func (*IMarketClientStruct) ClientFindData

func (s *IMarketClientStruct) ClientFindData(p0 context.Context, p1 cid.Cid, p2 *cid.Cid) ([]client.QueryOffer, error)

func (*IMarketClientStruct) ClientGenCar

func (s *IMarketClientStruct) ClientGenCar(p0 context.Context, p1 client.FileRef, p2 string) error

func (*IMarketClientStruct) ClientGetDealInfo

func (s *IMarketClientStruct) ClientGetDealInfo(p0 context.Context, p1 cid.Cid) (*client.DealInfo, error)

func (*IMarketClientStruct) ClientGetDealStatus

func (s *IMarketClientStruct) ClientGetDealStatus(p0 context.Context, p1 uint64) (string, error)

func (*IMarketClientStruct) ClientGetDealUpdates

func (s *IMarketClientStruct) ClientGetDealUpdates(p0 context.Context) (<-chan client.DealInfo, error)

func (*IMarketClientStruct) ClientGetRetrievalUpdates

func (s *IMarketClientStruct) ClientGetRetrievalUpdates(p0 context.Context) (<-chan client.RetrievalInfo, error)

func (*IMarketClientStruct) ClientHasLocal

func (s *IMarketClientStruct) ClientHasLocal(p0 context.Context, p1 cid.Cid) (bool, error)

func (*IMarketClientStruct) ClientImport

func (s *IMarketClientStruct) ClientImport(p0 context.Context, p1 client.FileRef) (*client.ImportRes, error)

func (*IMarketClientStruct) ClientListDataTransfers

func (s *IMarketClientStruct) ClientListDataTransfers(p0 context.Context) ([]market.DataTransferChannel, error)

func (*IMarketClientStruct) ClientListDeals

func (s *IMarketClientStruct) ClientListDeals(p0 context.Context) ([]client.DealInfo, error)

func (*IMarketClientStruct) ClientListImports

func (s *IMarketClientStruct) ClientListImports(p0 context.Context) ([]client.Import, error)

func (*IMarketClientStruct) ClientListRetrievals

func (s *IMarketClientStruct) ClientListRetrievals(p0 context.Context) ([]client.RetrievalInfo, error)

func (*IMarketClientStruct) ClientMinerQueryOffer

func (s *IMarketClientStruct) ClientMinerQueryOffer(p0 context.Context, p1 address.Address, p2 cid.Cid, p3 *cid.Cid) (client.QueryOffer, error)

func (*IMarketClientStruct) ClientQueryAsk

func (*IMarketClientStruct) ClientRemoveImport

func (s *IMarketClientStruct) ClientRemoveImport(p0 context.Context, p1 client.ImportID) error

func (*IMarketClientStruct) ClientRestartDataTransfer

func (s *IMarketClientStruct) ClientRestartDataTransfer(p0 context.Context, p1 datatransfer.TransferID, p2 peer.ID, p3 bool) error

func (*IMarketClientStruct) ClientRetrieve

func (*IMarketClientStruct) ClientRetrieveTryRestartInsufficientFunds

func (s *IMarketClientStruct) ClientRetrieveTryRestartInsufficientFunds(p0 context.Context, p1 address.Address) error

func (*IMarketClientStruct) ClientRetrieveWait

func (s *IMarketClientStruct) ClientRetrieveWait(p0 context.Context, p1 retrievalmarket.DealID) error

func (*IMarketClientStruct) ClientStartDeal

func (s *IMarketClientStruct) ClientStartDeal(p0 context.Context, p1 *client.StartDealParams) (*cid.Cid, error)

func (*IMarketClientStruct) ClientStatelessDeal

func (s *IMarketClientStruct) ClientStatelessDeal(p0 context.Context, p1 *client.StartDealParams) (*cid.Cid, error)

func (*IMarketClientStruct) DefaultAddress

func (s *IMarketClientStruct) DefaultAddress(p0 context.Context) (address.Address, error)

func (*IMarketClientStruct) MarketAddBalance

func (s *IMarketClientStruct) MarketAddBalance(p0 context.Context, p1, p2 address.Address, p3 types.BigInt) (cid.Cid, error)

func (*IMarketClientStruct) MarketGetReserved

func (s *IMarketClientStruct) MarketGetReserved(p0 context.Context, p1 address.Address) (types.BigInt, error)

func (*IMarketClientStruct) MarketReleaseFunds

func (s *IMarketClientStruct) MarketReleaseFunds(p0 context.Context, p1 address.Address, p2 types.BigInt) error

func (*IMarketClientStruct) MarketReserveFunds

func (s *IMarketClientStruct) MarketReserveFunds(p0 context.Context, p1 address.Address, p2 address.Address, p3 types.BigInt) (cid.Cid, error)

func (*IMarketClientStruct) MarketWithdraw

func (s *IMarketClientStruct) MarketWithdraw(p0 context.Context, p1, p2 address.Address, p3 types.BigInt) (cid.Cid, error)

func (*IMarketClientStruct) MessagerGetMessage

func (s *IMarketClientStruct) MessagerGetMessage(p0 context.Context, p1 cid.Cid) (*types.Message, error)

func (*IMarketClientStruct) MessagerPushMessage

func (s *IMarketClientStruct) MessagerPushMessage(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec) (cid.Cid, error)

func (*IMarketClientStruct) MessagerWaitMessage

func (s *IMarketClientStruct) MessagerWaitMessage(p0 context.Context, p1 cid.Cid) (*types.MsgLookup, error)

func (*IMarketClientStruct) Version added in v1.7.0

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL