2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package object;
|
2020-03-31 06:58:22 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/object";
|
2020-02-05 12:14:39 +00:00
|
|
|
option csharp_namespace = "NeoFS.API.Object";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
|
|
|
import "refs/types.proto";
|
2020-04-24 16:18:28 +00:00
|
|
|
import "service/verify.proto";
|
2020-01-30 11:41:24 +00:00
|
|
|
import "storagegroup/types.proto";
|
|
|
|
|
2020-08-04 09:53:33 +00:00
|
|
|
// Attribute groups the parameters of the object attributes.
|
|
|
|
message Attribute {
|
|
|
|
// Key carries the string key to the object attribute.
|
|
|
|
string Key = 1;
|
|
|
|
|
|
|
|
// Value carries the string value of the object attribute.
|
2020-01-30 11:41:24 +00:00
|
|
|
string Value = 2;
|
|
|
|
}
|
|
|
|
|
2020-08-04 10:04:45 +00:00
|
|
|
message ExtendedHeader {
|
2020-01-30 11:41:24 +00:00
|
|
|
oneof Value {
|
|
|
|
// Link to other objects
|
|
|
|
Link Link = 1;
|
|
|
|
// Redirect not used yet
|
|
|
|
refs.Address Redirect = 2;
|
2020-08-04 09:53:33 +00:00
|
|
|
// Attribute is a set of K-V object attributes
|
|
|
|
Attribute Attribute = 3;
|
2020-08-04 13:50:29 +00:00
|
|
|
// Split carries the position of the object in the split hierarchy.
|
|
|
|
SplitHeader SplitHeader = 4;
|
2020-01-30 11:41:24 +00:00
|
|
|
// Tombstone header that set up in deleted objects
|
|
|
|
Tombstone Tombstone = 5;
|
2020-04-24 16:18:28 +00:00
|
|
|
// Token header contains token of the session within which the object was created
|
|
|
|
service.Token Token = 6;
|
2020-01-30 11:41:24 +00:00
|
|
|
// HomoHash is a homomorphic hash of original object payload
|
2020-08-04 09:18:35 +00:00
|
|
|
bytes HomoHash = 7;
|
2020-01-30 11:41:24 +00:00
|
|
|
// PayloadChecksum of actual object's payload
|
|
|
|
bytes PayloadChecksum = 8;
|
|
|
|
// Integrity header with checksum of all above headers in the object
|
|
|
|
IntegrityHeader Integrity = 9;
|
|
|
|
// StorageGroup contains meta information for the data audit
|
|
|
|
storagegroup.StorageGroup StorageGroup = 10;
|
|
|
|
// PublicKey of owner of the object. Key is used for verification and can be based on NeoID or x509 cert.
|
|
|
|
PublicKey PublicKey = 11;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message Tombstone {}
|
|
|
|
|
|
|
|
message SystemHeader {
|
|
|
|
// Version of the object structure
|
|
|
|
uint64 Version = 1;
|
|
|
|
// PayloadLength is an object payload length
|
|
|
|
uint64 PayloadLength = 2;
|
2020-08-04 12:33:10 +00:00
|
|
|
// Address carries object address in the NeoFS system.
|
|
|
|
// It encapsulates the object and the container identifiers.
|
|
|
|
refs.Address Address = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
// OwnerID is a wallet address
|
2020-08-04 09:18:35 +00:00
|
|
|
bytes OwnerID = 4;
|
2020-08-04 12:10:44 +00:00
|
|
|
// CreationEpoch carries number of NeoFS epoch on which the object was created.
|
|
|
|
uint64 CreationEpoch = 6;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message IntegrityHeader {
|
|
|
|
// HeadersChecksum is a checksum of all above headers in the object
|
|
|
|
bytes HeadersChecksum = 1;
|
|
|
|
// ChecksumSignature is an user's signature of checksum to verify if it is correct
|
|
|
|
bytes ChecksumSignature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Link {
|
|
|
|
enum Type {
|
|
|
|
Unknown = 0;
|
|
|
|
// Parent object created during object transformation
|
|
|
|
Parent = 1;
|
|
|
|
// Previous object in the linked list created during object transformation
|
|
|
|
Previous = 2;
|
|
|
|
// Next object in the linked list created during object transformation
|
|
|
|
Next = 3;
|
|
|
|
// Child object created during object transformation
|
|
|
|
Child = 4;
|
|
|
|
// Object that included into this storage group
|
|
|
|
StorageGroup = 5;
|
|
|
|
}
|
|
|
|
// Type of link
|
|
|
|
Type type = 1;
|
|
|
|
// ID is an object identifier, is a valid UUIDv4
|
2020-08-04 09:18:35 +00:00
|
|
|
bytes ID = 2;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-04 13:04:56 +00:00
|
|
|
// SplitHeader groups information about spawning the object through a payload splitting.
|
|
|
|
message SplitHeader {
|
|
|
|
// Parent carries identifier of the origin object.
|
|
|
|
refs.ObjectID Parent = 1;
|
|
|
|
|
|
|
|
// Previous carries identifier of the left split neighbor.
|
|
|
|
refs.ObjectID Previous = 2;
|
|
|
|
|
|
|
|
// Previous carries identifier of the right split neighbor.
|
|
|
|
refs.ObjectID Next = 3;
|
|
|
|
|
|
|
|
// Children carries list of identifiers of the objects generated by splitting the current.
|
|
|
|
repeated refs.ObjectID Children = 4;
|
|
|
|
|
|
|
|
// Origin carries the header of the origin object.
|
|
|
|
Header Origin = 5;
|
|
|
|
}
|
|
|
|
|
2020-08-04 10:18:38 +00:00
|
|
|
// Header groups the information about the NeoFS object.
|
|
|
|
message Header {
|
2020-01-30 11:41:24 +00:00
|
|
|
// SystemHeader describes system header
|
2020-08-04 09:18:35 +00:00
|
|
|
SystemHeader SystemHeader = 1;
|
2020-08-04 10:18:38 +00:00
|
|
|
|
2020-08-04 10:04:45 +00:00
|
|
|
// ExtendedHeaders describes a set of an extended headers
|
|
|
|
repeated ExtendedHeader ExtendedHeaders = 2;
|
2020-08-04 10:18:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Object {
|
|
|
|
// Header carries the object header.
|
|
|
|
Header Header = 1;
|
2020-01-30 11:41:24 +00:00
|
|
|
// Payload is an object's payload
|
2020-08-04 10:18:38 +00:00
|
|
|
bytes Payload = 2;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message PublicKey {
|
|
|
|
// Value contains marshaled ecdsa public key
|
|
|
|
bytes Value = 1;
|
|
|
|
}
|