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

Commit

Permalink
Add data source missing fields (#165)
Browse files Browse the repository at this point in the history
* Add DS missing fields

* Fix linter complain
  • Loading branch information
joanlopez authored Oct 9, 2023
1 parent c343a57 commit 8559410
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ import (

// DataSource represents a Grafana data source.
type DataSource struct {
ID int64 `json:"id,omitempty"`
UID string `json:"uid,omitempty"`
Name string `json:"name"`
Type string `json:"type"`
ID int64 `json:"id,omitempty"`
UID string `json:"uid,omitempty"`
Name string `json:"name"`

Type string `json:"type"`
// This is only returned by the API. It depends on the Type.
TypeLogoURL string `json:"typeLogoUrl,omitempty"`

URL string `json:"url"`
Access string `json:"access"`

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

WithCredentials bool `json:"withCredentials,omitempty"`

JSONData map[string]interface{} `json:"jsonData,omitempty"`
SecureJSONData map[string]interface{} `json:"secureJsonData,omitempty"`

Version int `json:"version,omitempty"`
}

// NewDataSource creates a new Grafana data source.
Expand Down

0 comments on commit 8559410

Please sign in to comment.