3.加凭证可以被json 和 yaml 解释
This commit is contained in:
parent
c2428de635
commit
b7e56e1291
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user