From b7e56e1291118d97110e0aa709a912da5b0bba62 Mon Sep 17 00:00:00 2001 From: liangzy Date: Sat, 8 Aug 2020 17:53:47 +0800 Subject: [PATCH] =?UTF-8?q?3.=E5=8A=A0=E5=87=AD=E8=AF=81=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E8=A2=ABjson=20=E5=92=8C=20yaml=20=E8=A7=A3=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdk/auth/credentials/access_key_credential.go | 12 ++++++------ sdk/auth/credentials/sts_token_credential.go | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sdk/auth/credentials/access_key_credential.go b/sdk/auth/credentials/access_key_credential.go index 45bbdbc..b691502 100644 --- a/sdk/auth/credentials/access_key_credential.go +++ b/sdk/auth/credentials/access_key_credential.go @@ -1,15 +1,15 @@ package credentials type BaseCredential struct { - AccessKeyId string - AccessKeySecret string - AccessKeyFrom string + AccessKeyId string `json:"access_key_id" yaml:"access_key_id"` + AccessKeySecret string `json:"access_key_secret" yaml:"access_key_secret"` + AccessKeyFrom string `json:"access_key_from" yaml:"access_key_from"` } type AccessKeyCredential struct { - AccessKeyId string - AccessKeySecret string - AccessKeyFrom string + AccessKeyId string `json:"access_key_id" yaml:"access_key_id"` + AccessKeySecret string `json:"access_key_secret" yaml:"access_key_secret"` + AccessKeyFrom string `json:"access_key_from" yaml:"access_key_from"` } func (baseCred *BaseCredential) ToAccessKeyCredential() *AccessKeyCredential { diff --git a/sdk/auth/credentials/sts_token_credential.go b/sdk/auth/credentials/sts_token_credential.go index ef5847c..0fac16b 100644 --- a/sdk/auth/credentials/sts_token_credential.go +++ b/sdk/auth/credentials/sts_token_credential.go @@ -1,9 +1,9 @@ package credentials type StdTokenCredential struct { - AccessKeyId string - AccessKeySecret string - AccessKeyFrom string + AccessKeyId string `json:"access_key_id" yaml:"access_key_id"` + AccessKeySecret string `json:"access_key_secret" yaml:"access_key_secret"` + AccessKeyFrom string `json:"access_key_from" yaml:"access_key_from"` } func NewStsTokenCredential(accessKeyId, accessKeySecret, accessFrom string) *StdTokenCredential {