Skip to content

Commit

Permalink
API Re-org (#690)
Browse files Browse the repository at this point in the history
* move buildinfo service to new foundation

Signed-off-by: Aaron Sutula <hi@asutula.com>

* remove health module, rpc, client, cli

Signed-off-by: Aaron Sutula <hi@asutula.com>

* remove indexes and reputation apis

Signed-off-by: Aaron Sutula <hi@asutula.com>

* remove net module and api

Signed-off-by: Aaron Sutula <hi@asutula.com>

* fix proto formatting

Signed-off-by: Aaron Sutula <hi@asutula.com>

* remove pay channel code

Signed-off-by: Aaron Sutula <hi@asutula.com>

* remove wallet module rpc, move wallet methods to admin api

Signed-off-by: Aaron Sutula <hi@asutula.com>

* add wallet admin apis to client and cli

Signed-off-by: Aaron Sutula <hi@asutula.com>

* set wm

Signed-off-by: Aaron Sutula <hi@asutula.com>

* move ffs rpc to powergate proto, update client

Signed-off-by: Aaron Sutula <hi@asutula.com>

* update runner

Signed-off-by: Aaron Sutula <hi@asutula.com>

* update cli

Signed-off-by: Aaron Sutula <hi@asutula.com>

* future proofing some api names

Signed-off-by: Aaron Sutula <hi@asutula.com>

* Make config commands top level

Signed-off-by: Aaron Sutula <hi@asutula.com>

* remove extra line

Signed-off-by: Aaron Sutula <hi@asutula.com>

* remove some ffs wording

Signed-off-by: Aaron Sutula <hi@asutula.com>

* more ffs word removal

Signed-off-by: Aaron Sutula <hi@asutula.com>
  • Loading branch information
asutula committed Oct 23, 2020
1 parent 26d0415 commit f9f5683
Show file tree
Hide file tree
Showing 132 changed files with 10,995 additions and 18,486 deletions.
23 changes: 23 additions & 0 deletions api/client/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,29 @@ type Admin struct {
client proto.PowergateAdminServiceClient
}

// NewAddress creates a new address.
func (a *Admin) NewAddress(ctx context.Context, addrType string) (*proto.NewAddressResponse, error) {
req := &proto.NewAddressRequest{
Type: addrType,
}
return a.client.NewAddress(ctx, req)
}

// ListAddresses lists all addresses associated with this Powergate.
func (a *Admin) ListAddresses(ctx context.Context) (*proto.ListAddressesResponse, error) {
return a.client.ListAddresses(ctx, &proto.ListAddressesRequest{})
}

// SendFil sends FIL from an address associated with this Powergate to any other address.
func (a *Admin) SendFil(ctx context.Context, from, to string, amount int64) (*proto.SendFilResponse, error) {
req := &proto.SendFilRequest{
From: from,
To: to,
Amount: amount,
}
return a.client.SendFil(ctx, req)
}

// CreateStorageProfile creates a new Powergate storage profile, returning the instance ID and auth token.
func (a *Admin) CreateStorageProfile(ctx context.Context) (*proto.CreateStorageProfileResponse, error) {
return a.client.CreateStorageProfile(ctx, &proto.CreateStorageProfileRequest{})
Expand Down
22 changes: 0 additions & 22 deletions api/client/asks.go

This file was deleted.

33 changes: 0 additions & 33 deletions api/client/asks_test.go

This file was deleted.

Loading

0 comments on commit f9f5683

Please sign in to comment.