frostfs-api-go-pogpp/session/service.proto

40 lines
1.6 KiB
Protocol Buffer
Raw Normal View History

2019-11-18 13:34:06 +00:00
syntax = "proto3";
package session;
2020-03-31 07:05:26 +00:00
option go_package = "github.com/nspcc-dev/neofs-api-go/session";
2020-02-05 13:58:06 +00:00
option csharp_namespace = "NeoFS.API.Session";
2019-11-18 13:34:06 +00:00
2019-11-18 16:22:08 +00:00
import "service/meta.proto";
import "service/verify.proto";
2019-11-18 13:34:06 +00:00
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
2019-11-20 16:46:30 +00:00
2019-11-18 13:34:06 +00:00
service Session {
2020-05-08 07:49:23 +00:00
// Create opens new session between the client and the server
rpc Create (CreateRequest) returns (CreateResponse);
2019-11-18 13:34:06 +00:00
}
2020-05-08 07:49:23 +00:00
// CreateRequest carries an information necessary for opening a session
2019-11-18 13:34:06 +00:00
message CreateRequest {
2020-05-08 07:49:23 +00:00
// OwnerID carries an identifier of a session initiator
bytes OwnerID = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "OwnerID"];
// Lifetime carries a lifetime of the session
service.TokenLifetime Lifetime = 2 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
2019-11-18 16:22:08 +00:00
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
2019-11-18 16:22:08 +00:00
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
2019-11-18 13:34:06 +00:00
}
2020-05-08 07:49:23 +00:00
// CreateResponse carries an information about the opened session
2019-11-18 13:34:06 +00:00
message CreateResponse {
2020-05-08 07:49:23 +00:00
// ID carries an identifier of session token
bytes ID = 1 [(gogoproto.customtype) = "TokenID", (gogoproto.nullable) = false];
// SessionKey carries a session public key
bytes SessionKey = 2;
2019-11-18 13:34:06 +00:00
}