From 5b3860e3d9fd20e7caeba65a1ee4b2e09737450a Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Mon, 16 Aug 2021 14:40:48 +0300 Subject: [PATCH] [#331] v2/object: Recompile proto files Add new enum matchtype `COMMON_PREFIX` to object. Signed-off-by: Pavel Karpy --- v2/netmap/grpc/types.pb.go | 11 +++++++++++ v2/object/grpc/types.pb.go | 32 ++++++++++++++++++-------------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/v2/netmap/grpc/types.pb.go b/v2/netmap/grpc/types.pb.go index caee48b..5b2fb51 100644 --- a/v2/netmap/grpc/types.pb.go +++ b/v2/netmap/grpc/types.pb.go @@ -668,6 +668,17 @@ func (x *NetworkInfo) GetMagicNumber() uint64 { // `Attribute` is a Key-Value metadata pair. Key name must be a valid UTF-8 // string. Value can't be empty. // +// Attributes can be constructed into a chain of attributes: any attribute can +// have a parent attribute and a child attribute (except the first and the last +// one). A string representation of the chain of attributes in NeoFS Storage +// Node configuration uses ":" and "/" symbols, e.g.: +// +// `NEOFS_NODE_ATTRIBUTE_1=key1:val1/key2:val2` +// +// Therefore the string attribute representation in the Node configuration must +// use "\:", "\/" and "\\" escaped symbols if any of them appears in an attribute's +// key or value. +// // Node's attributes are mostly used during Storage Policy evaluation to // calculate object's placement and find a set of nodes satisfying policy // requirements. There are some "well-known" node attributes common to all the diff --git a/v2/object/grpc/types.pb.go b/v2/object/grpc/types.pb.go index 6334877..1da2414 100644 --- a/v2/object/grpc/types.pb.go +++ b/v2/object/grpc/types.pb.go @@ -28,14 +28,13 @@ const ( const _ = proto.ProtoPackageIsVersion4 // Type of the object payload content. Only `REGULAR` type objects can be split, -// hence `TOMBSTONE` and `STORAGEGROUP` payload is limited by maximal object +// hence `TOMBSTONE` and `STORAGE_GROUP` payload is limited by maximal object // size. // -// String presentation of object type is PascalCased `ObjectType` enumeration -// item name: -// * Regular -// * Tombstone -// * StorageGroup +// String presentation of object type is the same as definition: +// * REGULAR +// * TOMBSTONE +// * STORAGE_GROUP type ObjectType int32 const ( @@ -100,6 +99,8 @@ const ( MatchType_STRING_NOT_EQUAL MatchType = 2 // Lack of key MatchType_NOT_PRESENT MatchType = 3 + // String prefix match + MatchType_COMMON_PREFIX MatchType = 4 ) // Enum value maps for MatchType. @@ -109,12 +110,14 @@ var ( 1: "STRING_EQUAL", 2: "STRING_NOT_EQUAL", 3: "NOT_PRESENT", + 4: "COMMON_PREFIX", } MatchType_value = map[string]int32{ "MATCH_TYPE_UNSPECIFIED": 0, "STRING_EQUAL": 1, "STRING_NOT_EQUAL": 2, "NOT_PRESENT": 3, + "COMMON_PREFIX": 4, } ) @@ -849,19 +852,20 @@ var file_v2_object_grpc_types_proto_rawDesc = []byte{ 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x47, 0x55, 0x4c, 0x41, 0x52, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x4f, 0x52, - 0x41, 0x47, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x02, 0x2a, 0x60, 0x0a, 0x09, 0x4d, + 0x41, 0x47, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x02, 0x2a, 0x73, 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, - 0x4e, 0x4f, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x42, 0x56, 0x5a, - 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x73, 0x70, 0x63, - 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d, - 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x3b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xaa, 0x02, 0x1a, 0x4e, 0x65, 0x6f, 0x2e, 0x46, - 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4e, 0x4f, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x11, 0x0a, + 0x0d, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x10, 0x04, + 0x42, 0x56, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, + 0x73, 0x70, 0x63, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x2d, 0x61, + 0x70, 0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x3b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xaa, 0x02, 0x1a, 0x4e, 0x65, + 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, + 0x49, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var (