From a43175e2eacb409bfcd4adc482b1807268a58211 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 17 Mar 2021 13:59:45 +0300 Subject: [PATCH] [#263] pkg/client: Split interface method's declarations with linebreaks Signed-off-by: Leonard Lyubich --- pkg/client/container.go | 6 ++++++ pkg/client/netmap.go | 1 + pkg/client/object.go | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/pkg/client/container.go b/pkg/client/container.go index 757fb46..3430003 100644 --- a/pkg/client/container.go +++ b/pkg/client/container.go @@ -20,16 +20,22 @@ import ( type Container interface { // PutContainer creates new container in the NeoFS network. PutContainer(context.Context, *container.Container, ...CallOption) (*container.ID, error) + // GetContainer returns container by ID. GetContainer(context.Context, *container.ID, ...CallOption) (*container.Container, error) + // ListContainers return container list with the provided owner. ListContainers(context.Context, *owner.ID, ...CallOption) ([]*container.ID, error) + // DeleteContainer removes container from NeoFS network. DeleteContainer(context.Context, *container.ID, ...CallOption) error + // GetEACL returns extended ACL for a given container. GetEACL(context.Context, *container.ID, ...CallOption) (*EACLWithSignature, error) + // SetEACL sets extended ACL. SetEACL(context.Context, *eacl.Table, ...CallOption) error + // AnnounceContainerUsedSpace announces amount of space which is taken by stored objects. AnnounceContainerUsedSpace(context.Context, []container.UsedSpaceAnnouncement, ...CallOption) error } diff --git a/pkg/client/netmap.go b/pkg/client/netmap.go index 057b0c3..7ab3081 100644 --- a/pkg/client/netmap.go +++ b/pkg/client/netmap.go @@ -18,6 +18,7 @@ type Netmap interface { // in client constructor via address or open connection. This can be used as a // health check to see if node is alive and responses to requests. EndpointInfo(context.Context, ...CallOption) (*EndpointInfo, error) + // NetworkInfo returns information about the NeoFS network of which the remote server is a part. NetworkInfo(context.Context, ...CallOption) (*netmap.NetworkInfo, error) } diff --git a/pkg/client/object.go b/pkg/client/object.go index b242422..d970a20 100644 --- a/pkg/client/object.go +++ b/pkg/client/object.go @@ -24,18 +24,25 @@ import ( type Object interface { // PutObject puts new object to NeoFS. PutObject(context.Context, *PutObjectParams, ...CallOption) (*object.ID, error) + // DeleteObject deletes object to NeoFS. DeleteObject(context.Context, *DeleteObjectParams, ...CallOption) error + // GetObject returns object stored in NeoFS. GetObject(context.Context, *GetObjectParams, ...CallOption) (*object.Object, error) + // GetObjectHeader returns object header. GetObjectHeader(context.Context, *ObjectHeaderParams, ...CallOption) (*object.Object, error) + // ObjectPayloadRangeData returns range of object payload. ObjectPayloadRangeData(context.Context, *RangeDataParams, ...CallOption) ([]byte, error) + // ObjectPayloadRangeSHA256 returns sha-256 hashes of object sub-ranges from NeoFS. ObjectPayloadRangeSHA256(context.Context, *RangeChecksumParams, ...CallOption) ([][sha256.Size]byte, error) + // ObjectPayloadRangeTZ returns homomorphic hashes of object sub-ranges from NeoFS. ObjectPayloadRangeTZ(context.Context, *RangeChecksumParams, ...CallOption) ([][TZSize]byte, error) + // SearchObject searches for objects in NeoFS using provided parameters. SearchObject(context.Context, *SearchObjectParams, ...CallOption) ([]*object.ID, error) }