credentials

package
v1.19.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 5 Imported by: 0

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 CredentialBackend interface {
	GetClusterByIdentifier(clusterIdentifier string) (*m.Cluster, error)
	GetCredentials(clusterId string) (*m.ClusterCredentials, error)
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL