Documentation ¶
Index ¶
- type Admin
- type Data
- type GetMinersOption
- type Indices
- type ListConfig
- type ListSelect
- type Records
- func (c *Records) GetUpdatedRetrievalRecordsSince(ctx context.Context, since time.Time, limit int) (*adminPb.GetUpdatedRetrievalRecordsSinceResponse, error)
- func (c *Records) GetUpdatedStorageDealRecordsSince(ctx context.Context, since time.Time, limit int) (*adminPb.GetUpdatedStorageDealRecordsSinceResponse, error)
- type StorageInfo
- type StorageJobs
- type SummaryOption
- type Users
- type Wallet
- func (w *Wallet) Addresses(ctx context.Context) (*adminPb.AddressesResponse, error)
- func (w *Wallet) NewAddress(ctx context.Context, addrType string) (*adminPb.NewAddressResponse, error)
- func (w *Wallet) SendFil(ctx context.Context, from, to string, amount *big.Int) (*adminPb.SendFilResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct { StorageJobs *StorageJobs StorageInfo *StorageInfo Users *Users Wallet *Wallet Data *Data Records *Records Indices *Indices }
Admin provides access to Powergate admin APIs.
func NewAdmin ¶
func NewAdmin(client adminPb.AdminServiceClient) *Admin
NewAdmin creates a new admin API.
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data provides access to Powergate data admin APIs.
func (*Data) PinnedCids ¶
PinnedCids returns pinned cids information of hot-storage.
type GetMinersOption ¶ added in v2.1.0
type GetMinersOption func(*cfgGetMiners) error
GetMinersOption configures filters for getting miners.
func WithPowerGreaterThanZero ¶ added in v2.1.0
func WithPowerGreaterThanZero(withPower bool) GetMinersOption
WithPowerGreaterThanZero filters miners that have power greater than zero.
type Indices ¶ added in v2.1.0
type Indices struct {
// contains filtered or unexported fields
}
Indices provides APIs to fetch indices data.
func (*Indices) GetMinerInfo ¶ added in v2.1.0
func (i *Indices) GetMinerInfo(ctx context.Context, miners ...string) (*adminPb.GetMinerInfoResponse, error)
GetMinerInfo returns all known indices data for the provider miner addresses.
func (*Indices) GetMiners ¶ added in v2.1.0
func (i *Indices) GetMiners(ctx context.Context, opts ...GetMinersOption) (*adminPb.GetMinersResponse, error)
GetMiners return a list of miner addresses that satisfies the provided filters.
type ListConfig ¶
type ListConfig struct { // UserIDFilter filters StorageJobs list to the specified user ID. Defaults to no filter. UserIDFilter string // CidFilter filters StorageJobs list to the specified cid. Defaults to no filter. CidFilter string // Limit limits the number of StorageJobs returned. Defaults to no limit. Limit uint64 // Ascending returns the StorageJobs ascending by time. Defaults to false, descending. Ascending bool // Select specifies to return StorageJobs in the specified state. Select ListSelect // NextPageToken sets the slug from which to start building the next page of results. NextPageToken string }
ListConfig controls the behavior for listing StorageJobs.
type ListSelect ¶
type ListSelect int32
ListSelect specifies which StorageJobs to list.
const ( // All lists all StorageJobs and is the default. All ListSelect = iota // Queued lists queued StorageJobs. Queued // Executing lists executing StorageJobs. Executing // Final lists final StorageJobs. Final )
type Records ¶ added in v2.1.0
type Records struct {
// contains filtered or unexported fields
}
Records provides APIs to fetch generated records from the deals module.
func (*Records) GetUpdatedRetrievalRecordsSince ¶ added in v2.1.0
func (c *Records) GetUpdatedRetrievalRecordsSince(ctx context.Context, since time.Time, limit int) (*adminPb.GetUpdatedRetrievalRecordsSinceResponse, error)
GetUpdatedRetrievalRecordsSince returns the retrieval records that were created or modified since the specified date.
func (*Records) GetUpdatedStorageDealRecordsSince ¶ added in v2.1.0
func (c *Records) GetUpdatedStorageDealRecordsSince(ctx context.Context, since time.Time, limit int) (*adminPb.GetUpdatedStorageDealRecordsSinceResponse, error)
GetUpdatedStorageDealRecordsSince returns the storage-deal records that were created or modified since the specified date.
type StorageInfo ¶
type StorageInfo struct {
// contains filtered or unexported fields
}
StorageInfo provides access to Powergate storage indo APIs.
func (*StorageInfo) Get ¶
func (s *StorageInfo) Get(ctx context.Context, userID, cid string) (*adminPb.StorageInfoResponse, error)
Get returns the information about a stored Cid. If no information is available, since the Cid was never stored, it returns an error with codes.NotFound.
func (*StorageInfo) List ¶
func (s *StorageInfo) List(ctx context.Context, userIDs, cids []string) (*adminPb.ListStorageInfoResponse, error)
List returns a list of information about all stored cids, filtered by user ids and cids if provided.
type StorageJobs ¶
type StorageJobs struct {
// contains filtered or unexported fields
}
StorageJobs provides access to Powergate jobs admin APIs.
func (*StorageJobs) List ¶
func (j *StorageJobs) List(ctx context.Context, config ListConfig) (*adminPb.ListStorageJobsResponse, error)
List lists StorageJobs according to the provided ListConfig.
func (*StorageJobs) Summary ¶
func (j *StorageJobs) Summary(ctx context.Context, opts ...SummaryOption) (*adminPb.StorageJobsSummaryResponse, error)
Summary returns a summary of storage jobs.
type SummaryOption ¶
type SummaryOption = func(*summaryConfig)
SummaryOption configures a storageJobsConfig.
func WithCid ¶
func WithCid(cid string) SummaryOption
WithCid filters the results to the specified data cid.
func WithUserID ¶
func WithUserID(userID string) SummaryOption
WithUserID filters the results to the specified user.
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
Users provides access to Powergate admin users APIs.
func (*Users) RegenerateAuth ¶ added in v2.6.0
func (p *Users) RegenerateAuth(ctx context.Context, token string) (*adminPb.RegenerateAuthResponse, error)
RegenerateAuth invalidates an existing token replacing it with a new one.
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
Wallet provides access to Powergate wallet admin APIs.
func (*Wallet) NewAddress ¶
func (w *Wallet) NewAddress(ctx context.Context, addrType string) (*adminPb.NewAddressResponse, error)
NewAddress creates a new address.