github.com/mwhudson/juju@v0.0.0-20160512215208-90ff01f3497f/provider/cloudsigma/credentials.go (about)

     1  // Copyright 2016 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package cloudsigma
     5  
     6  import (
     7  	"github.com/juju/errors"
     8  	"github.com/juju/juju/cloud"
     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{
    16  		cloud.UserPassAuthType: {
    17  			{
    18  				"username", cloud.CredentialAttr{Description: "account username"},
    19  			}, {
    20  				"password", cloud.CredentialAttr{
    21  					Description: "account password",
    22  					Hidden:      true,
    23  				},
    24  			},
    25  		},
    26  	}
    27  }
    28  
    29  // DetectCredentials is part of the environs.ProviderCredentials interface.
    30  func (environProviderCredentials) DetectCredentials() (*cloud.CloudCredential, error) {
    31  	return nil, errors.NotFoundf("credentials")
    32  }