{"modulePath":"github.com/sqlatlas/gui","version":"v6.1.6+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package stackdriver\n\n## Functions\n\n```go\nfunc NewStackdriverExecutor(dsInfo *models.DataSource) (tsdb.TsdbQueryEndpoint, error)\n```\nNewStackdriverExecutor initializes a http client\n\n## Types\n\n```go\ntype StackdriverBucketOptions struct {\n\tLinearBuckets *struct {\n\t\tNumFiniteBuckets int64 `json:\"numFiniteBuckets\"`\n\t\tWidth            int64 `json:\"width\"`\n\t\tOffset           int64 `json:\"offset\"`\n\t} `json:\"linearBuckets\"`\n\tExponentialBuckets *struct {\n\t\tNumFiniteBuckets int64   `json:\"numFiniteBuckets\"`\n\t\tGrowthFactor     float64 `json:\"growthFactor\"`\n\t\tScale            float64 `json:\"scale\"`\n\t} `json:\"exponentialBuckets\"`\n\tExplicitBuckets *struct {\n\t\tBounds []float64 `json:\"bounds\"`\n\t} `json:\"explicitBuckets\"`\n}\n```\n\n```go\ntype StackdriverExecutor struct {\n\t// contains filtered or unexported fields\n}\n```\nStackdriverExecutor executes queries for the Stackdriver datasource\n\n```go\nfunc (e *StackdriverExecutor) Query(ctx context.Context, dsInfo *models.DataSource, tsdbQuery *tsdb.TsdbQuery) (*tsdb.Response, error)\n```\nQuery takes in the frontend queries, parses them into the Stackdriver query format executes the queries against the Stackdriver API and parses the response into the time series or table format\n\n```go\ntype StackdriverQuery struct {\n\tTarget   string\n\tParams   url.Values\n\tRefID    string\n\tGroupBys []string\n\tAliasBy  string\n}\n```\nStackdriverQuery is the query that Grafana sends from the frontend\n\n```go\ntype StackdriverResponse struct {\n\tTimeSeries []struct {\n\t\tMetric struct {\n\t\t\tLabels map[string]string `json:\"labels\"`\n\t\t\tType   string            `json:\"type\"`\n\t\t} `json:\"metric\"`\n\t\tResource struct {\n\t\t\tType   string            `json:\"type\"`\n\t\t\tLabels map[string]string `json:\"labels\"`\n\t\t} `json:\"resource\"`\n\t\tMetricKind string `json:\"metricKind\"`\n\t\tValueType  string `json:\"valueType\"`\n\t\tPoints     []struct {\n\t\t\tInterval struct {\n\t\t\t\tStartTime time.Time `json:\"startTime\"`\n\t\t\t\tEndTime   time.Time `json:\"endTime\"`\n\t\t\t} `json:\"interval\"`\n\t\t\tValue struct {\n\t\t\t\tDoubleValue       float64 `json:\"doubleValue\"`\n\t\t\t\tStringValue       string  `json:\"stringValue\"`\n\t\t\t\tBoolValue         bool    `json:\"boolValue\"`\n\t\t\t\tIntValue          string  `json:\"int64Value\"`\n\t\t\t\tDistributionValue struct {\n\t\t\t\t\tCount                 string  `json:\"count\"`\n\t\t\t\t\tMean                  float64 `json:\"mean\"`\n\t\t\t\t\tSumOfSquaredDeviation float64 `json:\"sumOfSquaredDeviation\"`\n\t\t\t\t\tRange                 struct {\n\t\t\t\t\t\tMin int `json:\"min\"`\n\t\t\t\t\t\tMax int `json:\"max\"`\n\t\t\t\t\t} `json:\"range\"`\n\t\t\t\t\tBucketOptions StackdriverBucketOptions `json:\"bucketOptions\"`\n\t\t\t\t\tBucketCounts  []string                 `json:\"bucketCounts\"`\n\t\t\t\t\tExamplars     []struct {\n\t\t\t\t\t\tValue     float64 `json:\"value\"`\n\t\t\t\t\t\tTimestamp string  `json:\"timestamp\"`\n\t\t\t\t\t} `json:\"examplars\"`\n\t\t\t\t} `json:\"distributionValue\"`\n\t\t\t} `json:\"value\"`\n\t\t} `json:\"points\"`\n\t} `json:\"timeSeries\"`\n}\n```\nStackdriverResponse is the data returned from the external Google Stackdriver API\n\n","path":"github.com/sqlatlas/gui/pkg/tsdb/stackdriver","name":"stackdriver","synopsis":"","isRedistributable":true}
