Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
59cdd4d8
Commit
59cdd4d8
authored
Sep 26, 2017
by
Mitsuhiro Tanda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove obsolete code
parent
fe9fca38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
33 deletions
+0
-33
pkg/tsdb/cloudwatch/credentials.go
+0
-33
No files found.
pkg/tsdb/cloudwatch/credentials.go
View file @
59cdd4d8
...
...
@@ -14,16 +14,8 @@ import (
"github.com/aws/aws-sdk-go/aws/ec2metadata"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sts"
m
"github.com/grafana/grafana/pkg/models"
)
type
cwRequest
struct
{
Region
string
`json:"region"`
Action
string
`json:"action"`
Body
[]
byte
`json:"-"`
DataSource
*
m
.
DataSource
}
type
DatasourceInfo
struct
{
Profile
string
Region
string
...
...
@@ -35,31 +27,6 @@ type DatasourceInfo struct {
SecretKey
string
}
func
(
req
*
cwRequest
)
GetDatasourceInfo
()
*
DatasourceInfo
{
authType
:=
req
.
DataSource
.
JsonData
.
Get
(
"authType"
)
.
MustString
()
assumeRoleArn
:=
req
.
DataSource
.
JsonData
.
Get
(
"assumeRoleArn"
)
.
MustString
()
accessKey
:=
""
secretKey
:=
""
for
key
,
value
:=
range
req
.
DataSource
.
SecureJsonData
.
Decrypt
()
{
if
key
==
"accessKey"
{
accessKey
=
value
}
if
key
==
"secretKey"
{
secretKey
=
value
}
}
return
&
DatasourceInfo
{
AuthType
:
authType
,
AssumeRoleArn
:
assumeRoleArn
,
Region
:
req
.
Region
,
Profile
:
req
.
DataSource
.
Database
,
AccessKey
:
accessKey
,
SecretKey
:
secretKey
,
}
}
type
cache
struct
{
credential
*
credentials
.
Credentials
expiration
*
time
.
Time
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment