88
90
// If no credentials can be detected, DetectCredentials should
89
91
// return an error satisfying errors.IsNotFound.
90
92
DetectCredentials() (*cloud.CloudCredential, error)
94
// FinalizeCredential finalizes a credential, updating any attributes
95
// as necessary. This is always done client-side, when adding the
96
// credential to credentials.yaml and before uploading credentials to
97
// the controller. The provider may completely alter a credential, even
98
// going as far as changing the auth-type, but the output must be a
99
// fully formed credential.
101
FinalizeCredentialContext,
102
FinalizeCredentialParams,
103
) (*cloud.Credential, error)
106
// FinalizeCredentialContext is an interface passed into FinalizeCredential
107
// to provide a means of interacting with the user when finalizing credentials.
108
type FinalizeCredentialContext interface {
109
GetStderr() io.Writer
112
// FinalizeCredentialParams contains the parameters for
113
// ProviderCredentials.FinalizeCredential.
114
type FinalizeCredentialParams struct {
115
// Credential is the credential that the provider should finalize.`
116
Credential cloud.Credential
118
// CloudEndpoint is the endpoint for the cloud that the credentials are
119
// for. This may be used by the provider to communicate with the cloud
120
// to finalize the credentials.
123
// CloudIdentityEndpoint is the identity endpoint for the cloud that the
124
// credentials are for. This may be used by the provider to communicate
125
// with the cloud to finalize the credentials.
126
CloudIdentityEndpoint string
93
129
// CloudRegionDetector is an interface that an EnvironProvider implements