admin

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 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
	Users       *Users
	Wallet      *Wallet
	Data        *Data
}

Admin provides access to Powergate admin APIs.

func NewAdmin

func NewAdmin(client adminPb.AdminServiceClient) *Admin

NewAdmin creates a new admin API.

type Data added in v1.2.2

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

Data provides access to Powergate data admin APIs.

func (*Data) GCStaged added in v1.2.2

func (w *Data) GCStaged(ctx context.Context) (*proto.GCStagedResponse, error)

GCStaged unpins staged data not related to queued or executing jobs.

func (*Data) PinnedCids added in v1.2.2

func (w *Data) PinnedCids(ctx context.Context) (*proto.PinnedCidsResponse, error)

PinnedCids returns pinned cids information of hot-storage.

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 WithUserID added in v1.1.0

func WithUserID(userID string) StorageJobsOption

WithUserID filters the results to the specified user.

type Users added in v1.1.0

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

Users provides access to Powergate admin users APIs.

func (*Users) Create added in v1.1.0

func (p *Users) Create(ctx context.Context) (*adminPb.CreateUserResponse, error)

Create creates a new Powergate user, returning the user ID and auth token.

func (*Users) List added in v1.1.0

func (p *Users) List(ctx context.Context) (*adminPb.UsersResponse, error)

List returns a list of existing users.

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) (*adminPb.AddressesResponse, error)

Addresses lists all addresses associated with this Powergate.

func (*Wallet) NewAddress

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

NewAddress creates a new address.

func (*Wallet) SendFil

func (w *Wallet) SendFil(ctx context.Context, from, to string, amount *big.Int) (*adminPb.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