Chore: Remove unused Go code (#28852)

* Chore: Remove more unused Go code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-11-17 11:51:31 +01:00
committed by GitHub
parent 8c765e8068
commit 4dd7b7a82d
47 changed files with 44 additions and 381 deletions
-12
View File
@@ -54,18 +54,6 @@ type AzureMonitorResponse struct {
Resourceregion string `json:"resourceregion"`
}
// ApplicationInsightsQueryResponse is the json response from the Application Insights API
type ApplicationInsightsQueryResponse struct {
Tables []struct {
Name string `json:"name"`
Columns []struct {
Name string `json:"name"`
Type string `json:"type"`
} `json:"columns"`
Rows [][]interface{} `json:"rows"`
} `json:"tables"`
}
// AzureLogAnalyticsResponse is the json response object from the Azure Log Analytics API.
type AzureLogAnalyticsResponse struct {
Tables []AzureLogAnalyticsTable `json:"tables"`
-4
View File
@@ -69,7 +69,3 @@ func (q *cloudWatchQuery) isMultiValuedDimensionExpression() bool {
return false
}
func (q *cloudWatchQuery) isMetricStat() bool {
return !q.isSearchExpression() && !q.isMathExpression()
}
@@ -137,3 +137,7 @@ func TestCloudWatchQuery(t *testing.T) {
assert.False(t, query.isMetricStat(), "Expected not metric stat")
})
}
func (q *cloudWatchQuery) isMetricStat() bool {
return !q.isSearchExpression() && !q.isMathExpression()
}
-5
View File
@@ -97,11 +97,6 @@ type BoolQuery struct {
Filters []Filter
}
// NewBoolQuery create a new bool query
func NewBoolQuery() *BoolQuery {
return &BoolQuery{Filters: make([]Filter, 0)}
}
// MarshalJSON returns the JSON encoding of the boolean query.
func (q *BoolQuery) MarshalJSON() ([]byte, error) {
root := make(map[string]interface{})
-4
View File
@@ -25,10 +25,6 @@ type Tag struct {
type Select []QueryPart
type InfluxDbSelect struct {
Type string
}
type Response struct {
Results []Result
Err error
-4
View File
@@ -128,10 +128,6 @@ func aliasRenderer(query *Query, queryContext *tsdb.TsdbQuery, part *QueryPart,
return fmt.Sprintf(`%s AS "%s"`, innerExpr, part.Params[0])
}
func (r QueryDefinition) Render(query *Query, queryContext *tsdb.TsdbQuery, part *QueryPart, innerExpr string) string {
return r.Renderer(query, queryContext, part, innerExpr)
}
func NewQueryPart(typ string, params []string) (*QueryPart, error) {
def, exist := renders[typ]
if !exist {
-7
View File
@@ -72,13 +72,6 @@ func NewTimePoint(value null.Float, timestamp float64) TimePoint {
return TimePoint{value, null.FloatFrom(timestamp)}
}
func NewTimeSeries(name string, points TimeSeriesPoints) *TimeSeries {
return &TimeSeries{
Name: name,
Points: points,
}
}
// DataFrames is an interface for retrieving encoded and decoded data frames.
//
// See NewDecodedDataFrames and NewEncodedDataFrames for more information.