From 086b7e60568417c5202bb5dcf1965d10b56bd4cc Mon Sep 17 00:00:00 2001 From: dtynn Date: Thu, 17 Feb 2022 21:03:10 +0800 Subject: [PATCH 1/4] feat: helper for formating endpoint with given addr & ver --- venus-shared/api/endpoint.go | 28 +++++++++ venus-shared/api/endpoint_test.go | 95 +++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 venus-shared/api/endpoint.go create mode 100644 venus-shared/api/endpoint_test.go diff --git a/venus-shared/api/endpoint.go b/venus-shared/api/endpoint.go new file mode 100644 index 0000000000..58f705b0ab --- /dev/null +++ b/venus-shared/api/endpoint.go @@ -0,0 +1,28 @@ +package api + +import ( + "fmt" + "net/url" +) + +func Endpoint(raw string, ver uint32) (string, error) { + u, err := url.Parse(raw) + if err != nil { + return "", fmt.Errorf("invalid url: %w", err) + } + + if u.Scheme == "" { + return "", fmt.Errorf("scheme is required") + } + + if u.Host == "" { + return "", fmt.Errorf("host is required") + } + + // raw url contains more than just scheme://host(:prot) + if u.Path != "" && u.Path != "/" { + return raw, nil + } + + return fmt.Sprintf("%s://%s/rpc/v%d", u.Scheme, u.Host, ver), nil +} diff --git a/venus-shared/api/endpoint_test.go b/venus-shared/api/endpoint_test.go new file mode 100644 index 0000000000..6ca1ffbdb8 --- /dev/null +++ b/venus-shared/api/endpoint_test.go @@ -0,0 +1,95 @@ +package api + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestParseHost(t *testing.T) { + + cases := []struct { + raw string + ver uint32 + expected string + }{ + // valid + { + raw: "http://api.venus.io:1234", + ver: 1, + expected: "http://api.venus.io:1234/rpc/v1", + }, + { + raw: "http://api.venus.io:1234/", + ver: 1, + expected: "http://api.venus.io:1234/rpc/v1", + }, + { + raw: "http://api.venus.io:1234/rpc", + ver: 1, + expected: "http://api.venus.io:1234/rpc", + }, + + { + raw: "http://api.venus.io:1234/rpc/v0", + ver: 1, + expected: "http://api.venus.io:1234/rpc/v0", + }, + + // invalid: no scheme + { + raw: "://api.venus.io:1234", + ver: 1, + expected: "", + }, + { + raw: "://api.venus.io:1234/", + ver: 1, + expected: "", + }, + { + raw: "://api.venus.io:1234/rpc", + ver: 1, + expected: "", + }, + { + raw: "://api.venus.io:1234/rpc/v0", + ver: 1, + expected: "", + }, + + // invalid: no scheme 2 + { + raw: "api.venus.io:1234", + ver: 1, + expected: "", + }, + { + raw: "api.venus.io:1234/", + ver: 1, + expected: "", + }, + { + raw: "api.venus.io:1234/rpc", + ver: 1, + expected: "", + }, + { + raw: "api.venus.io:1234/rpc/v0", + ver: 1, + expected: "", + }, + } + + for i := range cases { + c := cases[i] + got, err := Endpoint(c.raw, c.ver) + if c.expected == "" { + require.Errorf(t, err, "%s is expected to be invalid, got %s", c.raw, got) + continue + } + + require.NoErrorf(t, err, "%s is expected to be valid", c.raw) + require.Equal(t, c.expected, got, "converted endpoint") + } +} From 6c885367d23b0276f435864e1bde545e21233dca Mon Sep 17 00:00:00 2001 From: dtynn Date: Thu, 17 Feb 2022 21:07:23 +0800 Subject: [PATCH 2/4] feat: add Version for api-gen --- venus-devtool/api-gen/client.go | 25 ++++++++++++++++++------- venus-devtool/api-gen/common.go | 7 +++++++ venus-devtool/util/api_meta.go | 7 +++++++ 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/venus-devtool/api-gen/client.go b/venus-devtool/api-gen/client.go index 88a2207dde..a141d66528 100644 --- a/venus-devtool/api-gen/client.go +++ b/venus-devtool/api-gen/client.go @@ -30,6 +30,7 @@ package {{ .PkgName }} import ( "context" + "fmt" "net/http" "github.com/filecoin-project/go-jsonrpc" @@ -37,15 +38,24 @@ import ( "github.com/filecoin-project/venus/venus-shared/api" ) +const MajorVersion = {{ .MajorVersion }} +const APINamespace = "{{ .APINs }}" +const MethodNamespace = "{{ .MethNs }}" + // New{{ .APIName }}RPC creates a new httpparse jsonrpc remotecli. func New{{ .APIName }}RPC(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) ({{ .APIName }}, jsonrpc.ClientCloser, error) { + endpoint, err := api.Endpoint(addr, MajorVersion) + if err != nil { + return nil, nil, fmt.Errorf("invalid addr %s: %w", addr, err) + } + if requestHeader == nil { requestHeader = http.Header{} } - requestHeader.Set(api.VenusAPINamespaceHeader, "{{ .APINs }}") + requestHeader.Set(api.VenusAPINamespaceHeader, APINamespace) var res {{ .APIStruct }} - closer, err := jsonrpc.NewMergeClient(ctx, addr, "{{ .MethNs }}", api.GetInternalStructs(&res), requestHeader, opts...) + closer, err := jsonrpc.NewMergeClient(ctx, endpoint, MethodNamespace, api.GetInternalStructs(&res), requestHeader, opts...) return &res, closer, err } @@ -88,11 +98,12 @@ func genClientForAPI(t util.APIMeta) error { var buf bytes.Buffer err = tmpl.Execute(&buf, map[string]interface{}{ - "PkgName": apiIface.Pkg.Name, - "APIName": apiName, - "APIStruct": structName(apiName), - "APINs": ns, - "MethNs": methNs, + "PkgName": apiIface.Pkg.Name, + "APIName": apiName, + "APIStruct": structName(apiName), + "APINs": ns, + "MethNs": methNs, + "MajorVersion": t.RPCMeta.Version, }) if err != nil { return fmt.Errorf("exec template: %w", err) diff --git a/venus-devtool/api-gen/common.go b/venus-devtool/api-gen/common.go index bdd9d092b3..49f77985b3 100644 --- a/venus-devtool/api-gen/common.go +++ b/venus-devtool/api-gen/common.go @@ -30,6 +30,7 @@ func init() { IncludeAll: true, }, RPCMeta: util.RPCMeta{ + Version: 0, MethodNamespace: "Message", }, }, @@ -39,6 +40,9 @@ func init() { ImportPath: "github.com/filecoin-project/venus/venus-shared/api/wallet", IncludeAll: true, }, + RPCMeta: util.RPCMeta{ + Version: 0, + }, }, util.APIMeta{ Type: reflect.TypeOf((*gatewayv1.IGateway)(nil)).Elem(), @@ -47,6 +51,7 @@ func init() { IncludeAll: true, }, RPCMeta: util.RPCMeta{ + Version: 1, MethodNamespace: "Gateway", }, }, @@ -67,6 +72,7 @@ func init() { IncludeAll: true, }, RPCMeta: util.RPCMeta{ + Version: 0, MethodNamespace: "VENUS_MARKET", }, }, @@ -77,6 +83,7 @@ func init() { IncludeAll: true, }, RPCMeta: util.RPCMeta{ + Version: 0, MethodNamespace: "VENUS_MARKET_CLIENT", }, }, diff --git a/venus-devtool/util/api_meta.go b/venus-devtool/util/api_meta.go index ea29649708..bcee1e55d4 100644 --- a/venus-devtool/util/api_meta.go +++ b/venus-devtool/util/api_meta.go @@ -31,6 +31,9 @@ var ChainAPIPairs = []struct { ImportPath: "github.com/filecoin-project/venus/venus-shared/api/chain/v0", IncludeAll: true, }, + RPCMeta: RPCMeta{ + Version: 0, + }, }, }, { @@ -48,6 +51,9 @@ var ChainAPIPairs = []struct { ImportPath: "github.com/filecoin-project/venus/venus-shared/api/chain/v1", IncludeAll: true, }, + RPCMeta: RPCMeta{ + Version: 1, + }, }, }, } @@ -55,6 +61,7 @@ var ChainAPIPairs = []struct { var LatestChainAPIPair = ChainAPIPairs[len(ChainAPIPairs)-1] type RPCMeta struct { + Version uint32 Namespace string MethodNamespace string } From 534bcb536b02743290e1d69dbbb90a8fbe674cf3 Mon Sep 17 00:00:00 2001 From: dtynn Date: Thu, 17 Feb 2022 21:11:59 +0800 Subject: [PATCH 3/4] feat: re-generate api clients with ver & nss --- venus-shared/api/chain/v0/client_gen.go | 14 ++++++++++++-- venus-shared/api/chain/v1/client_gen.go | 14 ++++++++++++-- venus-shared/api/gateway/v1/client_gen.go | 14 ++++++++++++-- venus-shared/api/market/client/client_gen.go | 14 ++++++++++++-- venus-shared/api/market/client_gen.go | 14 ++++++++++++-- venus-shared/api/messager/client_gen.go | 14 ++++++++++++-- venus-shared/api/wallet/client_gen.go | 14 ++++++++++++-- 7 files changed, 84 insertions(+), 14 deletions(-) diff --git a/venus-shared/api/chain/v0/client_gen.go b/venus-shared/api/chain/v0/client_gen.go index a7215fcb4c..33e8a5f59d 100644 --- a/venus-shared/api/chain/v0/client_gen.go +++ b/venus-shared/api/chain/v0/client_gen.go @@ -3,6 +3,7 @@ package v0 import ( "context" + "fmt" "net/http" "github.com/filecoin-project/go-jsonrpc" @@ -10,15 +11,24 @@ import ( "github.com/filecoin-project/venus/venus-shared/api" ) +const MajorVersion = 0 +const APINamespace = "v0.FullNode" +const MethodNamespace = "Filecoin" + // NewFullNodeRPC creates a new httpparse jsonrpc remotecli. func NewFullNodeRPC(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (FullNode, jsonrpc.ClientCloser, error) { + endpoint, err := api.Endpoint(addr, MajorVersion) + if err != nil { + return nil, nil, fmt.Errorf("invalid addr %s: %w", addr, err) + } + if requestHeader == nil { requestHeader = http.Header{} } - requestHeader.Set(api.VenusAPINamespaceHeader, "v0.FullNode") + requestHeader.Set(api.VenusAPINamespaceHeader, APINamespace) var res FullNodeStruct - closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin", api.GetInternalStructs(&res), requestHeader, opts...) + closer, err := jsonrpc.NewMergeClient(ctx, endpoint, MethodNamespace, api.GetInternalStructs(&res), requestHeader, opts...) return &res, closer, err } diff --git a/venus-shared/api/chain/v1/client_gen.go b/venus-shared/api/chain/v1/client_gen.go index 285364777e..11ef9fa0a7 100644 --- a/venus-shared/api/chain/v1/client_gen.go +++ b/venus-shared/api/chain/v1/client_gen.go @@ -3,6 +3,7 @@ package v1 import ( "context" + "fmt" "net/http" "github.com/filecoin-project/go-jsonrpc" @@ -10,15 +11,24 @@ import ( "github.com/filecoin-project/venus/venus-shared/api" ) +const MajorVersion = 1 +const APINamespace = "v1.FullNode" +const MethodNamespace = "Filecoin" + // NewFullNodeRPC creates a new httpparse jsonrpc remotecli. func NewFullNodeRPC(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (FullNode, jsonrpc.ClientCloser, error) { + endpoint, err := api.Endpoint(addr, MajorVersion) + if err != nil { + return nil, nil, fmt.Errorf("invalid addr %s: %w", addr, err) + } + if requestHeader == nil { requestHeader = http.Header{} } - requestHeader.Set(api.VenusAPINamespaceHeader, "v1.FullNode") + requestHeader.Set(api.VenusAPINamespaceHeader, APINamespace) var res FullNodeStruct - closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin", api.GetInternalStructs(&res), requestHeader, opts...) + closer, err := jsonrpc.NewMergeClient(ctx, endpoint, MethodNamespace, api.GetInternalStructs(&res), requestHeader, opts...) return &res, closer, err } diff --git a/venus-shared/api/gateway/v1/client_gen.go b/venus-shared/api/gateway/v1/client_gen.go index 52f1c0e791..2d665133bb 100644 --- a/venus-shared/api/gateway/v1/client_gen.go +++ b/venus-shared/api/gateway/v1/client_gen.go @@ -3,6 +3,7 @@ package gateway import ( "context" + "fmt" "net/http" "github.com/filecoin-project/go-jsonrpc" @@ -10,15 +11,24 @@ import ( "github.com/filecoin-project/venus/venus-shared/api" ) +const MajorVersion = 1 +const APINamespace = "gateway.IGateway" +const MethodNamespace = "Gateway" + // NewIGatewayRPC creates a new httpparse jsonrpc remotecli. func NewIGatewayRPC(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (IGateway, jsonrpc.ClientCloser, error) { + endpoint, err := api.Endpoint(addr, MajorVersion) + if err != nil { + return nil, nil, fmt.Errorf("invalid addr %s: %w", addr, err) + } + if requestHeader == nil { requestHeader = http.Header{} } - requestHeader.Set(api.VenusAPINamespaceHeader, "gateway.IGateway") + requestHeader.Set(api.VenusAPINamespaceHeader, APINamespace) var res IGatewayStruct - closer, err := jsonrpc.NewMergeClient(ctx, addr, "Gateway", api.GetInternalStructs(&res), requestHeader, opts...) + closer, err := jsonrpc.NewMergeClient(ctx, endpoint, MethodNamespace, api.GetInternalStructs(&res), requestHeader, opts...) return &res, closer, err } diff --git a/venus-shared/api/market/client/client_gen.go b/venus-shared/api/market/client/client_gen.go index 828b63fd4e..abf56fc3ea 100644 --- a/venus-shared/api/market/client/client_gen.go +++ b/venus-shared/api/market/client/client_gen.go @@ -3,6 +3,7 @@ package client import ( "context" + "fmt" "net/http" "github.com/filecoin-project/go-jsonrpc" @@ -10,15 +11,24 @@ import ( "github.com/filecoin-project/venus/venus-shared/api" ) +const MajorVersion = 0 +const APINamespace = "client.IMarketClient" +const MethodNamespace = "VENUS_MARKET_CLIENT" + // NewIMarketClientRPC creates a new httpparse jsonrpc remotecli. func NewIMarketClientRPC(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (IMarketClient, jsonrpc.ClientCloser, error) { + endpoint, err := api.Endpoint(addr, MajorVersion) + if err != nil { + return nil, nil, fmt.Errorf("invalid addr %s: %w", addr, err) + } + if requestHeader == nil { requestHeader = http.Header{} } - requestHeader.Set(api.VenusAPINamespaceHeader, "client.IMarketClient") + requestHeader.Set(api.VenusAPINamespaceHeader, APINamespace) var res IMarketClientStruct - closer, err := jsonrpc.NewMergeClient(ctx, addr, "VENUS_MARKET_CLIENT", api.GetInternalStructs(&res), requestHeader, opts...) + closer, err := jsonrpc.NewMergeClient(ctx, endpoint, MethodNamespace, api.GetInternalStructs(&res), requestHeader, opts...) return &res, closer, err } diff --git a/venus-shared/api/market/client_gen.go b/venus-shared/api/market/client_gen.go index 0f920fa979..ae5cd1d49a 100644 --- a/venus-shared/api/market/client_gen.go +++ b/venus-shared/api/market/client_gen.go @@ -3,6 +3,7 @@ package market import ( "context" + "fmt" "net/http" "github.com/filecoin-project/go-jsonrpc" @@ -10,15 +11,24 @@ import ( "github.com/filecoin-project/venus/venus-shared/api" ) +const MajorVersion = 0 +const APINamespace = "market.IMarket" +const MethodNamespace = "VENUS_MARKET" + // NewIMarketRPC creates a new httpparse jsonrpc remotecli. func NewIMarketRPC(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (IMarket, jsonrpc.ClientCloser, error) { + endpoint, err := api.Endpoint(addr, MajorVersion) + if err != nil { + return nil, nil, fmt.Errorf("invalid addr %s: %w", addr, err) + } + if requestHeader == nil { requestHeader = http.Header{} } - requestHeader.Set(api.VenusAPINamespaceHeader, "market.IMarket") + requestHeader.Set(api.VenusAPINamespaceHeader, APINamespace) var res IMarketStruct - closer, err := jsonrpc.NewMergeClient(ctx, addr, "VENUS_MARKET", api.GetInternalStructs(&res), requestHeader, opts...) + closer, err := jsonrpc.NewMergeClient(ctx, endpoint, MethodNamespace, api.GetInternalStructs(&res), requestHeader, opts...) return &res, closer, err } diff --git a/venus-shared/api/messager/client_gen.go b/venus-shared/api/messager/client_gen.go index d98757bb18..75aeee9f78 100644 --- a/venus-shared/api/messager/client_gen.go +++ b/venus-shared/api/messager/client_gen.go @@ -3,6 +3,7 @@ package messager import ( "context" + "fmt" "net/http" "github.com/filecoin-project/go-jsonrpc" @@ -10,15 +11,24 @@ import ( "github.com/filecoin-project/venus/venus-shared/api" ) +const MajorVersion = 0 +const APINamespace = "messager.IMessager" +const MethodNamespace = "Message" + // NewIMessagerRPC creates a new httpparse jsonrpc remotecli. func NewIMessagerRPC(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (IMessager, jsonrpc.ClientCloser, error) { + endpoint, err := api.Endpoint(addr, MajorVersion) + if err != nil { + return nil, nil, fmt.Errorf("invalid addr %s: %w", addr, err) + } + if requestHeader == nil { requestHeader = http.Header{} } - requestHeader.Set(api.VenusAPINamespaceHeader, "messager.IMessager") + requestHeader.Set(api.VenusAPINamespaceHeader, APINamespace) var res IMessagerStruct - closer, err := jsonrpc.NewMergeClient(ctx, addr, "Message", api.GetInternalStructs(&res), requestHeader, opts...) + closer, err := jsonrpc.NewMergeClient(ctx, endpoint, MethodNamespace, api.GetInternalStructs(&res), requestHeader, opts...) return &res, closer, err } diff --git a/venus-shared/api/wallet/client_gen.go b/venus-shared/api/wallet/client_gen.go index 95e0cff4c4..29f1c49810 100644 --- a/venus-shared/api/wallet/client_gen.go +++ b/venus-shared/api/wallet/client_gen.go @@ -3,6 +3,7 @@ package wallet import ( "context" + "fmt" "net/http" "github.com/filecoin-project/go-jsonrpc" @@ -10,15 +11,24 @@ import ( "github.com/filecoin-project/venus/venus-shared/api" ) +const MajorVersion = 0 +const APINamespace = "wallet.IFullAPI" +const MethodNamespace = "Filecoin" + // NewIFullAPIRPC creates a new httpparse jsonrpc remotecli. func NewIFullAPIRPC(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (IFullAPI, jsonrpc.ClientCloser, error) { + endpoint, err := api.Endpoint(addr, MajorVersion) + if err != nil { + return nil, nil, fmt.Errorf("invalid addr %s: %w", addr, err) + } + if requestHeader == nil { requestHeader = http.Header{} } - requestHeader.Set(api.VenusAPINamespaceHeader, "wallet.IFullAPI") + requestHeader.Set(api.VenusAPINamespaceHeader, APINamespace) var res IFullAPIStruct - closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin", api.GetInternalStructs(&res), requestHeader, opts...) + closer, err := jsonrpc.NewMergeClient(ctx, endpoint, MethodNamespace, api.GetInternalStructs(&res), requestHeader, opts...) return &res, closer, err } From b959527a595cd6ece5b414b8225216b1805b01c4 Mon Sep 17 00:00:00 2001 From: dtynn Date: Thu, 17 Feb 2022 21:22:41 +0800 Subject: [PATCH 4/4] refactor: rename v0 to gateway so that we could have a better api namespace --- venus-devtool/api-gen/common.go | 1 + venus-shared/api/gateway/v0/api.go | 2 +- venus-shared/api/gateway/v0/client_gen.go | 16 +++++++++++++--- venus-shared/api/gateway/v0/market_event.go | 2 +- venus-shared/api/gateway/v0/proof_event.go | 2 +- venus-shared/api/gateway/v0/proxy_gen.go | 2 +- venus-shared/api/gateway/v0/wallet_event.go | 2 +- 7 files changed, 19 insertions(+), 8 deletions(-) diff --git a/venus-devtool/api-gen/common.go b/venus-devtool/api-gen/common.go index 49f77985b3..9e72e1003c 100644 --- a/venus-devtool/api-gen/common.go +++ b/venus-devtool/api-gen/common.go @@ -62,6 +62,7 @@ func init() { IncludeAll: true, }, RPCMeta: util.RPCMeta{ + Version: 0, MethodNamespace: "Gateway", }, }, diff --git a/venus-shared/api/gateway/v0/api.go b/venus-shared/api/gateway/v0/api.go index a7d52eafd1..537ed77210 100644 --- a/venus-shared/api/gateway/v0/api.go +++ b/venus-shared/api/gateway/v0/api.go @@ -1,4 +1,4 @@ -package v0 +package gateway type IGateway interface { IProofEvent diff --git a/venus-shared/api/gateway/v0/client_gen.go b/venus-shared/api/gateway/v0/client_gen.go index dfcc22dfa1..f12c406f31 100644 --- a/venus-shared/api/gateway/v0/client_gen.go +++ b/venus-shared/api/gateway/v0/client_gen.go @@ -1,8 +1,9 @@ // Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen. DO NOT EDIT. -package v0 +package gateway import ( "context" + "fmt" "net/http" "github.com/filecoin-project/go-jsonrpc" @@ -10,15 +11,24 @@ import ( "github.com/filecoin-project/venus/venus-shared/api" ) +const MajorVersion = 0 +const APINamespace = "gateway.IGateway" +const MethodNamespace = "Gateway" + // NewIGatewayRPC creates a new httpparse jsonrpc remotecli. func NewIGatewayRPC(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (IGateway, jsonrpc.ClientCloser, error) { + endpoint, err := api.Endpoint(addr, MajorVersion) + if err != nil { + return nil, nil, fmt.Errorf("invalid addr %s: %w", addr, err) + } + if requestHeader == nil { requestHeader = http.Header{} } - requestHeader.Set(api.VenusAPINamespaceHeader, "v0.IGateway") + requestHeader.Set(api.VenusAPINamespaceHeader, APINamespace) var res IGatewayStruct - closer, err := jsonrpc.NewMergeClient(ctx, addr, "Gateway", api.GetInternalStructs(&res), requestHeader, opts...) + closer, err := jsonrpc.NewMergeClient(ctx, endpoint, MethodNamespace, api.GetInternalStructs(&res), requestHeader, opts...) return &res, closer, err } diff --git a/venus-shared/api/gateway/v0/market_event.go b/venus-shared/api/gateway/v0/market_event.go index a45a475d77..42db2d2872 100644 --- a/venus-shared/api/gateway/v0/market_event.go +++ b/venus-shared/api/gateway/v0/market_event.go @@ -1,4 +1,4 @@ -package v0 +package gateway import ( "context" diff --git a/venus-shared/api/gateway/v0/proof_event.go b/venus-shared/api/gateway/v0/proof_event.go index 6b116cb1cf..1af746846a 100644 --- a/venus-shared/api/gateway/v0/proof_event.go +++ b/venus-shared/api/gateway/v0/proof_event.go @@ -1,4 +1,4 @@ -package v0 +package gateway import ( "context" diff --git a/venus-shared/api/gateway/v0/proxy_gen.go b/venus-shared/api/gateway/v0/proxy_gen.go index ffcc1bc4b5..39020b4b04 100644 --- a/venus-shared/api/gateway/v0/proxy_gen.go +++ b/venus-shared/api/gateway/v0/proxy_gen.go @@ -1,5 +1,5 @@ // Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen. DO NOT EDIT. -package v0 +package gateway import ( "context" diff --git a/venus-shared/api/gateway/v0/wallet_event.go b/venus-shared/api/gateway/v0/wallet_event.go index bced2e2a9e..90279d5319 100644 --- a/venus-shared/api/gateway/v0/wallet_event.go +++ b/venus-shared/api/gateway/v0/wallet_event.go @@ -1,4 +1,4 @@ -package v0 +package gateway import ( "context"