[#317] api: Revert easyproto marshaler usage

It has caused a noticeable degradation in node.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-12-26 10:03:55 +03:00
parent bab4d5a692
commit 328d214d2d
Signed by: fyrchik
SSH key fingerprint: SHA256:m/TTwCzjnRkXgnzEx9X92ccxy1CcVeinOgDb3NPWWmg
110 changed files with 47773 additions and 37555 deletions

606
api/session/grpc/service.pb.go generated Normal file
View file

@ -0,0 +1,606 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.1
// protoc v5.29.2
// source: api/session/grpc/service.proto
//go:build !protoopaque
package session
import (
grpc "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/refs/grpc"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Information necessary for opening a session.
type CreateRequest struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// Body of a create session token request message.
Body *CreateRequest_Body `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"`
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
MetaHeader *RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader" json:"meta_header,omitempty"`
// Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
VerifyHeader *RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader" json:"verify_header,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateRequest) Reset() {
*x = CreateRequest{}
mi := &file_api_session_grpc_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateRequest) ProtoMessage() {}
func (x *CreateRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_session_grpc_service_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *CreateRequest) GetBody() *CreateRequest_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *CreateRequest) GetMetaHeader() *RequestMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *CreateRequest) GetVerifyHeader() *RequestVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *CreateRequest) SetBody(v *CreateRequest_Body) {
x.Body = v
}
func (x *CreateRequest) SetMetaHeader(v *RequestMetaHeader) {
x.MetaHeader = v
}
func (x *CreateRequest) SetVerifyHeader(v *RequestVerificationHeader) {
x.VerifyHeader = v
}
func (x *CreateRequest) HasBody() bool {
if x == nil {
return false
}
return x.Body != nil
}
func (x *CreateRequest) HasMetaHeader() bool {
if x == nil {
return false
}
return x.MetaHeader != nil
}
func (x *CreateRequest) HasVerifyHeader() bool {
if x == nil {
return false
}
return x.VerifyHeader != nil
}
func (x *CreateRequest) ClearBody() {
x.Body = nil
}
func (x *CreateRequest) ClearMetaHeader() {
x.MetaHeader = nil
}
func (x *CreateRequest) ClearVerifyHeader() {
x.VerifyHeader = nil
}
type CreateRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Body of a create session token request message.
Body *CreateRequest_Body
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
MetaHeader *RequestMetaHeader
// Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
VerifyHeader *RequestVerificationHeader
}
func (b0 CreateRequest_builder) Build() *CreateRequest {
m0 := &CreateRequest{}
b, x := &b0, m0
_, _ = b, x
x.Body = b.Body
x.MetaHeader = b.MetaHeader
x.VerifyHeader = b.VerifyHeader
return m0
}
// Information about the opened session.
type CreateResponse struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// Body of create session token response message.
Body *CreateResponse_Body `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"`
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
MetaHeader *ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader" json:"meta_header,omitempty"`
// Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
VerifyHeader *ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader" json:"verify_header,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateResponse) Reset() {
*x = CreateResponse{}
mi := &file_api_session_grpc_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateResponse) ProtoMessage() {}
func (x *CreateResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_session_grpc_service_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *CreateResponse) GetBody() *CreateResponse_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *CreateResponse) GetMetaHeader() *ResponseMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *CreateResponse) GetVerifyHeader() *ResponseVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *CreateResponse) SetBody(v *CreateResponse_Body) {
x.Body = v
}
func (x *CreateResponse) SetMetaHeader(v *ResponseMetaHeader) {
x.MetaHeader = v
}
func (x *CreateResponse) SetVerifyHeader(v *ResponseVerificationHeader) {
x.VerifyHeader = v
}
func (x *CreateResponse) HasBody() bool {
if x == nil {
return false
}
return x.Body != nil
}
func (x *CreateResponse) HasMetaHeader() bool {
if x == nil {
return false
}
return x.MetaHeader != nil
}
func (x *CreateResponse) HasVerifyHeader() bool {
if x == nil {
return false
}
return x.VerifyHeader != nil
}
func (x *CreateResponse) ClearBody() {
x.Body = nil
}
func (x *CreateResponse) ClearMetaHeader() {
x.MetaHeader = nil
}
func (x *CreateResponse) ClearVerifyHeader() {
x.VerifyHeader = nil
}
type CreateResponse_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Body of create session token response message.
Body *CreateResponse_Body
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
MetaHeader *ResponseMetaHeader
// Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
VerifyHeader *ResponseVerificationHeader
}
func (b0 CreateResponse_builder) Build() *CreateResponse {
m0 := &CreateResponse{}
b, x := &b0, m0
_, _ = b, x
x.Body = b.Body
x.MetaHeader = b.MetaHeader
x.VerifyHeader = b.VerifyHeader
return m0
}
// Session creation request body
type CreateRequest_Body struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// Session initiating user's or node's key derived `OwnerID`
OwnerId *grpc.OwnerID `protobuf:"bytes,1,opt,name=owner_id,json=ownerId" json:"owner_id,omitempty"`
// Session expiration `Epoch`
Expiration *uint64 `protobuf:"varint,2,opt,name=expiration" json:"expiration,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateRequest_Body) Reset() {
*x = CreateRequest_Body{}
mi := &file_api_session_grpc_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateRequest_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateRequest_Body) ProtoMessage() {}
func (x *CreateRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_api_session_grpc_service_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *CreateRequest_Body) GetOwnerId() *grpc.OwnerID {
if x != nil {
return x.OwnerId
}
return nil
}
func (x *CreateRequest_Body) GetExpiration() uint64 {
if x != nil && x.Expiration != nil {
return *x.Expiration
}
return 0
}
func (x *CreateRequest_Body) SetOwnerId(v *grpc.OwnerID) {
x.OwnerId = v
}
func (x *CreateRequest_Body) SetExpiration(v uint64) {
x.Expiration = &v
}
func (x *CreateRequest_Body) HasOwnerId() bool {
if x == nil {
return false
}
return x.OwnerId != nil
}
func (x *CreateRequest_Body) HasExpiration() bool {
if x == nil {
return false
}
return x.Expiration != nil
}
func (x *CreateRequest_Body) ClearOwnerId() {
x.OwnerId = nil
}
func (x *CreateRequest_Body) ClearExpiration() {
x.Expiration = nil
}
type CreateRequest_Body_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Session initiating user's or node's key derived `OwnerID`
OwnerId *grpc.OwnerID
// Session expiration `Epoch`
Expiration *uint64
}
func (b0 CreateRequest_Body_builder) Build() *CreateRequest_Body {
m0 := &CreateRequest_Body{}
b, x := &b0, m0
_, _ = b, x
x.OwnerId = b.OwnerId
x.Expiration = b.Expiration
return m0
}
// Session creation response body
type CreateResponse_Body struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// Identifier of a newly created session
Id []byte `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
// Public key used for session
SessionKey []byte `protobuf:"bytes,2,opt,name=session_key,json=sessionKey" json:"session_key,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateResponse_Body) Reset() {
*x = CreateResponse_Body{}
mi := &file_api_session_grpc_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateResponse_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateResponse_Body) ProtoMessage() {}
func (x *CreateResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_api_session_grpc_service_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *CreateResponse_Body) GetId() []byte {
if x != nil {
return x.Id
}
return nil
}
func (x *CreateResponse_Body) GetSessionKey() []byte {
if x != nil {
return x.SessionKey
}
return nil
}
func (x *CreateResponse_Body) SetId(v []byte) {
if v == nil {
v = []byte{}
}
x.Id = v
}
func (x *CreateResponse_Body) SetSessionKey(v []byte) {
if v == nil {
v = []byte{}
}
x.SessionKey = v
}
func (x *CreateResponse_Body) HasId() bool {
if x == nil {
return false
}
return x.Id != nil
}
func (x *CreateResponse_Body) HasSessionKey() bool {
if x == nil {
return false
}
return x.SessionKey != nil
}
func (x *CreateResponse_Body) ClearId() {
x.Id = nil
}
func (x *CreateResponse_Body) ClearSessionKey() {
x.SessionKey = nil
}
type CreateResponse_Body_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Identifier of a newly created session
Id []byte
// Public key used for session
SessionKey []byte
}
func (b0 CreateResponse_Body_builder) Build() *CreateResponse_Body {
m0 := &CreateResponse_Body{}
b, x := &b0, m0
_, _ = b, x
x.Id = b.Id
x.SessionKey = b.SessionKey
return m0
}
var File_api_session_grpc_service_proto protoreflect.FileDescriptor
var file_api_session_grpc_service_proto_rawDesc = []byte{
0x0a, 0x1e, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x11, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x66, 0x73, 0x2f, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c,
0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63,
0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x02, 0x0a,
0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39,
0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e,
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42,
0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74,
0x61, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24,
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x65,
0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
0x12, 0x51, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65,
0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48,
0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x61,
0x64, 0x65, 0x72, 0x1a, 0x5a, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x08, 0x6f,
0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f,
0x77, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12,
0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0xa1, 0x02, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x26, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x46,
0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x4d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x61,
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79,
0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e,
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x65,
0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x37, 0x0a, 0x04, 0x42, 0x6f,
0x64, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02,
0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65,
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x4b, 0x65, 0x79, 0x32, 0x5f, 0x0a, 0x0e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12,
0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65,
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x65, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73,
0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f,
0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x73, 0x64,
0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0xaa, 0x02, 0x1b,
0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
0x41, 0x50, 0x49, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x08, 0x65, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07,
}
var file_api_session_grpc_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_api_session_grpc_service_proto_goTypes = []any{
(*CreateRequest)(nil), // 0: neo.fs.v2.session.CreateRequest
(*CreateResponse)(nil), // 1: neo.fs.v2.session.CreateResponse
(*CreateRequest_Body)(nil), // 2: neo.fs.v2.session.CreateRequest.Body
(*CreateResponse_Body)(nil), // 3: neo.fs.v2.session.CreateResponse.Body
(*RequestMetaHeader)(nil), // 4: neo.fs.v2.session.RequestMetaHeader
(*RequestVerificationHeader)(nil), // 5: neo.fs.v2.session.RequestVerificationHeader
(*ResponseMetaHeader)(nil), // 6: neo.fs.v2.session.ResponseMetaHeader
(*ResponseVerificationHeader)(nil), // 7: neo.fs.v2.session.ResponseVerificationHeader
(*grpc.OwnerID)(nil), // 8: neo.fs.v2.refs.OwnerID
}
var file_api_session_grpc_service_proto_depIdxs = []int32{
2, // 0: neo.fs.v2.session.CreateRequest.body:type_name -> neo.fs.v2.session.CreateRequest.Body
4, // 1: neo.fs.v2.session.CreateRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader
5, // 2: neo.fs.v2.session.CreateRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader
3, // 3: neo.fs.v2.session.CreateResponse.body:type_name -> neo.fs.v2.session.CreateResponse.Body
6, // 4: neo.fs.v2.session.CreateResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader
7, // 5: neo.fs.v2.session.CreateResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader
8, // 6: neo.fs.v2.session.CreateRequest.Body.owner_id:type_name -> neo.fs.v2.refs.OwnerID
0, // 7: neo.fs.v2.session.SessionService.Create:input_type -> neo.fs.v2.session.CreateRequest
1, // 8: neo.fs.v2.session.SessionService.Create:output_type -> neo.fs.v2.session.CreateResponse
8, // [8:9] is the sub-list for method output_type
7, // [7:8] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_api_session_grpc_service_proto_init() }
func file_api_session_grpc_service_proto_init() {
if File_api_session_grpc_service_proto != nil {
return
}
file_api_session_grpc_types_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_session_grpc_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_session_grpc_service_proto_goTypes,
DependencyIndexes: file_api_session_grpc_service_proto_depIdxs,
MessageInfos: file_api_session_grpc_service_proto_msgTypes,
}.Build()
File_api_session_grpc_service_proto = out.File
file_api_session_grpc_service_proto_rawDesc = nil
file_api_session_grpc_service_proto_goTypes = nil
file_api_session_grpc_service_proto_depIdxs = nil
}

View file

@ -1,866 +0,0 @@
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
package session
import (
json "encoding/json"
fmt "fmt"
grpc "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/refs/grpc"
pool "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/util/pool"
proto "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/util/proto"
encoding "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/util/proto/encoding"
easyproto "github.com/VictoriaMetrics/easyproto"
jlexer "github.com/mailru/easyjson/jlexer"
jwriter "github.com/mailru/easyjson/jwriter"
strconv "strconv"
)
type CreateRequest_Body struct {
OwnerId *grpc.OwnerID `json:"ownerId"`
Expiration uint64 `json:"expiration"`
}
var (
_ encoding.ProtoMarshaler = (*CreateRequest_Body)(nil)
_ encoding.ProtoUnmarshaler = (*CreateRequest_Body)(nil)
_ json.Marshaler = (*CreateRequest_Body)(nil)
_ json.Unmarshaler = (*CreateRequest_Body)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *CreateRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.OwnerId)
size += proto.UInt64Size(2, x.Expiration)
return size
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *CreateRequest_Body) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *CreateRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.OwnerId != nil {
x.OwnerId.EmitProtobuf(mm.AppendMessage(1))
}
if x.Expiration != 0 {
mm.AppendUint64(2, x.Expiration)
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *CreateRequest_Body) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "CreateRequest_Body")
}
switch fc.FieldNum {
case 1: // OwnerId
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "OwnerId")
}
x.OwnerId = new(grpc.OwnerID)
if err := x.OwnerId.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 2: // Expiration
data, ok := fc.Uint64()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Expiration")
}
x.Expiration = data
}
}
return nil
}
func (x *CreateRequest_Body) GetOwnerId() *grpc.OwnerID {
if x != nil {
return x.OwnerId
}
return nil
}
func (x *CreateRequest_Body) SetOwnerId(v *grpc.OwnerID) {
x.OwnerId = v
}
func (x *CreateRequest_Body) GetExpiration() uint64 {
if x != nil {
return x.Expiration
}
return 0
}
func (x *CreateRequest_Body) SetExpiration(v uint64) {
x.Expiration = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *CreateRequest_Body) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *CreateRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerId\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"expiration\":"
out.RawString(prefix)
out.RawByte('"')
out.Buffer.Buf = strconv.AppendUint(out.Buffer.Buf, x.Expiration, 10)
out.RawByte('"')
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *CreateRequest_Body) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *CreateRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeFieldName(false)
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "ownerId":
{
var f *grpc.OwnerID
f = new(grpc.OwnerID)
f.UnmarshalEasyJSON(in)
x.OwnerId = f
}
case "expiration":
{
var f uint64
r := in.JsonNumber()
n := r.String()
v, err := strconv.ParseUint(n, 10, 64)
if err != nil {
in.AddError(err)
return
}
pv := uint64(v)
f = pv
x.Expiration = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type CreateRequest struct {
Body *CreateRequest_Body `json:"body"`
MetaHeader *RequestMetaHeader `json:"metaHeader"`
VerifyHeader *RequestVerificationHeader `json:"verifyHeader"`
}
var (
_ encoding.ProtoMarshaler = (*CreateRequest)(nil)
_ encoding.ProtoUnmarshaler = (*CreateRequest)(nil)
_ json.Marshaler = (*CreateRequest)(nil)
_ json.Unmarshaler = (*CreateRequest)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *CreateRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.MetaHeader)
size += proto.NestedStructureSize(3, x.VerifyHeader)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), new buffer is allocated.
//
// Returns any error encountered which did not allow writing the data completely.
// Otherwise, returns the buffer in which the data is written.
//
// Structures with the same field values have the same signed data.
func (x *CreateRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *CreateRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *CreateRequest) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *CreateRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Body != nil {
x.Body.EmitProtobuf(mm.AppendMessage(1))
}
if x.MetaHeader != nil {
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
}
if x.VerifyHeader != nil {
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *CreateRequest) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "CreateRequest")
}
switch fc.FieldNum {
case 1: // Body
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Body")
}
x.Body = new(CreateRequest_Body)
if err := x.Body.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 2: // MetaHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
}
x.MetaHeader = new(RequestMetaHeader)
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 3: // VerifyHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
}
x.VerifyHeader = new(RequestVerificationHeader)
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *CreateRequest) GetBody() *CreateRequest_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *CreateRequest) SetBody(v *CreateRequest_Body) {
x.Body = v
}
func (x *CreateRequest) GetMetaHeader() *RequestMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *CreateRequest) SetMetaHeader(v *RequestMetaHeader) {
x.MetaHeader = v
}
func (x *CreateRequest) GetVerifyHeader() *RequestVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *CreateRequest) SetVerifyHeader(v *RequestVerificationHeader) {
x.VerifyHeader = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *CreateRequest) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *CreateRequest) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *CreateRequest) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *CreateRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeFieldName(false)
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "body":
{
var f *CreateRequest_Body
f = new(CreateRequest_Body)
f.UnmarshalEasyJSON(in)
x.Body = f
}
case "metaHeader":
{
var f *RequestMetaHeader
f = new(RequestMetaHeader)
f.UnmarshalEasyJSON(in)
x.MetaHeader = f
}
case "verifyHeader":
{
var f *RequestVerificationHeader
f = new(RequestVerificationHeader)
f.UnmarshalEasyJSON(in)
x.VerifyHeader = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type CreateResponse_Body struct {
Id []byte `json:"id"`
SessionKey []byte `json:"sessionKey"`
}
var (
_ encoding.ProtoMarshaler = (*CreateResponse_Body)(nil)
_ encoding.ProtoUnmarshaler = (*CreateResponse_Body)(nil)
_ json.Marshaler = (*CreateResponse_Body)(nil)
_ json.Unmarshaler = (*CreateResponse_Body)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *CreateResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.BytesSize(1, x.Id)
size += proto.BytesSize(2, x.SessionKey)
return size
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *CreateResponse_Body) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *CreateResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if len(x.Id) != 0 {
mm.AppendBytes(1, x.Id)
}
if len(x.SessionKey) != 0 {
mm.AppendBytes(2, x.SessionKey)
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *CreateResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "CreateResponse_Body")
}
switch fc.FieldNum {
case 1: // Id
data, ok := fc.Bytes()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Id")
}
x.Id = data
case 2: // SessionKey
data, ok := fc.Bytes()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "SessionKey")
}
x.SessionKey = data
}
}
return nil
}
func (x *CreateResponse_Body) GetId() []byte {
if x != nil {
return x.Id
}
return nil
}
func (x *CreateResponse_Body) SetId(v []byte) {
x.Id = v
}
func (x *CreateResponse_Body) GetSessionKey() []byte {
if x != nil {
return x.SessionKey
}
return nil
}
func (x *CreateResponse_Body) SetSessionKey(v []byte) {
x.SessionKey = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *CreateResponse_Body) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *CreateResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"id\":"
out.RawString(prefix)
if x.Id != nil {
out.Base64Bytes(x.Id)
} else {
out.String("")
}
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionKey\":"
out.RawString(prefix)
if x.SessionKey != nil {
out.Base64Bytes(x.SessionKey)
} else {
out.String("")
}
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *CreateResponse_Body) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *CreateResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeFieldName(false)
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "id":
{
var f []byte
{
tmp := in.Bytes()
if len(tmp) == 0 {
tmp = nil
}
f = tmp
}
x.Id = f
}
case "sessionKey":
{
var f []byte
{
tmp := in.Bytes()
if len(tmp) == 0 {
tmp = nil
}
f = tmp
}
x.SessionKey = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type CreateResponse struct {
Body *CreateResponse_Body `json:"body"`
MetaHeader *ResponseMetaHeader `json:"metaHeader"`
VerifyHeader *ResponseVerificationHeader `json:"verifyHeader"`
}
var (
_ encoding.ProtoMarshaler = (*CreateResponse)(nil)
_ encoding.ProtoUnmarshaler = (*CreateResponse)(nil)
_ json.Marshaler = (*CreateResponse)(nil)
_ json.Unmarshaler = (*CreateResponse)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *CreateResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.MetaHeader)
size += proto.NestedStructureSize(3, x.VerifyHeader)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), new buffer is allocated.
//
// Returns any error encountered which did not allow writing the data completely.
// Otherwise, returns the buffer in which the data is written.
//
// Structures with the same field values have the same signed data.
func (x *CreateResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *CreateResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *CreateResponse) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *CreateResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Body != nil {
x.Body.EmitProtobuf(mm.AppendMessage(1))
}
if x.MetaHeader != nil {
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
}
if x.VerifyHeader != nil {
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *CreateResponse) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "CreateResponse")
}
switch fc.FieldNum {
case 1: // Body
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Body")
}
x.Body = new(CreateResponse_Body)
if err := x.Body.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 2: // MetaHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
}
x.MetaHeader = new(ResponseMetaHeader)
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 3: // VerifyHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
}
x.VerifyHeader = new(ResponseVerificationHeader)
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *CreateResponse) GetBody() *CreateResponse_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *CreateResponse) SetBody(v *CreateResponse_Body) {
x.Body = v
}
func (x *CreateResponse) GetMetaHeader() *ResponseMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *CreateResponse) SetMetaHeader(v *ResponseMetaHeader) {
x.MetaHeader = v
}
func (x *CreateResponse) GetVerifyHeader() *ResponseVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *CreateResponse) SetVerifyHeader(v *ResponseVerificationHeader) {
x.VerifyHeader = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *CreateResponse) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *CreateResponse) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *CreateResponse) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *CreateResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeFieldName(false)
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "body":
{
var f *CreateResponse_Body
f = new(CreateResponse_Body)
f.UnmarshalEasyJSON(in)
x.Body = f
}
case "metaHeader":
{
var f *ResponseMetaHeader
f = new(ResponseMetaHeader)
f.UnmarshalEasyJSON(in)
x.MetaHeader = f
}
case "verifyHeader":
{
var f *ResponseVerificationHeader
f = new(ResponseVerificationHeader)
f.UnmarshalEasyJSON(in)
x.VerifyHeader = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}

View file

@ -1,45 +0,0 @@
//go:build gofuzz
// +build gofuzz
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
package session
func DoFuzzProtoCreateRequest(data []byte) int {
msg := new(CreateRequest)
if err := msg.UnmarshalProtobuf(data); err != nil {
return 0
}
_ = msg.MarshalProtobuf(nil)
return 1
}
func DoFuzzJSONCreateRequest(data []byte) int {
msg := new(CreateRequest)
if err := msg.UnmarshalJSON(data); err != nil {
return 0
}
_, err := msg.MarshalJSON()
if err != nil {
panic(err)
}
return 1
}
func DoFuzzProtoCreateResponse(data []byte) int {
msg := new(CreateResponse)
if err := msg.UnmarshalProtobuf(data); err != nil {
return 0
}
_ = msg.MarshalProtobuf(nil)
return 1
}
func DoFuzzJSONCreateResponse(data []byte) int {
msg := new(CreateResponse)
if err := msg.UnmarshalJSON(data); err != nil {
return 0
}
_, err := msg.MarshalJSON()
if err != nil {
panic(err)
}
return 1
}

View file

@ -1,31 +0,0 @@
//go:build gofuzz
// +build gofuzz
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
package session
import (
testing "testing"
)
func FuzzProtoCreateRequest(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzProtoCreateRequest(data)
})
}
func FuzzJSONCreateRequest(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzJSONCreateRequest(data)
})
}
func FuzzProtoCreateResponse(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzProtoCreateResponse(data)
})
}
func FuzzJSONCreateResponse(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzJSONCreateResponse(data)
})
}

View file

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v5.27.2
// - protoc-gen-go-grpc v1.5.1
// - protoc v5.29.2
// source: api/session/grpc/service.proto
package session
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
SessionService_Create_FullMethodName = "/neo.fs.v2.session.SessionService/Create"
@ -25,6 +25,11 @@ const (
// SessionServiceClient is the client API for SessionService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// `SessionService` allows to establish a temporary trust relationship between
// two peer nodes and generate a `SessionToken` as the proof of trust to be
// attached in requests for further verification. Please see corresponding
// section of FrostFS Technical Specification for details.
type SessionServiceClient interface {
// Open a new session between two peers.
//
@ -44,8 +49,9 @@ func NewSessionServiceClient(cc grpc.ClientConnInterface) SessionServiceClient {
}
func (c *sessionServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CreateResponse)
err := c.cc.Invoke(ctx, SessionService_Create_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, SessionService_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -54,7 +60,12 @@ func (c *sessionServiceClient) Create(ctx context.Context, in *CreateRequest, op
// SessionServiceServer is the server API for SessionService service.
// All implementations should embed UnimplementedSessionServiceServer
// for forward compatibility
// for forward compatibility.
//
// `SessionService` allows to establish a temporary trust relationship between
// two peer nodes and generate a `SessionToken` as the proof of trust to be
// attached in requests for further verification. Please see corresponding
// section of FrostFS Technical Specification for details.
type SessionServiceServer interface {
// Open a new session between two peers.
//
@ -65,13 +76,17 @@ type SessionServiceServer interface {
Create(context.Context, *CreateRequest) (*CreateResponse, error)
}
// UnimplementedSessionServiceServer should be embedded to have forward compatible implementations.
type UnimplementedSessionServiceServer struct {
}
// UnimplementedSessionServiceServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedSessionServiceServer struct{}
func (UnimplementedSessionServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedSessionServiceServer) testEmbeddedByValue() {}
// UnsafeSessionServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SessionServiceServer will
@ -81,6 +96,13 @@ type UnsafeSessionServiceServer interface {
}
func RegisterSessionServiceServer(s grpc.ServiceRegistrar, srv SessionServiceServer) {
// If the following call pancis, it indicates UnimplementedSessionServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&SessionService_ServiceDesc, srv)
}

609
api/session/grpc/service_protoopaque.pb.go generated Normal file
View file

@ -0,0 +1,609 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.1
// protoc v5.29.2
// source: api/session/grpc/service.proto
//go:build protoopaque
package session
import (
grpc "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/refs/grpc"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Information necessary for opening a session.
type CreateRequest struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_Body *CreateRequest_Body `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"`
xxx_hidden_MetaHeader *RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader" json:"meta_header,omitempty"`
xxx_hidden_VerifyHeader *RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader" json:"verify_header,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateRequest) Reset() {
*x = CreateRequest{}
mi := &file_api_session_grpc_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateRequest) ProtoMessage() {}
func (x *CreateRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_session_grpc_service_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *CreateRequest) GetBody() *CreateRequest_Body {
if x != nil {
return x.xxx_hidden_Body
}
return nil
}
func (x *CreateRequest) GetMetaHeader() *RequestMetaHeader {
if x != nil {
return x.xxx_hidden_MetaHeader
}
return nil
}
func (x *CreateRequest) GetVerifyHeader() *RequestVerificationHeader {
if x != nil {
return x.xxx_hidden_VerifyHeader
}
return nil
}
func (x *CreateRequest) SetBody(v *CreateRequest_Body) {
x.xxx_hidden_Body = v
}
func (x *CreateRequest) SetMetaHeader(v *RequestMetaHeader) {
x.xxx_hidden_MetaHeader = v
}
func (x *CreateRequest) SetVerifyHeader(v *RequestVerificationHeader) {
x.xxx_hidden_VerifyHeader = v
}
func (x *CreateRequest) HasBody() bool {
if x == nil {
return false
}
return x.xxx_hidden_Body != nil
}
func (x *CreateRequest) HasMetaHeader() bool {
if x == nil {
return false
}
return x.xxx_hidden_MetaHeader != nil
}
func (x *CreateRequest) HasVerifyHeader() bool {
if x == nil {
return false
}
return x.xxx_hidden_VerifyHeader != nil
}
func (x *CreateRequest) ClearBody() {
x.xxx_hidden_Body = nil
}
func (x *CreateRequest) ClearMetaHeader() {
x.xxx_hidden_MetaHeader = nil
}
func (x *CreateRequest) ClearVerifyHeader() {
x.xxx_hidden_VerifyHeader = nil
}
type CreateRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Body of a create session token request message.
Body *CreateRequest_Body
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
MetaHeader *RequestMetaHeader
// Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
VerifyHeader *RequestVerificationHeader
}
func (b0 CreateRequest_builder) Build() *CreateRequest {
m0 := &CreateRequest{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_Body = b.Body
x.xxx_hidden_MetaHeader = b.MetaHeader
x.xxx_hidden_VerifyHeader = b.VerifyHeader
return m0
}
// Information about the opened session.
type CreateResponse struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_Body *CreateResponse_Body `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"`
xxx_hidden_MetaHeader *ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader" json:"meta_header,omitempty"`
xxx_hidden_VerifyHeader *ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader" json:"verify_header,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateResponse) Reset() {
*x = CreateResponse{}
mi := &file_api_session_grpc_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateResponse) ProtoMessage() {}
func (x *CreateResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_session_grpc_service_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *CreateResponse) GetBody() *CreateResponse_Body {
if x != nil {
return x.xxx_hidden_Body
}
return nil
}
func (x *CreateResponse) GetMetaHeader() *ResponseMetaHeader {
if x != nil {
return x.xxx_hidden_MetaHeader
}
return nil
}
func (x *CreateResponse) GetVerifyHeader() *ResponseVerificationHeader {
if x != nil {
return x.xxx_hidden_VerifyHeader
}
return nil
}
func (x *CreateResponse) SetBody(v *CreateResponse_Body) {
x.xxx_hidden_Body = v
}
func (x *CreateResponse) SetMetaHeader(v *ResponseMetaHeader) {
x.xxx_hidden_MetaHeader = v
}
func (x *CreateResponse) SetVerifyHeader(v *ResponseVerificationHeader) {
x.xxx_hidden_VerifyHeader = v
}
func (x *CreateResponse) HasBody() bool {
if x == nil {
return false
}
return x.xxx_hidden_Body != nil
}
func (x *CreateResponse) HasMetaHeader() bool {
if x == nil {
return false
}
return x.xxx_hidden_MetaHeader != nil
}
func (x *CreateResponse) HasVerifyHeader() bool {
if x == nil {
return false
}
return x.xxx_hidden_VerifyHeader != nil
}
func (x *CreateResponse) ClearBody() {
x.xxx_hidden_Body = nil
}
func (x *CreateResponse) ClearMetaHeader() {
x.xxx_hidden_MetaHeader = nil
}
func (x *CreateResponse) ClearVerifyHeader() {
x.xxx_hidden_VerifyHeader = nil
}
type CreateResponse_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Body of create session token response message.
Body *CreateResponse_Body
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
MetaHeader *ResponseMetaHeader
// Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
VerifyHeader *ResponseVerificationHeader
}
func (b0 CreateResponse_builder) Build() *CreateResponse {
m0 := &CreateResponse{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_Body = b.Body
x.xxx_hidden_MetaHeader = b.MetaHeader
x.xxx_hidden_VerifyHeader = b.VerifyHeader
return m0
}
// Session creation request body
type CreateRequest_Body struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_OwnerId *grpc.OwnerID `protobuf:"bytes,1,opt,name=owner_id,json=ownerId" json:"owner_id,omitempty"`
xxx_hidden_Expiration uint64 `protobuf:"varint,2,opt,name=expiration" json:"expiration,omitempty"`
XXX_raceDetectHookData protoimpl.RaceDetectHookData
XXX_presence [1]uint32
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateRequest_Body) Reset() {
*x = CreateRequest_Body{}
mi := &file_api_session_grpc_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateRequest_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateRequest_Body) ProtoMessage() {}
func (x *CreateRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_api_session_grpc_service_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *CreateRequest_Body) GetOwnerId() *grpc.OwnerID {
if x != nil {
return x.xxx_hidden_OwnerId
}
return nil
}
func (x *CreateRequest_Body) GetExpiration() uint64 {
if x != nil {
return x.xxx_hidden_Expiration
}
return 0
}
func (x *CreateRequest_Body) SetOwnerId(v *grpc.OwnerID) {
x.xxx_hidden_OwnerId = v
}
func (x *CreateRequest_Body) SetExpiration(v uint64) {
x.xxx_hidden_Expiration = v
protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 2)
}
func (x *CreateRequest_Body) HasOwnerId() bool {
if x == nil {
return false
}
return x.xxx_hidden_OwnerId != nil
}
func (x *CreateRequest_Body) HasExpiration() bool {
if x == nil {
return false
}
return protoimpl.X.Present(&(x.XXX_presence[0]), 1)
}
func (x *CreateRequest_Body) ClearOwnerId() {
x.xxx_hidden_OwnerId = nil
}
func (x *CreateRequest_Body) ClearExpiration() {
protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1)
x.xxx_hidden_Expiration = 0
}
type CreateRequest_Body_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Session initiating user's or node's key derived `OwnerID`
OwnerId *grpc.OwnerID
// Session expiration `Epoch`
Expiration *uint64
}
func (b0 CreateRequest_Body_builder) Build() *CreateRequest_Body {
m0 := &CreateRequest_Body{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_OwnerId = b.OwnerId
if b.Expiration != nil {
protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 2)
x.xxx_hidden_Expiration = *b.Expiration
}
return m0
}
// Session creation response body
type CreateResponse_Body struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_Id []byte `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
xxx_hidden_SessionKey []byte `protobuf:"bytes,2,opt,name=session_key,json=sessionKey" json:"session_key,omitempty"`
XXX_raceDetectHookData protoimpl.RaceDetectHookData
XXX_presence [1]uint32
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateResponse_Body) Reset() {
*x = CreateResponse_Body{}
mi := &file_api_session_grpc_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateResponse_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateResponse_Body) ProtoMessage() {}
func (x *CreateResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_api_session_grpc_service_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *CreateResponse_Body) GetId() []byte {
if x != nil {
return x.xxx_hidden_Id
}
return nil
}
func (x *CreateResponse_Body) GetSessionKey() []byte {
if x != nil {
return x.xxx_hidden_SessionKey
}
return nil
}
func (x *CreateResponse_Body) SetId(v []byte) {
if v == nil {
v = []byte{}
}
x.xxx_hidden_Id = v
protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 2)
}
func (x *CreateResponse_Body) SetSessionKey(v []byte) {
if v == nil {
v = []byte{}
}
x.xxx_hidden_SessionKey = v
protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 2)
}
func (x *CreateResponse_Body) HasId() bool {
if x == nil {
return false
}
return protoimpl.X.Present(&(x.XXX_presence[0]), 0)
}
func (x *CreateResponse_Body) HasSessionKey() bool {
if x == nil {
return false
}
return protoimpl.X.Present(&(x.XXX_presence[0]), 1)
}
func (x *CreateResponse_Body) ClearId() {
protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0)
x.xxx_hidden_Id = nil
}
func (x *CreateResponse_Body) ClearSessionKey() {
protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1)
x.xxx_hidden_SessionKey = nil
}
type CreateResponse_Body_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Identifier of a newly created session
Id []byte
// Public key used for session
SessionKey []byte
}
func (b0 CreateResponse_Body_builder) Build() *CreateResponse_Body {
m0 := &CreateResponse_Body{}
b, x := &b0, m0
_, _ = b, x
if b.Id != nil {
protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 2)
x.xxx_hidden_Id = b.Id
}
if b.SessionKey != nil {
protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 2)
x.xxx_hidden_SessionKey = b.SessionKey
}
return m0
}
var File_api_session_grpc_service_proto protoreflect.FileDescriptor
var file_api_session_grpc_service_proto_rawDesc = []byte{
0x0a, 0x1e, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x11, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x66, 0x73, 0x2f, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c,
0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63,
0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x02, 0x0a,
0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39,
0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e,
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42,
0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74,
0x61, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24,
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x65,
0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
0x12, 0x51, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65,
0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48,
0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x61,
0x64, 0x65, 0x72, 0x1a, 0x5a, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x08, 0x6f,
0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f,
0x77, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12,
0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0xa1, 0x02, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x26, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x46,
0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x4d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x61,
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79,
0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e,
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x65,
0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x37, 0x0a, 0x04, 0x42, 0x6f,
0x64, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02,
0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65,
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x4b, 0x65, 0x79, 0x32, 0x5f, 0x0a, 0x0e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12,
0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65,
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x65, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73,
0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f,
0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x73, 0x64,
0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0xaa, 0x02, 0x1b,
0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
0x41, 0x50, 0x49, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x08, 0x65, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07,
}
var file_api_session_grpc_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_api_session_grpc_service_proto_goTypes = []any{
(*CreateRequest)(nil), // 0: neo.fs.v2.session.CreateRequest
(*CreateResponse)(nil), // 1: neo.fs.v2.session.CreateResponse
(*CreateRequest_Body)(nil), // 2: neo.fs.v2.session.CreateRequest.Body
(*CreateResponse_Body)(nil), // 3: neo.fs.v2.session.CreateResponse.Body
(*RequestMetaHeader)(nil), // 4: neo.fs.v2.session.RequestMetaHeader
(*RequestVerificationHeader)(nil), // 5: neo.fs.v2.session.RequestVerificationHeader
(*ResponseMetaHeader)(nil), // 6: neo.fs.v2.session.ResponseMetaHeader
(*ResponseVerificationHeader)(nil), // 7: neo.fs.v2.session.ResponseVerificationHeader
(*grpc.OwnerID)(nil), // 8: neo.fs.v2.refs.OwnerID
}
var file_api_session_grpc_service_proto_depIdxs = []int32{
2, // 0: neo.fs.v2.session.CreateRequest.body:type_name -> neo.fs.v2.session.CreateRequest.Body
4, // 1: neo.fs.v2.session.CreateRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader
5, // 2: neo.fs.v2.session.CreateRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader
3, // 3: neo.fs.v2.session.CreateResponse.body:type_name -> neo.fs.v2.session.CreateResponse.Body
6, // 4: neo.fs.v2.session.CreateResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader
7, // 5: neo.fs.v2.session.CreateResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader
8, // 6: neo.fs.v2.session.CreateRequest.Body.owner_id:type_name -> neo.fs.v2.refs.OwnerID
0, // 7: neo.fs.v2.session.SessionService.Create:input_type -> neo.fs.v2.session.CreateRequest
1, // 8: neo.fs.v2.session.SessionService.Create:output_type -> neo.fs.v2.session.CreateResponse
8, // [8:9] is the sub-list for method output_type
7, // [7:8] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_api_session_grpc_service_proto_init() }
func file_api_session_grpc_service_proto_init() {
if File_api_session_grpc_service_proto != nil {
return
}
file_api_session_grpc_types_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_session_grpc_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_session_grpc_service_proto_goTypes,
DependencyIndexes: file_api_session_grpc_service_proto_depIdxs,
MessageInfos: file_api_session_grpc_service_proto_msgTypes,
}.Build()
File_api_session_grpc_service_proto = out.File
file_api_session_grpc_service_proto_rawDesc = nil
file_api_session_grpc_service_proto_goTypes = nil
file_api_session_grpc_service_proto_depIdxs = nil
}

2145
api/session/grpc/types.pb.go generated Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,159 +0,0 @@
//go:build gofuzz
// +build gofuzz
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
package session
func DoFuzzProtoObjectSessionContext(data []byte) int {
msg := new(ObjectSessionContext)
if err := msg.UnmarshalProtobuf(data); err != nil {
return 0
}
_ = msg.MarshalProtobuf(nil)
return 1
}
func DoFuzzJSONObjectSessionContext(data []byte) int {
msg := new(ObjectSessionContext)
if err := msg.UnmarshalJSON(data); err != nil {
return 0
}
_, err := msg.MarshalJSON()
if err != nil {
panic(err)
}
return 1
}
func DoFuzzProtoContainerSessionContext(data []byte) int {
msg := new(ContainerSessionContext)
if err := msg.UnmarshalProtobuf(data); err != nil {
return 0
}
_ = msg.MarshalProtobuf(nil)
return 1
}
func DoFuzzJSONContainerSessionContext(data []byte) int {
msg := new(ContainerSessionContext)
if err := msg.UnmarshalJSON(data); err != nil {
return 0
}
_, err := msg.MarshalJSON()
if err != nil {
panic(err)
}
return 1
}
func DoFuzzProtoSessionToken(data []byte) int {
msg := new(SessionToken)
if err := msg.UnmarshalProtobuf(data); err != nil {
return 0
}
_ = msg.MarshalProtobuf(nil)
return 1
}
func DoFuzzJSONSessionToken(data []byte) int {
msg := new(SessionToken)
if err := msg.UnmarshalJSON(data); err != nil {
return 0
}
_, err := msg.MarshalJSON()
if err != nil {
panic(err)
}
return 1
}
func DoFuzzProtoXHeader(data []byte) int {
msg := new(XHeader)
if err := msg.UnmarshalProtobuf(data); err != nil {
return 0
}
_ = msg.MarshalProtobuf(nil)
return 1
}
func DoFuzzJSONXHeader(data []byte) int {
msg := new(XHeader)
if err := msg.UnmarshalJSON(data); err != nil {
return 0
}
_, err := msg.MarshalJSON()
if err != nil {
panic(err)
}
return 1
}
func DoFuzzProtoRequestMetaHeader(data []byte) int {
msg := new(RequestMetaHeader)
if err := msg.UnmarshalProtobuf(data); err != nil {
return 0
}
_ = msg.MarshalProtobuf(nil)
return 1
}
func DoFuzzJSONRequestMetaHeader(data []byte) int {
msg := new(RequestMetaHeader)
if err := msg.UnmarshalJSON(data); err != nil {
return 0
}
_, err := msg.MarshalJSON()
if err != nil {
panic(err)
}
return 1
}
func DoFuzzProtoResponseMetaHeader(data []byte) int {
msg := new(ResponseMetaHeader)
if err := msg.UnmarshalProtobuf(data); err != nil {
return 0
}
_ = msg.MarshalProtobuf(nil)
return 1
}
func DoFuzzJSONResponseMetaHeader(data []byte) int {
msg := new(ResponseMetaHeader)
if err := msg.UnmarshalJSON(data); err != nil {
return 0
}
_, err := msg.MarshalJSON()
if err != nil {
panic(err)
}
return 1
}
func DoFuzzProtoRequestVerificationHeader(data []byte) int {
msg := new(RequestVerificationHeader)
if err := msg.UnmarshalProtobuf(data); err != nil {
return 0
}
_ = msg.MarshalProtobuf(nil)
return 1
}
func DoFuzzJSONRequestVerificationHeader(data []byte) int {
msg := new(RequestVerificationHeader)
if err := msg.UnmarshalJSON(data); err != nil {
return 0
}
_, err := msg.MarshalJSON()
if err != nil {
panic(err)
}
return 1
}
func DoFuzzProtoResponseVerificationHeader(data []byte) int {
msg := new(ResponseVerificationHeader)
if err := msg.UnmarshalProtobuf(data); err != nil {
return 0
}
_ = msg.MarshalProtobuf(nil)
return 1
}
func DoFuzzJSONResponseVerificationHeader(data []byte) int {
msg := new(ResponseVerificationHeader)
if err := msg.UnmarshalJSON(data); err != nil {
return 0
}
_, err := msg.MarshalJSON()
if err != nil {
panic(err)
}
return 1
}

View file

@ -1,91 +0,0 @@
//go:build gofuzz
// +build gofuzz
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
package session
import (
testing "testing"
)
func FuzzProtoObjectSessionContext(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzProtoObjectSessionContext(data)
})
}
func FuzzJSONObjectSessionContext(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzJSONObjectSessionContext(data)
})
}
func FuzzProtoContainerSessionContext(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzProtoContainerSessionContext(data)
})
}
func FuzzJSONContainerSessionContext(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzJSONContainerSessionContext(data)
})
}
func FuzzProtoSessionToken(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzProtoSessionToken(data)
})
}
func FuzzJSONSessionToken(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzJSONSessionToken(data)
})
}
func FuzzProtoXHeader(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzProtoXHeader(data)
})
}
func FuzzJSONXHeader(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzJSONXHeader(data)
})
}
func FuzzProtoRequestMetaHeader(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzProtoRequestMetaHeader(data)
})
}
func FuzzJSONRequestMetaHeader(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzJSONRequestMetaHeader(data)
})
}
func FuzzProtoResponseMetaHeader(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzProtoResponseMetaHeader(data)
})
}
func FuzzJSONResponseMetaHeader(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzJSONResponseMetaHeader(data)
})
}
func FuzzProtoRequestVerificationHeader(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzProtoRequestVerificationHeader(data)
})
}
func FuzzJSONRequestVerificationHeader(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzJSONRequestVerificationHeader(data)
})
}
func FuzzProtoResponseVerificationHeader(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzProtoResponseVerificationHeader(data)
})
}
func FuzzJSONResponseVerificationHeader(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
DoFuzzJSONResponseVerificationHeader(data)
})
}

2187
api/session/grpc/types_protoopaque.pb.go generated Normal file

File diff suppressed because it is too large Load diff