github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/provider/manual/credentials.go (about) 1 // Copyright 2016 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package manual 5 6 import ( 7 "github.com/juju/juju/cloud" 8 "github.com/juju/juju/environs" 9 ) 10 11 type environProviderCredentials struct{} 12 13 // CredentialSchemas is part of the environs.ProviderCredentials interface. 14 func (environProviderCredentials) CredentialSchemas() map[cloud.AuthType]cloud.CredentialSchema { 15 return map[cloud.AuthType]cloud.CredentialSchema{cloud.EmptyAuthType: {}} 16 } 17 18 // DetectCredentials is part of the environs.ProviderCredentials interface. 19 func (environProviderCredentials) DetectCredentials() (*cloud.CloudCredential, error) { 20 return cloud.NewEmptyCloudCredential(), nil 21 } 22 23 // FinalizeCredential is part of the environs.ProviderCredentials interface. 24 func (environProviderCredentials) FinalizeCredential(_ environs.FinalizeCredentialContext, args environs.FinalizeCredentialParams) (*cloud.Credential, error) { 25 return &args.Credential, nil 26 }