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

Commit 63885df

Browse files
Merge pull request #42 from wanieldilson/enhancement/add-uid-to-datasource
2 parents 9584c49 + 7a52175 commit 63885df

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

datasource.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
// DataSource represents a Grafana data source.
1010
type DataSource struct {
1111
ID int64 `json:"id,omitempty"`
12+
UID string `json:"uid,omitempty"`
1213
Name string `json:"name"`
1314
Type string `json:"type"`
1415
URL string `json:"url"`

datasource_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
const (
10-
createdDataSourceJSON = `{"id":1,"message":"Datasource added", "name": "test_datasource"}`
10+
createdDataSourceJSON = `{"id":1,"uid":"myuid0001","message":"Datasource added", "name": "test_datasource"}`
1111
)
1212

1313
func TestNewDataSource(t *testing.T) {

0 commit comments

Comments
 (0)