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{},
|
Data: map[string]any{},
|
||||||
Deleted: e.Deleted,
|
Deleted: e.Deleted,
|
||||||
Diagdate: e.Diagdate.AsTime(),
|
Diagdate: e.Diagdate.AsTime(),
|
||||||
|
Owners: append([]string{}, e.Owners...),
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, d := range e.Data.GetFields() {
|
for k, d := range e.Data.GetFields() {
|
||||||
@@ -59,6 +60,7 @@ func DiagFromStorageType(diag *storage.Diag) (*Diag, error) {
|
|||||||
Data: data,
|
Data: data,
|
||||||
Deleted: diag.Deleted,
|
Deleted: diag.Deleted,
|
||||||
Diagdate: timestamppb.New(diag.Diagdate),
|
Diagdate: timestamppb.New(diag.Diagdate),
|
||||||
|
Owners: diag.Owners,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ type Diag struct {
|
|||||||
Data *structpb.Struct `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
|
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"`
|
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"`
|
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() {
|
func (x *Diag) Reset() {
|
||||||
@@ -123,6 +124,13 @@ func (x *Diag) GetDiagdate() *timestamppb.Timestamp {
|
|||||||
return nil
|
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 protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_diag_proto_rawDesc = []byte{
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20,
|
||||||
0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74,
|
0x03, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x2d, 0x5a, 0x2b, 0x67,
|
||||||
0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x64, 0x69, 0x61, 0x67, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x61,
|
0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f,
|
||||||
0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
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 (
|
var (
|
||||||
|
|||||||
@@ -14,4 +14,5 @@ message Diag {
|
|||||||
google.protobuf.Struct data = 6;
|
google.protobuf.Struct data = 6;
|
||||||
bool deleted = 7;
|
bool deleted = 7;
|
||||||
google.protobuf.Timestamp diagdate = 8;
|
google.protobuf.Timestamp diagdate = 8;
|
||||||
|
repeated string owners = 9;
|
||||||
}
|
}
|
||||||
@@ -3,12 +3,13 @@ package storage
|
|||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
type Diag struct {
|
type Diag struct {
|
||||||
ID string `json:"id" bson:"_id"`
|
ID string `json:"id" bson:"_id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Namespace string `json:"namespace"`
|
Namespace string `json:"namespace"`
|
||||||
Json_schema string `json:"json_schema"`
|
Json_schema string `json:"json_schema"`
|
||||||
Ui_schema string `json:"ui_schema"`
|
Ui_schema string `json:"ui_schema"`
|
||||||
Data map[string]any `json:"data"`
|
Data map[string]any `json:"data"`
|
||||||
Deleted bool `json:"deleted"`
|
Deleted bool `json:"deleted"`
|
||||||
Diagdate time.Time `json:"diagdate"`
|
Diagdate time.Time `json:"diagdate"`
|
||||||
|
Owners []string `json:"owners"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user