Skip to content

Commit

Permalink
api: add Version api for components
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode committed Aug 2, 2022
1 parent f5a4cc0 commit 79b2da1
Show file tree
Hide file tree
Showing 20 changed files with 212 additions and 0 deletions.
8 changes: 8 additions & 0 deletions venus-shared/api/gateway/v0/api.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
package gateway

import (
"context"

"github.com/filecoin-project/venus/venus-shared/types"
)

type IGateway interface {
IProofEvent
IWalletEvent
IMarketEvent

Version(ctx context.Context) (types.Version, error) //perm:read
}
19 changes: 19 additions & 0 deletions venus-shared/api/gateway/v0/method.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Groups

* [Gateway](#Gateway)
* [Version](#Version)
* [MarketClient](#MarketClient)
* [IsUnsealed](#IsUnsealed)
* [ListMarketConnectionsState](#ListMarketConnectionsState)
Expand All @@ -26,6 +28,23 @@
* [ResponseWalletEvent](#ResponseWalletEvent)
* [SupportNewAccount](#SupportNewAccount)

## Gateway

### Version


Perms: read

Inputs: `[]`

Response:
```json
{
"Version": "string value",
"APIVersion": 131584
}
```

## MarketClient

### IsUnsealed
Expand Down
15 changes: 15 additions & 0 deletions venus-shared/api/gateway/v0/mock/mock_igateway.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions venus-shared/api/gateway/v0/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions venus-shared/api/gateway/v1/api.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
package gateway

import (
"context"

"github.com/filecoin-project/venus/venus-shared/types"
)

type IGateway interface {
IProofEvent
IWalletEvent
IMarketEvent

Version(ctx context.Context) (types.Version, error) //perm:read
}
19 changes: 19 additions & 0 deletions venus-shared/api/gateway/v1/method.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Groups

* [Gateway](#Gateway)
* [Version](#Version)
* [MarketClient](#MarketClient)
* [IsUnsealed](#IsUnsealed)
* [ListMarketConnectionsState](#ListMarketConnectionsState)
Expand All @@ -26,6 +28,23 @@
* [ResponseWalletEvent](#ResponseWalletEvent)
* [SupportNewAccount](#SupportNewAccount)

## Gateway

### Version


Perms: read

Inputs: `[]`

Response:
```json
{
"Version": "string value",
"APIVersion": 131584
}
```

## MarketClient

### IsUnsealed
Expand Down
15 changes: 15 additions & 0 deletions venus-shared/api/gateway/v1/mock/mock_igateway.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions venus-shared/api/gateway/v1/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions venus-shared/api/market/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,6 @@ type IMarket interface {
RemovePieceStorage(ctx context.Context, name string) error //perm:admin

GetPieceStorages(ctx context.Context) market.PieceStorageInfos //perm:read

Version(ctx context.Context) (types.Version, error) //perm:read
}
2 changes: 2 additions & 0 deletions venus-shared/api/market/client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,6 @@ type IMarketClient interface {
MessagerWaitMessage(ctx context.Context, mid cid.Cid) (*types.MsgLookup, error) //perm:read
MessagerPushMessage(ctx context.Context, msg *types.Message, meta *types.MessageSendSpec) (cid.Cid, error) //perm:write
MessagerGetMessage(ctx context.Context, mid cid.Cid) (*types.Message, error) //perm:read

Version(ctx context.Context) (types.Version, error) //perm:read
}
16 changes: 16 additions & 0 deletions venus-shared/api/market/client/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* [MessagerGetMessage](#MessagerGetMessage)
* [MessagerPushMessage](#MessagerPushMessage)
* [MessagerWaitMessage](#MessagerWaitMessage)
* [Version](#Version)

## MarketClient

Expand Down Expand Up @@ -1246,3 +1247,18 @@ Response:
}
```

### Version


Perms: read

Inputs: `[]`

Response:
```json
{
"Version": "string value",
"APIVersion": 131584
}
```

15 changes: 15 additions & 0 deletions venus-shared/api/market/client/mock/mock_imarketclient.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions venus-shared/api/market/client/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions venus-shared/api/market/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
* [UpdateDealOnPacking](#UpdateDealOnPacking)
* [UpdateDealStatus](#UpdateDealStatus)
* [UpdateStorageDealStatus](#UpdateStorageDealStatus)
* [Version](#Version)

## Market

Expand Down Expand Up @@ -1945,3 +1946,18 @@ Inputs:

Response: `{}`

### Version


Perms: read

Inputs: `[]`

Response:
```json
{
"Version": "string value",
"APIVersion": 131584
}
```

15 changes: 15 additions & 0 deletions venus-shared/api/market/mock/mock_imarket.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions venus-shared/api/market/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions venus-shared/api/messager/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,6 @@ type IMessager interface {
SetLogLevel(ctx context.Context, level string) error //perm:admin

Send(ctx context.Context, params types.QuickSendParams) (string, error) //perm:admin

Version(ctx context.Context) (shared.Version, error) //perm:read
}
16 changes: 16 additions & 0 deletions venus-shared/api/messager/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
* [UpdateFilledMessageByID](#UpdateFilledMessageByID)
* [UpdateMessageStateByID](#UpdateMessageStateByID)
* [UpdateNonce](#UpdateNonce)
* [Version](#Version)
* [WaitMessage](#WaitMessage)
* [WalletHas](#WalletHas)

Expand Down Expand Up @@ -1264,6 +1265,21 @@ Inputs:

Response: `{}`

### Version


Perms: read

Inputs: `[]`

Response:
```json
{
"Version": "string value",
"APIVersion": 131584
}
```

### WaitMessage


Expand Down
16 changes: 16 additions & 0 deletions venus-shared/api/messager/mock/mock_imessager.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions venus-shared/api/messager/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 79b2da1

Please sign in to comment.