admin

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	StorageJobs *StorageJobs
	Profiles    *Profiles
	Wallet      *Wallet
}

Admin provides access to Powergate admin APIs.

func NewAdmin

func NewAdmin(client proto.PowergateAdminServiceClient) *Admin

NewAdmin creates a new admin API.

type Profiles

type Profiles struct {
	// contains filtered or unexported fields
}

Profiles provides access to Powergate admin storage profile APIs.

func (*Profiles) CreateStorageProfile

func (p *Profiles) CreateStorageProfile(ctx context.Context) (*proto.CreateStorageProfileResponse, error)

CreateStorageProfile creates a new Powergate storage profile, returning the instance ID and auth token.

func (*Profiles) StorageProfiles

func (p *Profiles) StorageProfiles(ctx context.Context) (*proto.StorageProfilesResponse, error)

StorageProfiles returns a list of existing API instances.

type StorageJobs

type StorageJobs struct {
	// contains filtered or unexported fields
}

StorageJobs provides access to Powergate jobs admin APIs.

func (*StorageJobs) Executing

Executing returns a list of executing storage jobs.

func (*StorageJobs) LatestFinal

LatestFinal returns a list of latest final storage jobs.

func (*StorageJobs) LatestSuccessful

LatestSuccessful returns a list of latest successful storage jobs.

func (*StorageJobs) Queued

Queued returns a list of queued storage jobs.

func (*StorageJobs) Summary

Summary returns a summary of storage jobs.

type StorageJobsOption

type StorageJobsOption = func(*storageJobsConfig)

StorageJobsOption configures a storageJobsConfig.

func WithCids

func WithCids(cids ...string) StorageJobsOption

WithCids filters the results to the specified data cids.

func WithProfileID

func WithProfileID(profileID string) StorageJobsOption

WithProfileID filters the results to the specified profile.

type Wallet

type Wallet struct {
	// contains filtered or unexported fields
}

Wallet provides access to Powergate wallet admin APIs.

func (*Wallet) Addresses

func (w *Wallet) Addresses(ctx context.Context) (*proto.AddressesResponse, error)

Addresses lists all addresses associated with this Powergate.

func (*Wallet) NewAddress

func (w *Wallet) NewAddress(ctx context.Context, addrType string) (*proto.NewAddressResponse, error)

NewAddress creates a new address.

func (*Wallet) SendFil

func (w *Wallet) SendFil(ctx context.Context, from, to string, amount *big.Int) (*proto.SendFilResponse, error)

SendFil sends FIL from an address associated with this Powergate to any other address.

Jump to

Keyboard shortcuts

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