From 5ca02d7be1f1b2d46bc085df7d97eb214c85f223 Mon Sep 17 00:00:00 2001 From: tanlang Date: Mon, 4 Jul 2022 16:36:41 +0800 Subject: [PATCH] style: ch PieceStorageList to be PieceStorageInfos --- venus-shared/api/market/api.go | 2 +- venus-shared/api/market/mock/mock_imarket.go | 4 ++-- venus-shared/api/market/proxy_gen.go | 4 ++-- venus-shared/types/market/piecestorage.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/venus-shared/api/market/api.go b/venus-shared/api/market/api.go index 0d51069564..614f31547d 100644 --- a/venus-shared/api/market/api.go +++ b/venus-shared/api/market/api.go @@ -154,5 +154,5 @@ type IMarket interface { RemovePieceStorage(ctx context.Context, name string) error //perm:admin - GetPieceStorages(ctx context.Context) market.PieceStorageList //perm:read + GetPieceStorages(ctx context.Context) market.PieceStorageInfos //perm:read } diff --git a/venus-shared/api/market/mock/mock_imarket.go b/venus-shared/api/market/mock/mock_imarket.go index bbedc2ae8b..b8167d1ba2 100644 --- a/venus-shared/api/market/mock/mock_imarket.go +++ b/venus-shared/api/market/mock/mock_imarket.go @@ -443,10 +443,10 @@ func (mr *MockIMarketMockRecorder) GetDeals(arg0, arg1, arg2, arg3 interface{}) } // GetPieceStorages mocks base method. -func (m *MockIMarket) GetPieceStorages(arg0 context.Context) market.PieceStorageList { +func (m *MockIMarket) GetPieceStorages(arg0 context.Context) market.PieceStorageInfos { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPieceStorages", arg0) - ret0, _ := ret[0].(market.PieceStorageList) + ret0, _ := ret[0].(market.PieceStorageInfos) return ret0 } diff --git a/venus-shared/api/market/proxy_gen.go b/venus-shared/api/market/proxy_gen.go index bf53789639..8afd0bb349 100644 --- a/venus-shared/api/market/proxy_gen.go +++ b/venus-shared/api/market/proxy_gen.go @@ -49,7 +49,7 @@ type IMarketStruct struct { DealsSetConsiderVerifiedStorageDeals func(context.Context, bool) error `perm:"admin"` DealsSetPieceCidBlocklist func(context.Context, []cid.Cid) error `perm:"admin"` GetDeals func(ctx context.Context, miner address.Address, pageIndex, pageSize int) ([]*market.DealInfo, error) `perm:"read"` - GetPieceStorages func(ctx context.Context) market.PieceStorageList `perm:"read"` + GetPieceStorages func(ctx context.Context) market.PieceStorageInfos `perm:"read"` GetReadUrl func(context.Context, string) (string, error) `perm:"read"` GetUnPackedDeals func(ctx context.Context, miner address.Address, spec *market.GetDealSpec) ([]*market.DealInfoIncludePath, error) `perm:"read"` GetWriteUrl func(ctx context.Context, resource string) (string, error) `perm:"read"` @@ -180,7 +180,7 @@ func (s *IMarketStruct) DealsSetPieceCidBlocklist(p0 context.Context, p1 []cid.C func (s *IMarketStruct) GetDeals(p0 context.Context, p1 address.Address, p2, p3 int) ([]*market.DealInfo, error) { return s.Internal.GetDeals(p0, p1, p2, p3) } -func (s *IMarketStruct) GetPieceStorages(p0 context.Context) market.PieceStorageList { +func (s *IMarketStruct) GetPieceStorages(p0 context.Context) market.PieceStorageInfos { return s.Internal.GetPieceStorages(p0) } func (s *IMarketStruct) GetReadUrl(p0 context.Context, p1 string) (string, error) { diff --git a/venus-shared/types/market/piecestorage.go b/venus-shared/types/market/piecestorage.go index 830bb85d6a..d866c5e95c 100644 --- a/venus-shared/types/market/piecestorage.go +++ b/venus-shared/types/market/piecestorage.go @@ -1,6 +1,6 @@ package market -type PieceStorageList struct { +type PieceStorageInfos struct { FsStorage []FsStorage S3Storage []S3Storage }