Chore: Update oapi-codegen library (#62962)
* Update oapi library and thema * Use fork commit to fix elasticsearch and cloudwatch generators * Update thema * Fixes * Update thema with last fixes * Sync * Fix test * Update thema and schemas * Update thema
This commit is contained in:
@@ -78,7 +78,7 @@ func (hs *HTTPServer) LoadPlaylistDashboards(ctx context.Context, orgID int64, s
|
||||
return result, err
|
||||
}
|
||||
|
||||
playlistItems := *dto.Items
|
||||
playlistItems := dto.Items
|
||||
|
||||
dashboardByIDs := make([]int64, 0)
|
||||
dashboardByTag := make([]string, 0)
|
||||
|
||||
@@ -183,13 +183,21 @@ func (cd *CoremodelDeclaration) GenerateGoCoremodel(path string) (WriteDiffer, e
|
||||
return nil, fmt.Errorf("error executing imports template: %w", err)
|
||||
}
|
||||
|
||||
gostr, err := codegen.Generate(oT, lin.Name(), codegen.Options{
|
||||
GenerateTypes: true,
|
||||
SkipPrune: true,
|
||||
SkipFmt: true,
|
||||
UserTemplates: map[string]string{
|
||||
"imports.tmpl": importbuf.String(),
|
||||
"typedef.tmpl": tmplTypedef,
|
||||
gostr, err := codegen.Generate(oT, codegen.Configuration{
|
||||
PackageName: lin.Name(),
|
||||
Generate: codegen.GenerateOptions{
|
||||
Models: true,
|
||||
},
|
||||
Compatibility: codegen.CompatibilityOptions{
|
||||
AlwaysPrefixEnumValues: true,
|
||||
},
|
||||
OutputOptions: codegen.OutputOptions{
|
||||
SkipFmt: true,
|
||||
SkipPrune: true,
|
||||
UserTemplates: map[string]string{
|
||||
"imports.tmpl": importbuf.String(),
|
||||
"typedef.tmpl": tmplTypedef,
|
||||
},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@@ -12,47 +12,37 @@ package dashboard
|
||||
|
||||
// Defines values for Style.
|
||||
const (
|
||||
StyleDark Style = "dark"
|
||||
|
||||
StyleDark Style = "dark"
|
||||
StyleLight Style = "light"
|
||||
)
|
||||
|
||||
// Defines values for CursorSync.
|
||||
const (
|
||||
CursorSyncN0 CursorSync = 0
|
||||
|
||||
CursorSyncN1 CursorSync = 1
|
||||
|
||||
CursorSyncN2 CursorSync = 2
|
||||
)
|
||||
|
||||
// Defines values for LinkType.
|
||||
const (
|
||||
LinkTypeDashboards LinkType = "dashboards"
|
||||
|
||||
LinkTypeLink LinkType = "link"
|
||||
LinkTypeLink LinkType = "link"
|
||||
)
|
||||
|
||||
// Defines values for FieldColorModeId.
|
||||
const (
|
||||
FieldColorModeIdContinuousGrYlRd FieldColorModeId = "continuous-GrYlRd"
|
||||
|
||||
FieldColorModeIdFixed FieldColorModeId = "fixed"
|
||||
|
||||
FieldColorModeIdPaletteClassic FieldColorModeId = "palette-classic"
|
||||
|
||||
FieldColorModeIdFixed FieldColorModeId = "fixed"
|
||||
FieldColorModeIdPaletteClassic FieldColorModeId = "palette-classic"
|
||||
FieldColorModeIdPaletteSaturated FieldColorModeId = "palette-saturated"
|
||||
|
||||
FieldColorModeIdThresholds FieldColorModeId = "thresholds"
|
||||
FieldColorModeIdThresholds FieldColorModeId = "thresholds"
|
||||
)
|
||||
|
||||
// Defines values for FieldColorSeriesByMode.
|
||||
const (
|
||||
FieldColorSeriesByModeLast FieldColorSeriesByMode = "last"
|
||||
|
||||
FieldColorSeriesByModeMax FieldColorSeriesByMode = "max"
|
||||
|
||||
FieldColorSeriesByModeMin FieldColorSeriesByMode = "min"
|
||||
FieldColorSeriesByModeMax FieldColorSeriesByMode = "max"
|
||||
FieldColorSeriesByModeMin FieldColorSeriesByMode = "min"
|
||||
)
|
||||
|
||||
// Defines values for GraphPanelType.
|
||||
@@ -67,35 +57,43 @@ const (
|
||||
|
||||
// Defines values for LoadingState.
|
||||
const (
|
||||
LoadingStateDone LoadingState = "Done"
|
||||
|
||||
LoadingStateError LoadingState = "Error"
|
||||
|
||||
LoadingStateLoading LoadingState = "Loading"
|
||||
|
||||
LoadingStateDone LoadingState = "Done"
|
||||
LoadingStateError LoadingState = "Error"
|
||||
LoadingStateLoading LoadingState = "Loading"
|
||||
LoadingStateNotStarted LoadingState = "NotStarted"
|
||||
|
||||
LoadingStateStreaming LoadingState = "Streaming"
|
||||
LoadingStateStreaming LoadingState = "Streaming"
|
||||
)
|
||||
|
||||
// Defines values for MappingType.
|
||||
const (
|
||||
MappingTypeRange MappingType = "range"
|
||||
|
||||
MappingTypeRegex MappingType = "regex"
|
||||
|
||||
MappingTypeRange MappingType = "range"
|
||||
MappingTypeRegex MappingType = "regex"
|
||||
MappingTypeSpecial MappingType = "special"
|
||||
|
||||
MappingTypeValue MappingType = "value"
|
||||
MappingTypeValue MappingType = "value"
|
||||
)
|
||||
|
||||
// Defines values for PanelRepeatDirection.
|
||||
const (
|
||||
PanelRepeatDirectionH PanelRepeatDirection = "h"
|
||||
|
||||
PanelRepeatDirectionV PanelRepeatDirection = "v"
|
||||
)
|
||||
|
||||
// Defines values for RangeMapType.
|
||||
const (
|
||||
RangeMapTypeRange RangeMapType = "range"
|
||||
RangeMapTypeRegex RangeMapType = "regex"
|
||||
RangeMapTypeSpecial RangeMapType = "special"
|
||||
RangeMapTypeValue RangeMapType = "value"
|
||||
)
|
||||
|
||||
// Defines values for RegexMapType.
|
||||
const (
|
||||
RegexMapTypeRange RegexMapType = "range"
|
||||
RegexMapTypeRegex RegexMapType = "regex"
|
||||
RegexMapTypeSpecial RegexMapType = "special"
|
||||
RegexMapTypeValue RegexMapType = "value"
|
||||
)
|
||||
|
||||
// Defines values for RowPanelType.
|
||||
const (
|
||||
RowPanelTypeRow RowPanelType = "row"
|
||||
@@ -104,58 +102,58 @@ const (
|
||||
// Defines values for SpecialValueMapOptionsMatch.
|
||||
const (
|
||||
SpecialValueMapOptionsMatchFalse SpecialValueMapOptionsMatch = "false"
|
||||
SpecialValueMapOptionsMatchTrue SpecialValueMapOptionsMatch = "true"
|
||||
)
|
||||
|
||||
SpecialValueMapOptionsMatchTrue SpecialValueMapOptionsMatch = "true"
|
||||
// Defines values for SpecialValueMapType.
|
||||
const (
|
||||
SpecialValueMapTypeRange SpecialValueMapType = "range"
|
||||
SpecialValueMapTypeRegex SpecialValueMapType = "regex"
|
||||
SpecialValueMapTypeSpecial SpecialValueMapType = "special"
|
||||
SpecialValueMapTypeValue SpecialValueMapType = "value"
|
||||
)
|
||||
|
||||
// Defines values for SpecialValueMatch.
|
||||
const (
|
||||
SpecialValueMatchEmpty SpecialValueMatch = "empty"
|
||||
|
||||
SpecialValueMatchFalse SpecialValueMatch = "false"
|
||||
|
||||
SpecialValueMatchNan SpecialValueMatch = "nan"
|
||||
|
||||
SpecialValueMatchNull SpecialValueMatch = "null"
|
||||
|
||||
SpecialValueMatchEmpty SpecialValueMatch = "empty"
|
||||
SpecialValueMatchFalse SpecialValueMatch = "false"
|
||||
SpecialValueMatchNan SpecialValueMatch = "nan"
|
||||
SpecialValueMatchNull SpecialValueMatch = "null"
|
||||
SpecialValueMatchNullNan SpecialValueMatch = "null+nan"
|
||||
|
||||
SpecialValueMatchTrue SpecialValueMatch = "true"
|
||||
SpecialValueMatchTrue SpecialValueMatch = "true"
|
||||
)
|
||||
|
||||
// Defines values for ThresholdsMode.
|
||||
const (
|
||||
ThresholdsModeAbsolute ThresholdsMode = "absolute"
|
||||
|
||||
ThresholdsModeAbsolute ThresholdsMode = "absolute"
|
||||
ThresholdsModePercentage ThresholdsMode = "percentage"
|
||||
)
|
||||
|
||||
// Defines values for ValueMapType.
|
||||
const (
|
||||
ValueMapTypeRange ValueMapType = "range"
|
||||
ValueMapTypeRegex ValueMapType = "regex"
|
||||
ValueMapTypeSpecial ValueMapType = "special"
|
||||
ValueMapTypeValue ValueMapType = "value"
|
||||
)
|
||||
|
||||
// Defines values for VariableHide.
|
||||
const (
|
||||
VariableHideN0 VariableHide = 0
|
||||
|
||||
VariableHideN1 VariableHide = 1
|
||||
|
||||
VariableHideN2 VariableHide = 2
|
||||
)
|
||||
|
||||
// Defines values for VariableType.
|
||||
const (
|
||||
VariableTypeAdhoc VariableType = "adhoc"
|
||||
|
||||
VariableTypeConstant VariableType = "constant"
|
||||
|
||||
VariableTypeCustom VariableType = "custom"
|
||||
|
||||
VariableTypeAdhoc VariableType = "adhoc"
|
||||
VariableTypeConstant VariableType = "constant"
|
||||
VariableTypeCustom VariableType = "custom"
|
||||
VariableTypeDatasource VariableType = "datasource"
|
||||
|
||||
VariableTypeInterval VariableType = "interval"
|
||||
|
||||
VariableTypeQuery VariableType = "query"
|
||||
|
||||
VariableTypeSystem VariableType = "system"
|
||||
|
||||
VariableTypeTextbox VariableType = "textbox"
|
||||
VariableTypeInterval VariableType = "interval"
|
||||
VariableTypeQuery VariableType = "query"
|
||||
VariableTypeSystem VariableType = "system"
|
||||
VariableTypeTextbox VariableType = "textbox"
|
||||
)
|
||||
|
||||
// TODO docs
|
||||
@@ -202,7 +200,7 @@ type AnnotationTarget struct {
|
||||
type Dashboard struct {
|
||||
// TODO docs
|
||||
Annotations *struct {
|
||||
List *[]AnnotationQuery `json:"list,omitempty"`
|
||||
List []AnnotationQuery `json:"list,omitempty"`
|
||||
} `json:"annotations,omitempty"`
|
||||
|
||||
// Description of dashboard.
|
||||
@@ -227,13 +225,13 @@ type Dashboard struct {
|
||||
Id *int64 `json:"id,omitempty"`
|
||||
|
||||
// TODO docs
|
||||
Links *[]Link `json:"links,omitempty"`
|
||||
Links []Link `json:"links,omitempty"`
|
||||
|
||||
// When set to true, the dashboard will redraw panels at an interval matching the pixel width.
|
||||
// This will keep data "moving left" regardless of the query refresh rate. This setting helps
|
||||
// avoid dashboards presenting stale live data
|
||||
LiveNow *bool `json:"liveNow,omitempty"`
|
||||
Panels *[]interface{} `json:"panels,omitempty"`
|
||||
LiveNow *bool `json:"liveNow,omitempty"`
|
||||
Panels []interface{} `json:"panels,omitempty"`
|
||||
|
||||
// Refresh rate of dashboard. Represented via interval string, e.g. "5s", "1m", "1h", "1d".
|
||||
Refresh *interface{} `json:"refresh,omitempty"`
|
||||
@@ -255,11 +253,11 @@ type Dashboard struct {
|
||||
Style Style `json:"style"`
|
||||
|
||||
// Tags associated with dashboard.
|
||||
Tags *[]string `json:"tags,omitempty"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
|
||||
// TODO docs
|
||||
Templating *struct {
|
||||
List *[]VariableModel `json:"list,omitempty"`
|
||||
List []VariableModel `json:"list,omitempty"`
|
||||
} `json:"templating,omitempty"`
|
||||
|
||||
// Time range for dashboard, e.g. last 6 hours, last 7 days, etc
|
||||
@@ -366,7 +364,7 @@ type FieldColor struct {
|
||||
FixedColor *string `json:"fixedColor,omitempty"`
|
||||
|
||||
// The main color scheme mode
|
||||
Mode interface{} `json:"mode"`
|
||||
Mode string `json:"mode"`
|
||||
|
||||
// TODO docs
|
||||
SeriesBy *FieldColorSeriesByMode `json:"seriesBy,omitempty"`
|
||||
@@ -385,7 +383,7 @@ type FieldConfig struct {
|
||||
|
||||
// custom is specified by the PanelFieldConfig field
|
||||
// in panel plugin schemas.
|
||||
Custom *map[string]interface{} `json:"custom,omitempty"`
|
||||
Custom map[string]interface{} `json:"custom,omitempty"`
|
||||
|
||||
// Significant digits (for display)
|
||||
Decimals *float32 `json:"decimals,omitempty"`
|
||||
@@ -404,12 +402,12 @@ type FieldConfig struct {
|
||||
Filterable *bool `json:"filterable,omitempty"`
|
||||
|
||||
// The behavior when clicking on a result
|
||||
Links *[]interface{} `json:"links,omitempty"`
|
||||
Links []interface{} `json:"links,omitempty"`
|
||||
|
||||
// Convert input values into a display string
|
||||
Mappings *[]ValueMapping `json:"mappings,omitempty"`
|
||||
Max *float32 `json:"max,omitempty"`
|
||||
Min *float32 `json:"min,omitempty"`
|
||||
Mappings []interface{} `json:"mappings,omitempty"`
|
||||
Max *float32 `json:"max,omitempty"`
|
||||
Min *float32 `json:"min,omitempty"`
|
||||
|
||||
// Alternative to empty string
|
||||
NoValue *string `json:"noValue,omitempty"`
|
||||
@@ -454,13 +452,13 @@ type GraphPanelType string
|
||||
|
||||
// GridPos defines model for GridPos.
|
||||
type GridPos struct {
|
||||
// Panel
|
||||
// H Panel
|
||||
H int `json:"h"`
|
||||
|
||||
// true if fixed
|
||||
// Static true if fixed
|
||||
Static *bool `json:"static,omitempty"`
|
||||
|
||||
// Panel
|
||||
// W Panel
|
||||
W int `json:"w"`
|
||||
|
||||
// Panel x
|
||||
@@ -506,7 +504,7 @@ type Panel struct {
|
||||
Uid *string `json:"uid,omitempty"`
|
||||
} `json:"datasource,omitempty"`
|
||||
|
||||
// Description.
|
||||
// Description Description.
|
||||
Description *string `json:"description,omitempty"`
|
||||
FieldConfig FieldConfigSource `json:"fieldConfig"`
|
||||
GridPos *GridPos `json:"gridPos,omitempty"`
|
||||
@@ -521,7 +519,7 @@ type Panel struct {
|
||||
|
||||
// Panel links.
|
||||
// TODO fill this out - seems there are a couple variants?
|
||||
Links *[]Link `json:"links,omitempty"`
|
||||
Links []Link `json:"links,omitempty"`
|
||||
|
||||
// TODO docs
|
||||
MaxDataPoints *float32 `json:"maxDataPoints,omitempty"`
|
||||
@@ -545,20 +543,20 @@ type Panel struct {
|
||||
RepeatPanelId *int64 `json:"repeatPanelId,omitempty"`
|
||||
|
||||
// TODO docs
|
||||
Tags *[]string `json:"tags,omitempty"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
|
||||
// TODO docs
|
||||
Targets *[]Target `json:"targets,omitempty"`
|
||||
Targets []Target `json:"targets,omitempty"`
|
||||
|
||||
// TODO docs - seems to be an old field from old dashboard alerts?
|
||||
Thresholds *[]interface{} `json:"thresholds,omitempty"`
|
||||
Thresholds []interface{} `json:"thresholds,omitempty"`
|
||||
|
||||
// TODO docs
|
||||
// TODO tighter constraint
|
||||
TimeFrom *string `json:"timeFrom,omitempty"`
|
||||
|
||||
// TODO docs
|
||||
TimeRegions *[]interface{} `json:"timeRegions,omitempty"`
|
||||
TimeRegions []interface{} `json:"timeRegions,omitempty"`
|
||||
|
||||
// TODO docs
|
||||
// TODO tighter constraint
|
||||
@@ -583,20 +581,19 @@ type PanelRepeatDirection string
|
||||
// TODO docs
|
||||
type RangeMap struct {
|
||||
Options struct {
|
||||
// to and from are `number | null` in current ts, really not sure what to do
|
||||
// From to and from are `number | null` in current ts, really not sure what to do
|
||||
From float64 `json:"from"`
|
||||
|
||||
// TODO docs
|
||||
Result ValueMappingResult `json:"result"`
|
||||
To float64 `json:"to"`
|
||||
} `json:"options"`
|
||||
Type struct {
|
||||
// Embedded struct due to allOf(#/components/schemas/MappingType)
|
||||
MappingType `yaml:",inline"`
|
||||
// Embedded fields due to inline allOf schema
|
||||
} `json:"type"`
|
||||
Type RangeMapType `json:"type"`
|
||||
}
|
||||
|
||||
// RangeMapType defines model for RangeMap.Type.
|
||||
type RangeMapType string
|
||||
|
||||
// TODO docs
|
||||
type RegexMap struct {
|
||||
Options struct {
|
||||
@@ -605,13 +602,12 @@ type RegexMap struct {
|
||||
// TODO docs
|
||||
Result ValueMappingResult `json:"result"`
|
||||
} `json:"options"`
|
||||
Type struct {
|
||||
// Embedded struct due to allOf(#/components/schemas/MappingType)
|
||||
MappingType `yaml:",inline"`
|
||||
// Embedded fields due to inline allOf schema
|
||||
} `json:"type"`
|
||||
Type RegexMapType `json:"type"`
|
||||
}
|
||||
|
||||
// RegexMapType defines model for RegexMap.Type.
|
||||
type RegexMapType string
|
||||
|
||||
// Row panel
|
||||
type RowPanel struct {
|
||||
Collapsed bool `json:"collapsed"`
|
||||
@@ -679,16 +675,15 @@ type SpecialValueMap struct {
|
||||
// TODO docs
|
||||
Result ValueMappingResult `json:"result"`
|
||||
} `json:"options"`
|
||||
Type struct {
|
||||
// Embedded struct due to allOf(#/components/schemas/MappingType)
|
||||
MappingType `yaml:",inline"`
|
||||
// Embedded fields due to inline allOf schema
|
||||
} `json:"type"`
|
||||
Type SpecialValueMapType `json:"type"`
|
||||
}
|
||||
|
||||
// SpecialValueMapOptionsMatch defines model for SpecialValueMap.Options.Match.
|
||||
type SpecialValueMapOptionsMatch string
|
||||
|
||||
// SpecialValueMapType defines model for SpecialValueMap.Type.
|
||||
type SpecialValueMapType string
|
||||
|
||||
// TODO docs
|
||||
type SpecialValueMatch string
|
||||
|
||||
@@ -699,7 +694,7 @@ type SpecialValueMatch string
|
||||
// with types derived from plugins in the Instance variant.
|
||||
// When working directly from CUE, importers can extend this
|
||||
// type directly to achieve the same effect.
|
||||
type Target map[string]interface{}
|
||||
type Target = map[string]interface{}
|
||||
|
||||
// TODO docs
|
||||
type Threshold struct {
|
||||
@@ -730,15 +725,11 @@ type ThresholdsMode string
|
||||
// TODO docs
|
||||
type ValueMap struct {
|
||||
Options map[string]ValueMappingResult `json:"options"`
|
||||
Type struct {
|
||||
// Embedded struct due to allOf(#/components/schemas/MappingType)
|
||||
MappingType `yaml:",inline"`
|
||||
// Embedded fields due to inline allOf schema
|
||||
} `json:"type"`
|
||||
Type ValueMapType `json:"type"`
|
||||
}
|
||||
|
||||
// TODO docs
|
||||
type ValueMapping interface{}
|
||||
// ValueMapType defines model for ValueMap.Type.
|
||||
type ValueMapType string
|
||||
|
||||
// TODO docs
|
||||
type ValueMappingResult struct {
|
||||
@@ -757,15 +748,15 @@ type VariableHide int
|
||||
// TODO there appear to be a lot of different kinds of [template] vars here? if so need a disjunction
|
||||
type VariableModel struct {
|
||||
// Ref to a DataSource instance
|
||||
Datasource *DataSourceRef `json:"datasource,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Error *map[string]interface{} `json:"error,omitempty"`
|
||||
Global bool `json:"global"`
|
||||
Hide VariableHide `json:"hide"`
|
||||
Id string `json:"id"`
|
||||
Index int `json:"index"`
|
||||
Label *string `json:"label,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Datasource *DataSourceRef `json:"datasource,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Error map[string]interface{} `json:"error,omitempty"`
|
||||
Global bool `json:"global"`
|
||||
Hide VariableHide `json:"hide"`
|
||||
Id string `json:"id"`
|
||||
Index int `json:"index"`
|
||||
Label *string `json:"label,omitempty"`
|
||||
Name string `json:"name"`
|
||||
|
||||
// TODO: Move this into a separated QueryVariableModel type
|
||||
Query *interface{} `json:"query,omitempty"`
|
||||
|
||||
@@ -53,6 +53,6 @@ type LibraryPanel struct {
|
||||
// Library element UID
|
||||
Uid string `json:"uid"`
|
||||
|
||||
// panel version, incremented each time the dashboard is updated.
|
||||
// Version panel version, incremented each time the dashboard is updated.
|
||||
Version int64 `json:"version"`
|
||||
}
|
||||
|
||||
@@ -12,10 +12,8 @@ package playlist
|
||||
|
||||
// Defines values for ItemType.
|
||||
const (
|
||||
ItemTypeDashboardById ItemType = "dashboard_by_id"
|
||||
|
||||
ItemTypeDashboardById ItemType = "dashboard_by_id"
|
||||
ItemTypeDashboardByTag ItemType = "dashboard_by_tag"
|
||||
|
||||
ItemTypeDashboardByUid ItemType = "dashboard_by_uid"
|
||||
)
|
||||
|
||||
@@ -27,7 +25,7 @@ type Playlist struct {
|
||||
|
||||
// The ordered list of items that the playlist will iterate over.
|
||||
// FIXME! This should not be optional, but changing it makes the godegen awkward
|
||||
Items *[]Item `json:"items,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
|
||||
// Name of the playlist.
|
||||
Name string `json:"name"`
|
||||
|
||||
@@ -19,19 +19,19 @@ type Preferences struct {
|
||||
Language *string `json:"language,omitempty"`
|
||||
QueryHistory *QueryHistoryPreference `json:"queryHistory,omitempty"`
|
||||
|
||||
// light, dark, empty is default
|
||||
// Theme light, dark, empty is default
|
||||
Theme *string `json:"theme,omitempty"`
|
||||
|
||||
// The timezone selection
|
||||
// TODO: this should use the timezone defined in common
|
||||
Timezone *string `json:"timezone,omitempty"`
|
||||
|
||||
// day of the week (sunday, monday, etc)
|
||||
// WeekStart day of the week (sunday, monday, etc)
|
||||
WeekStart *string `json:"weekStart,omitempty"`
|
||||
}
|
||||
|
||||
// QueryHistoryPreference defines model for QueryHistoryPreference.
|
||||
type QueryHistoryPreference struct {
|
||||
// one of: '' | 'query' | 'starred';
|
||||
// HomeTab one of: '' | 'query' | 'starred';
|
||||
HomeTab *string `json:"homeTab,omitempty"`
|
||||
}
|
||||
|
||||
@@ -12,10 +12,8 @@ package serviceaccount
|
||||
|
||||
// Defines values for OrgRole.
|
||||
const (
|
||||
OrgRoleAdmin OrgRole = "Admin"
|
||||
|
||||
OrgRoleAdmin OrgRole = "Admin"
|
||||
OrgRoleEditor OrgRole = "Editor"
|
||||
|
||||
OrgRoleViewer OrgRole = "Viewer"
|
||||
)
|
||||
|
||||
@@ -53,7 +51,7 @@ type ServiceAccount struct {
|
||||
Role OrgRole `json:"role"`
|
||||
|
||||
// Teams is a list of teams the service account belongs to.
|
||||
Teams *[]string `json:"teams,omitempty"`
|
||||
Teams []string `json:"teams,omitempty"`
|
||||
|
||||
// Tokens is the number of active tokens for the service account.
|
||||
// Tokens are used to authenticate the service account against Grafana.
|
||||
|
||||
@@ -13,11 +13,8 @@ package team
|
||||
// Defines values for Permission.
|
||||
const (
|
||||
PermissionN0 Permission = 0
|
||||
|
||||
PermissionN1 Permission = 1
|
||||
|
||||
PermissionN2 Permission = 2
|
||||
|
||||
PermissionN4 Permission = 4
|
||||
)
|
||||
|
||||
|
||||
@@ -11,22 +11,17 @@ package plugindef
|
||||
|
||||
// Defines values for BasicRole.
|
||||
const (
|
||||
BasicRoleAdmin BasicRole = "Admin"
|
||||
|
||||
BasicRoleEditor BasicRole = "Editor"
|
||||
|
||||
BasicRoleAdmin BasicRole = "Admin"
|
||||
BasicRoleEditor BasicRole = "Editor"
|
||||
BasicRoleGrafanaAdmin BasicRole = "Grafana Admin"
|
||||
|
||||
BasicRoleViewer BasicRole = "Viewer"
|
||||
BasicRoleViewer BasicRole = "Viewer"
|
||||
)
|
||||
|
||||
// Defines values for DependencyType.
|
||||
const (
|
||||
DependencyTypeApp DependencyType = "app"
|
||||
|
||||
DependencyTypeApp DependencyType = "app"
|
||||
DependencyTypeDatasource DependencyType = "datasource"
|
||||
|
||||
DependencyTypePanel DependencyType = "panel"
|
||||
DependencyTypePanel DependencyType = "panel"
|
||||
)
|
||||
|
||||
// Defines values for ExtensionsLinkType.
|
||||
@@ -36,71 +31,49 @@ const (
|
||||
|
||||
// Defines values for IncludeRole.
|
||||
const (
|
||||
IncludeRoleAdmin IncludeRole = "Admin"
|
||||
|
||||
IncludeRoleAdmin IncludeRole = "Admin"
|
||||
IncludeRoleEditor IncludeRole = "Editor"
|
||||
|
||||
IncludeRoleViewer IncludeRole = "Viewer"
|
||||
)
|
||||
|
||||
// Defines values for IncludeType.
|
||||
const (
|
||||
IncludeTypeApp IncludeType = "app"
|
||||
|
||||
IncludeTypeDashboard IncludeType = "dashboard"
|
||||
|
||||
IncludeTypeDatasource IncludeType = "datasource"
|
||||
|
||||
IncludeTypePage IncludeType = "page"
|
||||
|
||||
IncludeTypePanel IncludeType = "panel"
|
||||
|
||||
IncludeTypeRenderer IncludeType = "renderer"
|
||||
|
||||
IncludeTypeApp IncludeType = "app"
|
||||
IncludeTypeDashboard IncludeType = "dashboard"
|
||||
IncludeTypeDatasource IncludeType = "datasource"
|
||||
IncludeTypePage IncludeType = "page"
|
||||
IncludeTypePanel IncludeType = "panel"
|
||||
IncludeTypeRenderer IncludeType = "renderer"
|
||||
IncludeTypeSecretsmanager IncludeType = "secretsmanager"
|
||||
)
|
||||
|
||||
// Defines values for Category.
|
||||
const (
|
||||
CategoryCloud Category = "cloud"
|
||||
|
||||
CategoryCloud Category = "cloud"
|
||||
CategoryEnterprise Category = "enterprise"
|
||||
|
||||
CategoryLogging Category = "logging"
|
||||
|
||||
CategoryOther Category = "other"
|
||||
|
||||
CategoryProfiling Category = "profiling"
|
||||
|
||||
CategorySql Category = "sql"
|
||||
|
||||
CategoryTracing Category = "tracing"
|
||||
|
||||
CategoryTsdb Category = "tsdb"
|
||||
CategoryLogging Category = "logging"
|
||||
CategoryOther Category = "other"
|
||||
CategoryProfiling Category = "profiling"
|
||||
CategorySql Category = "sql"
|
||||
CategoryTracing Category = "tracing"
|
||||
CategoryTsdb Category = "tsdb"
|
||||
)
|
||||
|
||||
// Defines values for Type.
|
||||
const (
|
||||
TypeApp Type = "app"
|
||||
|
||||
TypeDatasource Type = "datasource"
|
||||
|
||||
TypePanel Type = "panel"
|
||||
|
||||
TypeRenderer Type = "renderer"
|
||||
|
||||
TypeApp Type = "app"
|
||||
TypeDatasource Type = "datasource"
|
||||
TypePanel Type = "panel"
|
||||
TypeRenderer Type = "renderer"
|
||||
TypeSecretsmanager Type = "secretsmanager"
|
||||
)
|
||||
|
||||
// Defines values for ReleaseState.
|
||||
const (
|
||||
ReleaseStateAlpha ReleaseState = "alpha"
|
||||
|
||||
ReleaseStateBeta ReleaseState = "beta"
|
||||
|
||||
ReleaseStateAlpha ReleaseState = "alpha"
|
||||
ReleaseStateBeta ReleaseState = "beta"
|
||||
ReleaseStateDeprecated ReleaseState = "deprecated"
|
||||
|
||||
ReleaseStateStable ReleaseState = "stable"
|
||||
ReleaseStateStable ReleaseState = "stable"
|
||||
)
|
||||
|
||||
// BasicRole is a Grafana basic role, which can be 'Viewer', 'Editor', 'Admin' or 'Grafana Admin'.
|
||||
@@ -137,7 +110,7 @@ type Dependencies struct {
|
||||
GrafanaVersion *string `json:"grafanaVersion,omitempty"`
|
||||
|
||||
// An array of required plugins on which this plugin depends.
|
||||
Plugins *[]Dependency `json:"plugins,omitempty"`
|
||||
Plugins []Dependency `json:"plugins,omitempty"`
|
||||
}
|
||||
|
||||
// Dependency describes another plugin on which a plugin depends.
|
||||
@@ -248,7 +221,7 @@ type Info struct {
|
||||
// An array of link objects to be displayed on this plugin's
|
||||
// project page in the form `{name: 'foo', url:
|
||||
// 'http://example.com'}`
|
||||
Links *[]struct {
|
||||
Links []struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Url *string `json:"url,omitempty"`
|
||||
} `json:"links,omitempty"`
|
||||
@@ -266,7 +239,7 @@ type Info struct {
|
||||
|
||||
// An array of screenshot objects in the form `{name: 'bar', path:
|
||||
// 'img/screenshot.png'}`
|
||||
Screenshots *[]struct {
|
||||
Screenshots []struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
} `json:"screenshots,omitempty"`
|
||||
@@ -341,7 +314,7 @@ type PluginDef struct {
|
||||
Executable *string `json:"executable,omitempty"`
|
||||
|
||||
// Extensions made by the current plugin.
|
||||
Extensions *[]ExtensionsLink `json:"extensions,omitempty"`
|
||||
Extensions []ExtensionsLink `json:"extensions,omitempty"`
|
||||
|
||||
// For data source plugins, include hidden queries in the data
|
||||
// request.
|
||||
@@ -357,7 +330,7 @@ type PluginDef struct {
|
||||
Id string `json:"id"`
|
||||
|
||||
// Resources to include in plugin.
|
||||
Includes *[]Include `json:"includes,omitempty"`
|
||||
Includes []Include `json:"includes,omitempty"`
|
||||
|
||||
// Metadata about a Grafana plugin. Some fields are used on the plugins
|
||||
// page in Grafana and others on grafana.com, if the plugin is published.
|
||||
@@ -407,10 +380,10 @@ type PluginDef struct {
|
||||
// which characterizes what viewers, editors, admins, or grafana admins can do on the plugin.
|
||||
// The Admin basic role inherits its default permissions from the Editor basic role which in turn
|
||||
// inherits them from the Viewer basic role.
|
||||
Roles *[]RoleRegistration `json:"roles,omitempty"`
|
||||
Roles []RoleRegistration `json:"roles,omitempty"`
|
||||
|
||||
// Routes is a list of proxy routes, if any. For datasource plugins only.
|
||||
Routes *[]Route `json:"routes,omitempty"`
|
||||
Routes []Route `json:"routes,omitempty"`
|
||||
|
||||
// For panel plugins. Hides the query editor.
|
||||
SkipDataQuery *bool `json:"skipDataQuery,omitempty"`
|
||||
@@ -435,7 +408,7 @@ type PluginDef struct {
|
||||
// Plugin category used on the Add data source page.
|
||||
type Category string
|
||||
|
||||
// type indicates which type of Grafana plugin this is, of the defined
|
||||
// Type type indicates which type of Grafana plugin this is, of the defined
|
||||
// set of Grafana plugin types.
|
||||
type Type string
|
||||
|
||||
@@ -475,11 +448,11 @@ type RoleRegistration struct {
|
||||
type Route struct {
|
||||
// For data source plugins. Route headers set the body content and
|
||||
// length to the proxied request.
|
||||
Body *map[string]interface{} `json:"body,omitempty"`
|
||||
Body map[string]interface{} `json:"body,omitempty"`
|
||||
|
||||
// For data source plugins. Route headers adds HTTP headers to the
|
||||
// proxied request.
|
||||
Headers *[]Header `json:"headers,omitempty"`
|
||||
Headers []Header `json:"headers,omitempty"`
|
||||
|
||||
// TODO docs
|
||||
// TODO should this really be separate from TokenAuth?
|
||||
@@ -501,8 +474,8 @@ type Route struct {
|
||||
|
||||
// For data source plugins. Route URL is where the request is
|
||||
// proxied to.
|
||||
Url *string `json:"url,omitempty"`
|
||||
UrlParams *[]URLParam `json:"urlParams,omitempty"`
|
||||
Url *string `json:"url,omitempty"`
|
||||
UrlParams []URLParam `json:"urlParams,omitempty"`
|
||||
}
|
||||
|
||||
// TODO docs
|
||||
@@ -512,7 +485,7 @@ type TokenAuth struct {
|
||||
|
||||
// The list of scopes that your application should be granted
|
||||
// access to.
|
||||
Scopes *[]string `json:"scopes,omitempty"`
|
||||
Scopes []string `json:"scopes,omitempty"`
|
||||
|
||||
// URL to fetch the authentication token.
|
||||
Url *string `json:"url,omitempty"`
|
||||
|
||||
@@ -83,7 +83,7 @@ func (s *Service) Get(ctx context.Context, q *playlist.GetPlaylistByUidQuery) (*
|
||||
Uid: v.UID,
|
||||
Name: v.Name,
|
||||
Interval: v.Interval,
|
||||
Items: &items,
|
||||
Items: items,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -31,17 +31,17 @@ func summaryBuilder(ctx context.Context, uid string, body []byte) (*entity.Entit
|
||||
// TODO: fix model so this is not possible
|
||||
if obj.Items == nil {
|
||||
temp := make([]playlist.Item, 0)
|
||||
obj.Items = &temp
|
||||
obj.Items = temp
|
||||
}
|
||||
|
||||
obj.Uid = uid // make sure they are consistent
|
||||
summary := &entity.EntitySummary{
|
||||
UID: uid,
|
||||
Name: obj.Name,
|
||||
Description: fmt.Sprintf("%d items, refreshed every %s", len(*obj.Items), obj.Interval),
|
||||
Description: fmt.Sprintf("%d items, refreshed every %s", len(obj.Items), obj.Interval),
|
||||
}
|
||||
|
||||
for _, item := range *obj.Items {
|
||||
for _, item := range obj.Items {
|
||||
switch item.Type {
|
||||
case playlist.ItemTypeDashboardByUid:
|
||||
summary.References = append(summary.References, &entity.EntityExternalReference{
|
||||
|
||||
@@ -20,7 +20,7 @@ func TestPlaylistSummary(t *testing.T) {
|
||||
playlist := playlist.Playlist{
|
||||
Interval: "30s",
|
||||
Name: "test",
|
||||
Items: &[]playlist.Item{
|
||||
Items: []playlist.Item{
|
||||
{Type: playlist.ItemTypeDashboardByUid, Value: "D1"},
|
||||
{Type: playlist.ItemTypeDashboardByTag, Value: "tagA"},
|
||||
{Type: playlist.ItemTypeDashboardByUid, Value: "D3"},
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
|
||||
package dataquery
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// Defines values for AppInsightsGroupByQueryKind.
|
||||
const (
|
||||
AppInsightsGroupByQueryKindAppInsightsGroupByQuery AppInsightsGroupByQueryKind = "AppInsightsGroupByQuery"
|
||||
@@ -21,62 +25,42 @@ const (
|
||||
|
||||
// Defines values for AzureLogsQueryResultFormat.
|
||||
const (
|
||||
AzureLogsQueryResultFormatTable AzureLogsQueryResultFormat = "table"
|
||||
|
||||
AzureLogsQueryResultFormatTable AzureLogsQueryResultFormat = "table"
|
||||
AzureLogsQueryResultFormatTimeSeries AzureLogsQueryResultFormat = "time_series"
|
||||
)
|
||||
|
||||
// Defines values for AzureMonitorQueryAzureLogAnalyticsResultFormat.
|
||||
const (
|
||||
AzureMonitorQueryAzureLogAnalyticsResultFormatTable AzureMonitorQueryAzureLogAnalyticsResultFormat = "table"
|
||||
|
||||
AzureMonitorQueryAzureLogAnalyticsResultFormatTable AzureMonitorQueryAzureLogAnalyticsResultFormat = "table"
|
||||
AzureMonitorQueryAzureLogAnalyticsResultFormatTimeSeries AzureMonitorQueryAzureLogAnalyticsResultFormat = "time_series"
|
||||
)
|
||||
|
||||
// Defines values for AzureQueryType.
|
||||
const (
|
||||
AzureQueryTypeAzureLogAnalytics AzureQueryType = "Azure Log Analytics"
|
||||
|
||||
AzureQueryTypeAzureMetricNames AzureQueryType = "Azure Metric Names"
|
||||
|
||||
AzureQueryTypeAzureMonitor AzureQueryType = "Azure Monitor"
|
||||
|
||||
AzureQueryTypeAzureNamespaces AzureQueryType = "Azure Namespaces"
|
||||
|
||||
AzureQueryTypeAzureRegions AzureQueryType = "Azure Regions"
|
||||
|
||||
AzureQueryTypeAzureResourceGraph AzureQueryType = "Azure Resource Graph"
|
||||
|
||||
AzureQueryTypeAzureResourceGroups AzureQueryType = "Azure Resource Groups"
|
||||
|
||||
AzureQueryTypeAzureResourceNames AzureQueryType = "Azure Resource Names"
|
||||
|
||||
AzureQueryTypeAzureSubscriptions AzureQueryType = "Azure Subscriptions"
|
||||
|
||||
AzureQueryTypeAzureWorkspaces AzureQueryType = "Azure Workspaces"
|
||||
|
||||
AzureQueryTypeAzureLogAnalytics AzureQueryType = "Azure Log Analytics"
|
||||
AzureQueryTypeAzureMetricNames AzureQueryType = "Azure Metric Names"
|
||||
AzureQueryTypeAzureMonitor AzureQueryType = "Azure Monitor"
|
||||
AzureQueryTypeAzureNamespaces AzureQueryType = "Azure Namespaces"
|
||||
AzureQueryTypeAzureRegions AzureQueryType = "Azure Regions"
|
||||
AzureQueryTypeAzureResourceGraph AzureQueryType = "Azure Resource Graph"
|
||||
AzureQueryTypeAzureResourceGroups AzureQueryType = "Azure Resource Groups"
|
||||
AzureQueryTypeAzureResourceNames AzureQueryType = "Azure Resource Names"
|
||||
AzureQueryTypeAzureSubscriptions AzureQueryType = "Azure Subscriptions"
|
||||
AzureQueryTypeAzureWorkspaces AzureQueryType = "Azure Workspaces"
|
||||
AzureQueryTypeGrafanaTemplateVariableFunction AzureQueryType = "Grafana Template Variable Function"
|
||||
)
|
||||
|
||||
// Defines values for GrafanaTemplateVariableQueryType.
|
||||
const (
|
||||
GrafanaTemplateVariableQueryTypeAppInsightsGroupByQuery GrafanaTemplateVariableQueryType = "AppInsightsGroupByQuery"
|
||||
|
||||
GrafanaTemplateVariableQueryTypeAppInsightsGroupByQuery GrafanaTemplateVariableQueryType = "AppInsightsGroupByQuery"
|
||||
GrafanaTemplateVariableQueryTypeAppInsightsMetricNameQuery GrafanaTemplateVariableQueryType = "AppInsightsMetricNameQuery"
|
||||
|
||||
GrafanaTemplateVariableQueryTypeMetricNamesQuery GrafanaTemplateVariableQueryType = "MetricNamesQuery"
|
||||
|
||||
GrafanaTemplateVariableQueryTypeMetricNamespaceQuery GrafanaTemplateVariableQueryType = "MetricNamespaceQuery"
|
||||
|
||||
GrafanaTemplateVariableQueryTypeResourceGroupsQuery GrafanaTemplateVariableQueryType = "ResourceGroupsQuery"
|
||||
|
||||
GrafanaTemplateVariableQueryTypeResourceNamesQuery GrafanaTemplateVariableQueryType = "ResourceNamesQuery"
|
||||
|
||||
GrafanaTemplateVariableQueryTypeSubscriptionsQuery GrafanaTemplateVariableQueryType = "SubscriptionsQuery"
|
||||
|
||||
GrafanaTemplateVariableQueryTypeUnknownQuery GrafanaTemplateVariableQueryType = "UnknownQuery"
|
||||
|
||||
GrafanaTemplateVariableQueryTypeWorkspacesQuery GrafanaTemplateVariableQueryType = "WorkspacesQuery"
|
||||
GrafanaTemplateVariableQueryTypeMetricNamesQuery GrafanaTemplateVariableQueryType = "MetricNamesQuery"
|
||||
GrafanaTemplateVariableQueryTypeMetricNamespaceQuery GrafanaTemplateVariableQueryType = "MetricNamespaceQuery"
|
||||
GrafanaTemplateVariableQueryTypeResourceGroupsQuery GrafanaTemplateVariableQueryType = "ResourceGroupsQuery"
|
||||
GrafanaTemplateVariableQueryTypeResourceNamesQuery GrafanaTemplateVariableQueryType = "ResourceNamesQuery"
|
||||
GrafanaTemplateVariableQueryTypeSubscriptionsQuery GrafanaTemplateVariableQueryType = "SubscriptionsQuery"
|
||||
GrafanaTemplateVariableQueryTypeUnknownQuery GrafanaTemplateVariableQueryType = "UnknownQuery"
|
||||
GrafanaTemplateVariableQueryTypeWorkspacesQuery GrafanaTemplateVariableQueryType = "WorkspacesQuery"
|
||||
)
|
||||
|
||||
// Defines values for MetricDefinitionsQueryKind.
|
||||
@@ -106,8 +90,7 @@ const (
|
||||
|
||||
// Defines values for ResultFormat.
|
||||
const (
|
||||
ResultFormatTable ResultFormat = "table"
|
||||
|
||||
ResultFormatTable ResultFormat = "table"
|
||||
ResultFormatTimeSeries ResultFormat = "time_series"
|
||||
)
|
||||
|
||||
@@ -126,9 +109,24 @@ const (
|
||||
WorkspacesQueryKindWorkspacesQuery WorkspacesQueryKind = "WorkspacesQuery"
|
||||
)
|
||||
|
||||
// AppInsightsGroupByQuery defines model for AppInsightsGroupByQuery.
|
||||
type AppInsightsGroupByQuery struct {
|
||||
Kind AppInsightsGroupByQueryKind `json:"kind"`
|
||||
MetricName string `json:"metricName"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// AppInsightsGroupByQueryKind defines model for AppInsightsGroupByQuery.Kind.
|
||||
type AppInsightsGroupByQueryKind string
|
||||
|
||||
// AppInsightsMetricNameQuery defines model for AppInsightsMetricNameQuery.
|
||||
type AppInsightsMetricNameQuery struct {
|
||||
Kind AppInsightsMetricNameQueryKind `json:"kind"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// AppInsightsMetricNameQueryKind defines model for AppInsightsMetricNameQuery.Kind.
|
||||
type AppInsightsMetricNameQueryKind string
|
||||
|
||||
@@ -141,7 +139,7 @@ type AzureLogsQuery struct {
|
||||
Resource *string `json:"resource,omitempty"`
|
||||
|
||||
// Array of resource URIs to be queried.
|
||||
Resources *[]string `json:"resources,omitempty"`
|
||||
Resources []string `json:"resources,omitempty"`
|
||||
|
||||
// Specifies the format results should be returned as.
|
||||
ResultFormat *AzureLogsQueryResultFormat `json:"resultFormat,omitempty"`
|
||||
@@ -162,7 +160,7 @@ type AzureMetricDimension struct {
|
||||
Filter *string `json:"filter,omitempty"`
|
||||
|
||||
// Values to match with the filter.
|
||||
Filters *[]string `json:"filters,omitempty"`
|
||||
Filters []string `json:"filters,omitempty"`
|
||||
|
||||
// String denoting the filter operation. Supports 'eq' - equals,'ne' - not equals, 'sw' - starts with. Note that some dimensions may not support all operators.
|
||||
Operator *string `json:"operator,omitempty"`
|
||||
@@ -177,7 +175,7 @@ type AzureMetricQuery struct {
|
||||
Alias *string `json:"alias,omitempty"`
|
||||
|
||||
// Time grains that are supported by the metric.
|
||||
AllowedTimeGrainsMs *[]int64 `json:"allowedTimeGrainsMs,omitempty"`
|
||||
AllowedTimeGrainsMs []int64 `json:"allowedTimeGrainsMs,omitempty"`
|
||||
|
||||
// Used as the value for the metricNamespace property when it's different from the resource namespace.
|
||||
CustomNamespace *string `json:"customNamespace,omitempty"`
|
||||
@@ -189,7 +187,7 @@ type AzureMetricQuery struct {
|
||||
DimensionFilter *string `json:"dimensionFilter,omitempty"`
|
||||
|
||||
// Filters to reduce the set of data returned. Dimensions that can be filtered on are defined by the metric.
|
||||
DimensionFilters *[]struct {
|
||||
DimensionFilters []struct {
|
||||
// Name of Dimension to be filtered on.
|
||||
Dimension *string `json:"dimension,omitempty"`
|
||||
|
||||
@@ -197,7 +195,7 @@ type AzureMetricQuery struct {
|
||||
Filter *string `json:"filter,omitempty"`
|
||||
|
||||
// Values to match with the filter.
|
||||
Filters *[]string `json:"filters,omitempty"`
|
||||
Filters []string `json:"filters,omitempty"`
|
||||
|
||||
// String denoting the filter operation. Supports 'eq' - equals,'ne' - not equals, 'sw' - starts with. Note that some dimensions may not support all operators.
|
||||
Operator *string `json:"operator,omitempty"`
|
||||
@@ -227,7 +225,7 @@ type AzureMetricQuery struct {
|
||||
ResourceUri *string `json:"resourceUri,omitempty"`
|
||||
|
||||
// Array of resource URIs to be queried.
|
||||
Resources *[]struct {
|
||||
Resources []struct {
|
||||
MetricNamespace *string `json:"metricNamespace,omitempty"`
|
||||
Region *string `json:"region,omitempty"`
|
||||
ResourceGroup *string `json:"resourceGroup,omitempty"`
|
||||
@@ -238,7 +236,7 @@ type AzureMetricQuery struct {
|
||||
// The granularity of data points to be queried. Defaults to auto.
|
||||
TimeGrain *string `json:"timeGrain,omitempty"`
|
||||
|
||||
// @deprecated
|
||||
// TimeGrainUnit @deprecated
|
||||
TimeGrainUnit *string `json:"timeGrainUnit,omitempty"`
|
||||
|
||||
// Maximum number of records to return. Defaults to 10.
|
||||
@@ -246,7 +244,7 @@ type AzureMetricQuery struct {
|
||||
}
|
||||
|
||||
// AzureMonitorDataQuery defines model for AzureMonitorDataQuery.
|
||||
type AzureMonitorDataQuery map[string]interface{}
|
||||
type AzureMonitorDataQuery = map[string]interface{}
|
||||
|
||||
// AzureMonitorQuery defines model for AzureMonitorQuery.
|
||||
type AzureMonitorQuery struct {
|
||||
@@ -259,7 +257,7 @@ type AzureMonitorQuery struct {
|
||||
Resource *string `json:"resource,omitempty"`
|
||||
|
||||
// Array of resource URIs to be queried.
|
||||
Resources *[]string `json:"resources,omitempty"`
|
||||
Resources []string `json:"resources,omitempty"`
|
||||
|
||||
// Specifies the format results should be returned as.
|
||||
ResultFormat *AzureMonitorQueryAzureLogAnalyticsResultFormat `json:"resultFormat,omitempty"`
|
||||
@@ -277,7 +275,7 @@ type AzureMonitorQuery struct {
|
||||
Alias *string `json:"alias,omitempty"`
|
||||
|
||||
// Time grains that are supported by the metric.
|
||||
AllowedTimeGrainsMs *[]int64 `json:"allowedTimeGrainsMs,omitempty"`
|
||||
AllowedTimeGrainsMs []int64 `json:"allowedTimeGrainsMs,omitempty"`
|
||||
|
||||
// Used as the value for the metricNamespace property when it's different from the resource namespace.
|
||||
CustomNamespace *string `json:"customNamespace,omitempty"`
|
||||
@@ -289,7 +287,7 @@ type AzureMonitorQuery struct {
|
||||
DimensionFilter *string `json:"dimensionFilter,omitempty"`
|
||||
|
||||
// Filters to reduce the set of data returned. Dimensions that can be filtered on are defined by the metric.
|
||||
DimensionFilters *[]struct {
|
||||
DimensionFilters []struct {
|
||||
// Name of Dimension to be filtered on.
|
||||
Dimension *string `json:"dimension,omitempty"`
|
||||
|
||||
@@ -297,7 +295,7 @@ type AzureMonitorQuery struct {
|
||||
Filter *string `json:"filter,omitempty"`
|
||||
|
||||
// Values to match with the filter.
|
||||
Filters *[]string `json:"filters,omitempty"`
|
||||
Filters []string `json:"filters,omitempty"`
|
||||
|
||||
// String denoting the filter operation. Supports 'eq' - equals,'ne' - not equals, 'sw' - starts with. Note that some dimensions may not support all operators.
|
||||
Operator *string `json:"operator,omitempty"`
|
||||
@@ -327,7 +325,7 @@ type AzureMonitorQuery struct {
|
||||
ResourceUri *string `json:"resourceUri,omitempty"`
|
||||
|
||||
// Array of resource URIs to be queried.
|
||||
Resources *[]struct {
|
||||
Resources []struct {
|
||||
MetricNamespace *string `json:"metricNamespace,omitempty"`
|
||||
Region *string `json:"region,omitempty"`
|
||||
ResourceGroup *string `json:"resourceGroup,omitempty"`
|
||||
@@ -338,7 +336,7 @@ type AzureMonitorQuery struct {
|
||||
// The granularity of data points to be queried. Defaults to auto.
|
||||
TimeGrain *string `json:"timeGrain,omitempty"`
|
||||
|
||||
// @deprecated
|
||||
// TimeGrainUnit @deprecated
|
||||
TimeGrainUnit *string `json:"timeGrainUnit,omitempty"`
|
||||
|
||||
// Maximum number of records to return. Defaults to 10.
|
||||
@@ -361,9 +359,9 @@ type AzureMonitorQuery struct {
|
||||
Datasource *interface{} `json:"datasource,omitempty"`
|
||||
|
||||
// @deprecated Legacy template variable support.
|
||||
GrafanaTemplateVariableFn *interface{} `json:"grafanaTemplateVariableFn,omitempty"`
|
||||
GrafanaTemplateVariableFn *AzureMonitorQuery_GrafanaTemplateVariableFn `json:"grafanaTemplateVariableFn,omitempty"`
|
||||
|
||||
// true if query is disabled (ie should not be returned to the dashboard)
|
||||
// Hide true if query is disabled (ie should not be returned to the dashboard)
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
|
||||
// Unique, guid like, string used in explore mode
|
||||
@@ -389,12 +387,25 @@ type AzureMonitorQuery struct {
|
||||
Subscription *string `json:"subscription,omitempty"`
|
||||
|
||||
// Subscriptions to be queried via Azure Resource Graph.
|
||||
Subscriptions *[]string `json:"subscriptions,omitempty"`
|
||||
Subscriptions []string `json:"subscriptions,omitempty"`
|
||||
}
|
||||
|
||||
// Specifies the format results should be returned as.
|
||||
type AzureMonitorQueryAzureLogAnalyticsResultFormat string
|
||||
|
||||
// @deprecated Legacy template variable support.
|
||||
type AzureMonitorQuery_GrafanaTemplateVariableFn struct {
|
||||
Kind *interface{} `json:"kind,omitempty"`
|
||||
MetricName *string `json:"metricName,omitempty"`
|
||||
MetricNamespace *string `json:"metricNamespace,omitempty"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
ResourceGroup *string `json:"resourceGroup,omitempty"`
|
||||
ResourceName *string `json:"resourceName,omitempty"`
|
||||
Subscription *string `json:"subscription,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
union json.RawMessage
|
||||
}
|
||||
|
||||
// AzureMonitorResource defines model for AzureMonitorResource.
|
||||
type AzureMonitorResource struct {
|
||||
MetricNamespace *string `json:"metricNamespace,omitempty"`
|
||||
@@ -416,35 +427,124 @@ type AzureResourceGraphQuery struct {
|
||||
ResultFormat *string `json:"resultFormat,omitempty"`
|
||||
}
|
||||
|
||||
// BaseGrafanaTemplateVariableQuery defines model for BaseGrafanaTemplateVariableQuery.
|
||||
type BaseGrafanaTemplateVariableQuery struct {
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// GrafanaTemplateVariableQuery defines model for GrafanaTemplateVariableQuery.
|
||||
type GrafanaTemplateVariableQuery interface{}
|
||||
type GrafanaTemplateVariableQuery struct {
|
||||
Kind *interface{} `json:"kind,omitempty"`
|
||||
MetricName *string `json:"metricName,omitempty"`
|
||||
MetricNamespace *string `json:"metricNamespace,omitempty"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
ResourceGroup *string `json:"resourceGroup,omitempty"`
|
||||
ResourceName *string `json:"resourceName,omitempty"`
|
||||
Subscription *string `json:"subscription,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
union json.RawMessage
|
||||
}
|
||||
|
||||
// GrafanaTemplateVariableQueryType defines model for GrafanaTemplateVariableQueryType.
|
||||
type GrafanaTemplateVariableQueryType string
|
||||
|
||||
// @deprecated Use MetricNamespaceQuery instead
|
||||
type MetricDefinitionsQuery struct {
|
||||
Kind MetricDefinitionsQueryKind `json:"kind"`
|
||||
MetricNamespace *string `json:"metricNamespace,omitempty"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
ResourceGroup string `json:"resourceGroup"`
|
||||
ResourceName *string `json:"resourceName,omitempty"`
|
||||
Subscription string `json:"subscription"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// MetricDefinitionsQueryKind defines model for MetricDefinitionsQuery.Kind.
|
||||
type MetricDefinitionsQueryKind string
|
||||
|
||||
// MetricNamesQuery defines model for MetricNamesQuery.
|
||||
type MetricNamesQuery struct {
|
||||
Kind MetricNamesQueryKind `json:"kind"`
|
||||
MetricNamespace string `json:"metricNamespace"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
ResourceGroup string `json:"resourceGroup"`
|
||||
ResourceName string `json:"resourceName"`
|
||||
Subscription string `json:"subscription"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// MetricNamesQueryKind defines model for MetricNamesQuery.Kind.
|
||||
type MetricNamesQueryKind string
|
||||
|
||||
// MetricNamespaceQuery defines model for MetricNamespaceQuery.
|
||||
type MetricNamespaceQuery struct {
|
||||
Kind MetricNamespaceQueryKind `json:"kind"`
|
||||
MetricNamespace *string `json:"metricNamespace,omitempty"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
ResourceGroup string `json:"resourceGroup"`
|
||||
ResourceName *string `json:"resourceName,omitempty"`
|
||||
Subscription string `json:"subscription"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// MetricNamespaceQueryKind defines model for MetricNamespaceQuery.Kind.
|
||||
type MetricNamespaceQueryKind string
|
||||
|
||||
// ResourceGroupsQuery defines model for ResourceGroupsQuery.
|
||||
type ResourceGroupsQuery struct {
|
||||
Kind ResourceGroupsQueryKind `json:"kind"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
Subscription string `json:"subscription"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// ResourceGroupsQueryKind defines model for ResourceGroupsQuery.Kind.
|
||||
type ResourceGroupsQueryKind string
|
||||
|
||||
// ResourceNamesQuery defines model for ResourceNamesQuery.
|
||||
type ResourceNamesQuery struct {
|
||||
Kind ResourceNamesQueryKind `json:"kind"`
|
||||
MetricNamespace string `json:"metricNamespace"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
ResourceGroup string `json:"resourceGroup"`
|
||||
Subscription string `json:"subscription"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// ResourceNamesQueryKind defines model for ResourceNamesQuery.Kind.
|
||||
type ResourceNamesQueryKind string
|
||||
|
||||
// ResultFormat defines model for ResultFormat.
|
||||
type ResultFormat string
|
||||
|
||||
// SubscriptionsQuery defines model for SubscriptionsQuery.
|
||||
type SubscriptionsQuery struct {
|
||||
Kind SubscriptionsQueryKind `json:"kind"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// SubscriptionsQueryKind defines model for SubscriptionsQuery.Kind.
|
||||
type SubscriptionsQueryKind string
|
||||
|
||||
// UnknownQuery defines model for UnknownQuery.
|
||||
type UnknownQuery struct {
|
||||
Kind UnknownQueryKind `json:"kind"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// UnknownQueryKind defines model for UnknownQuery.Kind.
|
||||
type UnknownQueryKind string
|
||||
|
||||
// WorkspacesQuery defines model for WorkspacesQuery.
|
||||
type WorkspacesQuery struct {
|
||||
Kind WorkspacesQueryKind `json:"kind"`
|
||||
RawQuery *string `json:"rawQuery,omitempty"`
|
||||
Subscription string `json:"subscription"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// WorkspacesQueryKind defines model for WorkspacesQuery.Kind.
|
||||
type WorkspacesQueryKind string
|
||||
|
||||
@@ -9,52 +9,58 @@
|
||||
|
||||
package dataquery
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// Defines values for CloudWatchAnnotationQueryQueryMode.
|
||||
const (
|
||||
CloudWatchAnnotationQueryQueryModeAnnotations CloudWatchAnnotationQueryQueryMode = "Annotations"
|
||||
|
||||
CloudWatchAnnotationQueryQueryModeLogs CloudWatchAnnotationQueryQueryMode = "Logs"
|
||||
|
||||
CloudWatchAnnotationQueryQueryModeMetrics CloudWatchAnnotationQueryQueryMode = "Metrics"
|
||||
CloudWatchAnnotationQueryQueryModeLogs CloudWatchAnnotationQueryQueryMode = "Logs"
|
||||
CloudWatchAnnotationQueryQueryModeMetrics CloudWatchAnnotationQueryQueryMode = "Metrics"
|
||||
)
|
||||
|
||||
// Defines values for CloudWatchLogsQueryQueryMode.
|
||||
const (
|
||||
CloudWatchLogsQueryQueryModeAnnotations CloudWatchLogsQueryQueryMode = "Annotations"
|
||||
|
||||
CloudWatchLogsQueryQueryModeLogs CloudWatchLogsQueryQueryMode = "Logs"
|
||||
|
||||
CloudWatchLogsQueryQueryModeMetrics CloudWatchLogsQueryQueryMode = "Metrics"
|
||||
CloudWatchLogsQueryQueryModeLogs CloudWatchLogsQueryQueryMode = "Logs"
|
||||
CloudWatchLogsQueryQueryModeMetrics CloudWatchLogsQueryQueryMode = "Metrics"
|
||||
)
|
||||
|
||||
// Defines values for CloudWatchMetricsQueryMetricEditorMode.
|
||||
const (
|
||||
CloudWatchMetricsQueryMetricEditorModeN0 CloudWatchMetricsQueryMetricEditorMode = 0
|
||||
|
||||
CloudWatchMetricsQueryMetricEditorModeN1 CloudWatchMetricsQueryMetricEditorMode = 1
|
||||
)
|
||||
|
||||
// Defines values for CloudWatchMetricsQueryMetricQueryType.
|
||||
const (
|
||||
CloudWatchMetricsQueryMetricQueryTypeN0 CloudWatchMetricsQueryMetricQueryType = 0
|
||||
|
||||
CloudWatchMetricsQueryMetricQueryTypeN1 CloudWatchMetricsQueryMetricQueryType = 1
|
||||
)
|
||||
|
||||
// Defines values for CloudWatchMetricsQueryQueryMode.
|
||||
const (
|
||||
CloudWatchMetricsQueryQueryModeAnnotations CloudWatchMetricsQueryQueryMode = "Annotations"
|
||||
CloudWatchMetricsQueryQueryModeLogs CloudWatchMetricsQueryQueryMode = "Logs"
|
||||
CloudWatchMetricsQueryQueryModeMetrics CloudWatchMetricsQueryQueryMode = "Metrics"
|
||||
)
|
||||
|
||||
CloudWatchMetricsQueryQueryModeLogs CloudWatchMetricsQueryQueryMode = "Logs"
|
||||
// Defines values for CloudWatchMetricsQuerySqlFromParametersType.
|
||||
const (
|
||||
CloudWatchMetricsQuerySqlFromParametersTypeFunctionParameter CloudWatchMetricsQuerySqlFromParametersType = "functionParameter"
|
||||
)
|
||||
|
||||
CloudWatchMetricsQueryQueryModeMetrics CloudWatchMetricsQueryQueryMode = "Metrics"
|
||||
// Defines values for CloudWatchMetricsQuerySqlFromPropertyType.
|
||||
const (
|
||||
CloudWatchMetricsQuerySqlFromPropertyTypeString CloudWatchMetricsQuerySqlFromPropertyType = "string"
|
||||
CloudWatchMetricsQuerySqlFromPropertyTypeTest CloudWatchMetricsQuerySqlFromPropertyType = "test"
|
||||
)
|
||||
|
||||
// Defines values for CloudWatchMetricsQuerySqlGroupByType.
|
||||
const (
|
||||
CloudWatchMetricsQuerySqlGroupByTypeAnd CloudWatchMetricsQuerySqlGroupByType = "and"
|
||||
|
||||
CloudWatchMetricsQuerySqlGroupByTypeOr CloudWatchMetricsQuerySqlGroupByType = "or"
|
||||
CloudWatchMetricsQuerySqlGroupByTypeOr CloudWatchMetricsQuerySqlGroupByType = "or"
|
||||
)
|
||||
|
||||
// Defines values for CloudWatchMetricsQuerySqlOrderByParametersType.
|
||||
@@ -80,55 +86,43 @@ const (
|
||||
// Defines values for CloudWatchMetricsQuerySqlWhereType.
|
||||
const (
|
||||
CloudWatchMetricsQuerySqlWhereTypeAnd CloudWatchMetricsQuerySqlWhereType = "and"
|
||||
|
||||
CloudWatchMetricsQuerySqlWhereTypeOr CloudWatchMetricsQuerySqlWhereType = "or"
|
||||
CloudWatchMetricsQuerySqlWhereTypeOr CloudWatchMetricsQuerySqlWhereType = "or"
|
||||
)
|
||||
|
||||
// Defines values for CloudWatchQueryMode.
|
||||
const (
|
||||
CloudWatchQueryModeAnnotations CloudWatchQueryMode = "Annotations"
|
||||
|
||||
CloudWatchQueryModeLogs CloudWatchQueryMode = "Logs"
|
||||
|
||||
CloudWatchQueryModeMetrics CloudWatchQueryMode = "Metrics"
|
||||
CloudWatchQueryModeLogs CloudWatchQueryMode = "Logs"
|
||||
CloudWatchQueryModeMetrics CloudWatchQueryMode = "Metrics"
|
||||
)
|
||||
|
||||
// Defines values for MetricEditorMode.
|
||||
const (
|
||||
MetricEditorModeN0 MetricEditorMode = 0
|
||||
|
||||
MetricEditorModeN1 MetricEditorMode = 1
|
||||
)
|
||||
|
||||
// Defines values for MetricQueryType.
|
||||
const (
|
||||
MetricQueryTypeN0 MetricQueryType = 0
|
||||
|
||||
MetricQueryTypeN1 MetricQueryType = 1
|
||||
)
|
||||
|
||||
// Defines values for QueryEditorArrayExpressionType.
|
||||
const (
|
||||
QueryEditorArrayExpressionTypeAnd QueryEditorArrayExpressionType = "and"
|
||||
|
||||
QueryEditorArrayExpressionTypeOr QueryEditorArrayExpressionType = "or"
|
||||
QueryEditorArrayExpressionTypeOr QueryEditorArrayExpressionType = "or"
|
||||
)
|
||||
|
||||
// Defines values for QueryEditorExpressionType.
|
||||
const (
|
||||
QueryEditorExpressionTypeAnd QueryEditorExpressionType = "and"
|
||||
|
||||
QueryEditorExpressionTypeFunction QueryEditorExpressionType = "function"
|
||||
|
||||
QueryEditorExpressionTypeAnd QueryEditorExpressionType = "and"
|
||||
QueryEditorExpressionTypeFunction QueryEditorExpressionType = "function"
|
||||
QueryEditorExpressionTypeFunctionParameter QueryEditorExpressionType = "functionParameter"
|
||||
|
||||
QueryEditorExpressionTypeGroupBy QueryEditorExpressionType = "groupBy"
|
||||
|
||||
QueryEditorExpressionTypeOperator QueryEditorExpressionType = "operator"
|
||||
|
||||
QueryEditorExpressionTypeOr QueryEditorExpressionType = "or"
|
||||
|
||||
QueryEditorExpressionTypeProperty QueryEditorExpressionType = "property"
|
||||
QueryEditorExpressionTypeGroupBy QueryEditorExpressionType = "groupBy"
|
||||
QueryEditorExpressionTypeOperator QueryEditorExpressionType = "operator"
|
||||
QueryEditorExpressionTypeOr QueryEditorExpressionType = "or"
|
||||
QueryEditorExpressionTypeProperty QueryEditorExpressionType = "property"
|
||||
)
|
||||
|
||||
// Defines values for QueryEditorFunctionExpressionParametersType.
|
||||
@@ -149,8 +143,7 @@ const (
|
||||
// Defines values for QueryEditorGroupByExpressionPropertyType.
|
||||
const (
|
||||
QueryEditorGroupByExpressionPropertyTypeString QueryEditorGroupByExpressionPropertyType = "string"
|
||||
|
||||
QueryEditorGroupByExpressionPropertyTypeTest QueryEditorGroupByExpressionPropertyType = "test"
|
||||
QueryEditorGroupByExpressionPropertyTypeTest QueryEditorGroupByExpressionPropertyType = "test"
|
||||
)
|
||||
|
||||
// Defines values for QueryEditorGroupByExpressionType.
|
||||
@@ -161,8 +154,7 @@ const (
|
||||
// Defines values for QueryEditorOperatorExpressionPropertyType.
|
||||
const (
|
||||
QueryEditorOperatorExpressionPropertyTypeString QueryEditorOperatorExpressionPropertyType = "string"
|
||||
|
||||
QueryEditorOperatorExpressionPropertyTypeTest QueryEditorOperatorExpressionPropertyType = "test"
|
||||
QueryEditorOperatorExpressionPropertyTypeTest QueryEditorOperatorExpressionPropertyType = "test"
|
||||
)
|
||||
|
||||
// Defines values for QueryEditorOperatorExpressionType.
|
||||
@@ -173,15 +165,13 @@ const (
|
||||
// Defines values for QueryEditorPropertyType.
|
||||
const (
|
||||
QueryEditorPropertyTypeString QueryEditorPropertyType = "string"
|
||||
|
||||
QueryEditorPropertyTypeTest QueryEditorPropertyType = "test"
|
||||
QueryEditorPropertyTypeTest QueryEditorPropertyType = "test"
|
||||
)
|
||||
|
||||
// Defines values for QueryEditorPropertyExpressionPropertyType.
|
||||
const (
|
||||
QueryEditorPropertyExpressionPropertyTypeString QueryEditorPropertyExpressionPropertyType = "string"
|
||||
|
||||
QueryEditorPropertyExpressionPropertyTypeTest QueryEditorPropertyExpressionPropertyType = "test"
|
||||
QueryEditorPropertyExpressionPropertyTypeTest QueryEditorPropertyExpressionPropertyType = "test"
|
||||
)
|
||||
|
||||
// Defines values for QueryEditorPropertyExpressionType.
|
||||
@@ -189,11 +179,21 @@ const (
|
||||
QueryEditorPropertyExpressionTypeProperty QueryEditorPropertyExpressionType = "property"
|
||||
)
|
||||
|
||||
// Defines values for SQLExpressionFromParametersType.
|
||||
const (
|
||||
SQLExpressionFromParametersTypeFunctionParameter SQLExpressionFromParametersType = "functionParameter"
|
||||
)
|
||||
|
||||
// Defines values for SQLExpressionFromPropertyType.
|
||||
const (
|
||||
SQLExpressionFromPropertyTypeString SQLExpressionFromPropertyType = "string"
|
||||
SQLExpressionFromPropertyTypeTest SQLExpressionFromPropertyType = "test"
|
||||
)
|
||||
|
||||
// Defines values for SQLExpressionGroupByType.
|
||||
const (
|
||||
SQLExpressionGroupByTypeAnd SQLExpressionGroupByType = "and"
|
||||
|
||||
SQLExpressionGroupByTypeOr SQLExpressionGroupByType = "or"
|
||||
SQLExpressionGroupByTypeOr SQLExpressionGroupByType = "or"
|
||||
)
|
||||
|
||||
// Defines values for SQLExpressionOrderByParametersType.
|
||||
@@ -219,8 +219,7 @@ const (
|
||||
// Defines values for SQLExpressionWhereType.
|
||||
const (
|
||||
SQLExpressionWhereTypeAnd SQLExpressionWhereType = "and"
|
||||
|
||||
SQLExpressionWhereTypeOr SQLExpressionWhereType = "or"
|
||||
SQLExpressionWhereTypeOr SQLExpressionWhereType = "or"
|
||||
)
|
||||
|
||||
// CloudWatchAnnotationQuery defines model for CloudWatchAnnotationQuery.
|
||||
@@ -239,14 +238,14 @@ type CloudWatchAnnotationQuery struct {
|
||||
Statistic *string `json:"statistic,omitempty"`
|
||||
|
||||
// @deprecated use statistic
|
||||
Statistics *[]string `json:"statistics,omitempty"`
|
||||
Statistics []string `json:"statistics,omitempty"`
|
||||
}
|
||||
|
||||
// CloudWatchAnnotationQueryQueryMode defines model for CloudWatchAnnotationQuery.QueryMode.
|
||||
type CloudWatchAnnotationQueryQueryMode string
|
||||
|
||||
// CloudWatchDataQuery defines model for CloudWatchDataQuery.
|
||||
type CloudWatchDataQuery map[string]interface{}
|
||||
type CloudWatchDataQuery = map[string]interface{}
|
||||
|
||||
// CloudWatchLogsQuery defines model for CloudWatchLogsQuery.
|
||||
type CloudWatchLogsQuery struct {
|
||||
@@ -257,16 +256,16 @@ type CloudWatchLogsQuery struct {
|
||||
Datasource *interface{} `json:"datasource,omitempty"`
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
|
||||
// true if query is disabled (ie should not be returned to the dashboard)
|
||||
// Hide true if query is disabled (ie should not be returned to the dashboard)
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
Id string `json:"id"`
|
||||
|
||||
// Unique, guid like, string used in explore mode
|
||||
Key *string `json:"key,omitempty"`
|
||||
|
||||
// deprecated, use logGroups instead
|
||||
LogGroupNames *[]string `json:"logGroupNames,omitempty"`
|
||||
LogGroups *[]struct {
|
||||
// LogGroupNames deprecated, use logGroups instead
|
||||
LogGroupNames []string `json:"logGroupNames,omitempty"`
|
||||
LogGroups []struct {
|
||||
AccountId *string `json:"accountId,omitempty"`
|
||||
AccountLabel *string `json:"accountLabel,omitempty"`
|
||||
Arn string `json:"arn"`
|
||||
@@ -279,9 +278,9 @@ type CloudWatchLogsQuery struct {
|
||||
QueryType *string `json:"queryType,omitempty"`
|
||||
|
||||
// A - Z
|
||||
RefId string `json:"refId"`
|
||||
Region string `json:"region"`
|
||||
StatsGroups *[]string `json:"statsGroups,omitempty"`
|
||||
RefId string `json:"refId"`
|
||||
Region string `json:"region"`
|
||||
StatsGroups []string `json:"statsGroups,omitempty"`
|
||||
}
|
||||
|
||||
// CloudWatchLogsQueryQueryMode defines model for CloudWatchLogsQuery.QueryMode.
|
||||
@@ -296,7 +295,7 @@ type CloudWatchMetricsQuery struct {
|
||||
// Math expression query
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
|
||||
// common props
|
||||
// Id common props
|
||||
Id string `json:"id"`
|
||||
Label *string `json:"label,omitempty"`
|
||||
MatchExact *bool `json:"matchExact,omitempty"`
|
||||
@@ -308,7 +307,7 @@ type CloudWatchMetricsQuery struct {
|
||||
QueryMode *CloudWatchMetricsQueryQueryMode `json:"queryMode,omitempty"`
|
||||
Region string `json:"region"`
|
||||
Sql *struct {
|
||||
From *interface{} `json:"from,omitempty"`
|
||||
From *CloudWatchMetricsQuery_Sql_From `json:"from,omitempty"`
|
||||
GroupBy *struct {
|
||||
// TODO should be QueryEditorExpression[] | QueryEditorArrayExpression[], extend in veneer
|
||||
Expressions interface{} `json:"expressions"`
|
||||
@@ -319,7 +318,7 @@ type CloudWatchMetricsQuery struct {
|
||||
Limit *int64 `json:"limit,omitempty"`
|
||||
OrderBy *struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Parameters *[]struct {
|
||||
Parameters []struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type CloudWatchMetricsQuerySqlOrderByParametersType `json:"type"`
|
||||
} `json:"parameters,omitempty"`
|
||||
@@ -328,7 +327,7 @@ type CloudWatchMetricsQuery struct {
|
||||
OrderByDirection *string `json:"orderByDirection,omitempty"`
|
||||
Select *struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Parameters *[]struct {
|
||||
Parameters []struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type CloudWatchMetricsQuerySqlSelectParametersType `json:"type"`
|
||||
} `json:"parameters,omitempty"`
|
||||
@@ -346,7 +345,7 @@ type CloudWatchMetricsQuery struct {
|
||||
Statistic *string `json:"statistic,omitempty"`
|
||||
|
||||
// @deprecated use statistic
|
||||
Statistics *[]string `json:"statistics,omitempty"`
|
||||
Statistics []string `json:"statistics,omitempty"`
|
||||
}
|
||||
|
||||
// CloudWatchMetricsQueryMetricEditorMode defines model for CloudWatchMetricsQuery.MetricEditorMode.
|
||||
@@ -358,6 +357,27 @@ type CloudWatchMetricsQueryMetricQueryType int
|
||||
// CloudWatchMetricsQueryQueryMode defines model for CloudWatchMetricsQuery.QueryMode.
|
||||
type CloudWatchMetricsQueryQueryMode string
|
||||
|
||||
// CloudWatchMetricsQuerySqlFromParametersType defines model for CloudWatchMetricsQuery.Sql.From.Parameters.Type.
|
||||
type CloudWatchMetricsQuerySqlFromParametersType string
|
||||
|
||||
// CloudWatchMetricsQuerySqlFromPropertyType defines model for CloudWatchMetricsQuery.Sql.From.Property.Type.
|
||||
type CloudWatchMetricsQuerySqlFromPropertyType string
|
||||
|
||||
// CloudWatchMetricsQuery_Sql_From defines model for CloudWatchMetricsQuery.Sql.From.
|
||||
type CloudWatchMetricsQuery_Sql_From struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Parameters []struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type CloudWatchMetricsQuerySqlFromParametersType `json:"type"`
|
||||
} `json:"parameters,omitempty"`
|
||||
Property *struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type CloudWatchMetricsQuerySqlFromPropertyType `json:"type"`
|
||||
} `json:"property,omitempty"`
|
||||
Type *interface{} `json:"type,omitempty"`
|
||||
union json.RawMessage
|
||||
}
|
||||
|
||||
// TODO this doesn't work
|
||||
type CloudWatchMetricsQuerySqlGroupByType string
|
||||
|
||||
@@ -379,6 +399,9 @@ type CloudWatchMetricsQuerySqlWhereType string
|
||||
// CloudWatchQueryMode defines model for CloudWatchQueryMode.
|
||||
type CloudWatchQueryMode string
|
||||
|
||||
// Dimensions defines model for Dimensions.
|
||||
type Dimensions map[string]interface{}
|
||||
|
||||
// LogGroup defines model for LogGroup.
|
||||
type LogGroup struct {
|
||||
AccountId *string `json:"accountId,omitempty"`
|
||||
@@ -405,7 +428,7 @@ type MetricStat struct {
|
||||
Statistic *string `json:"statistic,omitempty"`
|
||||
|
||||
// @deprecated use statistic
|
||||
Statistics *[]string `json:"statistics,omitempty"`
|
||||
Statistics []string `json:"statistics,omitempty"`
|
||||
}
|
||||
|
||||
// QueryEditorArrayExpression defines model for QueryEditorArrayExpression.
|
||||
@@ -426,7 +449,7 @@ type QueryEditorExpressionType string
|
||||
// QueryEditorFunctionExpression defines model for QueryEditorFunctionExpression.
|
||||
type QueryEditorFunctionExpression struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Parameters *[]struct {
|
||||
Parameters []struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type QueryEditorFunctionExpressionParametersType `json:"type"`
|
||||
} `json:"parameters,omitempty"`
|
||||
@@ -489,12 +512,6 @@ type QueryEditorOperatorExpressionPropertyType string
|
||||
// QueryEditorOperatorExpressionType defines model for QueryEditorOperatorExpression.Type.
|
||||
type QueryEditorOperatorExpressionType string
|
||||
|
||||
// QueryEditorOperatorType defines model for QueryEditorOperatorType.
|
||||
type QueryEditorOperatorType interface{}
|
||||
|
||||
// QueryEditorOperatorValueType defines model for QueryEditorOperatorValueType.
|
||||
type QueryEditorOperatorValueType interface{}
|
||||
|
||||
// QueryEditorProperty defines model for QueryEditorProperty.
|
||||
type QueryEditorProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
@@ -521,7 +538,7 @@ type QueryEditorPropertyExpressionType string
|
||||
|
||||
// SQLExpression defines model for SQLExpression.
|
||||
type SQLExpression struct {
|
||||
From *interface{} `json:"from,omitempty"`
|
||||
From *SQLExpression_From `json:"from,omitempty"`
|
||||
GroupBy *struct {
|
||||
// TODO should be QueryEditorExpression[] | QueryEditorArrayExpression[], extend in veneer
|
||||
Expressions interface{} `json:"expressions"`
|
||||
@@ -532,7 +549,7 @@ type SQLExpression struct {
|
||||
Limit *int64 `json:"limit,omitempty"`
|
||||
OrderBy *struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Parameters *[]struct {
|
||||
Parameters []struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type SQLExpressionOrderByParametersType `json:"type"`
|
||||
} `json:"parameters,omitempty"`
|
||||
@@ -541,7 +558,7 @@ type SQLExpression struct {
|
||||
OrderByDirection *string `json:"orderByDirection,omitempty"`
|
||||
Select *struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Parameters *[]struct {
|
||||
Parameters []struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type SQLExpressionSelectParametersType `json:"type"`
|
||||
} `json:"parameters,omitempty"`
|
||||
@@ -556,6 +573,27 @@ type SQLExpression struct {
|
||||
} `json:"where,omitempty"`
|
||||
}
|
||||
|
||||
// SQLExpressionFromParametersType defines model for SQLExpression.From.Parameters.Type.
|
||||
type SQLExpressionFromParametersType string
|
||||
|
||||
// SQLExpressionFromPropertyType defines model for SQLExpression.From.Property.Type.
|
||||
type SQLExpressionFromPropertyType string
|
||||
|
||||
// SQLExpression_From defines model for SQLExpression.From.
|
||||
type SQLExpression_From struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Parameters []struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type SQLExpressionFromParametersType `json:"type"`
|
||||
} `json:"parameters,omitempty"`
|
||||
Property *struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type SQLExpressionFromPropertyType `json:"type"`
|
||||
} `json:"property,omitempty"`
|
||||
Type *interface{} `json:"type,omitempty"`
|
||||
union json.RawMessage
|
||||
}
|
||||
|
||||
// TODO this doesn't work
|
||||
type SQLExpressionGroupByType string
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
|
||||
package dataquery
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// Defines values for AverageType.
|
||||
const (
|
||||
AverageTypeAvg AverageType = "avg"
|
||||
@@ -17,141 +21,92 @@ const (
|
||||
// Defines values for BaseBucketAggregationType.
|
||||
const (
|
||||
BaseBucketAggregationTypeDateHistogram BaseBucketAggregationType = "date_histogram"
|
||||
|
||||
BaseBucketAggregationTypeFilters BaseBucketAggregationType = "filters"
|
||||
|
||||
BaseBucketAggregationTypeGeohashGrid BaseBucketAggregationType = "geohash_grid"
|
||||
|
||||
BaseBucketAggregationTypeHistogram BaseBucketAggregationType = "histogram"
|
||||
|
||||
BaseBucketAggregationTypeNested BaseBucketAggregationType = "nested"
|
||||
|
||||
BaseBucketAggregationTypeTerms BaseBucketAggregationType = "terms"
|
||||
BaseBucketAggregationTypeFilters BaseBucketAggregationType = "filters"
|
||||
BaseBucketAggregationTypeGeohashGrid BaseBucketAggregationType = "geohash_grid"
|
||||
BaseBucketAggregationTypeHistogram BaseBucketAggregationType = "histogram"
|
||||
BaseBucketAggregationTypeNested BaseBucketAggregationType = "nested"
|
||||
BaseBucketAggregationTypeTerms BaseBucketAggregationType = "terms"
|
||||
)
|
||||
|
||||
// Defines values for BaseMetricAggregationType.
|
||||
const (
|
||||
BaseMetricAggregationTypeAvg BaseMetricAggregationType = "avg"
|
||||
|
||||
BaseMetricAggregationTypeBucketScript BaseMetricAggregationType = "bucket_script"
|
||||
|
||||
BaseMetricAggregationTypeCardinality BaseMetricAggregationType = "cardinality"
|
||||
|
||||
BaseMetricAggregationTypeCount BaseMetricAggregationType = "count"
|
||||
|
||||
BaseMetricAggregationTypeAvg BaseMetricAggregationType = "avg"
|
||||
BaseMetricAggregationTypeBucketScript BaseMetricAggregationType = "bucket_script"
|
||||
BaseMetricAggregationTypeCardinality BaseMetricAggregationType = "cardinality"
|
||||
BaseMetricAggregationTypeCount BaseMetricAggregationType = "count"
|
||||
BaseMetricAggregationTypeCumulativeSum BaseMetricAggregationType = "cumulative_sum"
|
||||
|
||||
BaseMetricAggregationTypeDerivative BaseMetricAggregationType = "derivative"
|
||||
|
||||
BaseMetricAggregationTypeDerivative BaseMetricAggregationType = "derivative"
|
||||
BaseMetricAggregationTypeExtendedStats BaseMetricAggregationType = "extended_stats"
|
||||
|
||||
BaseMetricAggregationTypeLogs BaseMetricAggregationType = "logs"
|
||||
|
||||
BaseMetricAggregationTypeMax BaseMetricAggregationType = "max"
|
||||
|
||||
BaseMetricAggregationTypeMin BaseMetricAggregationType = "min"
|
||||
|
||||
BaseMetricAggregationTypeMovingAvg BaseMetricAggregationType = "moving_avg"
|
||||
|
||||
BaseMetricAggregationTypeMovingFn BaseMetricAggregationType = "moving_fn"
|
||||
|
||||
BaseMetricAggregationTypePercentiles BaseMetricAggregationType = "percentiles"
|
||||
|
||||
BaseMetricAggregationTypeRate BaseMetricAggregationType = "rate"
|
||||
|
||||
BaseMetricAggregationTypeRawData BaseMetricAggregationType = "raw_data"
|
||||
|
||||
BaseMetricAggregationTypeRawDocument BaseMetricAggregationType = "raw_document"
|
||||
|
||||
BaseMetricAggregationTypeSerialDiff BaseMetricAggregationType = "serial_diff"
|
||||
|
||||
BaseMetricAggregationTypeSum BaseMetricAggregationType = "sum"
|
||||
|
||||
BaseMetricAggregationTypeTopMetrics BaseMetricAggregationType = "top_metrics"
|
||||
BaseMetricAggregationTypeLogs BaseMetricAggregationType = "logs"
|
||||
BaseMetricAggregationTypeMax BaseMetricAggregationType = "max"
|
||||
BaseMetricAggregationTypeMin BaseMetricAggregationType = "min"
|
||||
BaseMetricAggregationTypeMovingAvg BaseMetricAggregationType = "moving_avg"
|
||||
BaseMetricAggregationTypeMovingFn BaseMetricAggregationType = "moving_fn"
|
||||
BaseMetricAggregationTypePercentiles BaseMetricAggregationType = "percentiles"
|
||||
BaseMetricAggregationTypeRate BaseMetricAggregationType = "rate"
|
||||
BaseMetricAggregationTypeRawData BaseMetricAggregationType = "raw_data"
|
||||
BaseMetricAggregationTypeRawDocument BaseMetricAggregationType = "raw_document"
|
||||
BaseMetricAggregationTypeSerialDiff BaseMetricAggregationType = "serial_diff"
|
||||
BaseMetricAggregationTypeSum BaseMetricAggregationType = "sum"
|
||||
BaseMetricAggregationTypeTopMetrics BaseMetricAggregationType = "top_metrics"
|
||||
)
|
||||
|
||||
// Defines values for BaseMovingAverageModelSettingsModel.
|
||||
const (
|
||||
BaseMovingAverageModelSettingsModelEwma BaseMovingAverageModelSettingsModel = "ewma"
|
||||
|
||||
BaseMovingAverageModelSettingsModelHolt BaseMovingAverageModelSettingsModel = "holt"
|
||||
|
||||
BaseMovingAverageModelSettingsModelEwma BaseMovingAverageModelSettingsModel = "ewma"
|
||||
BaseMovingAverageModelSettingsModelHolt BaseMovingAverageModelSettingsModel = "holt"
|
||||
BaseMovingAverageModelSettingsModelHoltWinters BaseMovingAverageModelSettingsModel = "holt_winters"
|
||||
|
||||
BaseMovingAverageModelSettingsModelLinear BaseMovingAverageModelSettingsModel = "linear"
|
||||
|
||||
BaseMovingAverageModelSettingsModelSimple BaseMovingAverageModelSettingsModel = "simple"
|
||||
BaseMovingAverageModelSettingsModelLinear BaseMovingAverageModelSettingsModel = "linear"
|
||||
BaseMovingAverageModelSettingsModelSimple BaseMovingAverageModelSettingsModel = "simple"
|
||||
)
|
||||
|
||||
// Defines values for BasePipelineMetricAggregationType.
|
||||
const (
|
||||
BasePipelineMetricAggregationTypeAvg BasePipelineMetricAggregationType = "avg"
|
||||
|
||||
BasePipelineMetricAggregationTypeBucketScript BasePipelineMetricAggregationType = "bucket_script"
|
||||
|
||||
BasePipelineMetricAggregationTypeCardinality BasePipelineMetricAggregationType = "cardinality"
|
||||
|
||||
BasePipelineMetricAggregationTypeCount BasePipelineMetricAggregationType = "count"
|
||||
|
||||
BasePipelineMetricAggregationTypeAvg BasePipelineMetricAggregationType = "avg"
|
||||
BasePipelineMetricAggregationTypeBucketScript BasePipelineMetricAggregationType = "bucket_script"
|
||||
BasePipelineMetricAggregationTypeCardinality BasePipelineMetricAggregationType = "cardinality"
|
||||
BasePipelineMetricAggregationTypeCount BasePipelineMetricAggregationType = "count"
|
||||
BasePipelineMetricAggregationTypeCumulativeSum BasePipelineMetricAggregationType = "cumulative_sum"
|
||||
|
||||
BasePipelineMetricAggregationTypeDerivative BasePipelineMetricAggregationType = "derivative"
|
||||
|
||||
BasePipelineMetricAggregationTypeDerivative BasePipelineMetricAggregationType = "derivative"
|
||||
BasePipelineMetricAggregationTypeExtendedStats BasePipelineMetricAggregationType = "extended_stats"
|
||||
BasePipelineMetricAggregationTypeLogs BasePipelineMetricAggregationType = "logs"
|
||||
BasePipelineMetricAggregationTypeMax BasePipelineMetricAggregationType = "max"
|
||||
BasePipelineMetricAggregationTypeMin BasePipelineMetricAggregationType = "min"
|
||||
BasePipelineMetricAggregationTypeMovingAvg BasePipelineMetricAggregationType = "moving_avg"
|
||||
BasePipelineMetricAggregationTypeMovingFn BasePipelineMetricAggregationType = "moving_fn"
|
||||
BasePipelineMetricAggregationTypePercentiles BasePipelineMetricAggregationType = "percentiles"
|
||||
BasePipelineMetricAggregationTypeRate BasePipelineMetricAggregationType = "rate"
|
||||
BasePipelineMetricAggregationTypeRawData BasePipelineMetricAggregationType = "raw_data"
|
||||
BasePipelineMetricAggregationTypeRawDocument BasePipelineMetricAggregationType = "raw_document"
|
||||
BasePipelineMetricAggregationTypeSerialDiff BasePipelineMetricAggregationType = "serial_diff"
|
||||
BasePipelineMetricAggregationTypeSum BasePipelineMetricAggregationType = "sum"
|
||||
BasePipelineMetricAggregationTypeTopMetrics BasePipelineMetricAggregationType = "top_metrics"
|
||||
)
|
||||
|
||||
BasePipelineMetricAggregationTypeLogs BasePipelineMetricAggregationType = "logs"
|
||||
|
||||
BasePipelineMetricAggregationTypeMax BasePipelineMetricAggregationType = "max"
|
||||
|
||||
BasePipelineMetricAggregationTypeMin BasePipelineMetricAggregationType = "min"
|
||||
|
||||
BasePipelineMetricAggregationTypeMovingAvg BasePipelineMetricAggregationType = "moving_avg"
|
||||
|
||||
BasePipelineMetricAggregationTypeMovingFn BasePipelineMetricAggregationType = "moving_fn"
|
||||
|
||||
BasePipelineMetricAggregationTypePercentiles BasePipelineMetricAggregationType = "percentiles"
|
||||
|
||||
BasePipelineMetricAggregationTypeRate BasePipelineMetricAggregationType = "rate"
|
||||
|
||||
BasePipelineMetricAggregationTypeRawData BasePipelineMetricAggregationType = "raw_data"
|
||||
|
||||
BasePipelineMetricAggregationTypeRawDocument BasePipelineMetricAggregationType = "raw_document"
|
||||
|
||||
BasePipelineMetricAggregationTypeSerialDiff BasePipelineMetricAggregationType = "serial_diff"
|
||||
|
||||
BasePipelineMetricAggregationTypeSum BasePipelineMetricAggregationType = "sum"
|
||||
|
||||
BasePipelineMetricAggregationTypeTopMetrics BasePipelineMetricAggregationType = "top_metrics"
|
||||
// Defines values for BucketAggregationSettingsOrder.
|
||||
const (
|
||||
BucketAggregationSettingsOrderAsc BucketAggregationSettingsOrder = "asc"
|
||||
BucketAggregationSettingsOrderDesc BucketAggregationSettingsOrder = "desc"
|
||||
)
|
||||
|
||||
// Defines values for BucketAggregationType.
|
||||
const (
|
||||
BucketAggregationTypeDateHistogram BucketAggregationType = "date_histogram"
|
||||
|
||||
BucketAggregationTypeFilters BucketAggregationType = "filters"
|
||||
|
||||
BucketAggregationTypeGeohashGrid BucketAggregationType = "geohash_grid"
|
||||
|
||||
BucketAggregationTypeHistogram BucketAggregationType = "histogram"
|
||||
|
||||
BucketAggregationTypeNested BucketAggregationType = "nested"
|
||||
|
||||
BucketAggregationTypeTerms BucketAggregationType = "terms"
|
||||
BucketAggregationTypeFilters BucketAggregationType = "filters"
|
||||
BucketAggregationTypeGeohashGrid BucketAggregationType = "geohash_grid"
|
||||
BucketAggregationTypeHistogram BucketAggregationType = "histogram"
|
||||
BucketAggregationTypeNested BucketAggregationType = "nested"
|
||||
BucketAggregationTypeTerms BucketAggregationType = "terms"
|
||||
)
|
||||
|
||||
// Defines values for BucketAggregationWithFieldType.
|
||||
const (
|
||||
BucketAggregationWithFieldTypeDateHistogram BucketAggregationWithFieldType = "date_histogram"
|
||||
|
||||
BucketAggregationWithFieldTypeFilters BucketAggregationWithFieldType = "filters"
|
||||
|
||||
BucketAggregationWithFieldTypeGeohashGrid BucketAggregationWithFieldType = "geohash_grid"
|
||||
|
||||
BucketAggregationWithFieldTypeHistogram BucketAggregationWithFieldType = "histogram"
|
||||
|
||||
BucketAggregationWithFieldTypeNested BucketAggregationWithFieldType = "nested"
|
||||
|
||||
BucketAggregationWithFieldTypeTerms BucketAggregationWithFieldType = "terms"
|
||||
BucketAggregationWithFieldTypeFilters BucketAggregationWithFieldType = "filters"
|
||||
BucketAggregationWithFieldTypeGeohashGrid BucketAggregationWithFieldType = "geohash_grid"
|
||||
BucketAggregationWithFieldTypeHistogram BucketAggregationWithFieldType = "histogram"
|
||||
BucketAggregationWithFieldTypeNested BucketAggregationWithFieldType = "nested"
|
||||
BucketAggregationWithFieldTypeTerms BucketAggregationWithFieldType = "terms"
|
||||
)
|
||||
|
||||
// Defines values for BucketScriptType.
|
||||
@@ -179,42 +134,34 @@ const (
|
||||
DerivativeTypeDerivative DerivativeType = "derivative"
|
||||
)
|
||||
|
||||
// Defines values for BucketAggsSettingsOrder.
|
||||
const (
|
||||
BucketAggsSettingsOrderAsc BucketAggsSettingsOrder = "asc"
|
||||
BucketAggsSettingsOrderDesc BucketAggsSettingsOrder = "desc"
|
||||
)
|
||||
|
||||
// Defines values for ExtendedStatValue.
|
||||
const (
|
||||
ExtendedStatValueAvg ExtendedStatValue = "avg"
|
||||
|
||||
ExtendedStatValueCount ExtendedStatValue = "count"
|
||||
|
||||
ExtendedStatValueMax ExtendedStatValue = "max"
|
||||
|
||||
ExtendedStatValueMin ExtendedStatValue = "min"
|
||||
|
||||
ExtendedStatValueStdDeviation ExtendedStatValue = "std_deviation"
|
||||
|
||||
ExtendedStatValueAvg ExtendedStatValue = "avg"
|
||||
ExtendedStatValueCount ExtendedStatValue = "count"
|
||||
ExtendedStatValueMax ExtendedStatValue = "max"
|
||||
ExtendedStatValueMin ExtendedStatValue = "min"
|
||||
ExtendedStatValueStdDeviation ExtendedStatValue = "std_deviation"
|
||||
ExtendedStatValueStdDeviationBoundsLower ExtendedStatValue = "std_deviation_bounds_lower"
|
||||
|
||||
ExtendedStatValueStdDeviationBoundsUpper ExtendedStatValue = "std_deviation_bounds_upper"
|
||||
|
||||
ExtendedStatValueSum ExtendedStatValue = "sum"
|
||||
ExtendedStatValueSum ExtendedStatValue = "sum"
|
||||
)
|
||||
|
||||
// Defines values for ExtendedStatMetaType.
|
||||
const (
|
||||
ExtendedStatMetaTypeAvg ExtendedStatMetaType = "avg"
|
||||
|
||||
ExtendedStatMetaTypeCount ExtendedStatMetaType = "count"
|
||||
|
||||
ExtendedStatMetaTypeMax ExtendedStatMetaType = "max"
|
||||
|
||||
ExtendedStatMetaTypeMin ExtendedStatMetaType = "min"
|
||||
|
||||
ExtendedStatMetaTypeStdDeviation ExtendedStatMetaType = "std_deviation"
|
||||
|
||||
ExtendedStatMetaTypeAvg ExtendedStatMetaType = "avg"
|
||||
ExtendedStatMetaTypeCount ExtendedStatMetaType = "count"
|
||||
ExtendedStatMetaTypeMax ExtendedStatMetaType = "max"
|
||||
ExtendedStatMetaTypeMin ExtendedStatMetaType = "min"
|
||||
ExtendedStatMetaTypeStdDeviation ExtendedStatMetaType = "std_deviation"
|
||||
ExtendedStatMetaTypeStdDeviationBoundsLower ExtendedStatMetaType = "std_deviation_bounds_lower"
|
||||
|
||||
ExtendedStatMetaTypeStdDeviationBoundsUpper ExtendedStatMetaType = "std_deviation_bounds_upper"
|
||||
|
||||
ExtendedStatMetaTypeSum ExtendedStatMetaType = "sum"
|
||||
ExtendedStatMetaTypeSum ExtendedStatMetaType = "sum"
|
||||
)
|
||||
|
||||
// Defines values for ExtendedStatsType.
|
||||
@@ -249,166 +196,94 @@ const (
|
||||
|
||||
// Defines values for MetricAggregationType.
|
||||
const (
|
||||
MetricAggregationTypeAvg MetricAggregationType = "avg"
|
||||
|
||||
MetricAggregationTypeBucketScript MetricAggregationType = "bucket_script"
|
||||
|
||||
MetricAggregationTypeCardinality MetricAggregationType = "cardinality"
|
||||
|
||||
MetricAggregationTypeCount MetricAggregationType = "count"
|
||||
|
||||
MetricAggregationTypeAvg MetricAggregationType = "avg"
|
||||
MetricAggregationTypeBucketScript MetricAggregationType = "bucket_script"
|
||||
MetricAggregationTypeCardinality MetricAggregationType = "cardinality"
|
||||
MetricAggregationTypeCount MetricAggregationType = "count"
|
||||
MetricAggregationTypeCumulativeSum MetricAggregationType = "cumulative_sum"
|
||||
|
||||
MetricAggregationTypeDerivative MetricAggregationType = "derivative"
|
||||
|
||||
MetricAggregationTypeDerivative MetricAggregationType = "derivative"
|
||||
MetricAggregationTypeExtendedStats MetricAggregationType = "extended_stats"
|
||||
|
||||
MetricAggregationTypeLogs MetricAggregationType = "logs"
|
||||
|
||||
MetricAggregationTypeMax MetricAggregationType = "max"
|
||||
|
||||
MetricAggregationTypeMin MetricAggregationType = "min"
|
||||
|
||||
MetricAggregationTypeMovingAvg MetricAggregationType = "moving_avg"
|
||||
|
||||
MetricAggregationTypeMovingFn MetricAggregationType = "moving_fn"
|
||||
|
||||
MetricAggregationTypePercentiles MetricAggregationType = "percentiles"
|
||||
|
||||
MetricAggregationTypeRate MetricAggregationType = "rate"
|
||||
|
||||
MetricAggregationTypeRawData MetricAggregationType = "raw_data"
|
||||
|
||||
MetricAggregationTypeRawDocument MetricAggregationType = "raw_document"
|
||||
|
||||
MetricAggregationTypeSerialDiff MetricAggregationType = "serial_diff"
|
||||
|
||||
MetricAggregationTypeSum MetricAggregationType = "sum"
|
||||
|
||||
MetricAggregationTypeTopMetrics MetricAggregationType = "top_metrics"
|
||||
MetricAggregationTypeLogs MetricAggregationType = "logs"
|
||||
MetricAggregationTypeMax MetricAggregationType = "max"
|
||||
MetricAggregationTypeMin MetricAggregationType = "min"
|
||||
MetricAggregationTypeMovingAvg MetricAggregationType = "moving_avg"
|
||||
MetricAggregationTypeMovingFn MetricAggregationType = "moving_fn"
|
||||
MetricAggregationTypePercentiles MetricAggregationType = "percentiles"
|
||||
MetricAggregationTypeRate MetricAggregationType = "rate"
|
||||
MetricAggregationTypeRawData MetricAggregationType = "raw_data"
|
||||
MetricAggregationTypeRawDocument MetricAggregationType = "raw_document"
|
||||
MetricAggregationTypeSerialDiff MetricAggregationType = "serial_diff"
|
||||
MetricAggregationTypeSum MetricAggregationType = "sum"
|
||||
MetricAggregationTypeTopMetrics MetricAggregationType = "top_metrics"
|
||||
)
|
||||
|
||||
// Defines values for MetricAggregationWithFieldType.
|
||||
const (
|
||||
MetricAggregationWithFieldTypeAvg MetricAggregationWithFieldType = "avg"
|
||||
|
||||
MetricAggregationWithFieldTypeBucketScript MetricAggregationWithFieldType = "bucket_script"
|
||||
|
||||
MetricAggregationWithFieldTypeCardinality MetricAggregationWithFieldType = "cardinality"
|
||||
|
||||
MetricAggregationWithFieldTypeCount MetricAggregationWithFieldType = "count"
|
||||
|
||||
MetricAggregationWithFieldTypeAvg MetricAggregationWithFieldType = "avg"
|
||||
MetricAggregationWithFieldTypeBucketScript MetricAggregationWithFieldType = "bucket_script"
|
||||
MetricAggregationWithFieldTypeCardinality MetricAggregationWithFieldType = "cardinality"
|
||||
MetricAggregationWithFieldTypeCount MetricAggregationWithFieldType = "count"
|
||||
MetricAggregationWithFieldTypeCumulativeSum MetricAggregationWithFieldType = "cumulative_sum"
|
||||
|
||||
MetricAggregationWithFieldTypeDerivative MetricAggregationWithFieldType = "derivative"
|
||||
|
||||
MetricAggregationWithFieldTypeDerivative MetricAggregationWithFieldType = "derivative"
|
||||
MetricAggregationWithFieldTypeExtendedStats MetricAggregationWithFieldType = "extended_stats"
|
||||
|
||||
MetricAggregationWithFieldTypeLogs MetricAggregationWithFieldType = "logs"
|
||||
|
||||
MetricAggregationWithFieldTypeMax MetricAggregationWithFieldType = "max"
|
||||
|
||||
MetricAggregationWithFieldTypeMin MetricAggregationWithFieldType = "min"
|
||||
|
||||
MetricAggregationWithFieldTypeMovingAvg MetricAggregationWithFieldType = "moving_avg"
|
||||
|
||||
MetricAggregationWithFieldTypeMovingFn MetricAggregationWithFieldType = "moving_fn"
|
||||
|
||||
MetricAggregationWithFieldTypePercentiles MetricAggregationWithFieldType = "percentiles"
|
||||
|
||||
MetricAggregationWithFieldTypeRate MetricAggregationWithFieldType = "rate"
|
||||
|
||||
MetricAggregationWithFieldTypeRawData MetricAggregationWithFieldType = "raw_data"
|
||||
|
||||
MetricAggregationWithFieldTypeRawDocument MetricAggregationWithFieldType = "raw_document"
|
||||
|
||||
MetricAggregationWithFieldTypeSerialDiff MetricAggregationWithFieldType = "serial_diff"
|
||||
|
||||
MetricAggregationWithFieldTypeSum MetricAggregationWithFieldType = "sum"
|
||||
|
||||
MetricAggregationWithFieldTypeTopMetrics MetricAggregationWithFieldType = "top_metrics"
|
||||
MetricAggregationWithFieldTypeLogs MetricAggregationWithFieldType = "logs"
|
||||
MetricAggregationWithFieldTypeMax MetricAggregationWithFieldType = "max"
|
||||
MetricAggregationWithFieldTypeMin MetricAggregationWithFieldType = "min"
|
||||
MetricAggregationWithFieldTypeMovingAvg MetricAggregationWithFieldType = "moving_avg"
|
||||
MetricAggregationWithFieldTypeMovingFn MetricAggregationWithFieldType = "moving_fn"
|
||||
MetricAggregationWithFieldTypePercentiles MetricAggregationWithFieldType = "percentiles"
|
||||
MetricAggregationWithFieldTypeRate MetricAggregationWithFieldType = "rate"
|
||||
MetricAggregationWithFieldTypeRawData MetricAggregationWithFieldType = "raw_data"
|
||||
MetricAggregationWithFieldTypeRawDocument MetricAggregationWithFieldType = "raw_document"
|
||||
MetricAggregationWithFieldTypeSerialDiff MetricAggregationWithFieldType = "serial_diff"
|
||||
MetricAggregationWithFieldTypeSum MetricAggregationWithFieldType = "sum"
|
||||
MetricAggregationWithFieldTypeTopMetrics MetricAggregationWithFieldType = "top_metrics"
|
||||
)
|
||||
|
||||
// Defines values for MetricAggregationWithInlineScriptType.
|
||||
const (
|
||||
MetricAggregationWithInlineScriptTypeAvg MetricAggregationWithInlineScriptType = "avg"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeBucketScript MetricAggregationWithInlineScriptType = "bucket_script"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeCardinality MetricAggregationWithInlineScriptType = "cardinality"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeCount MetricAggregationWithInlineScriptType = "count"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeAvg MetricAggregationWithInlineScriptType = "avg"
|
||||
MetricAggregationWithInlineScriptTypeBucketScript MetricAggregationWithInlineScriptType = "bucket_script"
|
||||
MetricAggregationWithInlineScriptTypeCardinality MetricAggregationWithInlineScriptType = "cardinality"
|
||||
MetricAggregationWithInlineScriptTypeCount MetricAggregationWithInlineScriptType = "count"
|
||||
MetricAggregationWithInlineScriptTypeCumulativeSum MetricAggregationWithInlineScriptType = "cumulative_sum"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeDerivative MetricAggregationWithInlineScriptType = "derivative"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeDerivative MetricAggregationWithInlineScriptType = "derivative"
|
||||
MetricAggregationWithInlineScriptTypeExtendedStats MetricAggregationWithInlineScriptType = "extended_stats"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeLogs MetricAggregationWithInlineScriptType = "logs"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeMax MetricAggregationWithInlineScriptType = "max"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeMin MetricAggregationWithInlineScriptType = "min"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeMovingAvg MetricAggregationWithInlineScriptType = "moving_avg"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeMovingFn MetricAggregationWithInlineScriptType = "moving_fn"
|
||||
|
||||
MetricAggregationWithInlineScriptTypePercentiles MetricAggregationWithInlineScriptType = "percentiles"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeRate MetricAggregationWithInlineScriptType = "rate"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeRawData MetricAggregationWithInlineScriptType = "raw_data"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeRawDocument MetricAggregationWithInlineScriptType = "raw_document"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeSerialDiff MetricAggregationWithInlineScriptType = "serial_diff"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeSum MetricAggregationWithInlineScriptType = "sum"
|
||||
|
||||
MetricAggregationWithInlineScriptTypeTopMetrics MetricAggregationWithInlineScriptType = "top_metrics"
|
||||
MetricAggregationWithInlineScriptTypeLogs MetricAggregationWithInlineScriptType = "logs"
|
||||
MetricAggregationWithInlineScriptTypeMax MetricAggregationWithInlineScriptType = "max"
|
||||
MetricAggregationWithInlineScriptTypeMin MetricAggregationWithInlineScriptType = "min"
|
||||
MetricAggregationWithInlineScriptTypeMovingAvg MetricAggregationWithInlineScriptType = "moving_avg"
|
||||
MetricAggregationWithInlineScriptTypeMovingFn MetricAggregationWithInlineScriptType = "moving_fn"
|
||||
MetricAggregationWithInlineScriptTypePercentiles MetricAggregationWithInlineScriptType = "percentiles"
|
||||
MetricAggregationWithInlineScriptTypeRate MetricAggregationWithInlineScriptType = "rate"
|
||||
MetricAggregationWithInlineScriptTypeRawData MetricAggregationWithInlineScriptType = "raw_data"
|
||||
MetricAggregationWithInlineScriptTypeRawDocument MetricAggregationWithInlineScriptType = "raw_document"
|
||||
MetricAggregationWithInlineScriptTypeSerialDiff MetricAggregationWithInlineScriptType = "serial_diff"
|
||||
MetricAggregationWithInlineScriptTypeSum MetricAggregationWithInlineScriptType = "sum"
|
||||
MetricAggregationWithInlineScriptTypeTopMetrics MetricAggregationWithInlineScriptType = "top_metrics"
|
||||
)
|
||||
|
||||
// Defines values for MetricAggregationWithMissingSupportType.
|
||||
const (
|
||||
MetricAggregationWithMissingSupportTypeAvg MetricAggregationWithMissingSupportType = "avg"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeBucketScript MetricAggregationWithMissingSupportType = "bucket_script"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeCardinality MetricAggregationWithMissingSupportType = "cardinality"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeCount MetricAggregationWithMissingSupportType = "count"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeAvg MetricAggregationWithMissingSupportType = "avg"
|
||||
MetricAggregationWithMissingSupportTypeBucketScript MetricAggregationWithMissingSupportType = "bucket_script"
|
||||
MetricAggregationWithMissingSupportTypeCardinality MetricAggregationWithMissingSupportType = "cardinality"
|
||||
MetricAggregationWithMissingSupportTypeCount MetricAggregationWithMissingSupportType = "count"
|
||||
MetricAggregationWithMissingSupportTypeCumulativeSum MetricAggregationWithMissingSupportType = "cumulative_sum"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeDerivative MetricAggregationWithMissingSupportType = "derivative"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeDerivative MetricAggregationWithMissingSupportType = "derivative"
|
||||
MetricAggregationWithMissingSupportTypeExtendedStats MetricAggregationWithMissingSupportType = "extended_stats"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeLogs MetricAggregationWithMissingSupportType = "logs"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeMax MetricAggregationWithMissingSupportType = "max"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeMin MetricAggregationWithMissingSupportType = "min"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeMovingAvg MetricAggregationWithMissingSupportType = "moving_avg"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeMovingFn MetricAggregationWithMissingSupportType = "moving_fn"
|
||||
|
||||
MetricAggregationWithMissingSupportTypePercentiles MetricAggregationWithMissingSupportType = "percentiles"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeRate MetricAggregationWithMissingSupportType = "rate"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeRawData MetricAggregationWithMissingSupportType = "raw_data"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeRawDocument MetricAggregationWithMissingSupportType = "raw_document"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeSerialDiff MetricAggregationWithMissingSupportType = "serial_diff"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeSum MetricAggregationWithMissingSupportType = "sum"
|
||||
|
||||
MetricAggregationWithMissingSupportTypeTopMetrics MetricAggregationWithMissingSupportType = "top_metrics"
|
||||
MetricAggregationWithMissingSupportTypeLogs MetricAggregationWithMissingSupportType = "logs"
|
||||
MetricAggregationWithMissingSupportTypeMax MetricAggregationWithMissingSupportType = "max"
|
||||
MetricAggregationWithMissingSupportTypeMin MetricAggregationWithMissingSupportType = "min"
|
||||
MetricAggregationWithMissingSupportTypeMovingAvg MetricAggregationWithMissingSupportType = "moving_avg"
|
||||
MetricAggregationWithMissingSupportTypeMovingFn MetricAggregationWithMissingSupportType = "moving_fn"
|
||||
MetricAggregationWithMissingSupportTypePercentiles MetricAggregationWithMissingSupportType = "percentiles"
|
||||
MetricAggregationWithMissingSupportTypeRate MetricAggregationWithMissingSupportType = "rate"
|
||||
MetricAggregationWithMissingSupportTypeRawData MetricAggregationWithMissingSupportType = "raw_data"
|
||||
MetricAggregationWithMissingSupportTypeRawDocument MetricAggregationWithMissingSupportType = "raw_document"
|
||||
MetricAggregationWithMissingSupportTypeSerialDiff MetricAggregationWithMissingSupportType = "serial_diff"
|
||||
MetricAggregationWithMissingSupportTypeSum MetricAggregationWithMissingSupportType = "sum"
|
||||
MetricAggregationWithMissingSupportTypeTopMetrics MetricAggregationWithMissingSupportType = "top_metrics"
|
||||
)
|
||||
|
||||
// Defines values for MinType.
|
||||
@@ -443,28 +318,20 @@ const (
|
||||
|
||||
// Defines values for MovingAverageModel.
|
||||
const (
|
||||
MovingAverageModelEwma MovingAverageModel = "ewma"
|
||||
|
||||
MovingAverageModelHolt MovingAverageModel = "holt"
|
||||
|
||||
MovingAverageModelEwma MovingAverageModel = "ewma"
|
||||
MovingAverageModelHolt MovingAverageModel = "holt"
|
||||
MovingAverageModelHoltWinters MovingAverageModel = "holt_winters"
|
||||
|
||||
MovingAverageModelLinear MovingAverageModel = "linear"
|
||||
|
||||
MovingAverageModelSimple MovingAverageModel = "simple"
|
||||
MovingAverageModelLinear MovingAverageModel = "linear"
|
||||
MovingAverageModelSimple MovingAverageModel = "simple"
|
||||
)
|
||||
|
||||
// Defines values for MovingAverageModelOptionValue.
|
||||
const (
|
||||
MovingAverageModelOptionValueEwma MovingAverageModelOptionValue = "ewma"
|
||||
|
||||
MovingAverageModelOptionValueHolt MovingAverageModelOptionValue = "holt"
|
||||
|
||||
MovingAverageModelOptionValueEwma MovingAverageModelOptionValue = "ewma"
|
||||
MovingAverageModelOptionValueHolt MovingAverageModelOptionValue = "holt"
|
||||
MovingAverageModelOptionValueHoltWinters MovingAverageModelOptionValue = "holt_winters"
|
||||
|
||||
MovingAverageModelOptionValueLinear MovingAverageModelOptionValue = "linear"
|
||||
|
||||
MovingAverageModelOptionValueSimple MovingAverageModelOptionValue = "simple"
|
||||
MovingAverageModelOptionValueLinear MovingAverageModelOptionValue = "linear"
|
||||
MovingAverageModelOptionValueSimple MovingAverageModelOptionValue = "simple"
|
||||
)
|
||||
|
||||
// Defines values for MovingAverageSimpleModelSettingsModel.
|
||||
@@ -489,58 +356,35 @@ const (
|
||||
|
||||
// Defines values for PipelineMetricAggregationType.
|
||||
const (
|
||||
PipelineMetricAggregationTypeBucketScript PipelineMetricAggregationType = "bucket_script"
|
||||
|
||||
PipelineMetricAggregationTypeBucketScript PipelineMetricAggregationType = "bucket_script"
|
||||
PipelineMetricAggregationTypeCumulativeSum PipelineMetricAggregationType = "cumulative_sum"
|
||||
|
||||
PipelineMetricAggregationTypeDerivative PipelineMetricAggregationType = "derivative"
|
||||
|
||||
PipelineMetricAggregationTypeMovingAvg PipelineMetricAggregationType = "moving_avg"
|
||||
|
||||
PipelineMetricAggregationTypeMovingFn PipelineMetricAggregationType = "moving_fn"
|
||||
|
||||
PipelineMetricAggregationTypeSerialDiff PipelineMetricAggregationType = "serial_diff"
|
||||
PipelineMetricAggregationTypeDerivative PipelineMetricAggregationType = "derivative"
|
||||
PipelineMetricAggregationTypeMovingAvg PipelineMetricAggregationType = "moving_avg"
|
||||
PipelineMetricAggregationTypeMovingFn PipelineMetricAggregationType = "moving_fn"
|
||||
PipelineMetricAggregationTypeSerialDiff PipelineMetricAggregationType = "serial_diff"
|
||||
)
|
||||
|
||||
// Defines values for PipelineMetricAggregationWithMultipleBucketPathsType.
|
||||
const (
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeAvg PipelineMetricAggregationWithMultipleBucketPathsType = "avg"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeBucketScript PipelineMetricAggregationWithMultipleBucketPathsType = "bucket_script"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeCardinality PipelineMetricAggregationWithMultipleBucketPathsType = "cardinality"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeCount PipelineMetricAggregationWithMultipleBucketPathsType = "count"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeAvg PipelineMetricAggregationWithMultipleBucketPathsType = "avg"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeBucketScript PipelineMetricAggregationWithMultipleBucketPathsType = "bucket_script"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeCardinality PipelineMetricAggregationWithMultipleBucketPathsType = "cardinality"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeCount PipelineMetricAggregationWithMultipleBucketPathsType = "count"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeCumulativeSum PipelineMetricAggregationWithMultipleBucketPathsType = "cumulative_sum"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeDerivative PipelineMetricAggregationWithMultipleBucketPathsType = "derivative"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeDerivative PipelineMetricAggregationWithMultipleBucketPathsType = "derivative"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeExtendedStats PipelineMetricAggregationWithMultipleBucketPathsType = "extended_stats"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeLogs PipelineMetricAggregationWithMultipleBucketPathsType = "logs"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeMax PipelineMetricAggregationWithMultipleBucketPathsType = "max"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeMin PipelineMetricAggregationWithMultipleBucketPathsType = "min"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeMovingAvg PipelineMetricAggregationWithMultipleBucketPathsType = "moving_avg"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeMovingFn PipelineMetricAggregationWithMultipleBucketPathsType = "moving_fn"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypePercentiles PipelineMetricAggregationWithMultipleBucketPathsType = "percentiles"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeRate PipelineMetricAggregationWithMultipleBucketPathsType = "rate"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeRawData PipelineMetricAggregationWithMultipleBucketPathsType = "raw_data"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeRawDocument PipelineMetricAggregationWithMultipleBucketPathsType = "raw_document"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeSerialDiff PipelineMetricAggregationWithMultipleBucketPathsType = "serial_diff"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeSum PipelineMetricAggregationWithMultipleBucketPathsType = "sum"
|
||||
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeTopMetrics PipelineMetricAggregationWithMultipleBucketPathsType = "top_metrics"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeLogs PipelineMetricAggregationWithMultipleBucketPathsType = "logs"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeMax PipelineMetricAggregationWithMultipleBucketPathsType = "max"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeMin PipelineMetricAggregationWithMultipleBucketPathsType = "min"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeMovingAvg PipelineMetricAggregationWithMultipleBucketPathsType = "moving_avg"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeMovingFn PipelineMetricAggregationWithMultipleBucketPathsType = "moving_fn"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypePercentiles PipelineMetricAggregationWithMultipleBucketPathsType = "percentiles"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeRate PipelineMetricAggregationWithMultipleBucketPathsType = "rate"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeRawData PipelineMetricAggregationWithMultipleBucketPathsType = "raw_data"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeRawDocument PipelineMetricAggregationWithMultipleBucketPathsType = "raw_document"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeSerialDiff PipelineMetricAggregationWithMultipleBucketPathsType = "serial_diff"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeSum PipelineMetricAggregationWithMultipleBucketPathsType = "sum"
|
||||
PipelineMetricAggregationWithMultipleBucketPathsTypeTopMetrics PipelineMetricAggregationWithMultipleBucketPathsType = "top_metrics"
|
||||
)
|
||||
|
||||
// Defines values for RateType.
|
||||
@@ -570,8 +414,7 @@ const (
|
||||
|
||||
// Defines values for TermsSettingsOrder.
|
||||
const (
|
||||
TermsSettingsOrderAsc TermsSettingsOrder = "asc"
|
||||
|
||||
TermsSettingsOrderAsc TermsSettingsOrder = "asc"
|
||||
TermsSettingsOrderDesc TermsSettingsOrder = "desc"
|
||||
)
|
||||
|
||||
@@ -582,8 +425,7 @@ const (
|
||||
|
||||
// Defines values for TermsOrder.
|
||||
const (
|
||||
TermsOrderAsc TermsOrder = "asc"
|
||||
|
||||
TermsOrderAsc TermsOrder = "asc"
|
||||
TermsOrderDesc TermsOrder = "desc"
|
||||
)
|
||||
|
||||
@@ -655,7 +497,35 @@ type BasePipelineMetricAggregation struct {
|
||||
type BasePipelineMetricAggregationType string
|
||||
|
||||
// BucketAggregation defines model for BucketAggregation.
|
||||
type BucketAggregation interface{}
|
||||
type BucketAggregation struct {
|
||||
Field *string `json:"field,omitempty"`
|
||||
Id *string `json:"id,omitempty"`
|
||||
Settings *BucketAggregation_Settings `json:"settings,omitempty"`
|
||||
Type *interface{} `json:"type,omitempty"`
|
||||
union json.RawMessage
|
||||
}
|
||||
|
||||
// BucketAggregationSettingsOrder defines model for BucketAggregation.Settings.Order.
|
||||
type BucketAggregationSettingsOrder string
|
||||
|
||||
// BucketAggregation_Settings defines model for BucketAggregation.Settings.
|
||||
type BucketAggregation_Settings struct {
|
||||
Filters []struct {
|
||||
Label string `json:"label"`
|
||||
Query string `json:"query"`
|
||||
} `json:"filters,omitempty"`
|
||||
Interval *string `json:"interval,omitempty"`
|
||||
MinDocCount *string `json:"min_doc_count,omitempty"`
|
||||
Missing *string `json:"missing,omitempty"`
|
||||
Offset *string `json:"offset,omitempty"`
|
||||
Order *BucketAggregationSettingsOrder `json:"order,omitempty"`
|
||||
OrderBy *string `json:"orderBy,omitempty"`
|
||||
Precision *string `json:"precision,omitempty"`
|
||||
Size *string `json:"size,omitempty"`
|
||||
TimeZone *string `json:"timeZone,omitempty"`
|
||||
TrimEdges *string `json:"trimEdges,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// BucketAggregationType defines model for BucketAggregationType.
|
||||
type BucketAggregationType string
|
||||
@@ -675,7 +545,7 @@ type BucketAggregationWithFieldType string
|
||||
type BucketScript struct {
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
Id string `json:"id"`
|
||||
PipelineVariables *[]struct {
|
||||
PipelineVariables []struct {
|
||||
Name string `json:"name"`
|
||||
PipelineAgg string `json:"pipelineAgg"`
|
||||
} `json:"pipelineVariables,omitempty"`
|
||||
@@ -760,7 +630,7 @@ type ElasticsearchDataQuery struct {
|
||||
Alias *string `json:"alias,omitempty"`
|
||||
|
||||
// List of bucket aggregations
|
||||
BucketAggs *[]interface{} `json:"bucketAggs,omitempty"`
|
||||
BucketAggs []_BucketAggs_Item `json:"bucketAggs,omitempty"`
|
||||
|
||||
// For mixed data sources the selected datasource is on the query level.
|
||||
// For non mixed scenarios this is undefined.
|
||||
@@ -768,14 +638,14 @@ type ElasticsearchDataQuery struct {
|
||||
// TODO this shouldn't be unknown but DataSourceRef | null
|
||||
Datasource *interface{} `json:"datasource,omitempty"`
|
||||
|
||||
// true if query is disabled (ie should not be returned to the dashboard)
|
||||
// Hide true if query is disabled (ie should not be returned to the dashboard)
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
|
||||
// Unique, guid like, string used in explore mode
|
||||
Key *string `json:"key,omitempty"`
|
||||
|
||||
// List of metric aggregations
|
||||
Metrics *[]interface{} `json:"metrics,omitempty"`
|
||||
Metrics []_Metrics_Item `json:"metrics,omitempty"`
|
||||
|
||||
// Lucene query
|
||||
Query *string `json:"query,omitempty"`
|
||||
@@ -791,6 +661,74 @@ type ElasticsearchDataQuery struct {
|
||||
TimeField *string `json:"timeField,omitempty"`
|
||||
}
|
||||
|
||||
// BucketAggsSettingsOrder defines model for ElasticsearchDataQuery.BucketAggs.Settings.Order.
|
||||
type BucketAggsSettingsOrder string
|
||||
|
||||
// _BucketAggs_Settings defines model for ElasticsearchDataQuery.BucketAggs.Settings.
|
||||
type _BucketAggs_Settings struct {
|
||||
Filters []struct {
|
||||
Label string `json:"label"`
|
||||
Query string `json:"query"`
|
||||
} `json:"filters,omitempty"`
|
||||
Interval *string `json:"interval,omitempty"`
|
||||
MinDocCount *string `json:"min_doc_count,omitempty"`
|
||||
Missing *string `json:"missing,omitempty"`
|
||||
Offset *string `json:"offset,omitempty"`
|
||||
Order *BucketAggsSettingsOrder `json:"order,omitempty"`
|
||||
OrderBy *string `json:"orderBy,omitempty"`
|
||||
Precision *string `json:"precision,omitempty"`
|
||||
Size *string `json:"size,omitempty"`
|
||||
TimeZone *string `json:"timeZone,omitempty"`
|
||||
TrimEdges *string `json:"trimEdges,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// _BucketAggs_Item defines model for ElasticsearchDataQuery.bucketAggs.Item.
|
||||
type _BucketAggs_Item struct {
|
||||
Field *string `json:"field,omitempty"`
|
||||
Id *string `json:"id,omitempty"`
|
||||
Settings *_BucketAggs_Settings `json:"settings,omitempty"`
|
||||
Type *interface{} `json:"type,omitempty"`
|
||||
union json.RawMessage
|
||||
}
|
||||
|
||||
// _Metrics_Settings defines model for ElasticsearchDataQuery.Metrics.Settings.
|
||||
type _Metrics_Settings struct {
|
||||
Format *string `json:"format,omitempty"`
|
||||
Lag *string `json:"lag,omitempty"`
|
||||
Limit *string `json:"limit,omitempty"`
|
||||
Metrics []string `json:"metrics,omitempty"`
|
||||
Missing *string `json:"missing,omitempty"`
|
||||
Mode *string `json:"mode,omitempty"`
|
||||
Order *string `json:"order,omitempty"`
|
||||
OrderBy *string `json:"orderBy,omitempty"`
|
||||
Percents []string `json:"percents,omitempty"`
|
||||
PrecisionThreshold *string `json:"precision_threshold,omitempty"`
|
||||
Script *interface{} `json:"script,omitempty"`
|
||||
Shift *string `json:"shift,omitempty"`
|
||||
Sigma *string `json:"sigma,omitempty"`
|
||||
Size *string `json:"size,omitempty"`
|
||||
Unit *string `json:"unit,omitempty"`
|
||||
Window *string `json:"window,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// _Metrics_Item defines model for ElasticsearchDataQuery.metrics.Item.
|
||||
type _Metrics_Item struct {
|
||||
Field *string `json:"field,omitempty"`
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
Id *string `json:"id,omitempty"`
|
||||
Meta map[string]interface{} `json:"meta,omitempty"`
|
||||
PipelineAgg *string `json:"pipelineAgg,omitempty"`
|
||||
PipelineVariables []struct {
|
||||
Name string `json:"name"`
|
||||
PipelineAgg string `json:"pipelineAgg"`
|
||||
} `json:"pipelineVariables,omitempty"`
|
||||
Settings *_Metrics_Settings `json:"settings,omitempty"`
|
||||
Type *interface{} `json:"type,omitempty"`
|
||||
union json.RawMessage
|
||||
}
|
||||
|
||||
// ExtendedStat defines model for ExtendedStat.
|
||||
type ExtendedStat struct {
|
||||
Label string `json:"label"`
|
||||
@@ -805,10 +743,10 @@ type ExtendedStatMetaType string
|
||||
|
||||
// ExtendedStats defines model for ExtendedStats.
|
||||
type ExtendedStats struct {
|
||||
Field *string `json:"field,omitempty"`
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
Id string `json:"id"`
|
||||
Meta *map[string]interface{} `json:"meta,omitempty"`
|
||||
Field *string `json:"field,omitempty"`
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
Id string `json:"id"`
|
||||
Meta map[string]interface{} `json:"meta,omitempty"`
|
||||
Settings *struct {
|
||||
Missing *string `json:"missing,omitempty"`
|
||||
Script *interface{} `json:"script,omitempty"`
|
||||
@@ -830,7 +768,7 @@ type Filter struct {
|
||||
type Filters struct {
|
||||
Id string `json:"id"`
|
||||
Settings *struct {
|
||||
Filters *[]struct {
|
||||
Filters []struct {
|
||||
Label string `json:"label"`
|
||||
Query string `json:"query"`
|
||||
} `json:"filters,omitempty"`
|
||||
@@ -843,7 +781,7 @@ type FiltersType string
|
||||
|
||||
// FiltersSettings defines model for FiltersSettings.
|
||||
type FiltersSettings struct {
|
||||
Filters *[]struct {
|
||||
Filters []struct {
|
||||
Label string `json:"label"`
|
||||
Query string `json:"query"`
|
||||
} `json:"filters,omitempty"`
|
||||
@@ -887,9 +825,6 @@ type HistogramSettings struct {
|
||||
MinDocCount *string `json:"min_doc_count,omitempty"`
|
||||
}
|
||||
|
||||
// InlineScript defines model for InlineScript.
|
||||
type InlineScript interface{}
|
||||
|
||||
// Logs defines model for Logs.
|
||||
type Logs struct {
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
@@ -919,7 +854,41 @@ type Max struct {
|
||||
type MaxType string
|
||||
|
||||
// MetricAggregation defines model for MetricAggregation.
|
||||
type MetricAggregation interface{}
|
||||
type MetricAggregation struct {
|
||||
Field *string `json:"field,omitempty"`
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
Id *string `json:"id,omitempty"`
|
||||
Meta map[string]interface{} `json:"meta,omitempty"`
|
||||
PipelineAgg *string `json:"pipelineAgg,omitempty"`
|
||||
PipelineVariables []struct {
|
||||
Name string `json:"name"`
|
||||
PipelineAgg string `json:"pipelineAgg"`
|
||||
} `json:"pipelineVariables,omitempty"`
|
||||
Settings *MetricAggregation_Settings `json:"settings,omitempty"`
|
||||
Type *interface{} `json:"type,omitempty"`
|
||||
union json.RawMessage
|
||||
}
|
||||
|
||||
// MetricAggregation_Settings defines model for MetricAggregation.Settings.
|
||||
type MetricAggregation_Settings struct {
|
||||
Format *string `json:"format,omitempty"`
|
||||
Lag *string `json:"lag,omitempty"`
|
||||
Limit *string `json:"limit,omitempty"`
|
||||
Metrics []string `json:"metrics,omitempty"`
|
||||
Missing *string `json:"missing,omitempty"`
|
||||
Mode *string `json:"mode,omitempty"`
|
||||
Order *string `json:"order,omitempty"`
|
||||
OrderBy *string `json:"orderBy,omitempty"`
|
||||
Percents []string `json:"percents,omitempty"`
|
||||
PrecisionThreshold *string `json:"precision_threshold,omitempty"`
|
||||
Script *interface{} `json:"script,omitempty"`
|
||||
Shift *string `json:"shift,omitempty"`
|
||||
Sigma *string `json:"sigma,omitempty"`
|
||||
Size *string `json:"size,omitempty"`
|
||||
Unit *string `json:"unit,omitempty"`
|
||||
Window *string `json:"window,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// MetricAggregationType defines model for MetricAggregationType.
|
||||
type MetricAggregationType string
|
||||
@@ -962,7 +931,41 @@ type MetricAggregationWithMissingSupport struct {
|
||||
type MetricAggregationWithMissingSupportType string
|
||||
|
||||
// MetricAggregationWithSettings defines model for MetricAggregationWithSettings.
|
||||
type MetricAggregationWithSettings interface{}
|
||||
type MetricAggregationWithSettings struct {
|
||||
Field *string `json:"field,omitempty"`
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
Id *string `json:"id,omitempty"`
|
||||
Meta map[string]interface{} `json:"meta,omitempty"`
|
||||
PipelineAgg *string `json:"pipelineAgg,omitempty"`
|
||||
PipelineVariables []struct {
|
||||
Name string `json:"name"`
|
||||
PipelineAgg string `json:"pipelineAgg"`
|
||||
} `json:"pipelineVariables,omitempty"`
|
||||
Settings *MetricAggregationWithSettings_Settings `json:"settings,omitempty"`
|
||||
Type *interface{} `json:"type,omitempty"`
|
||||
union json.RawMessage
|
||||
}
|
||||
|
||||
// MetricAggregationWithSettings_Settings defines model for MetricAggregationWithSettings.Settings.
|
||||
type MetricAggregationWithSettings_Settings struct {
|
||||
Format *string `json:"format,omitempty"`
|
||||
Lag *string `json:"lag,omitempty"`
|
||||
Limit *string `json:"limit,omitempty"`
|
||||
Metrics []string `json:"metrics,omitempty"`
|
||||
Missing *string `json:"missing,omitempty"`
|
||||
Mode *string `json:"mode,omitempty"`
|
||||
Order *string `json:"order,omitempty"`
|
||||
OrderBy *string `json:"orderBy,omitempty"`
|
||||
Percents []string `json:"percents,omitempty"`
|
||||
PrecisionThreshold *string `json:"precision_threshold,omitempty"`
|
||||
Script *interface{} `json:"script,omitempty"`
|
||||
Shift *string `json:"shift,omitempty"`
|
||||
Sigma *string `json:"sigma,omitempty"`
|
||||
Size *string `json:"size,omitempty"`
|
||||
Unit *string `json:"unit,omitempty"`
|
||||
Window *string `json:"window,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// Min defines model for Min.
|
||||
type Min struct {
|
||||
@@ -1106,7 +1109,7 @@ type Percentiles struct {
|
||||
Id string `json:"id"`
|
||||
Settings *struct {
|
||||
Missing *string `json:"missing,omitempty"`
|
||||
Percents *[]string `json:"percents,omitempty"`
|
||||
Percents []string `json:"percents,omitempty"`
|
||||
Script *interface{} `json:"script,omitempty"`
|
||||
} `json:"settings,omitempty"`
|
||||
Type PercentilesType `json:"type"`
|
||||
@@ -1116,7 +1119,27 @@ type Percentiles struct {
|
||||
type PercentilesType string
|
||||
|
||||
// PipelineMetricAggregation defines model for PipelineMetricAggregation.
|
||||
type PipelineMetricAggregation interface{}
|
||||
type PipelineMetricAggregation struct {
|
||||
Field *string `json:"field,omitempty"`
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
Id *string `json:"id,omitempty"`
|
||||
PipelineAgg *string `json:"pipelineAgg,omitempty"`
|
||||
PipelineVariables []struct {
|
||||
Name string `json:"name"`
|
||||
PipelineAgg string `json:"pipelineAgg"`
|
||||
} `json:"pipelineVariables,omitempty"`
|
||||
Settings *PipelineMetricAggregation_Settings `json:"settings,omitempty"`
|
||||
Type *interface{} `json:"type,omitempty"`
|
||||
union json.RawMessage
|
||||
}
|
||||
|
||||
// PipelineMetricAggregation_Settings defines model for PipelineMetricAggregation.Settings.
|
||||
type PipelineMetricAggregation_Settings struct {
|
||||
Format *string `json:"format,omitempty"`
|
||||
Script *interface{} `json:"script,omitempty"`
|
||||
Unit *string `json:"unit,omitempty"`
|
||||
AdditionalProperties map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
// PipelineMetricAggregationType defines model for PipelineMetricAggregationType.
|
||||
type PipelineMetricAggregationType string
|
||||
@@ -1125,7 +1148,7 @@ type PipelineMetricAggregationType string
|
||||
type PipelineMetricAggregationWithMultipleBucketPaths struct {
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
Id string `json:"id"`
|
||||
PipelineVariables *[]struct {
|
||||
PipelineVariables []struct {
|
||||
Name string `json:"name"`
|
||||
PipelineAgg string `json:"pipelineAgg"`
|
||||
} `json:"pipelineVariables,omitempty"`
|
||||
@@ -1249,9 +1272,9 @@ type TopMetrics struct {
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
Id string `json:"id"`
|
||||
Settings *struct {
|
||||
Metrics *[]string `json:"metrics,omitempty"`
|
||||
Order *string `json:"order,omitempty"`
|
||||
OrderBy *string `json:"orderBy,omitempty"`
|
||||
Metrics []string `json:"metrics,omitempty"`
|
||||
Order *string `json:"order,omitempty"`
|
||||
OrderBy *string `json:"orderBy,omitempty"`
|
||||
} `json:"settings,omitempty"`
|
||||
Type TopMetricsType `json:"type"`
|
||||
}
|
||||
|
||||
@@ -12,39 +12,32 @@ package dataquery
|
||||
// Defines values for EditorMode.
|
||||
const (
|
||||
EditorModeBuilder EditorMode = "builder"
|
||||
|
||||
EditorModeCode EditorMode = "code"
|
||||
EditorModeCode EditorMode = "code"
|
||||
)
|
||||
|
||||
// Defines values for LokiQueryDirection.
|
||||
const (
|
||||
LokiQueryDirectionBackward LokiQueryDirection = "backward"
|
||||
|
||||
LokiQueryDirectionForward LokiQueryDirection = "forward"
|
||||
LokiQueryDirectionForward LokiQueryDirection = "forward"
|
||||
)
|
||||
|
||||
// Defines values for LokiQueryType.
|
||||
const (
|
||||
LokiQueryTypeInstant LokiQueryType = "instant"
|
||||
|
||||
LokiQueryTypeRange LokiQueryType = "range"
|
||||
|
||||
LokiQueryTypeStream LokiQueryType = "stream"
|
||||
LokiQueryTypeRange LokiQueryType = "range"
|
||||
LokiQueryTypeStream LokiQueryType = "stream"
|
||||
)
|
||||
|
||||
// Defines values for QueryEditorMode.
|
||||
const (
|
||||
QueryEditorModeBuilder QueryEditorMode = "builder"
|
||||
|
||||
QueryEditorModeCode QueryEditorMode = "code"
|
||||
QueryEditorModeCode QueryEditorMode = "code"
|
||||
)
|
||||
|
||||
// Defines values for SupportingQueryType.
|
||||
const (
|
||||
SupportingQueryTypeDataSample SupportingQueryType = "dataSample"
|
||||
|
||||
SupportingQueryTypeLogsSample SupportingQueryType = "logsSample"
|
||||
|
||||
SupportingQueryTypeLogsVolume SupportingQueryType = "logsVolume"
|
||||
)
|
||||
|
||||
@@ -60,7 +53,7 @@ type LokiDataQuery struct {
|
||||
// The LogQL query.
|
||||
Expr string `json:"expr"`
|
||||
|
||||
// true if query is disabled (ie should not be returned to the dashboard)
|
||||
// Hide true if query is disabled (ie should not be returned to the dashboard)
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
|
||||
// @deprecated, now use queryType.
|
||||
|
||||
@@ -11,10 +11,8 @@ package dataquery
|
||||
|
||||
// Defines values for ParcaQueryType.
|
||||
const (
|
||||
ParcaQueryTypeBoth ParcaQueryType = "both"
|
||||
|
||||
ParcaQueryTypeBoth ParcaQueryType = "both"
|
||||
ParcaQueryTypeMetrics ParcaQueryType = "metrics"
|
||||
|
||||
ParcaQueryTypeProfile ParcaQueryType = "profile"
|
||||
)
|
||||
|
||||
@@ -26,7 +24,7 @@ type ParcaDataQuery struct {
|
||||
// TODO this shouldn't be unknown but DataSourceRef | null
|
||||
Datasource *interface{} `json:"datasource,omitempty"`
|
||||
|
||||
// true if query is disabled (ie should not be returned to the dashboard)
|
||||
// Hide true if query is disabled (ie should not be returned to the dashboard)
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
|
||||
// Unique, guid like, string used in explore mode
|
||||
|
||||
@@ -11,10 +11,8 @@ package dataquery
|
||||
|
||||
// Defines values for PhlareQueryType.
|
||||
const (
|
||||
PhlareQueryTypeBoth PhlareQueryType = "both"
|
||||
|
||||
PhlareQueryTypeBoth PhlareQueryType = "both"
|
||||
PhlareQueryTypeMetrics PhlareQueryType = "metrics"
|
||||
|
||||
PhlareQueryTypeProfile PhlareQueryType = "profile"
|
||||
)
|
||||
|
||||
@@ -29,7 +27,7 @@ type PhlareDataQuery struct {
|
||||
// Allows to group the results.
|
||||
GroupBy []string `json:"groupBy"`
|
||||
|
||||
// true if query is disabled (ie should not be returned to the dashboard)
|
||||
// Hide true if query is disabled (ie should not be returned to the dashboard)
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
|
||||
// Unique, guid like, string used in explore mode
|
||||
|
||||
@@ -11,17 +11,12 @@ package dataquery
|
||||
|
||||
// Defines values for TempoQueryType.
|
||||
const (
|
||||
TempoQueryTypeClear TempoQueryType = "clear"
|
||||
|
||||
TempoQueryTypeClear TempoQueryType = "clear"
|
||||
TempoQueryTypeNativeSearch TempoQueryType = "nativeSearch"
|
||||
|
||||
TempoQueryTypeSearch TempoQueryType = "search"
|
||||
|
||||
TempoQueryTypeServiceMap TempoQueryType = "serviceMap"
|
||||
|
||||
TempoQueryTypeTraceql TempoQueryType = "traceql"
|
||||
|
||||
TempoQueryTypeUpload TempoQueryType = "upload"
|
||||
TempoQueryTypeSearch TempoQueryType = "search"
|
||||
TempoQueryTypeServiceMap TempoQueryType = "serviceMap"
|
||||
TempoQueryTypeTraceql TempoQueryType = "traceql"
|
||||
TempoQueryTypeUpload TempoQueryType = "upload"
|
||||
)
|
||||
|
||||
// TempoDataQuery defines model for TempoDataQuery.
|
||||
@@ -32,7 +27,7 @@ type TempoDataQuery struct {
|
||||
// TODO this shouldn't be unknown but DataSourceRef | null
|
||||
Datasource *interface{} `json:"datasource,omitempty"`
|
||||
|
||||
// true if query is disabled (ie should not be returned to the dashboard)
|
||||
// Hide true if query is disabled (ie should not be returned to the dashboard)
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
|
||||
// Unique, guid like, string used in explore mode
|
||||
@@ -70,5 +65,5 @@ type TempoDataQuery struct {
|
||||
SpanName *string `json:"spanName,omitempty"`
|
||||
}
|
||||
|
||||
// search = Loki search, nativeSearch = Tempo search for backwards compatibility
|
||||
// TempoQueryType search = Loki search, nativeSearch = Tempo search for backwards compatibility
|
||||
type TempoQueryType string
|
||||
|
||||
@@ -11,169 +11,103 @@ package dataquery
|
||||
|
||||
// Defines values for NodesQueryType.
|
||||
const (
|
||||
NodesQueryTypeRandom NodesQueryType = "random"
|
||||
|
||||
NodesQueryTypeRandom NodesQueryType = "random"
|
||||
NodesQueryTypeRandomEdges NodesQueryType = "random edges"
|
||||
|
||||
NodesQueryTypeResponse NodesQueryType = "response"
|
||||
NodesQueryTypeResponse NodesQueryType = "response"
|
||||
)
|
||||
|
||||
// Defines values for StreamingQueryType.
|
||||
const (
|
||||
StreamingQueryTypeFetch StreamingQueryType = "fetch"
|
||||
|
||||
StreamingQueryTypeLogs StreamingQueryType = "logs"
|
||||
|
||||
StreamingQueryTypeFetch StreamingQueryType = "fetch"
|
||||
StreamingQueryTypeLogs StreamingQueryType = "logs"
|
||||
StreamingQueryTypeSignal StreamingQueryType = "signal"
|
||||
)
|
||||
|
||||
// Defines values for ErrorType.
|
||||
const (
|
||||
ErrorTypeFrontendException ErrorType = "frontend_exception"
|
||||
|
||||
ErrorTypeFrontendException ErrorType = "frontend_exception"
|
||||
ErrorTypeFrontendObservable ErrorType = "frontend_observable"
|
||||
|
||||
ErrorTypeServerPanic ErrorType = "server_panic"
|
||||
ErrorTypeServerPanic ErrorType = "server_panic"
|
||||
)
|
||||
|
||||
// Defines values for NodesType.
|
||||
const (
|
||||
NodesTypeRandom NodesType = "random"
|
||||
|
||||
NodesTypeRandom NodesType = "random"
|
||||
NodesTypeRandomEdges NodesType = "random edges"
|
||||
|
||||
NodesTypeResponse NodesType = "response"
|
||||
NodesTypeResponse NodesType = "response"
|
||||
)
|
||||
|
||||
// Defines values for ScenarioId.
|
||||
const (
|
||||
ScenarioIdAnnotations ScenarioId = "annotations"
|
||||
|
||||
ScenarioIdArrow ScenarioId = "arrow"
|
||||
|
||||
ScenarioIdCsvContent ScenarioId = "csv_content"
|
||||
|
||||
ScenarioIdCsvFile ScenarioId = "csv_file"
|
||||
|
||||
ScenarioIdCsvMetricValues ScenarioId = "csv_metric_values"
|
||||
|
||||
ScenarioIdDatapointsOutsideRange ScenarioId = "datapoints_outside_range"
|
||||
|
||||
ScenarioIdAnnotations ScenarioId = "annotations"
|
||||
ScenarioIdArrow ScenarioId = "arrow"
|
||||
ScenarioIdCsvContent ScenarioId = "csv_content"
|
||||
ScenarioIdCsvFile ScenarioId = "csv_file"
|
||||
ScenarioIdCsvMetricValues ScenarioId = "csv_metric_values"
|
||||
ScenarioIdDatapointsOutsideRange ScenarioId = "datapoints_outside_range"
|
||||
ScenarioIdExponentialHeatmapBucketData ScenarioId = "exponential_heatmap_bucket_data"
|
||||
|
||||
ScenarioIdFlameGraph ScenarioId = "flame_graph"
|
||||
|
||||
ScenarioIdGrafanaApi ScenarioId = "grafana_api"
|
||||
|
||||
ScenarioIdLinearHeatmapBucketData ScenarioId = "linear_heatmap_bucket_data"
|
||||
|
||||
ScenarioIdLive ScenarioId = "live"
|
||||
|
||||
ScenarioIdLogs ScenarioId = "logs"
|
||||
|
||||
ScenarioIdManualEntry ScenarioId = "manual_entry"
|
||||
|
||||
ScenarioIdNoDataPoints ScenarioId = "no_data_points"
|
||||
|
||||
ScenarioIdNodeGraph ScenarioId = "node_graph"
|
||||
|
||||
ScenarioIdPredictableCsvWave ScenarioId = "predictable_csv_wave"
|
||||
|
||||
ScenarioIdPredictablePulse ScenarioId = "predictable_pulse"
|
||||
|
||||
ScenarioIdRandomWalk ScenarioId = "random_walk"
|
||||
|
||||
ScenarioIdRandomWalkTable ScenarioId = "random_walk_table"
|
||||
|
||||
ScenarioIdRandomWalkWithError ScenarioId = "random_walk_with_error"
|
||||
|
||||
ScenarioIdRawFrame ScenarioId = "raw_frame"
|
||||
|
||||
ScenarioIdServerError500 ScenarioId = "server_error_500"
|
||||
|
||||
ScenarioIdSimulation ScenarioId = "simulation"
|
||||
|
||||
ScenarioIdSlowQuery ScenarioId = "slow_query"
|
||||
|
||||
ScenarioIdStreamingClient ScenarioId = "streaming_client"
|
||||
|
||||
ScenarioIdTableStatic ScenarioId = "table_static"
|
||||
|
||||
ScenarioIdTrace ScenarioId = "trace"
|
||||
|
||||
ScenarioIdUsa ScenarioId = "usa"
|
||||
|
||||
ScenarioIdVariablesQuery ScenarioId = "variables-query"
|
||||
ScenarioIdFlameGraph ScenarioId = "flame_graph"
|
||||
ScenarioIdGrafanaApi ScenarioId = "grafana_api"
|
||||
ScenarioIdLinearHeatmapBucketData ScenarioId = "linear_heatmap_bucket_data"
|
||||
ScenarioIdLive ScenarioId = "live"
|
||||
ScenarioIdLogs ScenarioId = "logs"
|
||||
ScenarioIdManualEntry ScenarioId = "manual_entry"
|
||||
ScenarioIdNoDataPoints ScenarioId = "no_data_points"
|
||||
ScenarioIdNodeGraph ScenarioId = "node_graph"
|
||||
ScenarioIdPredictableCsvWave ScenarioId = "predictable_csv_wave"
|
||||
ScenarioIdPredictablePulse ScenarioId = "predictable_pulse"
|
||||
ScenarioIdRandomWalk ScenarioId = "random_walk"
|
||||
ScenarioIdRandomWalkTable ScenarioId = "random_walk_table"
|
||||
ScenarioIdRandomWalkWithError ScenarioId = "random_walk_with_error"
|
||||
ScenarioIdRawFrame ScenarioId = "raw_frame"
|
||||
ScenarioIdServerError500 ScenarioId = "server_error_500"
|
||||
ScenarioIdSimulation ScenarioId = "simulation"
|
||||
ScenarioIdSlowQuery ScenarioId = "slow_query"
|
||||
ScenarioIdStreamingClient ScenarioId = "streaming_client"
|
||||
ScenarioIdTableStatic ScenarioId = "table_static"
|
||||
ScenarioIdTrace ScenarioId = "trace"
|
||||
ScenarioIdUsa ScenarioId = "usa"
|
||||
ScenarioIdVariablesQuery ScenarioId = "variables-query"
|
||||
)
|
||||
|
||||
// Defines values for StreamType.
|
||||
const (
|
||||
StreamTypeFetch StreamType = "fetch"
|
||||
|
||||
StreamTypeLogs StreamType = "logs"
|
||||
|
||||
StreamTypeFetch StreamType = "fetch"
|
||||
StreamTypeLogs StreamType = "logs"
|
||||
StreamTypeSignal StreamType = "signal"
|
||||
)
|
||||
|
||||
// Defines values for TestDataQueryType.
|
||||
const (
|
||||
TestDataQueryTypeAnnotations TestDataQueryType = "annotations"
|
||||
|
||||
TestDataQueryTypeArrow TestDataQueryType = "arrow"
|
||||
|
||||
TestDataQueryTypeCsvContent TestDataQueryType = "csv_content"
|
||||
|
||||
TestDataQueryTypeCsvFile TestDataQueryType = "csv_file"
|
||||
|
||||
TestDataQueryTypeCsvMetricValues TestDataQueryType = "csv_metric_values"
|
||||
|
||||
TestDataQueryTypeDatapointsOutsideRange TestDataQueryType = "datapoints_outside_range"
|
||||
|
||||
TestDataQueryTypeAnnotations TestDataQueryType = "annotations"
|
||||
TestDataQueryTypeArrow TestDataQueryType = "arrow"
|
||||
TestDataQueryTypeCsvContent TestDataQueryType = "csv_content"
|
||||
TestDataQueryTypeCsvFile TestDataQueryType = "csv_file"
|
||||
TestDataQueryTypeCsvMetricValues TestDataQueryType = "csv_metric_values"
|
||||
TestDataQueryTypeDatapointsOutsideRange TestDataQueryType = "datapoints_outside_range"
|
||||
TestDataQueryTypeExponentialHeatmapBucketData TestDataQueryType = "exponential_heatmap_bucket_data"
|
||||
|
||||
TestDataQueryTypeFlameGraph TestDataQueryType = "flame_graph"
|
||||
|
||||
TestDataQueryTypeGrafanaApi TestDataQueryType = "grafana_api"
|
||||
|
||||
TestDataQueryTypeLinearHeatmapBucketData TestDataQueryType = "linear_heatmap_bucket_data"
|
||||
|
||||
TestDataQueryTypeLive TestDataQueryType = "live"
|
||||
|
||||
TestDataQueryTypeLogs TestDataQueryType = "logs"
|
||||
|
||||
TestDataQueryTypeManualEntry TestDataQueryType = "manual_entry"
|
||||
|
||||
TestDataQueryTypeNoDataPoints TestDataQueryType = "no_data_points"
|
||||
|
||||
TestDataQueryTypeNodeGraph TestDataQueryType = "node_graph"
|
||||
|
||||
TestDataQueryTypePredictableCsvWave TestDataQueryType = "predictable_csv_wave"
|
||||
|
||||
TestDataQueryTypePredictablePulse TestDataQueryType = "predictable_pulse"
|
||||
|
||||
TestDataQueryTypeRandomWalk TestDataQueryType = "random_walk"
|
||||
|
||||
TestDataQueryTypeRandomWalkTable TestDataQueryType = "random_walk_table"
|
||||
|
||||
TestDataQueryTypeRandomWalkWithError TestDataQueryType = "random_walk_with_error"
|
||||
|
||||
TestDataQueryTypeRawFrame TestDataQueryType = "raw_frame"
|
||||
|
||||
TestDataQueryTypeServerError500 TestDataQueryType = "server_error_500"
|
||||
|
||||
TestDataQueryTypeSimulation TestDataQueryType = "simulation"
|
||||
|
||||
TestDataQueryTypeSlowQuery TestDataQueryType = "slow_query"
|
||||
|
||||
TestDataQueryTypeStreamingClient TestDataQueryType = "streaming_client"
|
||||
|
||||
TestDataQueryTypeTableStatic TestDataQueryType = "table_static"
|
||||
|
||||
TestDataQueryTypeTrace TestDataQueryType = "trace"
|
||||
|
||||
TestDataQueryTypeUsa TestDataQueryType = "usa"
|
||||
|
||||
TestDataQueryTypeVariablesQuery TestDataQueryType = "variables-query"
|
||||
TestDataQueryTypeFlameGraph TestDataQueryType = "flame_graph"
|
||||
TestDataQueryTypeGrafanaApi TestDataQueryType = "grafana_api"
|
||||
TestDataQueryTypeLinearHeatmapBucketData TestDataQueryType = "linear_heatmap_bucket_data"
|
||||
TestDataQueryTypeLive TestDataQueryType = "live"
|
||||
TestDataQueryTypeLogs TestDataQueryType = "logs"
|
||||
TestDataQueryTypeManualEntry TestDataQueryType = "manual_entry"
|
||||
TestDataQueryTypeNoDataPoints TestDataQueryType = "no_data_points"
|
||||
TestDataQueryTypeNodeGraph TestDataQueryType = "node_graph"
|
||||
TestDataQueryTypePredictableCsvWave TestDataQueryType = "predictable_csv_wave"
|
||||
TestDataQueryTypePredictablePulse TestDataQueryType = "predictable_pulse"
|
||||
TestDataQueryTypeRandomWalk TestDataQueryType = "random_walk"
|
||||
TestDataQueryTypeRandomWalkTable TestDataQueryType = "random_walk_table"
|
||||
TestDataQueryTypeRandomWalkWithError TestDataQueryType = "random_walk_with_error"
|
||||
TestDataQueryTypeRawFrame TestDataQueryType = "raw_frame"
|
||||
TestDataQueryTypeServerError500 TestDataQueryType = "server_error_500"
|
||||
TestDataQueryTypeSimulation TestDataQueryType = "simulation"
|
||||
TestDataQueryTypeSlowQuery TestDataQueryType = "slow_query"
|
||||
TestDataQueryTypeStreamingClient TestDataQueryType = "streaming_client"
|
||||
TestDataQueryTypeTableStatic TestDataQueryType = "table_static"
|
||||
TestDataQueryTypeTrace TestDataQueryType = "trace"
|
||||
TestDataQueryTypeUsa TestDataQueryType = "usa"
|
||||
TestDataQueryTypeVariablesQuery TestDataQueryType = "variables-query"
|
||||
)
|
||||
|
||||
// CSVWave defines model for CSVWave.
|
||||
@@ -242,7 +176,7 @@ type TestDataDataQuery struct {
|
||||
Channel *string `json:"channel,omitempty"`
|
||||
CsvContent *string `json:"csvContent,omitempty"`
|
||||
CsvFileName *string `json:"csvFileName,omitempty"`
|
||||
CsvWave *[]struct {
|
||||
CsvWave []struct {
|
||||
Labels *string `json:"labels,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
TimeStep *int64 `json:"timeStep,omitempty"`
|
||||
@@ -256,7 +190,7 @@ type TestDataDataQuery struct {
|
||||
Datasource *interface{} `json:"datasource,omitempty"`
|
||||
ErrorType *ErrorType `json:"errorType,omitempty"`
|
||||
|
||||
// true if query is disabled (ie should not be returned to the dashboard)
|
||||
// Hide true if query is disabled (ie should not be returned to the dashboard)
|
||||
Hide *bool `json:"hide,omitempty"`
|
||||
|
||||
// Unique, guid like, string used in explore mode
|
||||
@@ -268,7 +202,7 @@ type TestDataDataQuery struct {
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
Type *NodesType `json:"type,omitempty"`
|
||||
} `json:"nodes,omitempty"`
|
||||
Points *[][]interface{} `json:"points,omitempty"`
|
||||
Points [][]interface{} `json:"points,omitempty"`
|
||||
PulseWave *struct {
|
||||
OffCount *int64 `json:"offCount,omitempty"`
|
||||
OffValue *float64 `json:"offValue,omitempty"`
|
||||
@@ -307,10 +241,10 @@ type TestDataDataQuery struct {
|
||||
} `json:"stream,omitempty"`
|
||||
StringInput *string `json:"stringInput,omitempty"`
|
||||
Usa *struct {
|
||||
Fields *[]string `json:"fields,omitempty"`
|
||||
Mode *string `json:"mode,omitempty"`
|
||||
Period *string `json:"period,omitempty"`
|
||||
States *[]string `json:"states,omitempty"`
|
||||
Fields []string `json:"fields,omitempty"`
|
||||
Mode *string `json:"mode,omitempty"`
|
||||
Period *string `json:"period,omitempty"`
|
||||
States []string `json:"states,omitempty"`
|
||||
} `json:"usa,omitempty"`
|
||||
}
|
||||
|
||||
@@ -331,8 +265,8 @@ type TestDataQueryType string
|
||||
|
||||
// USAQuery defines model for USAQuery.
|
||||
type USAQuery struct {
|
||||
Fields *[]string `json:"fields,omitempty"`
|
||||
Mode *string `json:"mode,omitempty"`
|
||||
Period *string `json:"period,omitempty"`
|
||||
States *[]string `json:"states,omitempty"`
|
||||
Fields []string `json:"fields,omitempty"`
|
||||
Mode *string `json:"mode,omitempty"`
|
||||
Period *string `json:"period,omitempty"`
|
||||
States []string `json:"states,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user