Skip to content

Commit

Permalink
formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
parthiv11 committed Jun 30, 2023
1 parent 0f9cf3f commit d53010e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions plugins/cratedb/crash.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import (

func CrateDBCLI() schema.Executable {
return schema.Executable{
Name: "CrateDB Shell",
Runs: []string{"crash"},
DocsURL: sdk.URL("https://crate.io/docs/crate/crash/en/latest/"),
Name: "CrateDB Shell",
Runs: []string{"crash"},
DocsURL: sdk.URL("https://crate.io/docs/crate/crash/en/latest/"),
NeedsAuth: needsauth.IfAll(
needsauth.NotForHelpOrVersion(),
needsauth.NotWithoutArgs(),
),
Uses: []schema.CredentialUsage{
{
Name: credname.DatabaseCredentials,
Name: credname.DatabaseCredentials,
Provisioner: crateProvisioner(),
},
},
Expand Down
8 changes: 3 additions & 5 deletions plugins/cratedb/database_credentials.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cratedb

import (

"github.com/1Password/shell-plugins/sdk"
"github.com/1Password/shell-plugins/sdk/importer"
"github.com/1Password/shell-plugins/sdk/provision"
Expand Down Expand Up @@ -33,11 +32,10 @@ func DatabaseCredentials() schema.CredentialType {
},
},
DefaultProvisioner: provision.NoOp(),
Importer: importer.TryEnvVarPair(defaultEnvVarMapping),
}
Importer: importer.TryEnvVarPair(defaultEnvVarMapping),
}
}

var defaultEnvVarMapping = map[string]sdk.FieldName{
"CRATEPW": fieldname.Password,
"CRATEPW": fieldname.Password,
}

2 changes: 1 addition & 1 deletion plugins/cratedb/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func New() schema.Plugin {
Name: "cratedb",
Platform: schema.PlatformInfo{
Name: "CrateDB",
Homepage: sdk.URL("https://crate.io/"),
Homepage: sdk.URL("https://crate.io/"),
},
Credentials: []schema.CredentialType{
DatabaseCredentials(),
Expand Down

0 comments on commit d53010e

Please sign in to comment.