diff --git a/service/signature/data.go b/pkg/signature/data.go similarity index 100% rename from service/signature/data.go rename to pkg/signature/data.go diff --git a/service/signature/options.go b/pkg/signature/options.go similarity index 100% rename from service/signature/options.go rename to pkg/signature/options.go diff --git a/service/signature/request.go b/pkg/signature/request.go similarity index 100% rename from service/signature/request.go rename to pkg/signature/request.go diff --git a/service/signature/util.go b/pkg/signature/util.go similarity index 100% rename from service/signature/util.go rename to pkg/signature/util.go diff --git a/service/v2/marshal.go b/service/v2/marshal.go deleted file mode 100644 index 54b7d10..0000000 --- a/service/v2/marshal.go +++ /dev/null @@ -1,21 +0,0 @@ -package v2 - -func (m *RequestMetaHeader) StableMarshal(buf []byte) ([]byte, error) { - // fixme: implement stable - return m.Marshal() -} - -func (m *RequestMetaHeader) StableSize() int { - // fixme: implement stable - return m.Size() -} - -func (m *RequestVerificationHeader) StableMarshal(buf []byte) ([]byte, error) { - // fixme: implement stable - return m.Marshal() -} - -func (m *RequestVerificationHeader) StableSize() int { - // fixme: implement stable - return m.Size() -} diff --git a/service/v2/signature.go b/service/v2/signature.go deleted file mode 100644 index 5470bea..0000000 --- a/service/v2/signature.go +++ /dev/null @@ -1,17 +0,0 @@ -package v2 - -func (m *RequestMetaHeader) ReadSignedData(buf []byte) ([]byte, error) { - return m.StableMarshal(buf) -} - -func (m *RequestMetaHeader) SignedDataSize() int { - return m.StableSize() -} - -func (m *RequestVerificationHeader) ReadSignedData(buf []byte) ([]byte, error) { - return m.StableMarshal(buf) -} - -func (m *RequestVerificationHeader) SignedDataSize() int { - return m.StableSize() -} diff --git a/accounting/v2/service.go b/v2/accounting/service.go similarity index 92% rename from accounting/v2/service.go rename to v2/accounting/service.go index 8898217..456d0e2 100644 --- a/accounting/v2/service.go +++ b/v2/accounting/service.go @@ -1,8 +1,8 @@ -package v2 +package accounting import ( - refs "github.com/nspcc-dev/neofs-api-go/refs/v2" - service "github.com/nspcc-dev/neofs-api-go/service/v2" + "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/nspcc-dev/neofs-api-go/v2/service" ) // SetValue sets value of the decimal number. diff --git a/accounting/v2/service.pb.go b/v2/accounting/service.pb.go similarity index 84% rename from accounting/v2/service.pb.go rename to v2/accounting/service.pb.go index 7d8eba9..0a4deda 100644 Binary files a/accounting/v2/service.pb.go and b/v2/accounting/service.pb.go differ diff --git a/accounting/v2/service.proto b/v2/accounting/service.proto similarity index 79% rename from accounting/v2/service.proto rename to v2/accounting/service.proto index 6c12c6b..35d55a7 100644 --- a/accounting/v2/service.proto +++ b/v2/accounting/service.proto @@ -1,13 +1,13 @@ syntax = "proto3"; -package accounting.v2; +package neo.fs.v2.accounting; -option go_package = "github.com/nspcc-dev/neofs-api-go/accounting/v2"; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/accounting"; option csharp_namespace = "NeoFS.API.Accounting"; -import "refs/v2/types.proto"; -import "service/v2/meta.proto"; -import "service/v2/verify.proto"; +import "v2/refs/types.proto"; +import "v2/service/meta.proto"; +import "v2/service/verify.proto"; // The service provides methods for obtaining information // about the account balance in NeoFS system. @@ -27,7 +27,7 @@ message BalanceRequest { message Body { // Carries user identifier in NeoFS system for which the balance // is requested. - refs.v2.OwnerID owner_id = 1; + neo.fs.v2.refs.OwnerID owner_id = 1; } // Body of the balance request message. @@ -35,12 +35,12 @@ message BalanceRequest { // Carries request meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } // Decimal represents the decimal numbers. @@ -66,10 +66,10 @@ message BalanceResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } diff --git a/acl/v2/types.go b/v2/acl/types.go similarity index 96% rename from acl/v2/types.go rename to v2/acl/types.go index 58eaf2e..6374787 100644 --- a/acl/v2/types.go +++ b/v2/acl/types.go @@ -1,7 +1,7 @@ -package v2 +package acl import ( - refs "github.com/nspcc-dev/neofs-api-go/refs/v2" + "github.com/nspcc-dev/neofs-api-go/v2/refs" ) // SetContainerId sets container identifier of the eACL table. diff --git a/acl/v2/types.pb.go b/v2/acl/types.pb.go similarity index 83% rename from acl/v2/types.pb.go rename to v2/acl/types.pb.go index 06711e2..e05fcf5 100644 Binary files a/acl/v2/types.pb.go and b/v2/acl/types.pb.go differ diff --git a/acl/v2/types.proto b/v2/acl/types.proto similarity index 91% rename from acl/v2/types.proto rename to v2/acl/types.proto index 58bbe25..a0a4c0b 100644 --- a/acl/v2/types.proto +++ b/v2/acl/types.proto @@ -1,18 +1,18 @@ syntax = "proto3"; -package acl.v2; +package neo.fs.v2.acl; -option go_package = "github.com/nspcc-dev/neofs-api-go/acl/v2"; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/acl"; option csharp_namespace = "NeoFS.API.Acl"; -import "refs/v2/types.proto"; +import "v2/refs/types.proto"; // Target of the access control rule in access control list. enum Target { // Unknown target, default value. UNKNOWN = 0; - // User target rule is applied if sender is the owner of the container.v2. + // User target rule is applied if sender is the owner of the container. USER = 1; // System target rule is applied if sender is the storage node within the @@ -85,7 +85,7 @@ message EACLRecord { // TargetInfo groups information about extended ACL target. message TargetInfo { // target carries target of ACL rule. - acl.v2.Target target = 1 [json_name="Role"]; + Target target = 1 [json_name="Role"]; // key_list carries public keys of ACL target. repeated bytes key_list = 2 [json_name="Keys"]; @@ -99,7 +99,7 @@ message EACLRecord { message EACLTable { // Carries identifier of the container that should use given // access control rules. - refs.v2.ContainerID container_id = 1 [json_name="ContainerID"]; + neo.fs.v2.refs.ContainerID container_id = 1 [json_name="ContainerID"]; // Records carries list of extended ACL rule records. repeated EACLRecord records = 2 [json_name="Records"]; diff --git a/container/v2/marshal.go b/v2/container/marshal.go similarity index 99% rename from container/v2/marshal.go rename to v2/container/marshal.go index 7dd25d2..2d8e1d0 100644 --- a/container/v2/marshal.go +++ b/v2/container/marshal.go @@ -1,4 +1,4 @@ -package v2 +package container import ( "encoding/binary" diff --git a/container/v2/marshal_test.go b/v2/container/marshal_test.go similarity index 92% rename from container/v2/marshal_test.go rename to v2/container/marshal_test.go index 180dcb1..43fa57f 100644 --- a/container/v2/marshal_test.go +++ b/v2/container/marshal_test.go @@ -1,10 +1,10 @@ -package v2 +package container import ( "testing" - netmap "github.com/nspcc-dev/neofs-api-go/netmap/v2" - refs "github.com/nspcc-dev/neofs-api-go/refs/v2" + "github.com/nspcc-dev/neofs-api-go/v2/netmap" + "github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/stretchr/testify/require" ) diff --git a/container/v2/service.go b/v2/container/service.go similarity index 97% rename from container/v2/service.go rename to v2/container/service.go index 1995b48..bde2b48 100644 --- a/container/v2/service.go +++ b/v2/container/service.go @@ -1,9 +1,9 @@ -package v2 +package container import ( - acl "github.com/nspcc-dev/neofs-api-go/acl/v2" - refs "github.com/nspcc-dev/neofs-api-go/refs/v2" - service "github.com/nspcc-dev/neofs-api-go/service/v2" + "github.com/nspcc-dev/neofs-api-go/v2/acl" + "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/nspcc-dev/neofs-api-go/v2/service" ) // SetContainer sets container of the request. diff --git a/container/v2/service.pb.go b/v2/container/service.pb.go similarity index 87% rename from container/v2/service.pb.go rename to v2/container/service.pb.go index 29fd633..2c7861d 100644 Binary files a/container/v2/service.pb.go and b/v2/container/service.pb.go differ diff --git a/container/v2/service.proto b/v2/container/service.proto similarity index 77% rename from container/v2/service.proto rename to v2/container/service.proto index 720abc6..3d6c9c2 100644 --- a/container/v2/service.proto +++ b/v2/container/service.proto @@ -1,15 +1,15 @@ syntax = "proto3"; -package container.v2; +package neo.fs.v2.container; -option go_package = "github.com/nspcc-dev/neofs-api-go/container/v2"; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/container"; option csharp_namespace = "NeoFS.API.Container"; -import "acl/v2/types.proto"; -import "container/v2/types.proto"; -import "refs/v2/types.proto"; -import "service/v2/meta.proto"; -import "service/v2/verify.proto"; +import "v2/acl/types.proto"; +import "v2/container/types.proto"; +import "v2/refs/types.proto"; +import "v2/service/meta.proto"; +import "v2/service/verify.proto"; // Service provides API to access container smart-contract in morph chain // via NeoFS node. @@ -46,7 +46,7 @@ service Service { message PutRequest { message Body { // Container to create in NeoFS. - container.v2.Container container = 1; + neo.fs.v2.container.Container container = 1; // Public Key of container owner. It can be public key of the owner // or it can be public key that bound in neofs.id smart-contract. @@ -61,18 +61,18 @@ message PutRequest { // Carries request meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } message PutResponse { message Body { - // container_id carries identifier of the new container.v2. - refs.v2.ContainerID container_id = 1; + // container_id carries identifier of the new container. + neo.fs.v2.refs.ContainerID container_id = 1; } // Body of container put response message. @@ -80,19 +80,19 @@ message PutResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } message DeleteRequest { message Body { // container_id carries identifier of the container to delete // from NeoFS. - refs.v2.ContainerID container_id = 1; + neo.fs.v2.refs.ContainerID container_id = 1; // Signature of container id according to RFC-6979. bytes signature = 2; @@ -103,12 +103,12 @@ message DeleteRequest { // Carries request meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } // DeleteResponse is empty because delete operation is asynchronous and done @@ -121,18 +121,18 @@ message DeleteResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } message GetRequest { message Body { // container_id carries identifier of the container to get. - refs.v2.ContainerID container_id = 1; + neo.fs.v2.refs.ContainerID container_id = 1; } // Body of container get request message. @@ -140,18 +140,18 @@ message GetRequest { // Carries request meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } message GetResponse { message Body { // Container that has been requested. - container.v2.Container container = 1; + neo.fs.v2.container.Container container = 1; } // Body of container get response message. @@ -159,18 +159,18 @@ message GetResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } message ListRequest { message Body { // owner_id carries identifier of the container owner. - refs.v2.OwnerID owner_id = 1; + neo.fs.v2.refs.OwnerID owner_id = 1; } // Body of list containers request message. @@ -178,18 +178,18 @@ message ListRequest { // Carries request meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } message ListResponse { message Body { // ContainerIDs carries list of identifiers of the containers that belong to the owner. - repeated refs.v2.ContainerID container_ids = 1; + repeated refs.ContainerID container_ids = 1; } // Body of list containers response message. @@ -197,18 +197,18 @@ message ListResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } message SetExtendedACLRequest { message Body { - // Extended ACL to set for the container.v2. - acl.v2.EACLTable eacl = 1; + // Extended ACL to set for the container. + neo.fs.v2.acl.EACLTable eacl = 1; // Signature of stable-marshalled Extended ACL according to RFC-6979. bytes signature = 2; @@ -219,12 +219,12 @@ message SetExtendedACLRequest { // Carries request meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } message SetExtendedACLResponse { @@ -235,18 +235,18 @@ message SetExtendedACLResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } message GetExtendedACLRequest { message Body { // container_id carries identifier of the container that has Extended ACL. - refs.v2.ContainerID container_id = 1; + neo.fs.v2.refs.ContainerID container_id = 1; } // Body of get extended acl request message. @@ -254,18 +254,18 @@ message GetExtendedACLRequest { // Carries request meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } message GetExtendedACLResponse { message Body { // Extended ACL that has been requested if it was set up. - acl.v2.EACLTable eacl = 1; + neo.fs.v2.acl.EACLTable eacl = 1; // Signature of stable-marshalled Extended ACL according to RFC-6979. bytes signature = 2; @@ -276,10 +276,10 @@ message GetExtendedACLResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } diff --git a/container/v2/signature.go b/v2/container/signature.go similarity index 95% rename from container/v2/signature.go rename to v2/container/signature.go index ca19ee6..0bdb334 100644 --- a/container/v2/signature.go +++ b/v2/container/signature.go @@ -1,4 +1,4 @@ -package v2 +package container func (m *Container) ReadSignedData(buf []byte) ([]byte, error) { return m.StableMarshal(buf) diff --git a/container/v2/types.go b/v2/container/types.go similarity index 89% rename from container/v2/types.go rename to v2/container/types.go index 1379be9..dd64a54 100644 --- a/container/v2/types.go +++ b/v2/container/types.go @@ -1,8 +1,8 @@ -package v2 +package container import ( - netmap "github.com/nspcc-dev/neofs-api-go/netmap/v2" - refs "github.com/nspcc-dev/neofs-api-go/refs/v2" + "github.com/nspcc-dev/neofs-api-go/v2/netmap" + "github.com/nspcc-dev/neofs-api-go/v2/refs" ) // SetKey sets key to the container attribute. diff --git a/container/v2/types.pb.go b/v2/container/types.pb.go similarity index 84% rename from container/v2/types.pb.go rename to v2/container/types.pb.go index 28c03d7..50a0a36 100644 Binary files a/container/v2/types.pb.go and b/v2/container/types.pb.go differ diff --git a/container/v2/types.proto b/v2/container/types.proto similarity index 80% rename from container/v2/types.proto rename to v2/container/types.proto index 5897b8c..aa9fb2c 100644 --- a/container/v2/types.proto +++ b/v2/container/types.proto @@ -1,12 +1,12 @@ syntax = "proto3"; -package container.v2; +package neo.fs.v2.container; -option go_package = "github.com/nspcc-dev/neofs-api-go/container/v2"; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/container"; option csharp_namespace = "NeoFS.API.Container"; -import "netmap/v2/types.proto"; -import "refs/v2/types.proto"; +import "v2/netmap/types.proto"; +import "v2/refs/types.proto"; // Container is a structure that defines object placement behaviour. Objects // can be stored only within containers. They define placement rule, attributes @@ -14,7 +14,7 @@ import "refs/v2/types.proto"; // SHA256 hash of stable-marshalled container message. message Container { // OwnerID carries identifier of the container owner. - refs.v2.OwnerID owner_id = 1; + neo.fs.v2.refs.OwnerID owner_id = 1; // Nonce is a 16 byte UUID, used to avoid collisions of container id. bytes nonce = 2; @@ -32,9 +32,9 @@ message Container { string value = 2; } - // Attributes define any immutable characteristics of container.v2. + // Attributes define any immutable characteristics of container. repeated Attribute attributes = 4; - // Rules define storage policy for the object inside the container.v2. - netmap.v2.PlacementRule rules = 5; + // Rules define storage policy for the object inside the container. + neo.fs.v2.netmap.PlacementRule rules = 5; } diff --git a/netmap/v2/marshal.go b/v2/netmap/marshal.go similarity index 99% rename from netmap/v2/marshal.go rename to v2/netmap/marshal.go index 11c6e50..f0938c4 100644 --- a/netmap/v2/marshal.go +++ b/v2/netmap/marshal.go @@ -1,4 +1,4 @@ -package v2 +package netmap import ( "encoding/binary" diff --git a/netmap/v2/types.go b/v2/netmap/types.go similarity index 99% rename from netmap/v2/types.go rename to v2/netmap/types.go index 81e63f8..552314d 100644 --- a/netmap/v2/types.go +++ b/v2/netmap/types.go @@ -1,4 +1,4 @@ -package v2 +package netmap // SetOp sets operation of the simple filter. func (m *PlacementRule_SFGroup_Filter_SimpleFilter) SetOp(v PlacementRule_SFGroup_Filter_SimpleFilter_Operation) { diff --git a/netmap/v2/types.pb.go b/v2/netmap/types.pb.go similarity index 90% rename from netmap/v2/types.pb.go rename to v2/netmap/types.pb.go index a83e195..84e68fc 100644 Binary files a/netmap/v2/types.pb.go and b/v2/netmap/types.pb.go differ diff --git a/netmap/v2/types.proto b/v2/netmap/types.proto similarity index 95% rename from netmap/v2/types.proto rename to v2/netmap/types.proto index 2d12ea5..0807cf4 100644 --- a/netmap/v2/types.proto +++ b/v2/netmap/types.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package netmap.v2; +package neo.fs.v2.netmap; -option go_package = "github.com/nspcc-dev/neofs-api-go/netmap/v2"; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/netmap"; option csharp_namespace = "NeoFS.API.Netmap"; message PlacementRule { diff --git a/object/v2/service.go b/v2/object/service.go similarity index 99% rename from object/v2/service.go rename to v2/object/service.go index b6e372f..9ec8941 100644 --- a/object/v2/service.go +++ b/v2/object/service.go @@ -1,8 +1,8 @@ -package v2 +package object import ( - refs "github.com/nspcc-dev/neofs-api-go/refs/v2" - service "github.com/nspcc-dev/neofs-api-go/service/v2" + "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/nspcc-dev/neofs-api-go/v2/service" ) // SetAddress sets address of the requested object. diff --git a/object/v2/service.pb.go b/v2/object/service.pb.go similarity index 88% rename from object/v2/service.pb.go rename to v2/object/service.pb.go index ce67752..18a68ce 100644 Binary files a/object/v2/service.pb.go and b/v2/object/service.pb.go differ diff --git a/object/v2/service.proto b/v2/object/service.proto similarity index 79% rename from object/v2/service.proto rename to v2/object/service.proto index 85e6d3e..28051e3 100644 --- a/object/v2/service.proto +++ b/v2/object/service.proto @@ -1,25 +1,25 @@ syntax = "proto3"; -package object.v2; +package neo.fs.v2.object; -option go_package = "github.com/nspcc-dev/neofs-api-go/object/v2"; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/object"; option csharp_namespace = "NeoFS.API.Object"; -import "object/v2/types.proto"; -import "refs/v2/types.proto"; -import "service/v2/meta.proto"; -import "service/v2/verify.proto"; +import "v2/object/types.proto"; +import "v2/refs/types.proto"; +import "v2/service/meta.proto"; +import "v2/service/verify.proto"; -// Object service provides API for manipulating with the object.v2. +// Object service provides API for manipulating with the object. service Service { - // Get the object from container.v2. Response uses gRPC stream. First response + // Get the object from container. Response uses gRPC stream. First response // message carry object of requested address. Chunk messages are parts of // the object's payload if it is needed. All messages except first carry // chunks. Requested object can be restored by concatenation of object // message payload and all chunks keeping receiving order. rpc Get(GetRequest) returns (stream GetResponse); - // Put the object into container.v2. Request uses gRPC stream. First message + // Put the object into container. Request uses gRPC stream. First message // SHOULD BE type of PutHeader. Container id and Owner id of object SHOULD // BE set. Session token SHOULD BE obtained before put operation (see // session package). Chunk messages considered by server as part of object @@ -35,7 +35,7 @@ service Service { // headers are also present. rpc Head(HeadRequest) returns (HeadResponse); - // Search objects in container.v2. Version of query language format SHOULD BE + // Search objects in container. Version of query language format SHOULD BE // set to 1. Search query represented in serialized format (see query // package). rpc Search(SearchRequest) returns (stream SearchResponse); @@ -54,8 +54,8 @@ service Service { message GetRequest { message Body { - // Address of the requested object.v2. - refs.v2.Address address = 1; + // Address of the requested object. + neo.fs.v2.refs.Address address = 1; // Carries the raw option flag of the request. // Raw request is sent to receive only the objects @@ -67,11 +67,11 @@ message GetRequest { // Carries request meta information. Header data is used only to regulate message // transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } message GetResponse { @@ -79,9 +79,9 @@ message GetResponse { // Initialization parameters of the object got from NeoFS. message Init { // Object ID - refs.v2.ObjectID object_id = 1; + neo.fs.v2.refs.ObjectID object_id = 1; // Object signature - service.v2.Signature signature =2; + neo.fs.v2.service.Signature signature =2; // Object header. Header header = 3; } @@ -98,12 +98,12 @@ message GetResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } message PutRequest { @@ -111,9 +111,9 @@ message PutRequest { // Groups initialization parameters of object placement in NeoFS. message Init { // Object ID, where available - refs.v2.ObjectID object_id = 1; + neo.fs.v2.refs.ObjectID object_id = 1; // Object signature, were available - service.v2.Signature signature =2; + neo.fs.v2.service.Signature signature =2; // Header of the object to save in the system. Header header = 3; // Number of the object copies to store within the RPC call. @@ -135,49 +135,49 @@ message PutRequest { // Carries request meta information. Header data is used only to regulate message // transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } message PutResponse { message Body { - // Carries identifier of the saved object.v2. - // It is used to access an object in the container.v2. - refs.v2.ObjectID object_id = 1; + // Carries identifier of the saved object. + // It is used to access an object in the container. + neo.fs.v2.refs.ObjectID object_id = 1; } // Body of put 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. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } message DeleteRequest { message Body { // Carries the address of the object to be deleted. - refs.v2.Address address = 1; + neo.fs.v2.refs.Address address = 1; // Carries identifier the object owner. - refs.v2.OwnerID owner_id = 2; + neo.fs.v2.refs.OwnerID owner_id = 2; } // Body of delete 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. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } // DeleteResponse is empty because we cannot guarantee permanent object removal @@ -190,18 +190,18 @@ message DeleteResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } message HeadRequest { message Body { // Address of the object with the requested header. - refs.v2.Address address = 1; + neo.fs.v2.refs.Address address = 1; // Return only minimal header subset bool main_only = 2; // Carries the raw option flag of the request. @@ -214,22 +214,22 @@ message HeadRequest { // Carries request meta information. Header data is used only to regulate message // transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } message HeadResponse { message Body { message ShortHeader { // Object format version. - service.v2.Version version = 1; + neo.fs.v2.service.Version version = 1; // Epoch when the object was created uint64 creation_epoch = 2; // Object's owner - refs.v2.OwnerID owner_id = 3; + neo.fs.v2.refs.OwnerID owner_id = 3; // Type of the object payload content ObjectType object_type = 4; // Size of payload in bytes. @@ -247,18 +247,18 @@ message HeadResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } message SearchRequest { message Body { // Carries search container identifier. - refs.v2.ContainerID container_id = 1; + neo.fs.v2.refs.ContainerID container_id = 1; message Query { uint32 version = 1; @@ -287,17 +287,17 @@ message SearchRequest { // Carries request meta information. Header data is used only to regulate message // transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } message SearchResponse { message Body { // Carries list of object identifiers that match the search query. - repeated refs.v2.ObjectID id_list = 1; + repeated neo.fs.v2.refs.ObjectID id_list = 1; } // Body of search object response message. @@ -305,12 +305,12 @@ message SearchResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } // Range groups the parameters of object payload range. @@ -325,7 +325,7 @@ message Range { message GetRangeRequest { message Body { // Address carries address of the object that contains the requested payload range. - refs.v2.Address address = 1; + neo.fs.v2.refs.Address address = 1; // Range carries the parameters of the requested payload range. Range range = 2; @@ -336,11 +336,11 @@ message GetRangeRequest { // Carries request meta information. Header data is used only to regulate message // transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } message GetRangeResponse { @@ -354,18 +354,18 @@ message GetRangeResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } message GetRangeHashRequest { message Body { // Carries address of the object that contains the requested payload range. - refs.v2.Address address = 1; + neo.fs.v2.refs.Address address = 1; // Carries the list of object payload range to calculate homomorphic hash. repeated Range ranges = 2; @@ -379,11 +379,11 @@ message GetRangeHashRequest { // Carries request meta information. Header data is used only to regulate message // transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } message GetRangeHashResponse { @@ -397,11 +397,11 @@ message GetRangeHashResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } diff --git a/object/v2/types.go b/v2/object/types.go similarity index 96% rename from object/v2/types.go rename to v2/object/types.go index 9acd3fd..7a97531 100644 --- a/object/v2/types.go +++ b/v2/object/types.go @@ -1,8 +1,8 @@ -package v2 +package object import ( - refs "github.com/nspcc-dev/neofs-api-go/refs/v2" - service "github.com/nspcc-dev/neofs-api-go/service/v2" + "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/nspcc-dev/neofs-api-go/v2/service" ) // SetKey sets key to the object attribute. diff --git a/object/v2/types.pb.go b/v2/object/types.pb.go similarity index 84% rename from object/v2/types.pb.go rename to v2/object/types.pb.go index bae2d04..0f083d3 100644 Binary files a/object/v2/types.pb.go and b/v2/object/types.pb.go differ diff --git a/object/v2/types.proto b/v2/object/types.proto similarity index 71% rename from object/v2/types.proto rename to v2/object/types.proto index 9462bc0..2881f0f 100644 --- a/object/v2/types.proto +++ b/v2/object/types.proto @@ -1,13 +1,13 @@ syntax = "proto3"; -package object.v2; +package neo.fs.v2.object; -option go_package = "github.com/nspcc-dev/neofs-api-go/object/v2"; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/object"; option csharp_namespace = "NeoFS.API.Object"; -import "refs/v2/types.proto"; -import "service/v2/meta.proto"; -import "service/v2/verify.proto"; +import "v2/refs/types.proto"; +import "v2/service/meta.proto"; +import "v2/service/verify.proto"; // Type of the object payload content enum ObjectType { @@ -21,14 +21,14 @@ enum ObjectType { message Header { // Object's container - refs.v2.ContainerID container_id = 1; + neo.fs.v2.refs.ContainerID container_id = 1; // Object's owner - refs.v2.OwnerID owner_id = 2; + neo.fs.v2.refs.OwnerID owner_id = 2; // Epoch when the object was created uint64 creation_epoch = 3; // Object format version. // Effectively the version of API library used to create particular object - service.v2.Version version = 4; + neo.fs.v2.service.Version version = 4; // Size of payload in bytes. // 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown uint64 payload_length = 5; @@ -39,7 +39,7 @@ message Header { bytes homomorphic_hash = 8; // Session token, if it was used during Object creation. // Need it to verify integrity and authenticity out of Request scope. - service.v2.SessionToken session_token = 9; + neo.fs.v2.service.SessionToken session_token = 9; // Attribute groups the user-defined Key-Value pairs attached to the object message Attribute { @@ -52,18 +52,18 @@ message Header { // Information about spawning the objects through a payload splitting. message Split { - // Identifier of the origin object.v2. - // Parent and children objects must be within the same container.v2. + // Identifier of the origin object. + // Parent and children objects must be within the same container. // Parent object_id is known only to the minor child. - refs.v2.ObjectID parent = 1; + neo.fs.v2.refs.ObjectID parent = 1; // Previous carries identifier of the left split neighbor. - refs.v2.ObjectID previous = 2; - // `signature` field of the parent object.v2. Used to reconstruct parent. - service.v2.Signature parent_signature = 3; - // `header` field of the parent object.v2. Used to reconstruct parent. + neo.fs.v2.refs.ObjectID previous = 2; + // `signature` field of the parent object. Used to reconstruct parent. + neo.fs.v2.service.Signature parent_signature = 3; + // `header` field of the parent object. Used to reconstruct parent. Header parent_header = 4; // Children carries list of identifiers of the objects generated by splitting the current. - repeated refs.v2.ObjectID children = 5; + repeated neo.fs.v2.refs.ObjectID children = 5; } // Position of the object in the split hierarchy. Split split = 11; @@ -75,9 +75,9 @@ message Object { // Object is content-addressed. It means id will change if header or payload // changes. It's calculated as a hash of header field, which contains hash of // object's payload - refs.v2.ObjectID object_id = 1; + neo.fs.v2.refs.ObjectID object_id = 1; // Signed object_id - service.v2.Signature signature = 2; + neo.fs.v2.service.Signature signature = 2; // Object metadata headers Header header = 3; // Payload bytes. diff --git a/refs/v2/marshal.go b/v2/refs/marshal.go similarity index 98% rename from refs/v2/marshal.go rename to v2/refs/marshal.go index e2abec1..3503a44 100644 --- a/refs/v2/marshal.go +++ b/v2/refs/marshal.go @@ -1,4 +1,4 @@ -package v2 +package refs import ( "encoding/binary" diff --git a/refs/v2/marshal_test.go b/v2/refs/marshal_test.go similarity index 98% rename from refs/v2/marshal_test.go rename to v2/refs/marshal_test.go index c38b3ec..7bf3d6f 100644 --- a/refs/v2/marshal_test.go +++ b/v2/refs/marshal_test.go @@ -1,4 +1,4 @@ -package v2 +package refs import ( "crypto/rand" diff --git a/refs/v2/types.go b/v2/refs/types.go similarity index 98% rename from refs/v2/types.go rename to v2/refs/types.go index 9381202..357b4da 100644 --- a/refs/v2/types.go +++ b/v2/refs/types.go @@ -1,4 +1,4 @@ -package v2 +package refs // SetValue sets container identifier in a binary format. func (m *ContainerID) SetValue(v []byte) { diff --git a/refs/v2/types.pb.go b/v2/refs/types.pb.go similarity index 90% rename from refs/v2/types.pb.go rename to v2/refs/types.pb.go index c76f97c..d5ecec6 100644 Binary files a/refs/v2/types.pb.go and b/v2/refs/types.pb.go differ diff --git a/refs/v2/types.proto b/v2/refs/types.proto similarity index 88% rename from refs/v2/types.proto rename to v2/refs/types.proto index 82049b4..eab1044 100644 --- a/refs/v2/types.proto +++ b/v2/refs/types.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package refs.v2; +package neo.fs.v2.refs; -option go_package = "github.com/nspcc-dev/neofs-api-go/refs/v2"; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/refs"; option csharp_namespace = "NeoFS.API.Refs"; // Address of object (container id + object id) @@ -25,7 +25,7 @@ message ContainerID { bytes value = 1; } -// OwnerID group information about the owner of the NeoFS container.v2. +// OwnerID group information about the owner of the NeoFS container. message OwnerID { // value carries the identifier of the container owner in a binary format. bytes value = 1; diff --git a/service/v2/meta.go b/v2/service/meta.go similarity index 97% rename from service/v2/meta.go rename to v2/service/meta.go index b9ac619..61da3fa 100644 --- a/service/v2/meta.go +++ b/v2/service/meta.go @@ -1,8 +1,8 @@ -package v2 +package service import ( - acl "github.com/nspcc-dev/neofs-api-go/acl/v2" - refs "github.com/nspcc-dev/neofs-api-go/refs/v2" + "github.com/nspcc-dev/neofs-api-go/v2/acl" + "github.com/nspcc-dev/neofs-api-go/v2/refs" ) // SetKey sets key to the X-Header. diff --git a/service/v2/meta.pb.go b/v2/service/meta.pb.go similarity index 90% rename from service/v2/meta.pb.go rename to v2/service/meta.pb.go index 34d2eb7..88d56b3 100644 Binary files a/service/v2/meta.pb.go and b/v2/service/meta.pb.go differ diff --git a/service/v2/meta.proto b/v2/service/meta.proto similarity index 89% rename from service/v2/meta.proto rename to v2/service/meta.proto index c1a4ddf..203e7ce 100644 --- a/service/v2/meta.proto +++ b/v2/service/meta.proto @@ -1,13 +1,13 @@ syntax = "proto3"; -package service.v2; +package neo.fs.v2.service; -option go_package = "github.com/nspcc-dev/neofs-api-go/service/v2"; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/service"; option csharp_namespace = "NeoFS.API.Service"; -import "acl/v2/types.proto"; -import "refs/v2/types.proto"; -import "service/v2/verify.proto"; +import "v2/acl/types.proto"; +import "v2/refs/types.proto"; +import "v2/service/verify.proto"; message XHeader { // Key of the X-Header. @@ -40,7 +40,7 @@ message SessionToken { // ID is a token identifier. valid UUIDv4 represented in bytes bytes id = 1; // OwnerID carries identifier of the session initiator. - refs.v2.OwnerID owner_id = 2; + neo.fs.v2.refs.OwnerID owner_id = 2; // Verb is an enumeration of session request types enum Verb { // Refers to object.Put RPC call @@ -67,7 +67,7 @@ message SessionToken { // Carries context of the session. oneof context { // object_address represents the object session context. - refs.v2.Address object_address = 6; + neo.fs.v2.refs.Address object_address = 6; } } // Session Token body @@ -81,9 +81,9 @@ message SessionToken { message BearerToken { message Body { // EACLTable carries table of extended ACL rules - acl.v2.EACLTable eacl_table = 1; + neo.fs.v2.acl.EACLTable eacl_table = 1; // OwnerID carries identifier of the token owner - refs.v2.OwnerID owner_id = 2; + neo.fs.v2.refs.OwnerID owner_id = 2; // Token expiration and valid time period parameters TokenLifetime lifetime = 3; } diff --git a/service/v2/verify.go b/v2/service/verify.go similarity index 99% rename from service/v2/verify.go rename to v2/service/verify.go index 8e7e2cf..c9081fd 100644 --- a/service/v2/verify.go +++ b/v2/service/verify.go @@ -1,4 +1,4 @@ -package v2 +package service // SetKey sets public key in a binary format. func (m *Signature) SetKey(v []byte) { diff --git a/service/v2/verify.pb.go b/v2/service/verify.pb.go similarity index 90% rename from service/v2/verify.pb.go rename to v2/service/verify.pb.go index 6f1cd42..34913d7 100644 Binary files a/service/v2/verify.pb.go and b/v2/service/verify.pb.go differ diff --git a/service/v2/verify.proto b/v2/service/verify.proto similarity index 88% rename from service/v2/verify.proto rename to v2/service/verify.proto index 2933896..0b9b87c 100644 --- a/service/v2/verify.proto +++ b/v2/service/verify.proto @@ -1,13 +1,10 @@ syntax = "proto3"; -package service.v2; +package neo.fs.v2.service; -option go_package = "github.com/nspcc-dev/neofs-api-go/service/v2"; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/service"; option csharp_namespace = "NeoFS.API.Service"; -import "acl/v2/types.proto"; -import "refs/v2/types.proto"; - // Signature of something in NeoFS message Signature { // Public key used for signing. diff --git a/session/v2/service.go b/v2/session/service.go similarity index 92% rename from session/v2/service.go rename to v2/session/service.go index 3c1b812..41a050d 100644 --- a/session/v2/service.go +++ b/v2/session/service.go @@ -1,8 +1,8 @@ -package v2 +package session import ( - refs "github.com/nspcc-dev/neofs-api-go/refs/v2" - service "github.com/nspcc-dev/neofs-api-go/service/v2" + "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/nspcc-dev/neofs-api-go/v2/service" ) // SetOwnerId sets identifier of the session initiator. diff --git a/session/v2/service.pb.go b/v2/session/service.pb.go similarity index 83% rename from session/v2/service.pb.go rename to v2/session/service.pb.go index 9d5d8af..7759f67 100644 Binary files a/session/v2/service.pb.go and b/v2/session/service.pb.go differ diff --git a/session/v2/service.proto b/v2/session/service.proto similarity index 70% rename from session/v2/service.proto rename to v2/session/service.proto index c980dcf..39650cf 100644 --- a/session/v2/service.proto +++ b/v2/session/service.proto @@ -1,27 +1,26 @@ syntax = "proto3"; -package session.v2; - -option go_package = "github.com/nspcc-dev/neofs-api-go/session/v2"; +package neo.fs.v2.session; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/session"; option csharp_namespace = "NeoFS.API.Session"; -import "refs/v2/types.proto"; -import "service/v2/meta.proto"; -import "service/v2/verify.proto"; +import "v2/refs/types.proto"; +import "v2/service/meta.proto"; +import "v2/service/verify.proto"; service Session { // Create opens new session between the client and the server. rpc Create (CreateRequest) returns (CreateResponse); } -// CreateRequest carries an information necessary for opening a session.v2. +// CreateRequest carries an information necessary for opening a session. message CreateRequest { message Body { // Carries an identifier of a session initiator. - refs.v2.OwnerID owner_id = 1; + neo.fs.v2.refs.OwnerID owner_id = 1; - // Carries a lifetime of the session.v2. - service.v2.TokenLifetime lifetime = 2; + // Carries a lifetime of the session. + neo.fs.v2.service.TokenLifetime lifetime = 2; } // Body of create session token request message. @@ -29,14 +28,14 @@ message CreateRequest { // Carries request meta information. Header data is used only to regulate message // transport and does not affect request execution. - service.v2.RequestMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.RequestVerificationHeader verify_header = 3; + neo.fs.v2.service.RequestVerificationHeader verify_header = 3; } -// CreateResponse carries an information about the opened session.v2. +// CreateResponse carries an information about the opened session. message CreateResponse { message Body { // id carries an identifier of session token. @@ -51,10 +50,10 @@ message CreateResponse { // Carries response meta information. Header data is used only to regulate // message transport and does not affect request execution. - service.v2.ResponseMetaHeader meta_header = 2; + neo.fs.v2.service.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. - service.v2.ResponseVerificationHeader verify_header = 3; + neo.fs.v2.service.ResponseVerificationHeader verify_header = 3; } diff --git a/storagegroup/v2/types.go b/v2/storagegroup/types.go similarity index 91% rename from storagegroup/v2/types.go rename to v2/storagegroup/types.go index a46acfb..5f4bd37 100644 --- a/storagegroup/v2/types.go +++ b/v2/storagegroup/types.go @@ -1,7 +1,7 @@ -package v2 +package storagegroup import ( - refs "github.com/nspcc-dev/neofs-api-go/refs/v2" + "github.com/nspcc-dev/neofs-api-go/v2/refs" ) // SetValidationDataSize sets the total size of the payloads of the storage group. diff --git a/storagegroup/v2/types.pb.go b/v2/storagegroup/types.pb.go similarity index 80% rename from storagegroup/v2/types.pb.go rename to v2/storagegroup/types.pb.go index e099149..e206d31 100644 Binary files a/storagegroup/v2/types.pb.go and b/v2/storagegroup/types.pb.go differ diff --git a/storagegroup/v2/types.proto b/v2/storagegroup/types.proto similarity index 82% rename from storagegroup/v2/types.proto rename to v2/storagegroup/types.proto index 3d89a67..5086621 100644 --- a/storagegroup/v2/types.proto +++ b/v2/storagegroup/types.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package storagegroup.v2; +package neo.fs.v2.storagegroup; -option go_package = "github.com/nspcc-dev/neofs-api-go/storagegroup/v2"; +option go_package = "github.com/nspcc-dev/neofs-api-go/v2/storagegroup"; option csharp_namespace = "NeoFS.API.StorageGroup"; -import "refs/v2/types.proto"; +import "v2/refs/types.proto"; // StorageGroup groups the information about the NeoFS storage group. // The storage group consists of objects from single container. @@ -26,5 +26,5 @@ message StorageGroup { // Members carries the list of identifiers of the object storage group members. // The list is strictly ordered. - repeated refs.v2.ObjectID members = 4; + repeated neo.fs.v2.refs.ObjectID members = 4; }