[#1101] *: Adopt interface changes of API client from SDK library

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-01-21 19:53:06 +03:00 committed by Alex Vanin
parent 674f520da7
commit 4f3323f084
14 changed files with 94 additions and 246 deletions

View file

@ -7,29 +7,12 @@ import (
rawclient "github.com/nspcc-dev/neofs-api-go/v2/rpc/client"
"github.com/nspcc-dev/neofs-node/pkg/network"
"github.com/nspcc-dev/neofs-sdk-go/client"
"github.com/nspcc-dev/neofs-sdk-go/container"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
"github.com/nspcc-dev/neofs-sdk-go/eacl"
"github.com/nspcc-dev/neofs-sdk-go/owner"
)
// Client is an interface of NeoFS storage
// node's client.
type Client interface {
GetBalance(context.Context, *owner.ID, ...client.CallOption) (*client.BalanceOfRes, error)
PutContainer(context.Context, *container.Container, ...client.CallOption) (*client.ContainerPutRes, error)
GetContainer(context.Context, *cid.ID, ...client.CallOption) (*client.ContainerGetRes, error)
ListContainers(context.Context, *owner.ID, ...client.CallOption) (*client.ContainerListRes, error)
DeleteContainer(context.Context, *cid.ID, ...client.CallOption) (*client.ContainerDeleteRes, error)
EACL(context.Context, *cid.ID, ...client.CallOption) (*client.EACLRes, error)
SetEACL(context.Context, *eacl.Table, ...client.CallOption) (*client.SetEACLRes, error)
AnnounceContainerUsedSpace(context.Context, []container.UsedSpaceAnnouncement, ...client.CallOption) (*client.AnnounceSpaceRes, error)
EndpointInfo(context.Context, ...client.CallOption) (*client.EndpointInfoRes, error)
NetworkInfo(context.Context, ...client.CallOption) (*client.NetworkInfoRes, error)
AnnounceContainerUsedSpace(context.Context, client.AnnounceSpacePrm) (*client.AnnounceSpaceRes, error)
PutObject(context.Context, *client.PutObjectParams, ...client.CallOption) (*client.ObjectPutRes, error)
DeleteObject(context.Context, *client.DeleteObjectParams, ...client.CallOption) (*client.ObjectDeleteRes, error)
@ -39,10 +22,8 @@ type Client interface {
ObjectPayloadRangeData(context.Context, *client.RangeDataParams, ...client.CallOption) (*client.ObjectRangeRes, error)
HashObjectPayloadRanges(context.Context, *client.RangeChecksumParams, ...client.CallOption) (*client.ObjectRangeHashRes, error)
AnnounceLocalTrust(context.Context, client.AnnounceLocalTrustPrm, ...client.CallOption) (*client.AnnounceLocalTrustRes, error)
AnnounceIntermediateTrust(context.Context, client.AnnounceIntermediateTrustPrm, ...client.CallOption) (*client.AnnounceIntermediateTrustRes, error)
CreateSession(context.Context, uint64, ...client.CallOption) (*client.CreateSessionRes, error)
AnnounceLocalTrust(context.Context, client.AnnounceLocalTrustPrm) (*client.AnnounceLocalTrustRes, error)
AnnounceIntermediateTrust(context.Context, client.AnnounceIntermediateTrustPrm) (*client.AnnounceIntermediateTrustRes, error)
Raw() *rawclient.Client