Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GDatabaseCrendentialBackend = &DatabaseCrendentialBackend{}
View Source
var GFixtureCredentialBackend = &FixtureCredentialBackend{ credentials: make(map[string]*m.ClusterCredentials), }
Functions ¶
This section is empty.
Types ¶
type CredentialBackend ¶
type DatabaseCrendentialBackend ¶
type DatabaseCrendentialBackend struct{}
A backend which loads credentials from database
func (*DatabaseCrendentialBackend) GetClusterByIdentifier ¶
func (l *DatabaseCrendentialBackend) GetClusterByIdentifier(clusterIdentifier string) (*m.Cluster, error)
GetClusterByIdentifier, for database backend, it will query the database using given clusterIdenfier.
func (*DatabaseCrendentialBackend) GetCredentials ¶
func (l *DatabaseCrendentialBackend) GetCredentials(clusterId string) (*m.ClusterCredentials, error)
GetCredentials get a credential from clusterId
type FixtureCredentialBackend ¶
type FixtureCredentialBackend struct {
// contains filtered or unexported fields
}
A backend which loads cluster credentials from config file
func (*FixtureCredentialBackend) ExtractCredentialsFixtures ¶
func (l *FixtureCredentialBackend) ExtractCredentialsFixtures() error
func (*FixtureCredentialBackend) GetClusterByIdentifier ¶
func (l *FixtureCredentialBackend) GetClusterByIdentifier(clusterIdentifier string) (*m.Cluster, error)
GetClusterByIdentifier, for fixture backend, it will only try to use the identifier as clusterId to find the Cluster.
func (*FixtureCredentialBackend) GetCredentials ¶
func (l *FixtureCredentialBackend) GetCredentials(clusterId string) (*m.ClusterCredentials, error)
GetCredentials get a credential by clusterId
Click to show internal directories.
Click to hide internal directories.