AdhocVariableSpec🔗
Adhoc variable specification
Definition🔗
type AdhocVariableSpec struct {
Name string `json:"name"`
BaseFilters []dashboardv2.AdHocFilterWithLabels `json:"baseFilters"`
Filters []dashboardv2.AdHocFilterWithLabels `json:"filters"`
DefaultKeys []dashboardv2.MetricFindValue `json:"defaultKeys"`
Label *string `json:"label,omitempty"`
Hide dashboardv2.VariableHide `json:"hide"`
SkipUrlSync bool `json:"skipUrlSync"`
Description *string `json:"description,omitempty"`
AllowCustomValue bool `json:"allowCustomValue"`
// Whether the group-by operator is enabled in the ad hoc filter combobox.
EnableGroupBy *bool `json:"enableGroupBy,omitempty"`
Origin *dashboardv2.ControlSourceRef `json:"origin,omitempty"`
}
Methods🔗
UnmarshalJSONStrict🔗
UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode AdhocVariableSpec from JSON.
Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
Equals🔗
Equals tests the equality of two AdhocVariableSpec objects.
Validate🔗
Validate checks all the validation constraints that may be defined on AdhocVariableSpec fields for violations and returns them.