forked from TrueCloudLab/frostfs-api-go
Move api-v2 files into v2 subdir
This subdir contains generated proto files and small wrappers.
This commit is contained in:
parent
0ee1c3653d
commit
1f143e54bd
48 changed files with 1479 additions and 1515 deletions
|
@ -1,76 +0,0 @@
|
|||
package v2
|
||||
|
||||
import (
|
||||
refs "github.com/nspcc-dev/neofs-api-go/refs/v2"
|
||||
service "github.com/nspcc-dev/neofs-api-go/service/v2"
|
||||
)
|
||||
|
||||
// SetOwnerId sets identifier of the session initiator.
|
||||
func (m *CreateRequest_Body) SetOwnerId(v *refs.OwnerID) {
|
||||
if m != nil {
|
||||
m.OwnerId = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetLifetime sets lifetime of the session.
|
||||
func (m *CreateRequest_Body) SetLifetime(v *service.TokenLifetime) {
|
||||
if m != nil {
|
||||
m.Lifetime = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetBody sets body of the request.
|
||||
func (m *CreateRequest) SetBody(v *CreateRequest_Body) {
|
||||
if m != nil {
|
||||
m.Body = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetMetaHeader sets meta header of the request.
|
||||
func (m *CreateRequest) SetMetaHeader(v *service.RequestMetaHeader) {
|
||||
if m != nil {
|
||||
m.MetaHeader = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetVerifyHeader sets verification header of the request.
|
||||
func (m *CreateRequest) SetVerifyHeader(v *service.RequestVerificationHeader) {
|
||||
if m != nil {
|
||||
m.VerifyHeader = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetId sets identifier of the session token.
|
||||
func (m *CreateResponse_Body) SetId(v []byte) {
|
||||
if m != nil {
|
||||
m.Id = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetSessionKey sets session public key in a binary format.
|
||||
func (m *CreateResponse_Body) SetSessionKey(v []byte) {
|
||||
if m != nil {
|
||||
m.SessionKey = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetBody sets body of the response.
|
||||
func (m *CreateResponse) SetBody(v *CreateResponse_Body) {
|
||||
if m != nil {
|
||||
m.Body = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetMetaHeader sets meta header of the response.
|
||||
func (m *CreateResponse) SetMetaHeader(v *service.ResponseMetaHeader) {
|
||||
if m != nil {
|
||||
m.MetaHeader = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetVerifyHeader sets verification header of the response.
|
||||
func (m *CreateResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) {
|
||||
if m != nil {
|
||||
m.VerifyHeader = v
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,60 +0,0 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package session.v2;
|
||||
|
||||
option go_package = "github.com/nspcc-dev/neofs-api-go/session/v2";
|
||||
option csharp_namespace = "NeoFS.API.Session";
|
||||
|
||||
import "refs/v2/types.proto";
|
||||
import "service/v2/meta.proto";
|
||||
import "service/v2/verify.proto";
|
||||
|
||||
service Session {
|
||||
// Create opens new session between the client and the server.
|
||||
rpc Create (CreateRequest) returns (CreateResponse);
|
||||
}
|
||||
|
||||
// CreateRequest carries an information necessary for opening a session.v2.
|
||||
message CreateRequest {
|
||||
message Body {
|
||||
// Carries an identifier of a session initiator.
|
||||
refs.v2.OwnerID owner_id = 1;
|
||||
|
||||
// Carries a lifetime of the session.v2.
|
||||
service.v2.TokenLifetime lifetime = 2;
|
||||
}
|
||||
|
||||
// Body of create session token request message.
|
||||
Body body = 1;
|
||||
|
||||
// Carries request meta information. Header data is used only to regulate message
|
||||
// transport and does not affect request execution.
|
||||
service.v2.RequestMetaHeader meta_header = 2;
|
||||
|
||||
// Carries request verification information. This header is used to authenticate
|
||||
// the nodes of the message route and check the correctness of transmission.
|
||||
service.v2.RequestVerificationHeader verify_header = 3;
|
||||
}
|
||||
|
||||
// CreateResponse carries an information about the opened session.v2.
|
||||
message CreateResponse {
|
||||
message Body {
|
||||
// id carries an identifier of session token.
|
||||
bytes id = 1;
|
||||
|
||||
// session_key carries a session public key.
|
||||
bytes session_key = 2;
|
||||
}
|
||||
|
||||
// Body of create session token response message.
|
||||
Body body = 1;
|
||||
|
||||
// Carries response meta information. Header data is used only to regulate
|
||||
// message transport and does not affect request execution.
|
||||
service.v2.ResponseMetaHeader meta_header = 2;
|
||||
|
||||
// Carries response verification information. This header is used to
|
||||
// authenticate the nodes of the message route and check the correctness
|
||||
// of transmission.
|
||||
service.v2.ResponseVerificationHeader verify_header = 3;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue