From 54778a86edcf6aecd529ffc2d95b4c95b79913e3 Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Tue, 18 Aug 2020 16:14:25 +0300 Subject: [PATCH] Move Version to refs Signed-off-by: Stanislav Bogatyrev --- container/types.proto | 3 +-- object/types.proto | 4 ++-- refs/types.proto | 11 ++++++++++- service/types.proto | 13 ++----------- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/container/types.proto b/container/types.proto index 589d392..85d89c6 100644 --- a/container/types.proto +++ b/container/types.proto @@ -7,7 +7,6 @@ option csharp_namespace = "NeoFS.API.v2.Container"; import "netmap/types.proto"; import "refs/types.proto"; -import "service/types.proto"; // Container is a structure that defines object placement behaviour. Objects // can be stored only within containers. They define placement rule, attributes @@ -16,7 +15,7 @@ import "service/types.proto"; message Container { // Container format version. // Effectively the version of API library used to create container - neo.fs.v2.service.Version version = 1; + neo.fs.v2.refs.Version version = 1; // OwnerID carries identifier of the container owner. neo.fs.v2.refs.OwnerID owner_id = 2; diff --git a/object/types.proto b/object/types.proto index c2a2afa..7324d6c 100644 --- a/object/types.proto +++ b/object/types.proto @@ -31,7 +31,7 @@ enum MatchType { // Short header fields message ShortHeader { // Object format version. - neo.fs.v2.service.Version version = 1; + neo.fs.v2.refs.Version version = 1; // Epoch when the object was created uint64 creation_epoch = 2; @@ -51,7 +51,7 @@ message ShortHeader { message Header { // Object format version. // Effectively the version of API library used to create particular object - neo.fs.v2.service.Version version = 1; + neo.fs.v2.refs.Version version = 1; // Object's container neo.fs.v2.refs.ContainerID container_id = 2; diff --git a/refs/types.proto b/refs/types.proto index f181a78..1f190a9 100644 --- a/refs/types.proto +++ b/refs/types.proto @@ -29,4 +29,13 @@ message ContainerID { message OwnerID { // value carries the identifier of the container owner in a binary format. bytes value = 1; -} \ No newline at end of file +} + +// Represents API version used by node. +message Version { + // Major API version. + uint32 major = 1; + + // Minor API version. + uint32 minor = 2; +} diff --git a/service/types.proto b/service/types.proto index c59f4d1..85cf208 100644 --- a/service/types.proto +++ b/service/types.proto @@ -17,15 +17,6 @@ message XHeader { string value = 2; } -// Represents API version used by node. -message Version { - // Major API version. - uint32 major = 1; - - // Minor API version. - uint32 minor = 2; -} - // Lifetime parameters of the token. Filed names taken from rfc7519. message TokenLifetime { // Expiration Epoch @@ -125,7 +116,7 @@ message BearerToken { // Information about the request message RequestMetaHeader { // Client API version. - Version version = 1; + neo.fs.v2.refs.Version version = 1; // Client local epoch number. Set to 0 if unknown. uint64 epoch = 2; @@ -149,7 +140,7 @@ message RequestMetaHeader { // Information about the response message ResponseMetaHeader { // Server API version. - Version version = 1; + neo.fs.v2.refs.Version version = 1; // Server local epoch number. uint64 epoch = 2;