Skip to content

Commit 720f376

Browse files
authored
Update PrivateKeyPair credential to APIKey
1 parent 98a454d commit 720f376

5 files changed

Lines changed: 6 additions & 8 deletions

File tree

plugins/atlas/atlas.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func MongoDBAtlasCLI() schema.Executable {
1818
),
1919
Uses: []schema.CredentialUsage{
2020
{
21-
Name: credname.PrivateKeyPair,
21+
Name: credname.APIKey,
2222
},
2323
},
2424
}

plugins/atlas/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func New() schema.Plugin {
1313
Homepage: sdk.URL("https://www.mongodb.com/"),
1414
},
1515
Credentials: []schema.CredentialType{
16-
PrivateKeyPair(),
16+
APIKey(),
1717
},
1818
Executables: []schema.Executable{
1919
MongoDBAtlasCLI(),

plugins/atlas/privatekeypair.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"github.com/1Password/shell-plugins/sdk/schema/fieldname"
1010
)
1111

12-
func PrivateKeyPair() schema.CredentialType {
12+
func APIKey() schema.CredentialType {
1313
return schema.CredentialType{
14-
Name: credname.PrivateKeyPair,
14+
Name: credname.APIKey,
1515
DocsURL: sdk.URL("https://www.mongodb.com/docs/atlas/cli/stable/atlas-cli-env-variables/"),
1616
ManagementURL: nil,
1717
Fields: []schema.CredentialField{

plugins/atlas/privatekeypair_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
func TestCredentialsProvisioner(t *testing.T) {
12-
plugintest.TestProvisioner(t, PrivateKeyPair().DefaultProvisioner, map[string]plugintest.ProvisionCase{
12+
plugintest.TestProvisioner(t, APIKey().DefaultProvisioner, map[string]plugintest.ProvisionCase{
1313
"default": {
1414
ItemFields: map[sdk.FieldName]string{
1515
fieldname.PublicKey: "eexample",
@@ -26,7 +26,7 @@ func TestCredentialsProvisioner(t *testing.T) {
2626
}
2727

2828
func TestCredentialsImporter(t *testing.T) {
29-
plugintest.TestImporter(t, PrivateKeyPair().Importer, map[string]plugintest.ImportCase{
29+
plugintest.TestImporter(t, APIKey().Importer, map[string]plugintest.ImportCase{
3030
"environment": {
3131
Environment: map[string]string{
3232
"MONGODB_ATLAS_PUBLIC_API_KEY": "eexample",

sdk/schema/credname/names.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const (
1818
LoginDetails = sdk.CredentialName("Login Details")
1919
PersonalAPIToken = sdk.CredentialName("Personal API Token")
2020
PersonalAccessToken = sdk.CredentialName("Personal Access Token")
21-
PrivateKeyPair = sdk.CredentialName("Private Key Pair")
2221
RegistryCredentials = sdk.CredentialName("Registry Credentials")
2322
SecretKey = sdk.CredentialName("Secret Key")
2423
)
@@ -39,7 +38,6 @@ func ListAll() []sdk.CredentialName {
3938
LoginDetails,
4039
PersonalAPIToken,
4140
PersonalAccessToken,
42-
PrivateKeyPair,
4341
RegistryCredentials,
4442
SecretKey,
4543
}

0 commit comments

Comments
 (0)