Move api-v2 files into v2 subdir

This subdir contains generated proto files
and small wrappers.
This commit is contained in:
Alex Vanin 2020-08-13 15:43:47 +03:00 committed by Stanislav Bogatyrev
parent 0ee1c3653d
commit 1f143e54bd
48 changed files with 213 additions and 255 deletions

View file

@ -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()
}

View file

@ -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()
}

View file

@ -1,8 +1,8 @@
package v2 package accounting
import ( import (
refs "github.com/nspcc-dev/neofs-api-go/refs/v2" "github.com/nspcc-dev/neofs-api-go/v2/refs"
service "github.com/nspcc-dev/neofs-api-go/service/v2" "github.com/nspcc-dev/neofs-api-go/v2/service"
) )
// SetValue sets value of the decimal number. // SetValue sets value of the decimal number.

View file

@ -1,13 +1,13 @@
syntax = "proto3"; 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"; option csharp_namespace = "NeoFS.API.Accounting";
import "refs/v2/types.proto"; import "v2/refs/types.proto";
import "service/v2/meta.proto"; import "v2/service/meta.proto";
import "service/v2/verify.proto"; import "v2/service/verify.proto";
// The service provides methods for obtaining information // The service provides methods for obtaining information
// about the account balance in NeoFS system. // about the account balance in NeoFS system.
@ -27,7 +27,7 @@ message BalanceRequest {
message Body { message Body {
// Carries user identifier in NeoFS system for which the balance // Carries user identifier in NeoFS system for which the balance
// is requested. // is requested.
refs.v2.OwnerID owner_id = 1; neo.fs.v2.refs.OwnerID owner_id = 1;
} }
// Body of the balance request message. // Body of the balance request message.
@ -35,12 +35,12 @@ message BalanceRequest {
// Carries request meta information. Header data is used only to regulate // Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.RequestVerificationHeader verify_header = 3; neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
} }
// Decimal represents the decimal numbers. // Decimal represents the decimal numbers.
@ -66,10 +66,10 @@ message BalanceResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }

View file

@ -1,7 +1,7 @@
package v2 package acl
import ( 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. // SetContainerId sets container identifier of the eACL table.

View file

@ -1,18 +1,18 @@
syntax = "proto3"; 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"; 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. // Target of the access control rule in access control list.
enum Target { enum Target {
// Unknown target, default value. // Unknown target, default value.
UNKNOWN = 0; 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; USER = 1;
// System target rule is applied if sender is the storage node within the // 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. // TargetInfo groups information about extended ACL target.
message TargetInfo { message TargetInfo {
// target carries target of ACL rule. // 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. // key_list carries public keys of ACL target.
repeated bytes key_list = 2 [json_name="Keys"]; repeated bytes key_list = 2 [json_name="Keys"];
@ -99,7 +99,7 @@ message EACLRecord {
message EACLTable { message EACLTable {
// Carries identifier of the container that should use given // Carries identifier of the container that should use given
// access control rules. // 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. // Records carries list of extended ACL rule records.
repeated EACLRecord records = 2 [json_name="Records"]; repeated EACLRecord records = 2 [json_name="Records"];

View file

@ -1,4 +1,4 @@
package v2 package container
import ( import (
"encoding/binary" "encoding/binary"

View file

@ -1,10 +1,10 @@
package v2 package container
import ( import (
"testing" "testing"
netmap "github.com/nspcc-dev/neofs-api-go/netmap/v2" "github.com/nspcc-dev/neofs-api-go/v2/netmap"
refs "github.com/nspcc-dev/neofs-api-go/refs/v2" "github.com/nspcc-dev/neofs-api-go/v2/refs"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

View file

@ -1,9 +1,9 @@
package v2 package container
import ( import (
acl "github.com/nspcc-dev/neofs-api-go/acl/v2" "github.com/nspcc-dev/neofs-api-go/v2/acl"
refs "github.com/nspcc-dev/neofs-api-go/refs/v2" "github.com/nspcc-dev/neofs-api-go/v2/refs"
service "github.com/nspcc-dev/neofs-api-go/service/v2" "github.com/nspcc-dev/neofs-api-go/v2/service"
) )
// SetContainer sets container of the request. // SetContainer sets container of the request.

View file

@ -1,15 +1,15 @@
syntax = "proto3"; 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"; option csharp_namespace = "NeoFS.API.Container";
import "acl/v2/types.proto"; import "v2/acl/types.proto";
import "container/v2/types.proto"; import "v2/container/types.proto";
import "refs/v2/types.proto"; import "v2/refs/types.proto";
import "service/v2/meta.proto"; import "v2/service/meta.proto";
import "service/v2/verify.proto"; import "v2/service/verify.proto";
// Service provides API to access container smart-contract in morph chain // Service provides API to access container smart-contract in morph chain
// via NeoFS node. // via NeoFS node.
@ -46,7 +46,7 @@ service Service {
message PutRequest { message PutRequest {
message Body { message Body {
// Container to create in NeoFS. // 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 // 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. // 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 // Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.RequestVerificationHeader verify_header = 3; neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
} }
message PutResponse { message PutResponse {
message Body { message Body {
// container_id carries identifier of the new container.v2. // container_id carries identifier of the new container.
refs.v2.ContainerID container_id = 1; neo.fs.v2.refs.ContainerID container_id = 1;
} }
// Body of container put response message. // Body of container put response message.
@ -80,19 +80,19 @@ message PutResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }
message DeleteRequest { message DeleteRequest {
message Body { message Body {
// container_id carries identifier of the container to delete // container_id carries identifier of the container to delete
// from NeoFS. // from NeoFS.
refs.v2.ContainerID container_id = 1; neo.fs.v2.refs.ContainerID container_id = 1;
// Signature of container id according to RFC-6979. // Signature of container id according to RFC-6979.
bytes signature = 2; bytes signature = 2;
@ -103,12 +103,12 @@ message DeleteRequest {
// Carries request meta information. Header data is used only to regulate // Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // 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 // 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 // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }
message GetRequest { message GetRequest {
message Body { message Body {
// container_id carries identifier of the container to get. // 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. // Body of container get request message.
@ -140,18 +140,18 @@ message GetRequest {
// Carries request meta information. Header data is used only to regulate // Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.RequestVerificationHeader verify_header = 3; neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
} }
message GetResponse { message GetResponse {
message Body { message Body {
// Container that has been requested. // Container that has been requested.
container.v2.Container container = 1; neo.fs.v2.container.Container container = 1;
} }
// Body of container get response message. // Body of container get response message.
@ -159,18 +159,18 @@ message GetResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }
message ListRequest { message ListRequest {
message Body { message Body {
// owner_id carries identifier of the container owner. // 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. // Body of list containers request message.
@ -178,18 +178,18 @@ message ListRequest {
// Carries request meta information. Header data is used only to regulate // Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.RequestVerificationHeader verify_header = 3; neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
} }
message ListResponse { message ListResponse {
message Body { message Body {
// ContainerIDs carries list of identifiers of the containers that belong to the owner. // 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. // Body of list containers response message.
@ -197,18 +197,18 @@ message ListResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }
message SetExtendedACLRequest { message SetExtendedACLRequest {
message Body { message Body {
// Extended ACL to set for the container.v2. // Extended ACL to set for the container.
acl.v2.EACLTable eacl = 1; neo.fs.v2.acl.EACLTable eacl = 1;
// Signature of stable-marshalled Extended ACL according to RFC-6979. // Signature of stable-marshalled Extended ACL according to RFC-6979.
bytes signature = 2; bytes signature = 2;
@ -219,12 +219,12 @@ message SetExtendedACLRequest {
// Carries request meta information. Header data is used only to regulate // Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.RequestVerificationHeader verify_header = 3; neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
} }
message SetExtendedACLResponse { message SetExtendedACLResponse {
@ -235,18 +235,18 @@ message SetExtendedACLResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }
message GetExtendedACLRequest { message GetExtendedACLRequest {
message Body { message Body {
// container_id carries identifier of the container that has Extended ACL. // 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. // Body of get extended acl request message.
@ -254,18 +254,18 @@ message GetExtendedACLRequest {
// Carries request meta information. Header data is used only to regulate // Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.RequestVerificationHeader verify_header = 3; neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
} }
message GetExtendedACLResponse { message GetExtendedACLResponse {
message Body { message Body {
// Extended ACL that has been requested if it was set up. // 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. // Signature of stable-marshalled Extended ACL according to RFC-6979.
bytes signature = 2; bytes signature = 2;
@ -276,10 +276,10 @@ message GetExtendedACLResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }

View file

@ -1,4 +1,4 @@
package v2 package container
func (m *Container) ReadSignedData(buf []byte) ([]byte, error) { func (m *Container) ReadSignedData(buf []byte) ([]byte, error) {
return m.StableMarshal(buf) return m.StableMarshal(buf)

View file

@ -1,8 +1,8 @@
package v2 package container
import ( import (
netmap "github.com/nspcc-dev/neofs-api-go/netmap/v2" "github.com/nspcc-dev/neofs-api-go/v2/netmap"
refs "github.com/nspcc-dev/neofs-api-go/refs/v2" "github.com/nspcc-dev/neofs-api-go/v2/refs"
) )
// SetKey sets key to the container attribute. // SetKey sets key to the container attribute.

View file

@ -1,12 +1,12 @@
syntax = "proto3"; 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"; option csharp_namespace = "NeoFS.API.Container";
import "netmap/v2/types.proto"; import "v2/netmap/types.proto";
import "refs/v2/types.proto"; import "v2/refs/types.proto";
// Container is a structure that defines object placement behaviour. Objects // Container is a structure that defines object placement behaviour. Objects
// can be stored only within containers. They define placement rule, attributes // 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. // SHA256 hash of stable-marshalled container message.
message Container { message Container {
// OwnerID carries identifier of the container owner. // 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. // Nonce is a 16 byte UUID, used to avoid collisions of container id.
bytes nonce = 2; bytes nonce = 2;
@ -32,9 +32,9 @@ message Container {
string value = 2; string value = 2;
} }
// Attributes define any immutable characteristics of container.v2. // Attributes define any immutable characteristics of container.
repeated Attribute attributes = 4; repeated Attribute attributes = 4;
// Rules define storage policy for the object inside the container.v2. // Rules define storage policy for the object inside the container.
netmap.v2.PlacementRule rules = 5; neo.fs.v2.netmap.PlacementRule rules = 5;
} }

View file

@ -1,4 +1,4 @@
package v2 package netmap
import ( import (
"encoding/binary" "encoding/binary"

View file

@ -1,4 +1,4 @@
package v2 package netmap
// SetOp sets operation of the simple filter. // SetOp sets operation of the simple filter.
func (m *PlacementRule_SFGroup_Filter_SimpleFilter) SetOp(v PlacementRule_SFGroup_Filter_SimpleFilter_Operation) { func (m *PlacementRule_SFGroup_Filter_SimpleFilter) SetOp(v PlacementRule_SFGroup_Filter_SimpleFilter_Operation) {

View file

@ -1,8 +1,8 @@
syntax = "proto3"; 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"; option csharp_namespace = "NeoFS.API.Netmap";
message PlacementRule { message PlacementRule {

View file

@ -1,8 +1,8 @@
package v2 package object
import ( import (
refs "github.com/nspcc-dev/neofs-api-go/refs/v2" "github.com/nspcc-dev/neofs-api-go/v2/refs"
service "github.com/nspcc-dev/neofs-api-go/service/v2" "github.com/nspcc-dev/neofs-api-go/v2/service"
) )
// SetAddress sets address of the requested object. // SetAddress sets address of the requested object.

View file

@ -1,25 +1,25 @@
syntax = "proto3"; 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"; option csharp_namespace = "NeoFS.API.Object";
import "object/v2/types.proto"; import "v2/object/types.proto";
import "refs/v2/types.proto"; import "v2/refs/types.proto";
import "service/v2/meta.proto"; import "v2/service/meta.proto";
import "service/v2/verify.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 { 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 // message carry object of requested address. Chunk messages are parts of
// the object's payload if it is needed. All messages except first carry // the object's payload if it is needed. All messages except first carry
// chunks. Requested object can be restored by concatenation of object // chunks. Requested object can be restored by concatenation of object
// message payload and all chunks keeping receiving order. // message payload and all chunks keeping receiving order.
rpc Get(GetRequest) returns (stream GetResponse); 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 // SHOULD BE type of PutHeader. Container id and Owner id of object SHOULD
// BE set. Session token SHOULD BE obtained before put operation (see // BE set. Session token SHOULD BE obtained before put operation (see
// session package). Chunk messages considered by server as part of object // session package). Chunk messages considered by server as part of object
@ -35,7 +35,7 @@ service Service {
// headers are also present. // headers are also present.
rpc Head(HeadRequest) returns (HeadResponse); 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 // set to 1. Search query represented in serialized format (see query
// package). // package).
rpc Search(SearchRequest) returns (stream SearchResponse); rpc Search(SearchRequest) returns (stream SearchResponse);
@ -54,8 +54,8 @@ service Service {
message GetRequest { message GetRequest {
message Body { message Body {
// Address of the requested object.v2. // Address of the requested object.
refs.v2.Address address = 1; neo.fs.v2.refs.Address address = 1;
// Carries the raw option flag of the request. // Carries the raw option flag of the request.
// Raw request is sent to receive only the objects // 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 // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // 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 GetResponse {
@ -79,9 +79,9 @@ message GetResponse {
// Initialization parameters of the object got from NeoFS. // Initialization parameters of the object got from NeoFS.
message Init { message Init {
// Object ID // Object ID
refs.v2.ObjectID object_id = 1; neo.fs.v2.refs.ObjectID object_id = 1;
// Object signature // Object signature
service.v2.Signature signature =2; neo.fs.v2.service.Signature signature =2;
// Object header. // Object header.
Header header = 3; Header header = 3;
} }
@ -98,12 +98,12 @@ message GetResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }
message PutRequest { message PutRequest {
@ -111,9 +111,9 @@ message PutRequest {
// Groups initialization parameters of object placement in NeoFS. // Groups initialization parameters of object placement in NeoFS.
message Init { message Init {
// Object ID, where available // Object ID, where available
refs.v2.ObjectID object_id = 1; neo.fs.v2.refs.ObjectID object_id = 1;
// Object signature, were available // 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 of the object to save in the system.
Header header = 3; Header header = 3;
// Number of the object copies to store within the RPC call. // 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 // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // 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 PutResponse {
message Body { message Body {
// Carries identifier of the saved object.v2. // Carries identifier of the saved object.
// It is used to access an object in the container.v2. // It is used to access an object in the container.
refs.v2.ObjectID object_id = 1; neo.fs.v2.refs.ObjectID object_id = 1;
} }
// Body of put object response message. // Body of put object response message.
Body body = 1; Body body = 1;
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }
message DeleteRequest { message DeleteRequest {
message Body { message Body {
// Carries the address of the object to be deleted. // 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. // 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 of delete object request message.
Body body = 1; Body body = 1;
// Carries request meta information. Header data is used only to regulate message // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // 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 // 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 // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }
message HeadRequest { message HeadRequest {
message Body { message Body {
// Address of the object with the requested header. // 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 // Return only minimal header subset
bool main_only = 2; bool main_only = 2;
// Carries the raw option flag of the request. // 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 // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // 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 HeadResponse {
message Body { message Body {
message ShortHeader { message ShortHeader {
// Object format version. // Object format version.
service.v2.Version version = 1; neo.fs.v2.service.Version version = 1;
// Epoch when the object was created // Epoch when the object was created
uint64 creation_epoch = 2; uint64 creation_epoch = 2;
// Object's owner // Object's owner
refs.v2.OwnerID owner_id = 3; neo.fs.v2.refs.OwnerID owner_id = 3;
// Type of the object payload content // Type of the object payload content
ObjectType object_type = 4; ObjectType object_type = 4;
// Size of payload in bytes. // Size of payload in bytes.
@ -247,18 +247,18 @@ message HeadResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }
message SearchRequest { message SearchRequest {
message Body { message Body {
// Carries search container identifier. // Carries search container identifier.
refs.v2.ContainerID container_id = 1; neo.fs.v2.refs.ContainerID container_id = 1;
message Query { message Query {
uint32 version = 1; uint32 version = 1;
@ -287,17 +287,17 @@ message SearchRequest {
// Carries request meta information. Header data is used only to regulate message // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // 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 SearchResponse {
message Body { message Body {
// Carries list of object identifiers that match the search query. // 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. // Body of search object response message.
@ -305,12 +305,12 @@ message SearchResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }
// Range groups the parameters of object payload range. // Range groups the parameters of object payload range.
@ -325,7 +325,7 @@ message Range {
message GetRangeRequest { message GetRangeRequest {
message Body { message Body {
// Address carries address of the object that contains the requested payload range. // 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 carries the parameters of the requested payload range.
Range range = 2; Range range = 2;
@ -336,11 +336,11 @@ message GetRangeRequest {
// Carries request meta information. Header data is used only to regulate message // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // 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 { message GetRangeResponse {
@ -354,18 +354,18 @@ message GetRangeResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }
message GetRangeHashRequest { message GetRangeHashRequest {
message Body { message Body {
// Carries address of the object that contains the requested payload range. // 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. // Carries the list of object payload range to calculate homomorphic hash.
repeated Range ranges = 2; repeated Range ranges = 2;
@ -379,11 +379,11 @@ message GetRangeHashRequest {
// Carries request meta information. Header data is used only to regulate message // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // 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 { message GetRangeHashResponse {
@ -397,11 +397,11 @@ message GetRangeHashResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }

View file

@ -1,8 +1,8 @@
package v2 package object
import ( import (
refs "github.com/nspcc-dev/neofs-api-go/refs/v2" "github.com/nspcc-dev/neofs-api-go/v2/refs"
service "github.com/nspcc-dev/neofs-api-go/service/v2" "github.com/nspcc-dev/neofs-api-go/v2/service"
) )
// SetKey sets key to the object attribute. // SetKey sets key to the object attribute.

View file

@ -1,13 +1,13 @@
syntax = "proto3"; 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"; option csharp_namespace = "NeoFS.API.Object";
import "refs/v2/types.proto"; import "v2/refs/types.proto";
import "service/v2/meta.proto"; import "v2/service/meta.proto";
import "service/v2/verify.proto"; import "v2/service/verify.proto";
// Type of the object payload content // Type of the object payload content
enum ObjectType { enum ObjectType {
@ -21,14 +21,14 @@ enum ObjectType {
message Header { message Header {
// Object's container // Object's container
refs.v2.ContainerID container_id = 1; neo.fs.v2.refs.ContainerID container_id = 1;
// Object's owner // Object's owner
refs.v2.OwnerID owner_id = 2; neo.fs.v2.refs.OwnerID owner_id = 2;
// Epoch when the object was created // Epoch when the object was created
uint64 creation_epoch = 3; uint64 creation_epoch = 3;
// Object format version. // Object format version.
// Effectively the version of API library used to create particular object // 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. // Size of payload in bytes.
// 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown // 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown
uint64 payload_length = 5; uint64 payload_length = 5;
@ -39,7 +39,7 @@ message Header {
bytes homomorphic_hash = 8; bytes homomorphic_hash = 8;
// Session token, if it was used during Object creation. // Session token, if it was used during Object creation.
// Need it to verify integrity and authenticity out of Request scope. // 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 // Attribute groups the user-defined Key-Value pairs attached to the object
message Attribute { message Attribute {
@ -52,18 +52,18 @@ message Header {
// Information about spawning the objects through a payload splitting. // Information about spawning the objects through a payload splitting.
message Split { message Split {
// Identifier of the origin object.v2. // Identifier of the origin object.
// Parent and children objects must be within the same container.v2. // Parent and children objects must be within the same container.
// Parent object_id is known only to the minor child. // 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. // Previous carries identifier of the left split neighbor.
refs.v2.ObjectID previous = 2; neo.fs.v2.refs.ObjectID previous = 2;
// `signature` field of the parent object.v2. Used to reconstruct parent. // `signature` field of the parent object. Used to reconstruct parent.
service.v2.Signature parent_signature = 3; neo.fs.v2.service.Signature parent_signature = 3;
// `header` field of the parent object.v2. Used to reconstruct parent. // `header` field of the parent object. Used to reconstruct parent.
Header parent_header = 4; Header parent_header = 4;
// Children carries list of identifiers of the objects generated by splitting the current. // 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. // Position of the object in the split hierarchy.
Split split = 11; Split split = 11;
@ -75,9 +75,9 @@ message Object {
// Object is content-addressed. It means id will change if header or payload // 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 // changes. It's calculated as a hash of header field, which contains hash of
// object's payload // object's payload
refs.v2.ObjectID object_id = 1; neo.fs.v2.refs.ObjectID object_id = 1;
// Signed object_id // Signed object_id
service.v2.Signature signature = 2; neo.fs.v2.service.Signature signature = 2;
// Object metadata headers // Object metadata headers
Header header = 3; Header header = 3;
// Payload bytes. // Payload bytes.

View file

@ -1,4 +1,4 @@
package v2 package refs
import ( import (
"encoding/binary" "encoding/binary"

View file

@ -1,4 +1,4 @@
package v2 package refs
import ( import (
"crypto/rand" "crypto/rand"

View file

@ -1,4 +1,4 @@
package v2 package refs
// SetValue sets container identifier in a binary format. // SetValue sets container identifier in a binary format.
func (m *ContainerID) SetValue(v []byte) { func (m *ContainerID) SetValue(v []byte) {

View file

@ -1,8 +1,8 @@
syntax = "proto3"; 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"; option csharp_namespace = "NeoFS.API.Refs";
// Address of object (container id + object id) // Address of object (container id + object id)
@ -25,7 +25,7 @@ message ContainerID {
bytes value = 1; 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 { message OwnerID {
// value carries the identifier of the container owner in a binary format. // value carries the identifier of the container owner in a binary format.
bytes value = 1; bytes value = 1;

View file

@ -1,8 +1,8 @@
package v2 package service
import ( import (
acl "github.com/nspcc-dev/neofs-api-go/acl/v2" "github.com/nspcc-dev/neofs-api-go/v2/acl"
refs "github.com/nspcc-dev/neofs-api-go/refs/v2" "github.com/nspcc-dev/neofs-api-go/v2/refs"
) )
// SetKey sets key to the X-Header. // SetKey sets key to the X-Header.

View file

@ -1,13 +1,13 @@
syntax = "proto3"; 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"; option csharp_namespace = "NeoFS.API.Service";
import "acl/v2/types.proto"; import "v2/acl/types.proto";
import "refs/v2/types.proto"; import "v2/refs/types.proto";
import "service/v2/verify.proto"; import "v2/service/verify.proto";
message XHeader { message XHeader {
// Key of the X-Header. // Key of the X-Header.
@ -40,7 +40,7 @@ message SessionToken {
// ID is a token identifier. valid UUIDv4 represented in bytes // ID is a token identifier. valid UUIDv4 represented in bytes
bytes id = 1; bytes id = 1;
// OwnerID carries identifier of the session initiator. // 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 // Verb is an enumeration of session request types
enum Verb { enum Verb {
// Refers to object.Put RPC call // Refers to object.Put RPC call
@ -67,7 +67,7 @@ message SessionToken {
// Carries context of the session. // Carries context of the session.
oneof context { oneof context {
// object_address represents the object session 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 // Session Token body
@ -81,9 +81,9 @@ message SessionToken {
message BearerToken { message BearerToken {
message Body { message Body {
// EACLTable carries table of extended ACL rules // 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 // 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 // Token expiration and valid time period parameters
TokenLifetime lifetime = 3; TokenLifetime lifetime = 3;
} }

View file

@ -1,4 +1,4 @@
package v2 package service
// SetKey sets public key in a binary format. // SetKey sets public key in a binary format.
func (m *Signature) SetKey(v []byte) { func (m *Signature) SetKey(v []byte) {

View file

@ -1,13 +1,10 @@
syntax = "proto3"; 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"; option csharp_namespace = "NeoFS.API.Service";
import "acl/v2/types.proto";
import "refs/v2/types.proto";
// Signature of something in NeoFS // Signature of something in NeoFS
message Signature { message Signature {
// Public key used for signing. // Public key used for signing.

View file

@ -1,8 +1,8 @@
package v2 package session
import ( import (
refs "github.com/nspcc-dev/neofs-api-go/refs/v2" "github.com/nspcc-dev/neofs-api-go/v2/refs"
service "github.com/nspcc-dev/neofs-api-go/service/v2" "github.com/nspcc-dev/neofs-api-go/v2/service"
) )
// SetOwnerId sets identifier of the session initiator. // SetOwnerId sets identifier of the session initiator.

View file

@ -1,27 +1,26 @@
syntax = "proto3"; syntax = "proto3";
package session.v2; package neo.fs.v2.session;
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/session";
option go_package = "github.com/nspcc-dev/neofs-api-go/session/v2";
option csharp_namespace = "NeoFS.API.Session"; option csharp_namespace = "NeoFS.API.Session";
import "refs/v2/types.proto"; import "v2/refs/types.proto";
import "service/v2/meta.proto"; import "v2/service/meta.proto";
import "service/v2/verify.proto"; import "v2/service/verify.proto";
service Session { service Session {
// Create opens new session between the client and the server. // Create opens new session between the client and the server.
rpc Create (CreateRequest) returns (CreateResponse); 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 CreateRequest {
message Body { message Body {
// Carries an identifier of a session initiator. // 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. // Carries a lifetime of the session.
service.v2.TokenLifetime lifetime = 2; neo.fs.v2.service.TokenLifetime lifetime = 2;
} }
// Body of create session token request message. // 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 // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // 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 CreateResponse {
message Body { message Body {
// id carries an identifier of session token. // id carries an identifier of session token.
@ -51,10 +50,10 @@ message CreateResponse {
// Carries response meta information. Header data is used only to regulate // Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution. // 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 // Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness // authenticate the nodes of the message route and check the correctness
// of transmission. // of transmission.
service.v2.ResponseVerificationHeader verify_header = 3; neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
} }

View file

@ -1,7 +1,7 @@
package v2 package storagegroup
import ( 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. // SetValidationDataSize sets the total size of the payloads of the storage group.

View file

@ -1,11 +1,11 @@
syntax = "proto3"; 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"; 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. // StorageGroup groups the information about the NeoFS storage group.
// The storage group consists of objects from single container. // 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. // Members carries the list of identifiers of the object storage group members.
// The list is strictly ordered. // The list is strictly ordered.
repeated refs.v2.ObjectID members = 4; repeated neo.fs.v2.refs.ObjectID members = 4;
} }