From 291671c295e6f4b72526a7d47ecfde5070c7e259 Mon Sep 17 00:00:00 2001 From: Nicolas CARON Date: Tue, 11 Feb 2025 09:24:57 +0100 Subject: [PATCH] Add Owners in Diags --- grpcapi/diag.pb.go | 20 +++++++++++++++----- grpcapi/diag.proto | 1 + storage/Diag.go | 1 + 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/grpcapi/diag.pb.go b/grpcapi/diag.pb.go index 0497c0f..0b1424b 100644 --- a/grpcapi/diag.pb.go +++ b/grpcapi/diag.pb.go @@ -35,6 +35,7 @@ type Diag struct { Data *structpb.Struct `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` Deleted bool `protobuf:"varint,7,opt,name=deleted,proto3" json:"deleted,omitempty"` Diagdate *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=diagdate,proto3" json:"diagdate,omitempty"` + Owners []string `protobuf:"bytes,9,rep,name=owners,proto3" json:"owners,omitempty"` } func (x *Diag) Reset() { @@ -123,6 +124,13 @@ func (x *Diag) GetDiagdate() *timestamppb.Timestamp { return nil } +func (x *Diag) GetOwners() []string { + if x != nil { + return x.Owners + } + return nil +} + var File_diag_proto protoreflect.FileDescriptor var file_diag_proto_rawDesc = []byte{ @@ -130,7 +138,7 @@ var file_diag_proto_rawDesc = []byte{ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x02, 0x0a, 0x04, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x02, 0x0a, 0x04, 0x44, 0x69, 0x61, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, @@ -147,10 +155,12 @@ var file_diag_proto_rawDesc = []byte{ 0x69, 0x61, 0x67, 0x64, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x64, 0x69, 0x61, 0x67, 0x64, - 0x61, 0x74, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, - 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x64, 0x69, 0x61, 0x67, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x61, - 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x2d, 0x5a, 0x2b, 0x67, + 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, + 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x64, 0x69, 0x61, + 0x67, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/grpcapi/diag.proto b/grpcapi/diag.proto index 1afabb6..8d4457b 100644 --- a/grpcapi/diag.proto +++ b/grpcapi/diag.proto @@ -14,4 +14,5 @@ message Diag { google.protobuf.Struct data = 6; bool deleted = 7; google.protobuf.Timestamp diagdate = 8; + repeated string owners = 9; } \ No newline at end of file diff --git a/storage/Diag.go b/storage/Diag.go index c805520..8f95c7d 100644 --- a/storage/Diag.go +++ b/storage/Diag.go @@ -11,4 +11,5 @@ type Diag struct { Data map[string]any `json:"data"` Deleted bool `json:"deleted"` Diagdate time.Time `json:"diagdate"` + Owners string `json:"owners"` }