feat(influxdb): add doc meta type
parent
401ec79bff
commit
75b19dc1ec
|
@ -25,6 +25,7 @@ type Document struct {
|
|||
// data in the meta should be indexed and queryable.
|
||||
type DocumentMeta struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Version string `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ var (
|
|||
ID: doc1ID,
|
||||
Meta: influxdb.DocumentMeta{
|
||||
Name: "doc1",
|
||||
Type: "typ1",
|
||||
},
|
||||
Content: "content1",
|
||||
Labels: []*influxdb.Label{
|
||||
|
@ -75,6 +76,7 @@ var (
|
|||
ID: doc4ID,
|
||||
Meta: influxdb.DocumentMeta{
|
||||
Name: "doc4",
|
||||
Type: "typ4",
|
||||
},
|
||||
Content: "content4",
|
||||
}
|
||||
|
@ -122,7 +124,8 @@ var (
|
|||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "doc1"
|
||||
"name": "doc1",
|
||||
"type": "typ1"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -7022,6 +7022,8 @@ components:
|
|||
properties:
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
version:
|
||||
type: string
|
||||
required:
|
||||
|
|
|
@ -61,6 +61,7 @@ func NewDocumentIntegrationTest(store kv.Store) func(t *testing.T) {
|
|||
d1 = &influxdb.Document{
|
||||
Meta: influxdb.DocumentMeta{
|
||||
Name: "i1",
|
||||
Type: "type1",
|
||||
},
|
||||
Content: map[string]interface{}{
|
||||
"v1": "v1",
|
||||
|
|
Loading…
Reference in New Issue