feat(influxdb): add doc meta type

pull/13412/head
Kelvin Wang 2019-04-15 15:48:54 -04:00
parent 401ec79bff
commit 75b19dc1ec
4 changed files with 8 additions and 1 deletions

View File

@ -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"`
}

View File

@ -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"
}
},
{

View File

@ -7022,6 +7022,8 @@ components:
properties:
name:
type: string
type:
type: string
version:
type: string
required:

View File

@ -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",