Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 8559410

Browse files
authored
Add data source missing fields (#165)
* Add DS missing fields * Fix linter complain
1 parent c343a57 commit 8559410

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

datasource.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ import (
88

99
// DataSource represents a Grafana data source.
1010
type DataSource struct {
11-
ID int64 `json:"id,omitempty"`
12-
UID string `json:"uid,omitempty"`
13-
Name string `json:"name"`
14-
Type string `json:"type"`
11+
ID int64 `json:"id,omitempty"`
12+
UID string `json:"uid,omitempty"`
13+
Name string `json:"name"`
14+
15+
Type string `json:"type"`
16+
// This is only returned by the API. It depends on the Type.
17+
TypeLogoURL string `json:"typeLogoUrl,omitempty"`
18+
1519
URL string `json:"url"`
1620
Access string `json:"access"`
1721

@@ -27,8 +31,12 @@ type DataSource struct {
2731
BasicAuth bool `json:"basicAuth"`
2832
BasicAuthUser string `json:"basicAuthUser,omitempty"`
2933

34+
WithCredentials bool `json:"withCredentials,omitempty"`
35+
3036
JSONData map[string]interface{} `json:"jsonData,omitempty"`
3137
SecureJSONData map[string]interface{} `json:"secureJsonData,omitempty"`
38+
39+
Version int `json:"version,omitempty"`
3240
}
3341

3442
// NewDataSource creates a new Grafana data source.

0 commit comments

Comments
 (0)