Add the ability to retrieve datasets for fields and groupby.

This commit is contained in:
Jim Myers 2020-06-29 10:35:13 -04:00
parent c40d001588
commit f7feeff01e
3 changed files with 17 additions and 7 deletions

8
dynamicquery/dataset.go Normal file
View File

@ -0,0 +1,8 @@
package dynamicquery
// Dataset is segment building block
type Dataset struct {
ID string `json:"id"`
EntityID string `json:"entity_id"`
Owner string `json:"owner"`
}

View File

@ -2,8 +2,9 @@ package dynamicquery
// Field selects a field to return
type Field struct {
Field string `json:"field"`
Label string `json:"label"`
DecimalAdjustment int `json:"decimal_adjustment"`
ToNegative bool `json:"to_negative"`
Field string `json:"field"`
Label string `json:"label"`
DecimalAdjustment int `json:"decimal_adjustment"`
ToNegative bool `json:"to_negative"`
Datasets []Dataset `json:"datasets"`
}

View File

@ -2,7 +2,8 @@ package dynamicquery
// GroupBy a set of fields
type GroupBy struct {
Field string `json:"field"`
Label string `json:"label"`
Timebucket string `json:"timebucket"`
Field string `json:"field"`
Label string `json:"label"`
Timebucket string `json:"timebucket"`
Datasets []Dataset `json:"datasets"`
}