Documentation ¶
Index ¶
- Variables
- type CredentialManager
- func (cm *CredentialManager) GetCreds(namespace string) (url.URL, string, error)
- func (cm *CredentialManager) GetCurrentKeptnCLIConfig() config.CLIConfig
- func (cm *CredentialManager) GetCurrentKubeConfig() KubeConfigFileType
- func (cm *CredentialManager) GetInstallCreds() (string, error)
- func (cm *CredentialManager) SetCreds(endPoint url.URL, apiToken string, namespace string) error
- func (cm *CredentialManager) SetCurrentKeptnCLIConfig(cliConfig config.CLIConfig)
- func (cm *CredentialManager) SetCurrentKubeConfig(kubeConfig KubeConfigFileType)
- func (cm *CredentialManager) SetInstallCreds(creds string) error
- type CredentialManagerInterface
- type KubeConfigFileType
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalCheckForContextChange bool
GlobalCheckForContextChange ...Since credential manager is called at multiple times, we don't want to check for context switch for one command at multiple places, it should be called only for the first time.
View Source
var MockAuthCreds bool
View Source
var MockKubeConfigCheck bool
Functions ¶
This section is empty.
Types ¶
type CredentialManager ¶
type CredentialManager struct {
// contains filtered or unexported fields
}
func NewCredentialManager ¶
func NewCredentialManager(autoApplyNewContext bool) *CredentialManager
NewCredentialManager creates a new credential manager
func (*CredentialManager) GetCreds ¶
GetCreds reads the credentials and returns an endpoint, the api token, or potentially an error.
func (*CredentialManager) GetCurrentKeptnCLIConfig ¶
func (cm *CredentialManager) GetCurrentKeptnCLIConfig() config.CLIConfig
func (*CredentialManager) GetCurrentKubeConfig ¶
func (cm *CredentialManager) GetCurrentKubeConfig() KubeConfigFileType
func (*CredentialManager) GetInstallCreds ¶
func (cm *CredentialManager) GetInstallCreds() (string, error)
GetInstallCreds gets the install credentials
func (*CredentialManager) SetCreds ¶
SetCreds stores the credentials consisting of an endpoint and an api token using pass or into a file in case pass is unavailable.
func (*CredentialManager) SetCurrentKeptnCLIConfig ¶
func (cm *CredentialManager) SetCurrentKeptnCLIConfig(cliConfig config.CLIConfig)
func (*CredentialManager) SetCurrentKubeConfig ¶
func (cm *CredentialManager) SetCurrentKubeConfig(kubeConfig KubeConfigFileType)
func (*CredentialManager) SetInstallCreds ¶
func (cm *CredentialManager) SetInstallCreds(creds string) error
SetInstallCreds sets the install credentials
type CredentialManagerInterface ¶
type CredentialManagerInterface interface { SetCreds(endPoint url.URL, apiToken string, namespace string) error GetCreds(namespace string) (url.URL, string, error) SetInstallCreds(creds string) error GetInstallCreds() (string, error) SetCurrentKubeConfig(kubeConfig KubeConfigFileType) GetCurrentKubeConfig() KubeConfigFileType SetCurrentKeptnCLIConfig(cliConfig config.CLIConfig) GetCurrentKeptnCLIConfig() config.CLIConfig }
type KubeConfigFileType ¶
type KubeConfigFileType struct {
CurrentContext string `yaml:"current-context"`
}
Click to show internal directories.
Click to hide internal directories.