Documentation ¶
Index ¶
Constants ¶
const ( PinStatusPinned = PinStatus(api.TrackerStatusPinned) PinStatusPinning = PinStatus(api.TrackerStatusPinning) PinStatusPinQueued = PinStatus(api.TrackerStatusPinQueued) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Get(context.Context, cid.Cid) (*w3http.Web3Response, error) Put(context.Context, fs.File, ...PutOption) (cid.Cid, error) PutCar(context.Context, io.Reader) (cid.Cid, error) Status(context.Context, cid.Cid) (*Status, error) }
Client is a HTTP API client to the web3.storage service.
type Deal ¶
type Deal struct { DealID uint64 StorageProvider address.Address Status DealStatus PieceCid cid.Cid DataCid cid.Cid DataModelSelector string Activation time.Time Created time.Time Updated time.Time }
func (*Deal) UnmarshalJSON ¶
type DealStatus ¶
type DealStatus int
const ( DealStatusQueued DealStatus = iota DealStatusPublished DealStatusActive )
func (DealStatus) String ¶
func (s DealStatus) String() string
type Option ¶
type Option func(cfg *clientConfig) error
Option is an option configuring a web3.storage client.
func WithDatastore ¶
WithDatastore sets the underlying datastore to use when reading or writing DAG block data. The default is to use a new in-memory store per Get/Put request.
func WithEndpoint ¶
WithEndpoint sets the URL of the root API when making requests (default https://api.web3.storage).
type Pin ¶
func (*Pin) UnmarshalJSON ¶
type PutOption ¶
type PutOption func(cfg *putConfig) error
PutOption is an option configuring a call to Put.
func WithDirname ¶
WithDirname sets the root directory path, for use when the provided file is a directory and does NOT implement fs.ReadDirFile. The default is "", which will resolve to the current working directory if the file system interface is the default (the OS).