7
0
gaore-common-sdk-go/sdk/auth/credentials/access_key_creditial.go

22 lines
477 B
Go
Raw Normal View History

2020-08-04 00:51:19 +08:00
package credentials
type BaseCredential struct {
AccessKeyId string
AccessKeySecret string
2020-08-06 12:15:51 +08:00
AccessKeyFrom string
2020-08-04 00:51:19 +08:00
}
type AccessKeyCredential struct {
AccessKeyId string
AccessKeySecret string
2020-08-06 12:15:51 +08:00
AccessKeyFrom string
2020-08-04 00:51:19 +08:00
}
2020-08-05 17:01:10 +08:00
func (baseCred *BaseCredential) ToAccessKeyCredential() *AccessKeyCredential {
return &AccessKeyCredential{
AccessKeyId: baseCred.AccessKeyId,
AccessKeySecret: baseCred.AccessKeySecret,
2020-08-06 12:15:51 +08:00
AccessKeyFrom: baseCred.AccessKeyFrom,
2020-08-05 17:01:10 +08:00
}
}