Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 4521cce

Browse files
committed
Rename update passphrase types to credential instead of config
1 parent e16df34 commit 4521cce

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

internals/secrethub/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ func NewConfigCommand(io ui.IO, store CredentialConfig) *ConfigCommand {
2222
// Register registers the command and its sub-commands on the provided Registerer.
2323
func (cmd *ConfigCommand) Register(r command.Registerer) {
2424
clause := r.Command("config", "Manage your local configuration.").Hidden()
25-
NewConfigUpdatePassphraseCommand(cmd.io, cmd.credentialStore).Register(clause)
25+
NewCredentialUpdatePassphraseCommand(cmd.io, cmd.credentialStore).Register(clause)
2626
NewConfigUpgradeCommand().Register(clause)
2727
}

internals/secrethub/credential.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ func (cmd *CredentialCommand) Register(r command.Registerer) {
2727
NewCredentialListCommand(cmd.io, cmd.clientFactory.NewClient).Register(clause)
2828
NewCredentialBackupCommand(cmd.io, cmd.clientFactory.NewClient).Register(clause)
2929
NewCredentialDisableCommand(cmd.io, cmd.clientFactory.NewClient).Register(clause)
30-
NewConfigUpdatePassphraseCommand(cmd.io, cmd.credentialStore).Register(clause)
30+
NewCredentialUpdatePassphraseCommand(cmd.io, cmd.credentialStore).Register(clause)
3131
}

internals/secrethub/config_update_passphrase.go renamed to internals/secrethub/credential_update_passphrase.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ import (
99
"github.com/secrethub/secrethub-cli/internals/secrethub/command"
1010
)
1111

12-
type ConfigUpdatePassphraseCommand struct {
12+
type CredentialUpdatePassphraseCommand struct {
1313
io ui.IO
1414
credentialStore CredentialConfig
1515
}
1616

17-
// NewConfigUpdatePassphraseCommand creates a new ConfigUpdatePassphraseCommand.
18-
func NewConfigUpdatePassphraseCommand(io ui.IO, credentialStore CredentialConfig) *ConfigUpdatePassphraseCommand {
19-
return &ConfigUpdatePassphraseCommand{
17+
// NewCredentialUpdatePassphraseCommand creates a new CredentialUpdatePassphraseCommand.
18+
func NewCredentialUpdatePassphraseCommand(io ui.IO, credentialStore CredentialConfig) *CredentialUpdatePassphraseCommand {
19+
return &CredentialUpdatePassphraseCommand{
2020
io: io,
2121
credentialStore: credentialStore,
2222
}
2323
}
2424

2525
// Register registers the command, arguments and flags on the provided Registerer.
26-
func (cmd *ConfigUpdatePassphraseCommand) Register(r command.Registerer) {
26+
func (cmd *CredentialUpdatePassphraseCommand) Register(r command.Registerer) {
2727
clause := r.Command("update-passphrase", "Update the passphrase of your local key credential file.")
2828

2929
command.BindAction(clause, cmd.Run)
3030
}
3131

3232
// Run upgrades the configuration in the profile directory to the new version.
33-
func (cmd *ConfigUpdatePassphraseCommand) Run() error {
33+
func (cmd *CredentialUpdatePassphraseCommand) Run() error {
3434
if !cmd.credentialStore.ConfigDir().Credential().Exists() {
3535
fmt.Println("No credentials. Nothing to do.")
3636
return nil

0 commit comments

Comments
 (0)