forked from TrueCloudLab/frostfs-api
b46011db45
This commit merges object system header fields ID and CID into field Address of type refs.Address. This will allow you to reuse an already existing type of object reference without duplication and simplify taking the address from the object body Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
122 lines
4.1 KiB
Protocol Buffer
122 lines
4.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
package object;
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/object";
|
|
option csharp_namespace = "NeoFS.API.Object";
|
|
|
|
import "refs/types.proto";
|
|
import "service/verify.proto";
|
|
import "storagegroup/types.proto";
|
|
|
|
// 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.
|
|
string Value = 2;
|
|
}
|
|
|
|
message ExtendedHeader {
|
|
oneof Value {
|
|
// Link to other objects
|
|
Link Link = 1;
|
|
// Redirect not used yet
|
|
refs.Address Redirect = 2;
|
|
// Attribute is a set of K-V object attributes
|
|
Attribute Attribute = 3;
|
|
// Transform defines transform operation (e.g. payload split)
|
|
Transform Transform = 4;
|
|
// Tombstone header that set up in deleted objects
|
|
Tombstone Tombstone = 5;
|
|
// Token header contains token of the session within which the object was created
|
|
service.Token Token = 6;
|
|
// HomoHash is a homomorphic hash of original object payload
|
|
bytes HomoHash = 7;
|
|
// 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;
|
|
// Address carries object address in the NeoFS system.
|
|
// It encapsulates the object and the container identifiers.
|
|
refs.Address Address = 3;
|
|
// OwnerID is a wallet address
|
|
bytes OwnerID = 4;
|
|
// CreationEpoch carries number of NeoFS epoch on which the object was created.
|
|
uint64 CreationEpoch = 6;
|
|
}
|
|
|
|
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
|
|
bytes ID = 2;
|
|
}
|
|
|
|
message Transform {
|
|
enum Type {
|
|
Unknown = 0;
|
|
// Split sets when object created after payload split
|
|
Split = 1;
|
|
// Sign sets when object created after re-signing (doesn't used)
|
|
Sign = 2;
|
|
// Mould sets when object created after filling missing headers in the object
|
|
Mould = 3;
|
|
}
|
|
// Type of object transformation
|
|
Type type = 1;
|
|
}
|
|
|
|
// Header groups the information about the NeoFS object.
|
|
message Header {
|
|
// SystemHeader describes system header
|
|
SystemHeader SystemHeader = 1;
|
|
|
|
// ExtendedHeaders describes a set of an extended headers
|
|
repeated ExtendedHeader ExtendedHeaders = 2;
|
|
}
|
|
|
|
message Object {
|
|
// Header carries the object header.
|
|
Header Header = 1;
|
|
// Payload is an object's payload
|
|
bytes Payload = 2;
|
|
}
|
|
|
|
message PublicKey {
|
|
// Value contains marshaled ecdsa public key
|
|
bytes Value = 1;
|
|
}
|