Skip to content

Commit b925f4e

Browse files
author
Jan Sternagel
committed
fix spelling
1 parent de5e097 commit b925f4e

File tree

9 files changed

+50
-52
lines changed

9 files changed

+50
-52
lines changed

internal/cmd/beta/kms/key/key.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
1818
cmd := &cobra.Command{
1919
Use: "key",
2020
Short: "Manage KMS Keys",
21-
Long: "Provides CRUD functionality for Key operations inside the KMS",
21+
Long: "Provides functionality for key operations inside the KMS",
2222
Args: args.NoArgs,
2323
Run: utils.CmdHelp,
2424
}

internal/cmd/beta/kms/key/list/list.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ type inputModel struct {
3131
func NewCmd(params *params.CmdParams) *cobra.Command {
3232
cmd := &cobra.Command{
3333
Use: fmt.Sprintf("list %s", keyRingIdArg),
34-
Short: "Lists all KMS Keys",
35-
Long: "Lists all KMS Keys inside a key ring.",
34+
Short: "List all KMS keys",
35+
Long: "List all KMS keys inside a key ring.",
3636
Args: args.SingleArg(keyRingIdArg, utils.ValidateUUID),
3737
Example: examples.Build(
3838
examples.NewExample(
39-
`List all KMS Keys for the key ring "xxx"`,
39+
`List all KMS keys for the key ring "xxx"`,
4040
"$ stackit beta kms key list xxx"),
4141
examples.NewExample(
42-
`List all KMS Keys in JSON format`,
42+
`List all KMS keys in JSON format`,
4343
"$ stackit beta kms key list xxx --output-format json"),
4444
),
4545
RunE: func(cmd *cobra.Command, args []string) error {
@@ -119,7 +119,7 @@ func outputResult(p *print.Printer, outputFormat, projectId, keyRingId string, k
119119
return nil
120120
default:
121121
if len(keys) == 0 {
122-
p.Outputf("No Keys found for project %q under the key ring %q\n", projectId, keyRingId)
122+
p.Outputf("No keys found for project %q under the key ring %q\n", projectId, keyRingId)
123123
return nil
124124
}
125125
table := tables.NewTable()
@@ -132,7 +132,6 @@ func outputResult(p *print.Printer, outputFormat, projectId, keyRingId string, k
132132
utils.PtrString(key.DisplayName),
133133
utils.PtrString(key.Purpose),
134134
utils.PtrString(key.Algorithm),
135-
// utils.PtrString(wrappingKeys.CreatedAt),
136135
utils.PtrString(key.DeletionDate),
137136
utils.PtrString(key.State),
138137
)

internal/cmd/beta/kms/keyring/keyring.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
func NewCmd(params *params.CmdParams) *cobra.Command {
1515
cmd := &cobra.Command{
1616
Use: "keyring",
17-
Short: "Manage KMS Keyrings",
18-
Long: "Provides functionality for Keyring operations inside the KMS",
17+
Short: "Manage KMS key rings",
18+
Long: "Provides functionality for key ring operations inside the KMS",
1919
Args: args.NoArgs,
2020
Run: utils.CmdHelp,
2121
}

internal/cmd/beta/kms/keyring/list/list.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ type inputModel struct {
2626
func NewCmd(params *params.CmdParams) *cobra.Command {
2727
cmd := &cobra.Command{
2828
Use: "list",
29-
Short: "Lists all KMS Keyrings",
30-
Long: "Lists all KMS Keyrings.",
29+
Short: "Lists all KMS key rings",
30+
Long: "Lists all KMS key rings.",
3131
Args: args.NoArgs,
3232
Example: examples.Build(
3333
examples.NewExample(
34-
`List all KMS Keyrings`,
34+
`List all KMS key rings`,
3535
"$ stackit beta kms keyring list"),
3636
examples.NewExample(
37-
`List all KMS Keyrings in JSON format`,
37+
`List all KMS key rings in JSON format`,
3838
"$ stackit beta kms keyring list --output-format json"),
3939
),
4040
RunE: func(cmd *cobra.Command, _ []string) error {
@@ -54,7 +54,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
5454
req := buildRequest(ctx, model, apiClient)
5555
resp, err := req.Execute()
5656
if err != nil {
57-
return fmt.Errorf("get KMS Keyrings: %w", err)
57+
return fmt.Errorf("get KMS key rings: %w", err)
5858
}
5959

6060
return outputResult(params.Printer, model.OutputFormat, model.ProjectId, *resp.KeyRings)
@@ -96,22 +96,22 @@ func outputResult(p *print.Printer, outputFormat, projectId string, keyRings []k
9696
case print.JSONOutputFormat:
9797
details, err := json.MarshalIndent(keyRings, "", " ")
9898
if err != nil {
99-
return fmt.Errorf("marshal KMS Keyrings list: %w", err)
99+
return fmt.Errorf("marshal KMS key rings list: %w", err)
100100
}
101101
p.Outputln(string(details))
102102

103103
return nil
104104
case print.YAMLOutputFormat:
105105
details, err := yaml.MarshalWithOptions(keyRings, yaml.IndentSequence(true), yaml.UseJSONMarshaler())
106106
if err != nil {
107-
return fmt.Errorf("marshal KMS Keyrings list: %w", err)
107+
return fmt.Errorf("marshal KMS key rings list: %w", err)
108108
}
109109
p.Outputln(string(details))
110110

111111
return nil
112112
default:
113113
if len(keyRings) == 0 {
114-
p.Outputf("No Keyrings found for project %q\n", projectId)
114+
p.Outputf("No key rings found for project %q\n", projectId)
115115
return nil
116116
}
117117

internal/cmd/beta/kms/version/list/list.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ type inputModel struct {
3434
func NewCmd(params *params.CmdParams) *cobra.Command {
3535
cmd := &cobra.Command{
3636
Use: "list",
37-
Short: "Lists all Key Versions",
38-
Long: "Lists all versions of a given key.",
37+
Short: "List all key versions",
38+
Long: "List all versions of a given key.",
3939
Args: args.NoArgs,
4040
Example: examples.Build(
4141
examples.NewExample(
@@ -62,7 +62,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
6262
req := buildRequest(ctx, model, apiClient)
6363
resp, err := req.Execute()
6464
if err != nil {
65-
return fmt.Errorf("get Key Versions: %w", err)
65+
return fmt.Errorf("get key version: %w", err)
6666
}
6767

6868
return outputResult(params.Printer, model.OutputFormat, model.ProjectId, model.KeyId, *resp.Versions)
@@ -106,22 +106,22 @@ func outputResult(p *print.Printer, outputFormat, projectId, keyId string, versi
106106
case print.JSONOutputFormat:
107107
details, err := json.MarshalIndent(versions, "", " ")
108108
if err != nil {
109-
return fmt.Errorf("marshal Key Versions list: %w", err)
109+
return fmt.Errorf("marshal key versions list: %w", err)
110110
}
111111
p.Outputln(string(details))
112112

113113
return nil
114114
case print.YAMLOutputFormat:
115115
details, err := yaml.MarshalWithOptions(versions, yaml.IndentSequence(true), yaml.UseJSONMarshaler())
116116
if err != nil {
117-
return fmt.Errorf("marshal Key Versions list: %w", err)
117+
return fmt.Errorf("marshal key versions list: %w", err)
118118
}
119119
p.Outputln(string(details))
120120

121121
return nil
122122
default:
123123
if len(versions) == 0 {
124-
p.Outputf("No Key Versions found for project %q for the key %q\n", projectId, keyId)
124+
p.Outputf("No key versions found for project %q for the key %q\n", projectId, keyId)
125125
return nil
126126
}
127127
table := tables.NewTable()
@@ -148,8 +148,8 @@ func outputResult(p *print.Printer, outputFormat, projectId, keyId string, versi
148148
}
149149

150150
func configureFlags(cmd *cobra.Command) {
151-
cmd.Flags().Var(flags.UUIDFlag(), keyRingIdFlag, "ID of the KMS Key Ring")
152-
cmd.Flags().Var(flags.UUIDFlag(), keyIdFlag, "ID of the Key")
151+
cmd.Flags().Var(flags.UUIDFlag(), keyRingIdFlag, "ID of the KMS key ring")
152+
cmd.Flags().Var(flags.UUIDFlag(), keyIdFlag, "ID of the key")
153153

154154
err := flags.MarkFlagsRequired(cmd, keyRingIdFlag, keyIdFlag)
155155
cobra.CheckErr(err)

internal/cmd/beta/kms/version/version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
func NewCmd(params *params.CmdParams) *cobra.Command {
1717
cmd := &cobra.Command{
1818
Use: "version",
19-
Short: "Manage KMS Key versions",
20-
Long: "Provides CRUD functionality for Key Version operations inside the KMS",
19+
Short: "Manage KMS key versions",
20+
Long: "Provides functionality for key version operations inside the KMS",
2121
Args: args.NoArgs,
2222
Run: utils.CmdHelp,
2323
}

internal/cmd/beta/kms/wrappingkey/create/create.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ type inputModel struct {
4545
func NewCmd(params *params.CmdParams) *cobra.Command {
4646
cmd := &cobra.Command{
4747
Use: "create",
48-
Short: "Creates a KMS Wrapping Key",
49-
Long: "Creates a KMS Wrapping Key.",
48+
Short: "Creates a KMS wrapping key",
49+
Long: "Creates a KMS wrapping key.",
5050
Args: args.NoArgs,
5151
Example: examples.Build(
5252
examples.NewExample(
53-
`Create a Symmetric KMS Wrapping Key`,
53+
`Create a Symmetric KMS wrapping key`,
5454
`$ stakit beta kms wrappingkey create --key-ring "my-keyring-id" --algorithm "rsa_2048_oaep_sha256" --name "my-wrapping-key-name" --purpose "wrap_symmetric_key"`),
5555
examples.NewExample(
56-
`Create an Asymmetric KMS Wrapping Key with a description`,
56+
`Create an Asymmetric KMS wrapping key with a description`,
5757
`$ stakit beta kms wrappingkey create --key-ring "my-keyring-id" --algorithm "hmac_sha256" --name "my-wrapping-key-name" --description "my-description" --purpose "wrap_asymmetric_key"`),
5858
),
5959
RunE: func(cmd *cobra.Command, _ []string) error {
@@ -76,7 +76,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
7676
}
7777

7878
if !model.AssumeYes {
79-
prompt := fmt.Sprintf("Are you sure you want to create a KMS Wrapping Key for project %q?", projectLabel)
79+
prompt := fmt.Sprintf("Are you sure you want to create a KMS wrapping key for project %q?", projectLabel)
8080
err = params.Printer.PromptForConfirmation(prompt)
8181
if err != nil {
8282
return err
@@ -91,7 +91,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
9191

9292
wrappingKey, err := req.Execute()
9393
if err != nil {
94-
return fmt.Errorf("create KMS Wrapping Key: %w", err)
94+
return fmt.Errorf("create KMS wrapping key: %w", err)
9595
}
9696

9797
// Wait for async operation, if async mode not enabled
@@ -100,7 +100,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
100100
s.Start("Creating instance")
101101
_, err = wait.CreateWrappingKeyWaitHandler(ctx, apiClient, model.ProjectId, model.Region, *wrappingKey.KeyRingId, *wrappingKey.Id).WaitWithContext(ctx)
102102
if err != nil {
103-
return fmt.Errorf("wait for KMS Wrapping Key creation: %w", err)
103+
return fmt.Errorf("wait for KMS wrapping key creation: %w", err)
104104
}
105105
s.Stop()
106106
}
@@ -167,31 +167,31 @@ func outputResult(p *print.Printer, outputFormat, projectLabel string, resp *kms
167167
case print.JSONOutputFormat:
168168
details, err := json.MarshalIndent(resp, "", " ")
169169
if err != nil {
170-
return fmt.Errorf("marshal KMS Wrapping Key: %w", err)
170+
return fmt.Errorf("marshal KMS wrapping key: %w", err)
171171
}
172172
p.Outputln(string(details))
173173
return nil
174174

175175
case print.YAMLOutputFormat:
176176
details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true), yaml.UseJSONMarshaler())
177177
if err != nil {
178-
return fmt.Errorf("marshal KMS Wrapping Key: %w", err)
178+
return fmt.Errorf("marshal KMS wrapping key: %w", err)
179179
}
180180
p.Outputln(string(details))
181181
return nil
182182

183183
default:
184-
p.Outputf("Created Wrapping Key for project %q. Wrapping Key ID: %s\n", projectLabel, utils.PtrString(resp.Id))
184+
p.Outputf("Created wrapping key for project %q. wrapping key ID: %s\n", projectLabel, utils.PtrString(resp.Id))
185185
return nil
186186
}
187187
}
188188

189189
func configureFlags(cmd *cobra.Command) {
190-
cmd.Flags().Var(flags.UUIDFlag(), keyRingIdFlag, "ID of the KMS Key Ring")
190+
cmd.Flags().Var(flags.UUIDFlag(), keyRingIdFlag, "ID of the KMS key ring")
191191
cmd.Flags().String(algorithmFlag, "", "En-/Decryption algorithm")
192192
cmd.Flags().String(displayNameFlag, "", "The display name to distinguish multiple wrapping keys")
193-
cmd.Flags().String(descriptionFlag, "", "Optinal description of the Wrapping Key")
194-
cmd.Flags().String(purposeFlag, "", "Purpose of the Wrapping Key. Enum: 'wrap_symmetric_key', 'wrap_asymmetric_key' ")
193+
cmd.Flags().String(descriptionFlag, "", "Optional description of the wrapping key")
194+
cmd.Flags().String(purposeFlag, "", "Purpose of the wrapping key. Enum: 'wrap_symmetric_key', 'wrap_asymmetric_key' ")
195195

196196
err := flags.MarkFlagsRequired(cmd, keyRingIdFlag, algorithmFlag, purposeFlag, displayNameFlag)
197197
cobra.CheckErr(err)

internal/cmd/beta/kms/wrappingkey/list/list.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@ type inputModel struct {
3131
func NewCmd(params *params.CmdParams) *cobra.Command {
3232
cmd := &cobra.Command{
3333
Use: fmt.Sprintf("list %s", keyRingIdArg),
34-
Short: "Lists all KMS Wrapping Keys",
35-
Long: "Lists all KMS Wrapping Keys inside a key ring.",
34+
Short: "Lists all KMS wrapping keys",
35+
Long: "Lists all KMS wrapping keys inside a key ring.",
3636
Args: args.SingleArg(keyRingIdArg, utils.ValidateUUID),
3737
Example: examples.Build(
38-
// Enforce a specific region for the KMS
3938
examples.NewExample(
40-
`List all KMS Wrapping Keys for the key ring "xxx"`,
39+
`List all KMS wrapping keys for the key ring "xxx"`,
4140
"$ stackit beta kms wrappingkeys list xxx"),
4241
examples.NewExample(
43-
`List all KMS Wrapping Keys in JSON format`,
42+
`List all KMS wrapping keys in JSON format`,
4443
"$ stackit beta kms wrappingkeys list xxx --output-format json"),
4544
),
4645
RunE: func(cmd *cobra.Command, args []string) error {
@@ -60,7 +59,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
6059
req := buildRequest(ctx, model, apiClient)
6160
resp, err := req.Execute()
6261
if err != nil {
63-
return fmt.Errorf("get KMS Wrapping Keys: %w", err)
62+
return fmt.Errorf("get KMS wrapping keys: %w", err)
6463
}
6564

6665
return outputResult(params.Printer, model.OutputFormat, model.ProjectId, model.KeyRingId, *resp.WrappingKeys)
@@ -104,22 +103,22 @@ func outputResult(p *print.Printer, outputFormat, projectId, keyRingId string, w
104103
case print.JSONOutputFormat:
105104
details, err := json.MarshalIndent(wrappingKeys, "", " ")
106105
if err != nil {
107-
return fmt.Errorf("marshal KMS Wrapping Keys list: %w", err)
106+
return fmt.Errorf("marshal KMS wrapping keys list: %w", err)
108107
}
109108
p.Outputln(string(details))
110109

111110
return nil
112111
case print.YAMLOutputFormat:
113112
details, err := yaml.MarshalWithOptions(wrappingKeys, yaml.IndentSequence(true), yaml.UseJSONMarshaler())
114113
if err != nil {
115-
return fmt.Errorf("marshal KMS Wrapping Keys list: %w", err)
114+
return fmt.Errorf("marshal KMS wrapping keys list: %w", err)
116115
}
117116
p.Outputln(string(details))
118117

119118
return nil
120119
default:
121120
if len(wrappingKeys) == 0 {
122-
p.Outputf("No Wrapping Keys found for project %q under the key ring %q\n", projectId, keyRingId)
121+
p.Outputf("No wrapping keys found for project %q under the key ring %q\n", projectId, keyRingId)
123122
return nil
124123
}
125124
table := tables.NewTable()

internal/cmd/beta/kms/wrappingkey/wrappingkey.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313

1414
func NewCmd(params *params.CmdParams) *cobra.Command {
1515
cmd := &cobra.Command{
16-
Use: "wrappingkey",
17-
Short: "Manage KMS Wrapping Keys",
18-
Long: "Provides CRUD functionality for Wrapping Key operations inside the KMS",
16+
Use: "wrapping-key",
17+
Short: "Manage KMS wrapping keys",
18+
Long: "Provides CRUD functionality for wrapping key operations inside the KMS",
1919
Args: args.NoArgs,
2020
Run: utils.CmdHelp,
2121
}

0 commit comments

Comments
 (0)