diff --git a/.github/workflows/buf.yml b/.github/workflows/buf.yml
index 5d9d740..71e2ad3 100644
--- a/.github/workflows/buf.yml
+++ b/.github/workflows/buf.yml
@@ -7,30 +7,39 @@ on:
jobs:
lint:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - uses: wizhi/setup-buf@v1
+ - uses: actions/checkout@v4
+ - name: Download buf
+ uses: dsaltares/fetch-gh-release-asset@1.1.2
with:
- version: 0.20.5
- - run: buf check lint
+ repo: 'bufbuild/buf'
+ version: 'tags/v1.48.0'
+ file: 'buf-Linux-x86_64'
+ target: 'buf-Linux-x86_64'
+ - run: chmod 755 ./buf-Linux-x86_64
+ - run: ./buf-Linux-x86_64 lint
breaking:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
steps:
- - name: Setup buf
- uses: wizhi/setup-buf@v1
+ - name: Download buf
+ uses: dsaltares/fetch-gh-release-asset@1.1.2
with:
- version: 0.20.5
+ repo: 'bufbuild/buf'
+ version: 'tags/v1.48.0'
+ file: 'buf-Linux-x86_64'
+ target: 'buf-Linux-x86_64'
+ - run: chmod 755 ./buf-Linux-x86_64
- name: Check out ref code
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: baseref
- - run: cd baseref && buf image build -o image.bin
+ - run: cd baseref && ../buf-Linux-x86_64 build -o image.bin
- name: Check out code
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
path: prclone
- - run: cd prclone && buf check breaking --against-input ../baseref/image.bin
+ - run: cd prclone && ../buf-Linux-x86_64 breaking --against ../baseref/image.bin
diff --git a/Makefile b/Makefile
index d66c98a..ce789e4 100644
--- a/Makefile
+++ b/Makefile
@@ -6,8 +6,8 @@ BRBR?=master
.PHONY: lint
lint:
- buf check lint
- buf check breaking --against-input '.git#branch=$(BRBR)'
+ buf lint
+ buf breaking --against '.git#branch=$(BRBR)'
.PHONY: doc
# Regenerate documentation for proto files:
@@ -19,3 +19,7 @@ doc:
--proto_path=.:/usr/local/include \
--doc_out=proto-docs/ $${f}/*.proto; \
done
+
+.PHONY: format
+format:
+ buf format -w
diff --git a/README.md b/README.md
index ce5ad24..95b3485 100644
--- a/README.md
+++ b/README.md
@@ -24,6 +24,8 @@ This repository contains:
- protocol buffers packages
- [auto-generated docs](proto-docs) for protocol buffers
+To perform linting and formatting buf is required, see https://buf.build/.
+
## Contributing
Feel free to contribute to this project after reading the [contributing
diff --git a/accounting/service.proto b/accounting/service.proto
index 50bcc57..3b94884 100644
--- a/accounting/service.proto
+++ b/accounting/service.proto
@@ -2,13 +2,13 @@ syntax = "proto3";
package neo.fs.v2.accounting;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc;accounting";
-option csharp_namespace = "Neo.FileStorage.API.Accounting";
-
import "accounting/types.proto";
import "refs/types.proto";
import "session/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Accounting";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc;accounting";
+
// Accounting service provides methods for interaction with FS chain via
// other NeoFS nodes to get information about the account balance. Deposit and
// Withdraw operations can't be implemented here, as they require Mainnet NeoFS
@@ -21,7 +21,7 @@ service AccountingService {
// - **OK** (0, SECTION_SUCCESS):
// balance has been successfully read;
// - Common failures (SECTION_FAILURE_COMMON).
- rpc Balance (BalanceRequest) returns (BalanceResponse);
+ rpc Balance(BalanceRequest) returns (BalanceResponse);
}
// BalanceRequest message
diff --git a/accounting/types.proto b/accounting/types.proto
index f1facbf..0044e11 100644
--- a/accounting/types.proto
+++ b/accounting/types.proto
@@ -2,8 +2,8 @@ syntax = "proto3";
package neo.fs.v2.accounting;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc;accounting";
option csharp_namespace = "Neo.FileStorage.API.Accounting";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc;accounting";
// Standard floating point data type can't be used in NeoFS due to inexactness
// of the result when doing lots of small number operations. To solve the lost
diff --git a/acl/types.proto b/acl/types.proto
index fa55427..2503f48 100644
--- a/acl/types.proto
+++ b/acl/types.proto
@@ -2,11 +2,11 @@ syntax = "proto3";
package neo.fs.v2.acl;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/acl/grpc;acl";
-option csharp_namespace = "Neo.FileStorage.API.Acl";
-
import "refs/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Acl";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/acl/grpc;acl";
+
// Target role of the access control rule in access control list.
enum Role {
// Unspecified role, default value
@@ -161,27 +161,27 @@ message EACLRecord {
MatchType match_type = 2 [json_name = "matchType"];
// Name of the Header to use
- string key = 3 [json_name="key"];
+ string key = 3 [json_name = "key"];
// Expected Header Value or pattern to match
- string value = 4 [json_name="value"];
+ string value = 4 [json_name = "value"];
}
// List of filters to match and see if rule is applicable
- repeated Filter filters = 3 [json_name="filters"];
+ repeated Filter filters = 3 [json_name = "filters"];
// Target to apply ACL rule. Can be a subject's role class or a list of public
// keys to match.
message Target {
// Target subject's role class
- Role role = 1 [json_name="role"];
+ Role role = 1 [json_name = "role"];
// List of 25-byte accounts to identify target subjects.
// 33-byte public keys are also supported, however, they are deprecated and script hashes should be derived from them.
- repeated bytes keys = 2 [json_name="keys"];
+ repeated bytes keys = 2 [json_name = "keys"];
}
// List of target subjects to apply ACL rule to
- repeated Target targets = 4 [json_name="targets"];
+ repeated Target targets = 4 [json_name = "targets"];
}
// Extended ACL rules table. A list of ACL rules defined additionally to Basic
@@ -194,10 +194,10 @@ message EACLTable {
neo.fs.v2.refs.Version version = 1 [json_name = "version"];
// Identifier of the container that should use given access control rules
- neo.fs.v2.refs.ContainerID container_id = 2 [json_name="containerID"];
+ neo.fs.v2.refs.ContainerID container_id = 2 [json_name = "containerID"];
// List of Extended ACL rules
- repeated EACLRecord records = 3 [json_name="records"];
+ repeated EACLRecord records = 3 [json_name = "records"];
}
// BearerToken allows to attach signed Extended ACL rules to the request in
@@ -217,34 +217,34 @@ message BearerToken {
// container. If it contains `container_id` field, bearer token is only
// valid for this specific container. Otherwise, any container of the same owner
// is allowed.
- EACLTable eacl_table = 1 [json_name="eaclTable"];
+ EACLTable eacl_table = 1 [json_name = "eaclTable"];
// `OwnerID` defines to whom the token was issued. It must match the request
// originator's `OwnerID`. If empty, any token bearer will be accepted.
- neo.fs.v2.refs.OwnerID owner_id = 2 [json_name="ownerID"];
+ neo.fs.v2.refs.OwnerID owner_id = 2 [json_name = "ownerID"];
// Lifetime parameters of the token. Field names taken from
// [rfc7519](https://tools.ietf.org/html/rfc7519).
message TokenLifetime {
// Expiration Epoch
- uint64 exp = 1 [json_name="exp"];
+ uint64 exp = 1 [json_name = "exp"];
// Not valid before Epoch
- uint64 nbf = 2 [json_name="nbf"];
+ uint64 nbf = 2 [json_name = "nbf"];
// Issued at Epoch
- uint64 iat = 3 [json_name="iat"];
+ uint64 iat = 3 [json_name = "iat"];
}
// Token expiration and valid time period parameters
- TokenLifetime lifetime = 3 [json_name="lifetime"];
+ TokenLifetime lifetime = 3 [json_name = "lifetime"];
// Token issuer's user ID in NeoFS. It must equal to the related
// container's owner.
- neo.fs.v2.refs.OwnerID issuer = 4 [json_name="issuer"];
+ neo.fs.v2.refs.OwnerID issuer = 4 [json_name = "issuer"];
}
// Bearer Token body
- Body body = 1 [json_name="body"];
+ Body body = 1 [json_name = "body"];
// Signature of BearerToken body
- neo.fs.v2.refs.Signature signature = 2 [json_name="signature"];
+ neo.fs.v2.refs.Signature signature = 2 [json_name = "signature"];
}
diff --git a/audit/types.proto b/audit/types.proto
index 8a9bb72..356568d 100644
--- a/audit/types.proto
+++ b/audit/types.proto
@@ -2,11 +2,11 @@ syntax = "proto3";
package neo.fs.v2.audit;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/audit/grpc;audit";
-option csharp_namespace = "Neo.FileStorage.API.Audit";
-
import "refs/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Audit";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/audit/grpc;audit";
+
// DataAuditResult keeps record of conducted Data Audits. The detailed report is
// generated separately.
message DataAuditResult {
diff --git a/buf.yaml b/buf.yaml
index 2006bea..7e0e90e 100644
--- a/buf.yaml
+++ b/buf.yaml
@@ -1,6 +1,7 @@
+version: v2
lint:
use:
- - DEFAULT
+ - STANDARD
- COMMENTS
- ENUM_FIRST_VALUE_ZERO
except:
diff --git a/container/service.proto b/container/service.proto
index 25f6d5d..9063fa3 100644
--- a/container/service.proto
+++ b/container/service.proto
@@ -2,14 +2,14 @@ syntax = "proto3";
package neo.fs.v2.container;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/container/grpc;container";
-option csharp_namespace = "Neo.FileStorage.API.Container";
-
import "acl/types.proto";
import "container/types.proto";
import "refs/types.proto";
import "session/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Container";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/container/grpc;container";
+
// `ContainerService` provides API to interact with `Container` smart contract
// in FS chain via other NeoFS nodes. All of those actions can be done
// equivalently by directly issuing transactions and RPC calls to FS chain
@@ -301,7 +301,7 @@ message SetExtendedACLResponse {
// `SetExtendedACLResponse` has an empty body because the operation is
// asynchronous and the update should be reflected in `Container` smart contract's
// storage after next block is issued in FS chain.
- message Body { }
+ message Body {}
// Body of set extended acl response message.
Body body = 1;
@@ -404,7 +404,7 @@ message AnnounceUsedSpaceRequest {
message AnnounceUsedSpaceResponse {
// `AnnounceUsedSpaceResponse` has an empty body because announcements are
// one way communication.
- message Body { }
+ message Body {}
// Body of announce used space response message.
Body body = 1;
diff --git a/container/types.proto b/container/types.proto
index 6af7b31..9c32b59 100644
--- a/container/types.proto
+++ b/container/types.proto
@@ -2,12 +2,12 @@ syntax = "proto3";
package neo.fs.v2.container;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/container/grpc;container";
-option csharp_namespace = "Neo.FileStorage.API.Container";
-
import "netmap/types.proto";
import "refs/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Container";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/container/grpc;container";
+
// Container is a structure that defines object placement behaviour. Objects can
// be stored only within containers. They define placement rule, attributes and
// access control information. An ID of a container is a 32 byte long SHA256 hash
diff --git a/link/types.proto b/link/types.proto
index b7d78b5..62276c1 100644
--- a/link/types.proto
+++ b/link/types.proto
@@ -2,11 +2,11 @@ syntax = "proto3";
package neo.fs.v2.link;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/link/grpc;link";
-option csharp_namespace = "Neo.FileStorage.API.Link";
-
import "refs/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Link";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/link/grpc;link";
+
// Link is a payload of helper objects that contain the full list of the split
// chain objects' IDs. It is created only after the whole split chain is known
// and signed. This object is the only object that refers to every "child object"
diff --git a/lock/types.proto b/lock/types.proto
index ae0cdc1..3e1e917 100644
--- a/lock/types.proto
+++ b/lock/types.proto
@@ -2,11 +2,11 @@ syntax = "proto3";
package neo.fs.v2.lock;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/lock/grpc;lock";
-option csharp_namespace = "Neo.FileStorage.API.Lock";
-
import "refs/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Lock";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/lock/grpc;lock";
+
// Lock objects protects a list of objects from being deleted. The lifetime of a
// lock object is limited similar to regular objects in
// `__NEOFS__EXPIRATION_EPOCH` attribute. Lock object MUST have expiration epoch.
diff --git a/netmap/service.proto b/netmap/service.proto
index 09e8751..184179f 100644
--- a/netmap/service.proto
+++ b/netmap/service.proto
@@ -2,19 +2,19 @@ syntax = "proto3";
package neo.fs.v2.netmap;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc;netmap";
-option csharp_namespace = "Neo.FileStorage.API.Netmap";
-
import "netmap/types.proto";
import "refs/types.proto";
import "session/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Netmap";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc;netmap";
+
// `NetmapService` provides methods to work with `Network Map` and the information
// required to build it. The resulting `Network Map` is stored in FS chain
// `Netmap` smart contract, while related information can be obtained from other
// NeoFS nodes.
service NetmapService {
- // Get NodeInfo structure from the particular node directly.
+ // Get NodeInfo structure from the particular node directly.
// Node information can be taken from `Netmap` smart contract. In some cases, though,
// one may want to get recent information directly or to talk to the node not yet
// present in the `Network Map` to find out what API version can be used for
@@ -24,7 +24,7 @@ service NetmapService {
// - **OK** (0, SECTION_SUCCESS):
// information about the server has been successfully read;
// - Common failures (SECTION_FAILURE_COMMON).
- rpc LocalNodeInfo (LocalNodeInfoRequest) returns (LocalNodeInfoResponse);
+ rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse);
// Read recent information about the NeoFS network.
//
@@ -32,7 +32,7 @@ service NetmapService {
// - **OK** (0, SECTION_SUCCESS):
// information about the current network state has been successfully read;
// - Common failures (SECTION_FAILURE_COMMON).
- rpc NetworkInfo (NetworkInfoRequest) returns (NetworkInfoResponse);
+ rpc NetworkInfo(NetworkInfoRequest) returns (NetworkInfoResponse);
// Returns network map snapshot of the current NeoFS epoch.
//
@@ -40,14 +40,13 @@ service NetmapService {
// - **OK** (0, SECTION_SUCCESS):
// information about the current network map has been successfully read;
// - Common failures (SECTION_FAILURE_COMMON).
- rpc NetmapSnapshot (NetmapSnapshotRequest) returns (NetmapSnapshotResponse);
+ rpc NetmapSnapshot(NetmapSnapshotRequest) returns (NetmapSnapshotResponse);
}
// Get NodeInfo structure directly from a particular node
message LocalNodeInfoRequest {
// LocalNodeInfo request body is empty.
- message Body {
- }
+ message Body {}
// Body of the LocalNodeInfo request message
Body body = 1;
@@ -86,81 +85,77 @@ message LocalNodeInfoResponse {
// Get NetworkInfo structure with the network view from a particular node.
message NetworkInfoRequest {
- // NetworkInfo request body is empty.
- message Body {
- }
- // Body of the NetworkInfo request message
- Body body = 1;
-
- // Carries request meta information. Header data is used only to regulate
- // message transport and does not affect request execution.
- neo.fs.v2.session.RequestMetaHeader meta_header = 2;
-
- // Carries request verification information. This header is used to
- // authenticate the nodes of the message route and check the correctness of
- // transmission.
- neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
+ // NetworkInfo request body is empty.
+ message Body {}
+ // Body of the NetworkInfo request message
+ Body body = 1;
+
+ // Carries request meta information. Header data is used only to regulate
+ // message transport and does not affect request execution.
+ neo.fs.v2.session.RequestMetaHeader meta_header = 2;
+
+ // Carries request verification information. This header is used to
+ // authenticate the nodes of the message route and check the correctness of
+ // transmission.
+ neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
// Response with NetworkInfo structure including current epoch and
// FS chain magic number.
message NetworkInfoResponse {
- // Information about the network.
- message Body {
- // NetworkInfo structure with recent information.
- NetworkInfo network_info = 1;
- }
- // Body of the NetworkInfo response message.
- Body body = 1;
-
- // Carries response meta information. Header data is used only to regulate
- // message transport and does not affect response execution.
- neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
-
- // Carries response verification information. This header is used to
- // authenticate the nodes of the message route and check the correctness of
- // transmission.
- neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
+ // Information about the network.
+ message Body {
+ // NetworkInfo structure with recent information.
+ NetworkInfo network_info = 1;
+ }
+ // Body of the NetworkInfo response message.
+ Body body = 1;
+
+ // Carries response meta information. Header data is used only to regulate
+ // message transport and does not affect response execution.
+ neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
+
+ // Carries response verification information. This header is used to
+ // authenticate the nodes of the message route and check the correctness of
+ // transmission.
+ neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}
// Get netmap snapshot request
message NetmapSnapshotRequest {
- // Get netmap snapshot request body.
- message Body {
- }
-
- // Body of get netmap snapshot request message.
- Body body = 1;
+ // Get netmap snapshot request body.
+ message Body {}
- // Carries request meta information. Header data is used only to regulate
- // message transport and does not affect request execution.
- neo.fs.v2.session.RequestMetaHeader meta_header = 2;
+ // Body of get netmap snapshot request message.
+ Body body = 1;
- // Carries request verification information. This header is used to
- // authenticate the nodes of the message route and check the correctness of
- // transmission.
- neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
+ // Carries request meta information. Header data is used only to regulate
+ // message transport and does not affect request execution.
+ neo.fs.v2.session.RequestMetaHeader meta_header = 2;
+ // Carries request verification information. This header is used to
+ // authenticate the nodes of the message route and check the correctness of
+ // transmission.
+ neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
// Response with current netmap snapshot
message NetmapSnapshotResponse {
- // Get netmap snapshot response body
- message Body {
- // Structure of the requested network map.
- Netmap netmap = 1 [json_name = "netmap"];
- }
-
- // Body of get netmap snapshot response message.
- Body body = 1;
+ // Get netmap snapshot response body
+ message Body {
+ // Structure of the requested network map.
+ Netmap netmap = 1 [json_name = "netmap"];
+ }
- // Carries response meta information. Header data is used only to regulate
- // message transport and does not affect response execution.
- neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
+ // Body of get netmap snapshot response message.
+ Body body = 1;
- // Carries response verification information. This header is used to
- // authenticate the nodes of the message route and check the correctness of
- // transmission.
- neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
+ // Carries response meta information. Header data is used only to regulate
+ // message transport and does not affect response execution.
+ neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
+ // Carries response verification information. This header is used to
+ // authenticate the nodes of the message route and check the correctness of
+ // transmission.
+ neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}
diff --git a/netmap/types.proto b/netmap/types.proto
index a581099..bad932d 100644
--- a/netmap/types.proto
+++ b/netmap/types.proto
@@ -2,11 +2,11 @@ syntax = "proto3";
package neo.fs.v2.netmap;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc;netmap";
-option csharp_namespace = "Neo.FileStorage.API.Netmap";
-
import "refs/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Netmap";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc;netmap";
+
// Operations on filters
enum Operation {
// No Operation defined
@@ -124,7 +124,10 @@ message PlacementPolicy {
// DEPRECATED. Was used for subnetwork ID to select nodes from, currently
// ignored.
- refs.SubnetID subnet_id = 5 [json_name = "subnetId", deprecated = true];
+ refs.SubnetID subnet_id = 5 [
+ json_name = "subnetId",
+ deprecated = true
+ ];
}
// NeoFS node description
@@ -257,11 +260,11 @@ message NodeInfo {
// Network map structure
message Netmap {
- // Network map revision number.
- uint64 epoch = 1 [json_name = "epoch"];
+ // Network map revision number.
+ uint64 epoch = 1 [json_name = "epoch"];
- // Nodes presented in network.
- repeated NodeInfo nodes = 2 [json_name = "nodes"];
+ // Nodes presented in network.
+ repeated NodeInfo nodes = 2 [json_name = "nodes"];
}
// NeoFS network configuration
@@ -320,15 +323,15 @@ message NetworkConfig {
// Information about NeoFS network
message NetworkInfo {
- // Number of the current epoch in the NeoFS network
- uint64 current_epoch = 1 [json_name = "currentEpoch"];
+ // Number of the current epoch in the NeoFS network
+ uint64 current_epoch = 1 [json_name = "currentEpoch"];
- // Magic number of FS chain of the NeoFS network
- uint64 magic_number = 2 [json_name = "magicNumber"];
+ // Magic number of FS chain of the NeoFS network
+ uint64 magic_number = 2 [json_name = "magicNumber"];
- // MillisecondsPerBlock network parameter of FS chain of the NeoFS network
- int64 ms_per_block = 3 [json_name = "msPerBlock"];
+ // MillisecondsPerBlock network parameter of FS chain of the NeoFS network
+ int64 ms_per_block = 3 [json_name = "msPerBlock"];
- // NeoFS network configuration
- NetworkConfig network_config = 4 [json_name = "networkConfig"];
+ // NeoFS network configuration
+ NetworkConfig network_config = 4 [json_name = "networkConfig"];
}
diff --git a/object/service.proto b/object/service.proto
index 094c288..762d12f 100644
--- a/object/service.proto
+++ b/object/service.proto
@@ -2,14 +2,14 @@ syntax = "proto3";
package neo.fs.v2.object;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/object/grpc;object";
-option csharp_namespace = "Neo.FileStorage.API.Object";
-
import "object/types.proto";
import "refs/types.proto";
import "session/types.proto";
import "status/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Object";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/object/grpc;object";
+
// `ObjectService` provides API for manipulating objects. Object operations do
// not affect FS chain and are only served by nodes in P2P style.
service ObjectService {
@@ -137,6 +137,8 @@ service ObjectService {
// Header's filed values. Please see the corresponding NeoFS Technical
// Specification section for more details.
//
+ // DEPRECATED: please use SearchV2.
+ //
// Extended headers can change `Search` behaviour:
// * __NEOFS__NETMAP_EPOCH \
// Will use the requsted version of Network Map for object placement
@@ -156,6 +158,15 @@ service ObjectService {
// provided session token has expired.
rpc Search(SearchRequest) returns (stream SearchResponse);
+ // Search for objects in a container. Similar to Search, but:
+ // * sorted
+ // * limited in amount of returned data
+ // * single message
+ // * allows for additional header fields to be returned
+ //
+ // Result is ordered by requested attributes and object ID.
+ rpc SearchV2(SearchV2Request) returns (SearchV2Response);
+
// Get byte range of data payload. Range is set as an (offset, length) tuple.
// Like in `Get` method, the response uses gRPC stream. Requested range can be
// restored by concatenation of all received payload chunks keeping the receiving
@@ -373,7 +384,7 @@ message DeleteRequest {
message Body {
// Address of the object to be deleted
neo.fs.v2.refs.Address address = 1;
- }
+ }
// Body of delete object request message.
Body body = 1;
@@ -457,7 +468,7 @@ message HeadResponse {
message Body {
// Requested object header, it's part or meta information about split
// object.
- oneof head{
+ oneof head {
// Full object's `Header` with `ObjectID` signature
HeaderWithSignature header = 1;
@@ -490,77 +501,9 @@ message SearchRequest {
// Version of the Query Language used
uint32 version = 2;
- // Filter structure checks if the object header field or the attribute content
- // matches a value.
- //
- // If no filters are set, search request will return all objects of the
- // container, including Regular object, Tombstones and Storage Group
- // objects. Most human users expect to get only object they can directly
- // work with. In that case, `$Object:ROOT` filter should be used.
- //
- // If `match_type` field is numerical, both `value` field and object
- // attribute MUST be base-10 integers.
- //
- // By default `key` field refers to the corresponding object's `Attribute`.
- // Some Object's header fields can also be accessed by adding `$Object:`
- // prefix to the name. Here is the list of fields available via this prefix:
- //
- // * $Object:version \
- // version
- // * $Object:objectID \
- // object_id
- // * $Object:containerID \
- // container_id
- // * $Object:ownerID \
- // owner_id
- // * $Object:creationEpoch \
- // creation_epoch
- // * $Object:payloadLength \
- // payload_length
- // * $Object:payloadHash \
- // payload_hash
- // * $Object:objectType \
- // object_type
- // * $Object:homomorphicHash \
- // homomorphic_hash
- // * $Object:split.parent \
- // object_id of parent
- // * $Object:split.splitID \
- // 16 byte UUIDv4 used to identify the split object hierarchy parts
- // * $Object:split.first \
- // object_id of the first part in split chain; non-acceptable for deprecated V1 split scheme
- //
- // There are some well-known filter aliases to match objects by certain
- // properties:
- //
- // * $Object:ROOT \
- // Returns only `REGULAR` type objects that are not split or that are the top
- // level root objects in a split hierarchy. This includes objects not
- // present physically, like large objects split into smaller objects
- // without a separate top-level root object. Objects of other types like
- // StorageGroups and Tombstones will not be shown. This filter may be
- // useful for listing objects like `ls` command of some virtual file
- // system. This filter is activated if the `key` exists, disregarding the
- // value and matcher type.
- // * $Object:PHY \
- // Returns only objects physically stored in the system. This filter is
- // activated if the `key` exists, disregarding the value and matcher type.
- //
- // Note: using filters with a key with prefix `$Object:` and match type
- // `NOT_PRESENT `is not recommended since this is not a cross-version approach.
- // Behavior when processing this kind of filters is undefined.
- message Filter {
- // Match type to use
- MatchType match_type = 1 [json_name = "matchType"];
-
- // Attribute or Header fields to match
- string key = 2 [json_name = "key"];
-
- // Value to match
- string value = 3 [json_name = "value"];
- }
+
// List of search expressions
- repeated Filter filters = 3;
+ repeated SearchFilter filters = 3;
}
// Body of search object request message.
Body body = 1;
@@ -595,6 +538,83 @@ message SearchResponse {
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}
+// Object SearchV2 request
+message SearchV2Request {
+ // Object Search request body
+ message Body {
+ // Container where the search is being performed.
+ neo.fs.v2.refs.ContainerID container_id = 1;
+
+ // Version of the Query Language used.
+ uint32 version = 2;
+
+ // List of search expressions. Limited to 8. If additional attributes are
+ // requested (see attributes below) then the search expression MUST use
+ // the first requested attribute.
+ repeated SearchFilter filters = 3;
+
+ // Cursor to continue search. Can be omitted or empty for the new search.
+ string cursor = 4;
+
+ // Limits the number of responses to the specified number. Can't be more
+ // than 1000.
+ uint32 count = 5;
+
+ // List of attribute names (including special ones as defined by
+ // SearchFilter key) to include into the reply. Limited to 4, these
+ // attributes also affect result ordering (result is ordered by attributes
+ // and then by OID).
+ repeated string attributes = 6;
+ }
+ // Body of search object request message.
+ Body body = 1;
+
+ // Carries request meta information. Header data is used only to regulate
+ // message transport and does not affect request execution.
+ neo.fs.v2.session.RequestMetaHeader meta_header = 2;
+
+ // Carries request verification information. This header is used to
+ // authenticate the nodes of the message route and check the correctness of
+ // transmission.
+ neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
+}
+
+// SearchV2 response
+message SearchV2Response {
+ // OID with additional requested metadata.
+ message OIDWithMeta {
+ // Object ID that matches search criteria.
+ neo.fs.v2.refs.ObjectID id = 1;
+ // List of attribute data from the respective object, fields
+ // strictly follow requested ones.
+ repeated string attributes = 2;
+ }
+
+ // Main result structure.
+ message Body {
+ // List of object IDs with additional requested attributes.
+ repeated OIDWithMeta result = 1;
+
+ // Cursor that can be used for subsequent requests. For users it's an
+ // opaque string that is omitted or empty when there are no more results
+ // to list. For nodes to interoperate this is defined as the latest OID
+ // for queries without filters and primary (first) attribute value plus
+ // OID. Values are encoded in base64.
+ string cursor = 2;
+ }
+ // Body of search object response message.
+ Body body = 1;
+
+ // Carries response meta information. Header data is used only to regulate
+ // message transport and does not affect request execution.
+ neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
+
+ // Carries response verification information. This header is used to
+ // authenticate the nodes of the message route and check the correctness of
+ // transmission.
+ neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
+}
+
// Object payload range. Ranges of zero length SHOULD be considered as invalid.
message Range {
// Offset of the range from the object payload start
@@ -640,7 +660,7 @@ message GetRangeResponse {
// chunks.
message Body {
// Requested object range or meta information about split object.
- oneof range_part{
+ oneof range_part {
// Chunked object payload's range.
bytes chunk = 1;
diff --git a/object/types.proto b/object/types.proto
index 0cb556c..1a4371c 100644
--- a/object/types.proto
+++ b/object/types.proto
@@ -2,12 +2,12 @@ syntax = "proto3";
package neo.fs.v2.object;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/object/grpc;object";
-option csharp_namespace = "Neo.FileStorage.API.Object";
-
import "refs/types.proto";
import "session/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Object";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/object/grpc;object";
+
// Type of the object payload content. Only `REGULAR` type objects can be split,
// hence `TOMBSTONE`, `STORAGE_GROUP` and `LOCK` payload is limited by the maximum
// object size.
@@ -65,6 +65,76 @@ enum MatchType {
NUM_LE = 8;
}
+// Filter structure checks if the object header field or the attribute content
+// matches a value.
+//
+// If no filters are set, search request will return all objects of the
+// container, including Regular object, Tombstones and Storage Group
+// objects. Most human users expect to get only object they can directly
+// work with. In that case, `$Object:ROOT` filter should be used.
+//
+// If `match_type` field is numerical, both `value` field and object
+// attribute MUST be base-10 integers.
+//
+// By default `key` field refers to the corresponding object's `Attribute`.
+// Some Object's header fields can also be accessed by adding `$Object:`
+// prefix to the name. Here is the list of fields available via this prefix:
+//
+// * $Object:version \
+// version
+// * $Object:objectID \
+// object_id
+// * $Object:containerID \
+// container_id
+// * $Object:ownerID \
+// owner_id
+// * $Object:creationEpoch \
+// creation_epoch
+// * $Object:payloadLength \
+// payload_length
+// * $Object:payloadHash \
+// payload_hash
+// * $Object:objectType \
+// object_type
+// * $Object:homomorphicHash \
+// homomorphic_hash
+// * $Object:split.parent \
+// object_id of parent
+// * $Object:split.splitID \
+// 16 byte UUIDv4 used to identify the split object hierarchy parts
+// * $Object:split.first \
+// object_id of the first part in split chain; non-acceptable for deprecated V1 split scheme
+//
+// There are some well-known filter aliases to match objects by certain
+// properties:
+//
+// * $Object:ROOT \
+// Returns only `REGULAR` type objects that are not split or that are the top
+// level root objects in a split hierarchy. This includes objects not
+// present physically, like large objects split into smaller objects
+// without a separate top-level root object. Objects of other types like
+// StorageGroups and Tombstones will not be shown. This filter may be
+// useful for listing objects like `ls` command of some virtual file
+// system. This filter is activated if the `key` exists, disregarding the
+// value and matcher type.
+// * $Object:PHY \
+// Returns only objects physically stored in the system. This filter is
+// activated if the `key` exists, disregarding the value and matcher type.
+//
+// Note: using filters with a key with prefix `$Object:` and match type
+// `NOT_PRESENT `is not recommended since this is not a cross-version approach.
+// Behavior when processing this kind of filters is undefined.
+message SearchFilter {
+ // Match type to use
+ MatchType match_type = 1 [json_name = "matchType"];
+
+ // Attribute or Header fields to match
+ string key = 2 [json_name = "key"];
+
+ // Value to match
+ string value = 3 [json_name = "value"];
+}
+
// Short header fields
message ShortHeader {
// Object format version. Effectively, the version of API library used to
diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md
index b23d244..f2d9683 100644
--- a/proto-docs/netmap.md
+++ b/proto-docs/netmap.md
@@ -66,7 +66,7 @@ rpc NetmapSnapshot(NetmapSnapshotRequest) returns (NetmapSnapshotResponse);
#### Method LocalNodeInfo
-Get NodeInfo structure from the particular node directly.
+Get NodeInfo structure from the particular node directly.
Node information can be taken from `Netmap` smart contract. In some cases, though,
one may want to get recent information directly or to talk to the node not yet
present in the `Network Map` to find out what API version can be used for
diff --git a/proto-docs/object.md b/proto-docs/object.md
index 97d9931..948e923 100644
--- a/proto-docs/object.md
+++ b/proto-docs/object.md
@@ -40,9 +40,13 @@
- [ReplicateResponse](#neo.fs.v2.object.ReplicateResponse)
- [SearchRequest](#neo.fs.v2.object.SearchRequest)
- [SearchRequest.Body](#neo.fs.v2.object.SearchRequest.Body)
- - [SearchRequest.Body.Filter](#neo.fs.v2.object.SearchRequest.Body.Filter)
- [SearchResponse](#neo.fs.v2.object.SearchResponse)
- [SearchResponse.Body](#neo.fs.v2.object.SearchResponse.Body)
+ - [SearchV2Request](#neo.fs.v2.object.SearchV2Request)
+ - [SearchV2Request.Body](#neo.fs.v2.object.SearchV2Request.Body)
+ - [SearchV2Response](#neo.fs.v2.object.SearchV2Response)
+ - [SearchV2Response.Body](#neo.fs.v2.object.SearchV2Response.Body)
+ - [SearchV2Response.OIDWithMeta](#neo.fs.v2.object.SearchV2Response.OIDWithMeta)
- [object/types.proto](#object/types.proto)
@@ -52,6 +56,7 @@
- [Header.Attribute](#neo.fs.v2.object.Header.Attribute)
- [Header.Split](#neo.fs.v2.object.Header.Split)
- [Object](#neo.fs.v2.object.Object)
+ - [SearchFilter](#neo.fs.v2.object.SearchFilter)
- [ShortHeader](#neo.fs.v2.object.ShortHeader)
- [SplitInfo](#neo.fs.v2.object.SplitInfo)
@@ -80,6 +85,7 @@ rpc Put(stream PutRequest) returns (PutResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc Head(HeadRequest) returns (HeadResponse);
rpc Search(SearchRequest) returns (stream SearchResponse);
+rpc SearchV2(SearchV2Request) returns (SearchV2Response);
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
rpc Replicate(ReplicateRequest) returns (ReplicateResponse);
@@ -228,6 +234,8 @@ Search objects in container. Search query allows to match by Object
Header's filed values. Please see the corresponding NeoFS Technical
Specification section for more details.
+DEPRECATED: please use SearchV2.
+
Extended headers can change `Search` behaviour:
* __NEOFS__NETMAP_EPOCH \
Will use the requsted version of Network Map for object placement
@@ -249,6 +257,19 @@ Statuses:
| Name | Input | Output |
| ---- | ----- | ------ |
| Search | [SearchRequest](#neo.fs.v2.object.SearchRequest) | [SearchResponse](#neo.fs.v2.object.SearchResponse) |
+#### Method SearchV2
+
+Search for objects in a container. Similar to Search, but:
+* sorted
+* limited in amount of returned data
+* single message
+* allows for additional header fields to be returned
+
+Result is ordered by requested attributes and object ID.
+
+| Name | Input | Output |
+| ---- | ----- | ------ |
+| SearchV2 | [SearchV2Request](#neo.fs.v2.object.SearchV2Request) | [SearchV2Response](#neo.fs.v2.object.SearchV2Response) |
#### Method GetRange
Get byte range of data payload. Range is set as an (offset, length) tuple.
@@ -759,102 +780,97 @@ Object Search request body
| ----- | ---- | ----- | ----------- |
| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Container identifier were to search |
| version | [uint32](#uint32) | | Version of the Query Language used |
-| filters | [SearchRequest.Body.Filter](#neo.fs.v2.object.SearchRequest.Body.Filter) | repeated | List of search expressions |
+| filters | [SearchFilter](#neo.fs.v2.object.SearchFilter) | repeated | List of search expressions |
-
+
-### Message SearchRequest.Body.Filter
-Filter structure checks if the object header field or the attribute content
-matches a value.
+### Message SearchResponse
+Search response
-If no filters are set, search request will return all objects of the
-container, including Regular object, Tombstones and Storage Group
-objects. Most human users expect to get only object they can directly
-work with. In that case, `$Object:ROOT` filter should be used.
-If `match_type` field is numerical, both `value` field and object
-attribute MUST be base-10 integers.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| body | [SearchResponse.Body](#neo.fs.v2.object.SearchResponse.Body) | | Body of search object response message. |
+| meta_header | [neo.fs.v2.session.ResponseMetaHeader](#neo.fs.v2.session.ResponseMetaHeader) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. |
+| verify_header | [neo.fs.v2.session.ResponseVerificationHeader](#neo.fs.v2.session.ResponseVerificationHeader) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
-By default `key` field refers to the corresponding object's `Attribute`.
-Some Object's header fields can also be accessed by adding `$Object:`
-prefix to the name. Here is the list of fields available via this prefix:
-* $Object:version \
- version
-* $Object:objectID \
- object_id
-* $Object:containerID \
- container_id
-* $Object:ownerID \
- owner_id
-* $Object:creationEpoch \
- creation_epoch
-* $Object:payloadLength \
- payload_length
-* $Object:payloadHash \
- payload_hash
-* $Object:objectType \
- object_type
-* $Object:homomorphicHash \
- homomorphic_hash
-* $Object:split.parent \
- object_id of parent
-* $Object:split.splitID \
- 16 byte UUIDv4 used to identify the split object hierarchy parts
-* $Object:split.first \
- object_id of the first part in split chain; non-acceptable for deprecated V1 split scheme
+
-There are some well-known filter aliases to match objects by certain
-properties:
+### Message SearchResponse.Body
+Object Search response body
-* $Object:ROOT \
- Returns only `REGULAR` type objects that are not split or that are the top
- level root objects in a split hierarchy. This includes objects not
- present physically, like large objects split into smaller objects
- without a separate top-level root object. Objects of other types like
- StorageGroups and Tombstones will not be shown. This filter may be
- useful for listing objects like `ls` command of some virtual file
- system. This filter is activated if the `key` exists, disregarding the
- value and matcher type.
-* $Object:PHY \
- Returns only objects physically stored in the system. This filter is
- activated if the `key` exists, disregarding the value and matcher type.
-Note: using filters with a key with prefix `$Object:` and match type
-`NOT_PRESENT `is not recommended since this is not a cross-version approach.
-Behavior when processing this kind of filters is undefined.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id_list | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | List of `ObjectID`s that match the search query |
+
+
+
+
+### Message SearchV2Request
+Object SearchV2 request
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| match_type | [MatchType](#neo.fs.v2.object.MatchType) | | Match type to use |
-| key | [string](#string) | | Attribute or Header fields to match |
-| value | [string](#string) | | Value to match |
+| body | [SearchV2Request.Body](#neo.fs.v2.object.SearchV2Request.Body) | | Body of search object request message. |
+| meta_header | [neo.fs.v2.session.RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
+| verify_header | [neo.fs.v2.session.RequestVerificationHeader](#neo.fs.v2.session.RequestVerificationHeader) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
-
+
-### Message SearchResponse
-Search response
+### Message SearchV2Request.Body
+Object Search request body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| body | [SearchResponse.Body](#neo.fs.v2.object.SearchResponse.Body) | | Body of search object response message. |
+| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Container where the search is being performed. |
+| version | [uint32](#uint32) | | Version of the Query Language used. |
+| filters | [SearchFilter](#neo.fs.v2.object.SearchFilter) | repeated | List of search expressions. Limited to 8. If additional attributes are requested (see attributes below) then the search expression MUST use the first requested attribute. |
+| cursor | [string](#string) | | Cursor to continue search. Can be omitted or empty for the new search. |
+| count | [uint32](#uint32) | | Limits the number of responses to the specified number. Can't be more than 1000. |
+| attributes | [string](#string) | repeated | List of attribute names (including special ones as defined by SearchFilter key) to include into the reply. Limited to 4, these attributes also affect result ordering (result is ordered by attributes and then by OID). |
+
+
+
+
+### Message SearchV2Response
+SearchV2 response
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| body | [SearchV2Response.Body](#neo.fs.v2.object.SearchV2Response.Body) | | Body of search object response message. |
| meta_header | [neo.fs.v2.session.ResponseMetaHeader](#neo.fs.v2.session.ResponseMetaHeader) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.ResponseVerificationHeader](#neo.fs.v2.session.ResponseVerificationHeader) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
-
+
-### Message SearchResponse.Body
-Object Search response body
+### Message SearchV2Response.Body
+Main result structure.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id_list | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | List of `ObjectID`s that match the search query |
+| result | [SearchV2Response.OIDWithMeta](#neo.fs.v2.object.SearchV2Response.OIDWithMeta) | repeated | List of object IDs with additional requested attributes. |
+| cursor | [string](#string) | | Cursor that can be used for subsequent requests. For users it's an opaque string that is omitted or empty when there are no more results to list. For nodes to interoperate this is defined as the latest OID for queries without filters and primary (first) attribute value plus OID. Values are encoded in base64. |
+
+
+
+
+### Message SearchV2Response.OIDWithMeta
+OID with additional requested metadata.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | Object ID that matches search criteria. |
+| attributes | [string](#string) | repeated | List of attribute data from the respective object, fields strictly follow requested ones. |
@@ -984,6 +1000,77 @@ in the header.
| payload | [bytes](#bytes) | | Payload bytes |
+
+
+### Message SearchFilter
+Filter structure checks if the object header field or the attribute content
+matches a value.
+
+If no filters are set, search request will return all objects of the
+container, including Regular object, Tombstones and Storage Group
+objects. Most human users expect to get only object they can directly
+work with. In that case, `$Object:ROOT` filter should be used.
+
+If `match_type` field is numerical, both `value` field and object
+attribute MUST be base-10 integers.
+
+By default `key` field refers to the corresponding object's `Attribute`.
+Some Object's header fields can also be accessed by adding `$Object:`
+prefix to the name. Here is the list of fields available via this prefix:
+
+* $Object:version \
+ version
+* $Object:objectID \
+ object_id
+* $Object:containerID \
+ container_id
+* $Object:ownerID \
+ owner_id
+* $Object:creationEpoch \
+ creation_epoch
+* $Object:payloadLength \
+ payload_length
+* $Object:payloadHash \
+ payload_hash
+* $Object:objectType \
+ object_type
+* $Object:homomorphicHash \
+ homomorphic_hash
+* $Object:split.parent \
+ object_id of parent
+* $Object:split.splitID \
+ 16 byte UUIDv4 used to identify the split object hierarchy parts
+* $Object:split.first \
+ object_id of the first part in split chain; non-acceptable for deprecated V1 split scheme
+
+There are some well-known filter aliases to match objects by certain
+properties:
+
+* $Object:ROOT \
+ Returns only `REGULAR` type objects that are not split or that are the top
+ level root objects in a split hierarchy. This includes objects not
+ present physically, like large objects split into smaller objects
+ without a separate top-level root object. Objects of other types like
+ StorageGroups and Tombstones will not be shown. This filter may be
+ useful for listing objects like `ls` command of some virtual file
+ system. This filter is activated if the `key` exists, disregarding the
+ value and matcher type.
+* $Object:PHY \
+ Returns only objects physically stored in the system. This filter is
+ activated if the `key` exists, disregarding the value and matcher type.
+
+Note: using filters with a key with prefix `$Object:` and match type
+`NOT_PRESENT `is not recommended since this is not a cross-version approach.
+Behavior when processing this kind of filters is undefined.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| match_type | [MatchType](#neo.fs.v2.object.MatchType) | | Match type to use |
+| key | [string](#string) | | Attribute or Header fields to match |
+| value | [string](#string) | | Value to match |
+
+
### Message ShortHeader
diff --git a/refs/types.proto b/refs/types.proto
index 70c941b..b3dce60 100644
--- a/refs/types.proto
+++ b/refs/types.proto
@@ -2,8 +2,8 @@ syntax = "proto3";
package neo.fs.v2.refs;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc;refs";
option csharp_namespace = "Neo.FileStorage.API.Refs";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc;refs";
// Objects in NeoFS are addressed by their ContainerID and ObjectID.
//
diff --git a/reputation/service.proto b/reputation/service.proto
index c430c5e..a799bb0 100644
--- a/reputation/service.proto
+++ b/reputation/service.proto
@@ -2,127 +2,125 @@ syntax = "proto3";
package neo.fs.v2.reputation;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc;reputation";
-option csharp_namespace = "Neo.FileStorage.API.Reputation";
-
import "reputation/types.proto";
import "session/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Reputation";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc;reputation";
+
// `ReputationService` provides mechanisms for exchanging trust values with
// other NeoFS nodes. Nodes rate each other's reputation based on how good they
// process requests and set a trust level based on that rating. The trust
// information is passed to the next nodes to check and aggregate unless the
// final result is recorded.
service ReputationService {
- // Announce local client trust information to any node in NeoFS network.
- //
- // Statuses:
- // - **OK** (0, SECTION_SUCCESS):
- // local trust has been successfully announced;
- // - Common failures (SECTION_FAILURE_COMMON).
- rpc AnnounceLocalTrust (AnnounceLocalTrustRequest) returns (AnnounceLocalTrustResponse);
-
- // Announce the intermediate result of the iterative algorithm for
- // calculating the global reputation of the node in NeoFS network.
- //
- // Statuses:
- // - **OK** (0, SECTION_SUCCESS):
- // intermediate trust estimation has been successfully announced;
- // - Common failures (SECTION_FAILURE_COMMON).
- rpc AnnounceIntermediateResult (AnnounceIntermediateResultRequest) returns (AnnounceIntermediateResultResponse);
+ // Announce local client trust information to any node in NeoFS network.
+ //
+ // Statuses:
+ // - **OK** (0, SECTION_SUCCESS):
+ // local trust has been successfully announced;
+ // - Common failures (SECTION_FAILURE_COMMON).
+ rpc AnnounceLocalTrust(AnnounceLocalTrustRequest) returns (AnnounceLocalTrustResponse);
+
+ // Announce the intermediate result of the iterative algorithm for
+ // calculating the global reputation of the node in NeoFS network.
+ //
+ // Statuses:
+ // - **OK** (0, SECTION_SUCCESS):
+ // intermediate trust estimation has been successfully announced;
+ // - Common failures (SECTION_FAILURE_COMMON).
+ rpc AnnounceIntermediateResult(AnnounceIntermediateResultRequest) returns (AnnounceIntermediateResultResponse);
}
// Announce node's local trust information.
message AnnounceLocalTrustRequest {
- // Announce node's local trust information.
- message Body {
- // Trust assessment Epoch number
- uint64 epoch = 1;
-
- // List of normalized local trust values to other NeoFS nodes. The value
- // is calculated according to EigenTrust++ algorithm and must be a
- // floating point number in [0;1] range.
- repeated Trust trusts = 2;
- }
-
- // Body of the request message.
- Body body = 1;
-
- // Carries request meta information. Header data is used only to regulate
- // message transport and does not affect request execution.
- neo.fs.v2.session.RequestMetaHeader meta_header = 2;
-
- // Carries request verification information. This header is used to
- // authenticate the nodes of the message route and check the correctness of
- // transmission.
- neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
+ // Announce node's local trust information.
+ message Body {
+ // Trust assessment Epoch number
+ uint64 epoch = 1;
+
+ // List of normalized local trust values to other NeoFS nodes. The value
+ // is calculated according to EigenTrust++ algorithm and must be a
+ // floating point number in [0;1] range.
+ repeated Trust trusts = 2;
+ }
+
+ // Body of the request message.
+ Body body = 1;
+
+ // Carries request meta information. Header data is used only to regulate
+ // message transport and does not affect request execution.
+ neo.fs.v2.session.RequestMetaHeader meta_header = 2;
+
+ // Carries request verification information. This header is used to
+ // authenticate the nodes of the message route and check the correctness of
+ // transmission.
+ neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
// Node's local trust information announcement response.
message AnnounceLocalTrustResponse {
- // Response to the node's local trust information announcement has an empty body
- // because the trust exchange operation is asynchronous. If Trust information
- // does not pass sanity checks, it is silently ignored.
- message Body {
- }
-
- // Body of the response message.
- Body body = 1;
-
- // Carries response meta information. Header data is used only to regulate
- // message transport and does not affect request execution.
- neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
-
- // Carries response verification information. This header is used to
- // authenticate the nodes of the message route and check the correctness of
- // transmission.
- neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
+ // Response to the node's local trust information announcement has an empty body
+ // because the trust exchange operation is asynchronous. If Trust information
+ // does not pass sanity checks, it is silently ignored.
+ message Body {}
+
+ // Body of the response message.
+ Body body = 1;
+
+ // Carries response meta information. Header data is used only to regulate
+ // message transport and does not affect request execution.
+ neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
+
+ // Carries response verification information. This header is used to
+ // authenticate the nodes of the message route and check the correctness of
+ // transmission.
+ neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}
// Announce intermediate global trust information.
message AnnounceIntermediateResultRequest {
- // Announce intermediate global trust information.
- message Body {
- // Iteration execution Epoch number
- uint64 epoch = 1;
+ // Announce intermediate global trust information.
+ message Body {
+ // Iteration execution Epoch number
+ uint64 epoch = 1;
- // Iteration sequence number
- uint32 iteration = 2;
+ // Iteration sequence number
+ uint32 iteration = 2;
- // Current global trust value calculated at the specified iteration
- PeerToPeerTrust trust = 3;
- }
+ // Current global trust value calculated at the specified iteration
+ PeerToPeerTrust trust = 3;
+ }
- // Body of the request message.
- Body body = 1;
+ // Body of the request message.
+ Body body = 1;
- // Carries request meta information. Header data is used only to regulate
- // message transport and does not affect request execution.
- neo.fs.v2.session.RequestMetaHeader meta_header = 2;
+ // Carries request meta information. Header data is used only to regulate
+ // message transport and does not affect request execution.
+ neo.fs.v2.session.RequestMetaHeader meta_header = 2;
- // Carries request verification information. This header is used to
- // authenticate the nodes of the message route and check the correctness of
- // transmission.
- neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
+ // Carries request verification information. This header is used to
+ // authenticate the nodes of the message route and check the correctness of
+ // transmission.
+ neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
// Intermediate global trust information announcement response.
message AnnounceIntermediateResultResponse {
- // Response to the node's intermediate global trust information announcement has
- // an empty body because the trust exchange operation is asynchronous. If
- // Trust information does not pass sanity checks, it is silently ignored.
- message Body {
- }
-
- // Body of the response message.
- Body body = 1;
-
- // Carries response meta information. Header data is used only to regulate
- // message transport and does not affect request execution.
- neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
-
- // Carries response verification information. This header is used to
- // authenticate the nodes of the message route and check the correctness of
- // transmission.
- neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
+ // Response to the node's intermediate global trust information announcement has
+ // an empty body because the trust exchange operation is asynchronous. If
+ // Trust information does not pass sanity checks, it is silently ignored.
+ message Body {}
+
+ // Body of the response message.
+ Body body = 1;
+
+ // Carries response meta information. Header data is used only to regulate
+ // message transport and does not affect request execution.
+ neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
+
+ // Carries response verification information. This header is used to
+ // authenticate the nodes of the message route and check the correctness of
+ // transmission.
+ neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}
diff --git a/reputation/types.proto b/reputation/types.proto
index 627008d..3c6b7ff 100644
--- a/reputation/types.proto
+++ b/reputation/types.proto
@@ -2,11 +2,11 @@ syntax = "proto3";
package neo.fs.v2.reputation;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc;reputation";
-option csharp_namespace = "Neo.FileStorage.API.Reputation";
-
import "refs/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Reputation";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc;reputation";
+
// NeoFS unique peer identifier is a 33 byte long compressed public key of the
// node, the same as the one stored in the network map.
//
@@ -19,45 +19,45 @@ import "refs/types.proto";
// [URL-safe](https://tools.ietf.org/html/rfc4648#section-5) base64 encoding
// with/without paddings are accepted.
message PeerID {
- // Peer node's public key
- bytes public_key = 1 [json_name = "publicKey"];
+ // Peer node's public key
+ bytes public_key = 1 [json_name = "publicKey"];
}
// Trust level to a NeoFS network peer.
message Trust {
- // Identifier of the trusted peer
- PeerID peer = 1 [json_name = "peer"];
+ // Identifier of the trusted peer
+ PeerID peer = 1 [json_name = "peer"];
- // Trust level in [0:1] range
- double value = 2 [json_name = "value"];
+ // Trust level in [0:1] range
+ double value = 2 [json_name = "value"];
}
// Trust level of a peer to a peer.
message PeerToPeerTrust {
- // Identifier of the trusting peer
- PeerID trusting_peer = 1 [json_name = "trustingPeer"];
+ // Identifier of the trusting peer
+ PeerID trusting_peer = 1 [json_name = "trustingPeer"];
- // Trust level
- Trust trust = 2 [json_name = "trust"];
+ // Trust level
+ Trust trust = 2 [json_name = "trust"];
}
// Global trust level to NeoFS node.
message GlobalTrust {
- // Message format version. Effectively, the version of API library used to create
- // the message.
- neo.fs.v2.refs.Version version = 1 [json_name = "version"];
- // Message body structure.
- message Body {
- // Node manager ID
- PeerID manager = 1 [json_name = "manager"];
-
- // Global trust level
- Trust trust = 2 [json_name = "trust"];
- }
-
- // Message body
- Body body = 2 [json_name = "body"];
-
- // Signature of the binary `body` field by the manager.
- neo.fs.v2.refs.Signature signature = 3 [json_name = "signature"];
+ // Message format version. Effectively, the version of API library used to create
+ // the message.
+ neo.fs.v2.refs.Version version = 1 [json_name = "version"];
+ // Message body structure.
+ message Body {
+ // Node manager ID
+ PeerID manager = 1 [json_name = "manager"];
+
+ // Global trust level
+ Trust trust = 2 [json_name = "trust"];
+ }
+
+ // Message body
+ Body body = 2 [json_name = "body"];
+
+ // Signature of the binary `body` field by the manager.
+ neo.fs.v2.refs.Signature signature = 3 [json_name = "signature"];
}
diff --git a/session/service.proto b/session/service.proto
index 98c2ca4..4b04482 100644
--- a/session/service.proto
+++ b/session/service.proto
@@ -2,12 +2,12 @@ syntax = "proto3";
package neo.fs.v2.session;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/session/grpc;session";
-option csharp_namespace = "Neo.FileStorage.API.Session";
-
import "refs/types.proto";
import "session/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Session";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/session/grpc;session";
+
// `SessionService` allows to establish a temporary trust relationship between
// two peer nodes and generate a `SessionToken` as the proof of trust to be
// attached in requests for further verification. Please see corresponding
@@ -19,7 +19,7 @@ service SessionService {
// - **OK** (0, SECTION_SUCCESS):
// session has been successfully opened;
// - Common failures (SECTION_FAILURE_COMMON).
- rpc Create (CreateRequest) returns (CreateResponse);
+ rpc Create(CreateRequest) returns (CreateResponse);
}
// Information necessary for opening a session.
diff --git a/session/types.proto b/session/types.proto
index ec17432..9d72f9c 100644
--- a/session/types.proto
+++ b/session/types.proto
@@ -2,13 +2,13 @@ syntax = "proto3";
package neo.fs.v2.session;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/session/grpc;session";
-option csharp_namespace = "Neo.FileStorage.API.Session";
-
-import "refs/types.proto";
import "acl/types.proto";
+import "refs/types.proto";
import "status/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Session";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/session/grpc;session";
+
// Context information for Session Tokens related to ObjectService requests
message ObjectSessionContext {
// Object request verbs
@@ -59,30 +59,30 @@ message ObjectSessionContext {
// Context information for Session Tokens related to ContainerService requests.
message ContainerSessionContext {
- // Container request verbs
- enum Verb {
- // Unknown verb
- VERB_UNSPECIFIED = 0;
+ // Container request verbs
+ enum Verb {
+ // Unknown verb
+ VERB_UNSPECIFIED = 0;
- // Refers to container.Put RPC call
- PUT = 1;
+ // Refers to container.Put RPC call
+ PUT = 1;
- // Refers to container.Delete RPC call
- DELETE = 2;
+ // Refers to container.Delete RPC call
+ DELETE = 2;
- // Refers to container.SetExtendedACL RPC call
- SETEACL = 3;
- }
- // Type of request for which the token is issued
- Verb verb = 1 [json_name = "verb"];
+ // Refers to container.SetExtendedACL RPC call
+ SETEACL = 3;
+ }
+ // Type of request for which the token is issued
+ Verb verb = 1 [json_name = "verb"];
- // Spreads the action to all owner containers.
- // If set, container_id field is ignored.
- bool wildcard = 2 [json_name = "wildcard"];
+ // Spreads the action to all owner containers.
+ // If set, container_id field is ignored.
+ bool wildcard = 2 [json_name = "wildcard"];
- // Particular container to which the action applies.
- // Ignored if wildcard flag is set.
- refs.ContainerID container_id = 3 [json_name = "containerID"];
+ // Particular container to which the action applies.
+ // Ignored if wildcard flag is set.
+ refs.ContainerID container_id = 3 [json_name = "containerID"];
}
// NeoFS Session Token.
diff --git a/status/types.proto b/status/types.proto
index 1b4a9fc..367452a 100644
--- a/status/types.proto
+++ b/status/types.proto
@@ -2,8 +2,8 @@ syntax = "proto3";
package neo.fs.v2.status;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/status/grpc;status";
option csharp_namespace = "Neo.FileStorage.API.Status";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/status/grpc;status";
// Declares the general format of the status returns of the NeoFS RPC protocol.
// Status is present in all response messages. Each RPC of NeoFS protocol
@@ -33,113 +33,113 @@ option csharp_namespace = "Neo.FileStorage.API.Status";
// should not expect) useful information in the message. Field `details`
// should make the return more detailed.
message Status {
- // The status code
- uint32 code = 1;
-
- // Developer-facing error message
- string message = 2;
-
- // Return detail. It contains additional information that can be used to
- // analyze the response. Each code defines a set of details that can be
- // attached to a status. Client should not handle details that are not
- // covered by the code.
- message Detail {
- // Detail ID. The identifier is required to determine the binary format
- // of the detail and how to decode it.
- uint32 id = 1;
-
- // Binary status detail. Must follow the format associated with ID.
- // The possibility of missing a value must be explicitly allowed.
- bytes value = 2;
- }
-
- // Data detailing the outcome of the operation. Must be unique by ID.
- repeated Detail details = 3;
+ // The status code
+ uint32 code = 1;
+
+ // Developer-facing error message
+ string message = 2;
+
+ // Return detail. It contains additional information that can be used to
+ // analyze the response. Each code defines a set of details that can be
+ // attached to a status. Client should not handle details that are not
+ // covered by the code.
+ message Detail {
+ // Detail ID. The identifier is required to determine the binary format
+ // of the detail and how to decode it.
+ uint32 id = 1;
+
+ // Binary status detail. Must follow the format associated with ID.
+ // The possibility of missing a value must be explicitly allowed.
+ bytes value = 2;
+ }
+
+ // Data detailing the outcome of the operation. Must be unique by ID.
+ repeated Detail details = 3;
}
// Section identifiers.
enum Section {
- // Successful return codes.
- SECTION_SUCCESS = 0;
+ // Successful return codes.
+ SECTION_SUCCESS = 0;
- // Failure codes regardless of the operation.
- SECTION_FAILURE_COMMON = 1;
+ // Failure codes regardless of the operation.
+ SECTION_FAILURE_COMMON = 1;
- // Object service-specific errors.
- SECTION_OBJECT = 2;
+ // Object service-specific errors.
+ SECTION_OBJECT = 2;
- // Container service-specific errors.
- SECTION_CONTAINER = 3;
+ // Container service-specific errors.
+ SECTION_CONTAINER = 3;
- // Session service-specific errors.
- SECTION_SESSION = 4;
+ // Session service-specific errors.
+ SECTION_SESSION = 4;
}
// Section of NeoFS successful return codes.
enum Success {
- // [**0**] Default success. Not detailed.
- // If the server cannot match successful outcome to the code, it should
- // use this code.
- OK = 0;
+ // [**0**] Default success. Not detailed.
+ // If the server cannot match successful outcome to the code, it should
+ // use this code.
+ OK = 0;
}
// Section of failed statuses independent of the operation.
enum CommonFail {
- // [**1024**] Internal server error, default failure. Not detailed.
- // If the server cannot match failed outcome to the code, it should
- // use this code.
- INTERNAL = 0;
-
- // [**1025**] Wrong magic of the NeoFS network.
- // Details:
- // - [**0**] Magic number of the served NeoFS network (big-endian 64-bit
- // unsigned integer).
- WRONG_MAGIC_NUMBER = 1;
-
- // [**1026**] Signature verification failure.
- SIGNATURE_VERIFICATION_FAIL = 2;
-
- // [**1027**] Node is under maintenance.
- NODE_UNDER_MAINTENANCE = 3;
+ // [**1024**] Internal server error, default failure. Not detailed.
+ // If the server cannot match failed outcome to the code, it should
+ // use this code.
+ INTERNAL = 0;
+
+ // [**1025**] Wrong magic of the NeoFS network.
+ // Details:
+ // - [**0**] Magic number of the served NeoFS network (big-endian 64-bit
+ // unsigned integer).
+ WRONG_MAGIC_NUMBER = 1;
+
+ // [**1026**] Signature verification failure.
+ SIGNATURE_VERIFICATION_FAIL = 2;
+
+ // [**1027**] Node is under maintenance.
+ NODE_UNDER_MAINTENANCE = 3;
}
// Section of statuses for object-related operations.
enum Object {
- // [**2048**] Access denied by ACL.
- // Details:
- // - [**0**] Human-readable description (UTF-8 encoded string).
- ACCESS_DENIED = 0;
+ // [**2048**] Access denied by ACL.
+ // Details:
+ // - [**0**] Human-readable description (UTF-8 encoded string).
+ ACCESS_DENIED = 0;
- // [**2049**] Object not found.
- OBJECT_NOT_FOUND = 1;
+ // [**2049**] Object not found.
+ OBJECT_NOT_FOUND = 1;
- // [**2050**] Operation rejected by the object lock.
- LOCKED = 2;
+ // [**2050**] Operation rejected by the object lock.
+ LOCKED = 2;
- // [**2051**] Locking an object with a non-REGULAR type rejected.
- LOCK_NON_REGULAR_OBJECT = 3;
+ // [**2051**] Locking an object with a non-REGULAR type rejected.
+ LOCK_NON_REGULAR_OBJECT = 3;
- // [**2052**] Object has been marked deleted.
- OBJECT_ALREADY_REMOVED = 4;
+ // [**2052**] Object has been marked deleted.
+ OBJECT_ALREADY_REMOVED = 4;
- // [**2053**] Invalid range has been requested for an object.
- OUT_OF_RANGE = 5;
+ // [**2053**] Invalid range has been requested for an object.
+ OUT_OF_RANGE = 5;
}
// Section of statuses for container-related operations.
enum Container {
- // [**3072**] Container not found.
- CONTAINER_NOT_FOUND = 0;
+ // [**3072**] Container not found.
+ CONTAINER_NOT_FOUND = 0;
- // [**3073**] eACL table not found.
- EACL_NOT_FOUND = 1;
+ // [**3073**] eACL table not found.
+ EACL_NOT_FOUND = 1;
}
// Section of statuses for session-related operations.
enum Session {
- // [**4096**] Token not found.
- TOKEN_NOT_FOUND = 0;
+ // [**4096**] Token not found.
+ TOKEN_NOT_FOUND = 0;
- // [**4097**] Token has expired.
- TOKEN_EXPIRED = 1;
+ // [**4097**] Token has expired.
+ TOKEN_EXPIRED = 1;
}
diff --git a/storagegroup/types.proto b/storagegroup/types.proto
index c54c741..2a21142 100644
--- a/storagegroup/types.proto
+++ b/storagegroup/types.proto
@@ -2,11 +2,11 @@ syntax = "proto3";
package neo.fs.v2.storagegroup;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/storagegroup/grpc;storagegroup";
-option csharp_namespace = "Neo.FileStorage.API.StorageGroup";
-
import "refs/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.StorageGroup";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/storagegroup/grpc;storagegroup";
+
// StorageGroup keeps verification information for Data Audit sessions. Objects
// that require paid storage guarantees are gathered in `StorageGroups` with
// additional information used for the proof of storage. `StorageGroup` only
@@ -27,7 +27,10 @@ message StorageGroup {
neo.fs.v2.refs.Checksum validation_hash = 2 [json_name = "validationHash"];
// DEPRECATED. Last NeoFS epoch number of the storage group lifetime
- uint64 expiration_epoch = 3 [json_name = "expirationEpoch", deprecated = true];
+ uint64 expiration_epoch = 3 [
+ json_name = "expirationEpoch",
+ deprecated = true
+ ];
// Strictly ordered list of storage group member objects. Members MUST be unique
repeated neo.fs.v2.refs.ObjectID members = 4 [json_name = "members"];
diff --git a/subnet/types.proto b/subnet/types.proto
index b2c5571..e8bbd14 100644
--- a/subnet/types.proto
+++ b/subnet/types.proto
@@ -2,19 +2,19 @@ syntax = "proto3";
package neo.fs.v2.subnet;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/subnet/grpc;subnet";
-option csharp_namespace = "Neo.FileStorage.API.Subnet";
-
import "refs/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Subnet";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/subnet/grpc;subnet";
+
// NeoFS subnetwork description
//
// DEPRECATED. Ignored and kept for compatibility only.
message SubnetInfo {
- // Unique subnet identifier. Missing ID is
- // equivalent to zero (default subnetwork) ID.
- neo.fs.v2.refs.SubnetID id = 1;
+ // Unique subnet identifier. Missing ID is
+ // equivalent to zero (default subnetwork) ID.
+ neo.fs.v2.refs.SubnetID id = 1;
- // Identifier of the subnetwork owner
- neo.fs.v2.refs.OwnerID owner = 2;
+ // Identifier of the subnetwork owner
+ neo.fs.v2.refs.OwnerID owner = 2;
}
diff --git a/tombstone/types.proto b/tombstone/types.proto
index 8a67ae5..c7731a1 100644
--- a/tombstone/types.proto
+++ b/tombstone/types.proto
@@ -2,11 +2,11 @@ syntax = "proto3";
package neo.fs.v2.tombstone;
-option go_package = "github.com/nspcc-dev/neofs-api-go/v2/tombstone/grpc;tombstone";
-option csharp_namespace = "Neo.FileStorage.API.Tombstone";
-
import "refs/types.proto";
+option csharp_namespace = "Neo.FileStorage.API.Tombstone";
+option go_package = "github.com/nspcc-dev/neofs-api-go/v2/tombstone/grpc;tombstone";
+
// Tombstone keeps record of deleted objects for a few epochs until they are
// purged from the NeoFS network.
message Tombstone {
@@ -14,7 +14,10 @@ message Tombstone {
// creator depending on the current NeoFS network settings.
// DEPRECATED. Field ignored by servers, set corresponding object attribute
// `__NEOFS__EXPIRATION_EPOCH` only.
- uint64 expiration_epoch = 1 [json_name = "expirationEpoch", deprecated = true];
+ uint64 expiration_epoch = 1 [
+ json_name = "expirationEpoch",
+ deprecated = true
+ ];
// 16 byte UUID used to identify the split object hierarchy parts. Must be
// unique inside a container. All objects participating in the split must