package credentials type BaseCredential struct { AccessKeyId string AccessKeySecret string } type AccessKeyCredential struct { AccessKeyId string AccessKeySecret string } func (baseCred *BaseCredential) ToAccessKeyCredential() *AccessKeyCredential { return &AccessKeyCredential{ AccessKeyId: baseCred.AccessKeyId, AccessKeySecret: baseCred.AccessKeySecret, } }