mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 22:00:04 -07:00
chore: small changes, fixes, and refactor
This commit is contained in:
parent
2491c6bd1c
commit
a62f74dbdd
11 changed files with 105 additions and 125 deletions
|
|
@ -14,6 +14,9 @@ type BMCCredentials struct {
|
|||
|
||||
func GetBMCCredentialsDefault(store secrets.SecretStore) (BMCCredentials, error) {
|
||||
var creds BMCCredentials
|
||||
if store == nil {
|
||||
return creds, fmt.Errorf("invalid secrets store")
|
||||
}
|
||||
if strCreds, err := store.GetSecretByID(secrets.DEFAULT_KEY); err != nil {
|
||||
return creds, fmt.Errorf("get default BMC credentials from secret store: %w", err)
|
||||
} else {
|
||||
|
|
@ -27,6 +30,9 @@ func GetBMCCredentialsDefault(store secrets.SecretStore) (BMCCredentials, error)
|
|||
|
||||
func GetBMCCredentials(store secrets.SecretStore, id string) (BMCCredentials, error) {
|
||||
var creds BMCCredentials
|
||||
if store == nil {
|
||||
return creds, fmt.Errorf("invalid secrets store")
|
||||
}
|
||||
if strCreds, err := store.GetSecretByID(id); err != nil {
|
||||
return creds, fmt.Errorf("get BMC credentials from secret store: %w", err)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue