vault

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

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

type RedfishCreds struct {
	Username string
	Password string
}

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

func (*VaultType) Set added in v0.1.5

func (v *VaultType) Set(value string) error

Set implements the kingpin.Value interface

func (VaultType) String added in v0.1.5

func (v VaultType) String() string

String returns the string representation of VaultType

Jump to

Keyboard shortcuts

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