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

Add data source missing fields #165

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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