Skip to content

Commit 83eee5d

Browse files
committed
refactor: ♻️ rename internal struct
1 parent df57365 commit 83eee5d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pkg/util/credentials.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import (
1212
"github.com/JamesChung/cprl/pkg/client"
1313
)
1414

15-
type credentials struct {
16-
AccessKeyID string `json:"sessionId"`
17-
SecretAccessKey string `json:"sessionKey"`
18-
SessionToken string `json:"sessionToken"`
15+
type sessionCredentials struct {
16+
SessionID string `json:"sessionId"`
17+
SessionKey string `json:"sessionKey"`
18+
SessionToken string `json:"sessionToken"`
1919
}
2020

2121
func GetCredentials(profile string) (aws.Credentials, error) {
@@ -149,10 +149,10 @@ func StringifyCredentials(creds aws.Credentials) (string, error) {
149149
}
150150

151151
func StringifySessionCredentials(creds aws.Credentials) (string, error) {
152-
b, err := json.Marshal(credentials{
153-
AccessKeyID: creds.AccessKeyID,
154-
SecretAccessKey: creds.SecretAccessKey,
155-
SessionToken: creds.SessionToken,
152+
b, err := json.Marshal(sessionCredentials{
153+
SessionID: creds.AccessKeyID,
154+
SessionKey: creds.SecretAccessKey,
155+
SessionToken: creds.SessionToken,
156156
})
157157
if err != nil {
158158
return "", err

0 commit comments

Comments
 (0)