22 lines
765 B
Go
22 lines
765 B
Go
package credentials
|
|
|
|
type BaseCredential struct {
|
|
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 `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 {
|
|
return &AccessKeyCredential{
|
|
AccessKeyId: baseCred.AccessKeyId,
|
|
AccessKeySecret: baseCred.AccessKeySecret,
|
|
AccessKeyFrom: baseCred.AccessKeyFrom,
|
|
}
|
|
}
|