Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit 7380665

Browse files
authored
Add customMetricsNamespaces into data structure (#1)
1 parent b18120d commit 7380665

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

datasource.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ type DataSource struct {
3232

3333
// JSONData is a representation of the datasource `jsonData` property
3434
type JSONData struct {
35-
AssumeRoleArn string `json:"assumeRoleArn,omitempty"`
36-
AuthType string `json:"authType,omitempty"`
37-
DefaultRegion string `json:"defaultRegion,omitempty"`
35+
AssumeRoleArn string `json:"assumeRoleArn,omitempty"`
36+
AuthType string `json:"authType,omitempty"`
37+
CustomMetricsNamespaces string `json:"customMetricsNamespaces,omitempty"`
38+
DefaultRegion string `json:"defaultRegion,omitempty"`
3839
}
3940

4041
// SecureJSONData is a representation of the datasource `secureJsonData` property

datasource_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ func TestNewDataSource(t *testing.T) {
4646
Access: "access",
4747
IsDefault: true,
4848
JSONData: JSONData{
49-
AssumeRoleArn: "arn:aws:iam::123:role/some-role",
50-
AuthType: "keys",
51-
DefaultRegion: "us-east-1",
49+
AssumeRoleArn: "arn:aws:iam::123:role/some-role",
50+
AuthType: "keys",
51+
CustomMetricsNamespaces: "SomeNamespace",
52+
DefaultRegion: "us-east-1",
5253
},
5354
SecureJSONData: SecureJSONData{
5455
AccessKey: "123",

0 commit comments

Comments
 (0)