Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFlags ¶
func AddFlags(a *kingpin.Application)
AddFlags adds the vault type command line flag and driver specific flags
func IsVaultEnabled ¶ added in v0.1.5
func IsVaultEnabled() bool
IsVaultEnabled returns true if vault is enabled (vault type is set)
Types ¶
type RedfishCreds ¶ added in v0.1.5
RedfishCreds represents credentials for Redfish authentication
type VaultClient ¶
type VaultClient interface {
GetCredentials(ctx context.Context, target string) (*RedfishCreds, error)
HealthCheck(ctx context.Context) error
Close() error
}
VaultClient defines the interface for interacting with a vault to get credentials.
type VaultConfig ¶ added in v0.1.5
type VaultConfig struct {
Type VaultType
}
VaultConfig holds configuration for vault clients
type VaultManager ¶ added in v0.1.5
type VaultManager struct {
// contains filtered or unexported fields
}
VaultManager manages vault operations and provides a clean interface
func NewHashiCorpVaultManager ¶ added in v0.1.5
func NewHashiCorpVaultManager(logger *alog.Entry) (*VaultManager, error)
NewHashiCorpVaultManager creates a VaultManager for HashiCorp Vault using the internal configuration
func NewVaultManager ¶ added in v0.1.5
func NewVaultManager(config *VaultConfig, logger *alog.Entry) (*VaultManager, error)
NewVaultManager creates a new vault manager with the given configuration
func (*VaultManager) Close ¶ added in v0.1.5
func (vm *VaultManager) Close() error
Close closes the vault client
func (*VaultManager) GetCredentials ¶ added in v0.1.5
func (vm *VaultManager) GetCredentials(ctx context.Context, target string) (*RedfishCreds, error)
GetCredentials retrieves credentials for the given target
func (*VaultManager) HealthCheck ¶ added in v0.1.5
func (vm *VaultManager) HealthCheck(ctx context.Context) error
HealthCheck performs a health check on the vault client
type VaultType ¶ added in v0.1.5
type VaultType string
VaultType represents the type of vault
const (
VaultTypeHashiCorp VaultType = "HashiCorp"
)
func GetVaultType ¶
func GetVaultType() VaultType
GetVaultType returns the vault type from the command line flag