Skip to content

Commit d4f7bd5

Browse files
committed
feat(cli): Add password credential CLI commands (#6117)
1 parent 11c4fd7 commit d4f7bd5

File tree

11 files changed

+676
-84
lines changed

11 files changed

+676
-84
lines changed

api/sessionrecordings/password_credential_attributes.gen.go

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/api/genapi/input.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,22 @@ var inputStructs = []*structInfo{
692692
versionEnabled: true,
693693
createResponseTypes: []string{CreateResponseType, ReadResponseType, UpdateResponseType, DeleteResponseType, ListResponseType},
694694
},
695+
{
696+
inProto: &credentials.PasswordAttributes{},
697+
outFile: "credentials/password_attributes.gen.go",
698+
subtypeName: "PasswordCredential",
699+
subtype: "password",
700+
fieldOverrides: []fieldInfo{
701+
{
702+
Name: "Password",
703+
SkipDefault: true,
704+
},
705+
},
706+
parentTypeName: "Credential",
707+
templates: []*template.Template{
708+
mapstructureConversionTemplate,
709+
},
710+
},
695711
{
696712
inProto: &credentials.UsernamePasswordAttributes{},
697713
outFile: "credentials/username_password_attributes.gen.go",
@@ -1294,6 +1310,15 @@ var inputStructs = []*structInfo{
12941310
inProto: &session_recordings.Credential{},
12951311
outFile: "sessionrecordings/credential.gen.go",
12961312
},
1313+
{
1314+
inProto: &session_recordings.PasswordCredentialAttributes{},
1315+
outFile: "sessionrecordings/password_credential_attributes.gen.go",
1316+
subtype: "password",
1317+
parentTypeName: "Credential",
1318+
templates: []*template.Template{
1319+
mapstructureConversionTemplate,
1320+
},
1321+
},
12971322
{
12981323
inProto: &session_recordings.UsernamePasswordCredentialAttributes{},
12991324
outFile: "sessionrecordings/username_password_credential_attributes.gen.go",

internal/cmd/commands.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,12 @@ func initCommands(ui, serverCmdUi cli.Ui, runOpts *RunOptions) {
621621
Func: "create",
622622
}
623623
}),
624+
"credentials create password": wrapper.Wrap(func() wrapper.WrappableCommand {
625+
return &credentialscmd.PasswordCommand{
626+
Command: base.NewCommand(ui, opts...),
627+
Func: "create",
628+
}
629+
}),
624630
"credentials create username-password": wrapper.Wrap(func() wrapper.WrappableCommand {
625631
return &credentialscmd.UsernamePasswordCommand{
626632
Command: base.NewCommand(ui, opts...),
@@ -651,6 +657,12 @@ func initCommands(ui, serverCmdUi cli.Ui, runOpts *RunOptions) {
651657
Func: "update",
652658
}
653659
}),
660+
"credentials update password": wrapper.Wrap(func() wrapper.WrappableCommand {
661+
return &credentialscmd.PasswordCommand{
662+
Command: base.NewCommand(ui, opts...),
663+
Func: "update",
664+
}
665+
}),
654666
"credentials update username-password": wrapper.Wrap(func() wrapper.WrappableCommand {
655667
return &credentialscmd.UsernamePasswordCommand{
656668
Command: base.NewCommand(ui, opts...),

internal/cmd/commands/credentialscmd/password_credentials.gen.go

Lines changed: 278 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)