2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-01-30 11:41:24 +00:00
|
|
|
package object;
|
2020-08-04 21:10:51 +00:00
|
|
|
|
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
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Header groups the information about the NeoFS object.
|
|
|
|
message Header {
|
2020-08-04 21:08:56 +00:00
|
|
|
// Main groups mandatory information about the object.
|
2020-08-04 20:43:33 +00:00
|
|
|
// Message fields are presented in all NeoFS objects.
|
2020-08-04 21:08:56 +00:00
|
|
|
message Main {
|
2020-08-04 20:54:26 +00:00
|
|
|
// PayloadLength carries length of the object payload.
|
|
|
|
// Each object has a fixed payload length since it's immutable.
|
2020-08-04 20:43:33 +00:00
|
|
|
uint64 PayloadLength = 1;
|
|
|
|
// Address carries object address in the NeoFS system.
|
|
|
|
// It encapsulates the object and the container identifiers.
|
|
|
|
refs.Address Address = 2;
|
2020-08-05 16:49:16 +00:00
|
|
|
// OwnerID carries identifier of the object owner.
|
|
|
|
refs.OwnerID OwnerID = 3;
|
2020-08-04 20:36:24 +00:00
|
|
|
}
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 21:08:56 +00:00
|
|
|
// Main carries the main part of the header.
|
|
|
|
// Main MUST NOT be NULL.
|
|
|
|
Main main = 1;
|
2020-08-04 09:53:33 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Extended groups additional information about the object.
|
|
|
|
// It encapsulates both user and system attributes needed to regulate
|
|
|
|
// the NeoFS sub-systems.
|
|
|
|
message Extended {
|
|
|
|
// Integrity groups evidence of the integrity of an object's structure.
|
|
|
|
message Integrity {
|
|
|
|
// PayloadChecksum carries the checksum of object payload bytes.
|
|
|
|
// Changing any byte of the payload changes the checksum.
|
|
|
|
// It is calculated as a SHA-256 hash over payload bytes.
|
|
|
|
bytes PayloadChecksum = 1;
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// HeaderChecksum carries checksum of the object header structure.
|
|
|
|
// It covers all object attributes. Changing any field of the object except
|
|
|
|
// CreatorKey and ChecksumSignature changes the checksum.
|
|
|
|
// PayloadChecksum and HeaderChecksum cannot be merged due to the need
|
|
|
|
// to verify the header in the absence of a payload (e.g. in object.Head rpc).
|
|
|
|
// It is calculated as a SHA-256 hash over marshaled object header
|
|
|
|
// with cut CreatorKey and ChecksumSignature.
|
|
|
|
bytes HeaderChecksum = 2;
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// SessionToken carries token of the session within which the object was created.
|
|
|
|
// If session token is presented in object, it acts as the user's proof of the
|
|
|
|
// correctness of the CreatorKey.
|
|
|
|
service.Token SessionToken = 3;
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// CreatorKey carries public key of the object creator in a binary format.
|
|
|
|
bytes CreatorKey = 4;
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// ChecksumSignature carries signature of the structure checksum by the object creator.
|
|
|
|
bytes ChecksumSignature = 5;
|
|
|
|
}
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Integrity carries object integrity evidence.
|
|
|
|
Integrity integrity = 1;
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-08-04 20:43: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;
|
2020-08-04 20:36:24 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Value carries the string value of the object attribute.
|
|
|
|
string Value = 2;
|
|
|
|
}
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Attributes carries list of the object attributes in a string key-value format.
|
|
|
|
repeated Attribute Attributes = 2;
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// CreationEpoch carries number of NeoFS epoch on which the object was created.
|
|
|
|
uint64 CreationEpoch = 3;
|
2020-08-04 20:36:24 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Tombstone groups the options for deleting an object.
|
|
|
|
message Tombstone {
|
|
|
|
}
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Tombstone marks the object to be deleted.
|
|
|
|
Tombstone tombstone = 4;
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// HomomorphicHash carries homomorphic hash of the object payload.
|
|
|
|
bytes HomomorphicHash = 5;
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-05 09:00:47 +00:00
|
|
|
// StorageGroup groups meta information about a storage group.
|
|
|
|
message StorageGroup {
|
|
|
|
}
|
|
|
|
|
|
|
|
// StorageGroup marks an object containing information about a storage group.
|
|
|
|
StorageGroup storageGroup = 6;
|
2020-08-04 20:36:24 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Split groups information about spawning the object through a payload splitting.
|
|
|
|
message Split {
|
|
|
|
// Parent carries identifier of the origin object.
|
|
|
|
refs.ObjectID Parent = 1;
|
2020-08-04 20:36:24 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Previous carries identifier of the left split neighbor.
|
|
|
|
refs.ObjectID Previous = 2;
|
2020-08-04 20:36:24 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Previous carries identifier of the right split neighbor.
|
|
|
|
refs.ObjectID Next = 3;
|
2020-08-04 20:36:24 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Children carries list of identifiers of the objects generated by splitting the current.
|
|
|
|
repeated refs.ObjectID Children = 4;
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Origin carries the header of the origin object.
|
|
|
|
Header Origin = 5;
|
|
|
|
}
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Split carries the position of the object in the split hierarchy.
|
|
|
|
Split split = 7;
|
|
|
|
}
|
2020-08-04 10:18:38 +00:00
|
|
|
|
2020-08-04 20:43:33 +00:00
|
|
|
// Extended carries the additional part of the header.
|
|
|
|
Extended extended = 2;
|
2020-08-04 10:18:38 +00:00
|
|
|
}
|
|
|
|
|
2020-08-04 20:54:26 +00:00
|
|
|
// Object groups the information about the NeoFS object.
|
|
|
|
// It consists of payload data with additional service information.
|
2020-08-04 10:18:38 +00:00
|
|
|
message Object {
|
|
|
|
// Header carries the object header.
|
|
|
|
Header Header = 1;
|
2020-08-04 21:10:51 +00:00
|
|
|
|
2020-08-04 20:54:26 +00:00
|
|
|
// Payload carries the object payload bytes.
|
2020-08-04 10:18:38 +00:00
|
|
|
bytes Payload = 2;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|