Skip to content

Commit 78bcda2

Browse files
committed
feat(polykey): added storage type for easier tier resolution
1 parent 88a30ed commit 78bcda2

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

gen/go/polykey/v2/common.pb.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ type KeyMetadata struct {
217217
DataClassification string `protobuf:"bytes,14,opt,name=data_classification,json=dataClassification,proto3" json:"data_classification,omitempty"`
218218
MetadataChecksum string `protobuf:"bytes,15,opt,name=metadata_checksum,json=metadataChecksum,proto3" json:"metadata_checksum,omitempty"`
219219
AccessCount int64 `protobuf:"varint,16,opt,name=access_count,json=accessCount,proto3" json:"access_count,omitempty"`
220+
StorageType string `protobuf:"bytes,17,opt,name=storage_type,json=storageType,proto3" json:"storage_type,omitempty"`
220221
unknownFields protoimpl.UnknownFields
221222
sizeCache protoimpl.SizeCache
222223
}
@@ -363,6 +364,13 @@ func (x *KeyMetadata) GetAccessCount() int64 {
363364
return 0
364365
}
365366

367+
func (x *KeyMetadata) GetStorageType() string {
368+
if x != nil {
369+
return x.StorageType
370+
}
371+
return ""
372+
}
373+
366374
type KeyMaterial struct {
367375
state protoimpl.MessageState `protogen:"open.v1"`
368376
EncryptedKeyData []byte `protobuf:"bytes,1,opt,name=encrypted_key_data,json=encryptedKeyData,proto3" json:"encrypted_key_data,omitempty"`
@@ -608,7 +616,7 @@ const file_polykey_v2_common_proto_rawDesc = "" +
608616
"\x11custom_attributes\x18\b \x03(\v22.polykey.v2.AccessAttributes.CustomAttributesEntryR\x10customAttributes\x1aC\n" +
609617
"\x15CustomAttributesEntry\x12\x10\n" +
610618
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
611-
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x9c\a\n" +
619+
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xbf\a\n" +
612620
"\vKeyMetadata\x12\x15\n" +
613621
"\x06key_id\x18\x01 \x01(\tR\x05keyId\x12.\n" +
614622
"\bkey_type\x18\x02 \x01(\x0e2\x13.polykey.v2.KeyTypeR\akeyType\x12-\n" +
@@ -629,7 +637,8 @@ const file_polykey_v2_common_proto_rawDesc = "" +
629637
"\x04tags\x18\r \x03(\v2!.polykey.v2.KeyMetadata.TagsEntryR\x04tags\x12/\n" +
630638
"\x13data_classification\x18\x0e \x01(\tR\x12dataClassification\x12+\n" +
631639
"\x11metadata_checksum\x18\x0f \x01(\tR\x10metadataChecksum\x12!\n" +
632-
"\faccess_count\x18\x10 \x01(\x03R\vaccessCount\x1aA\n" +
640+
"\faccess_count\x18\x10 \x01(\x03R\vaccessCount\x12!\n" +
641+
"\fstorage_type\x18\x11 \x01(\tR\vstorageType\x1aA\n" +
633642
"\x13AccessPoliciesEntry\x12\x10\n" +
634643
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
635644
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a7\n" +

proto/polykey/v2/common.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ message KeyMetadata {
4545
string data_classification = 14;
4646
string metadata_checksum = 15;
4747
int64 access_count = 16;
48+
string storage_type = 17;
4849
}
4950

5051
message KeyMaterial {

0 commit comments

Comments
 (0)