Compare commits
3 Commits
AddDiagDat
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 64da61495c | |||
| 56bd7af62d | |||
| 291671c295 |
@@ -21,6 +21,7 @@ func (e Diag) ToStorageType() storage.Diag {
|
||||
Data: map[string]any{},
|
||||
Deleted: e.Deleted,
|
||||
Diagdate: e.Diagdate.AsTime(),
|
||||
Owners: append([]string{}, e.Owners...),
|
||||
}
|
||||
|
||||
for k, d := range e.Data.GetFields() {
|
||||
@@ -59,6 +60,7 @@ func DiagFromStorageType(diag *storage.Diag) (*Diag, error) {
|
||||
Data: data,
|
||||
Deleted: diag.Deleted,
|
||||
Diagdate: timestamppb.New(diag.Diagdate),
|
||||
Owners: diag.Owners,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -14,4 +14,5 @@ message Diag {
|
||||
google.protobuf.Struct data = 6;
|
||||
bool deleted = 7;
|
||||
google.protobuf.Timestamp diagdate = 8;
|
||||
repeated string owners = 9;
|
||||
}
|
||||
@@ -3,12 +3,13 @@ package storage
|
||||
import "time"
|
||||
|
||||
type Diag struct {
|
||||
ID string `json:"id" bson:"_id"`
|
||||
Name string `json:"name"`
|
||||
Namespace string `json:"namespace"`
|
||||
Json_schema string `json:"json_schema"`
|
||||
Ui_schema string `json:"ui_schema"`
|
||||
Data map[string]any `json:"data"`
|
||||
Deleted bool `json:"deleted"`
|
||||
Diagdate time.Time `json:"diagdate"`
|
||||
ID string `json:"id" bson:"_id"`
|
||||
Name string `json:"name"`
|
||||
Namespace string `json:"namespace"`
|
||||
Json_schema string `json:"json_schema"`
|
||||
Ui_schema string `json:"ui_schema"`
|
||||
Data map[string]any `json:"data"`
|
||||
Deleted bool `json:"deleted"`
|
||||
Diagdate time.Time `json:"diagdate"`
|
||||
Owners []string `json:"owners"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user