Skip to content

Commit

Permalink
Removed config as it has no Creds stored
Browse files Browse the repository at this point in the history
  • Loading branch information
parthiv11 authored Jun 27, 2023
1 parent 652668b commit 95e2502
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions plugins/cratedb/database_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,37 +46,11 @@ func DatabaseCredentials() schema.CredentialType {
DefaultProvisioner: provision.EnvVars(defaultEnvVarMapping),
Importer: importer.TryAll(
importer.TryEnvVarPair(defaultEnvVarMapping),
TryCrateDBConfigFile(),

)}
}

var defaultEnvVarMapping = map[string]sdk.FieldName{
"CRATEPW": fieldname.Password, // TODO: Check if this is correct
"CRATEPW": fieldname.Password,
}

// TODO: Check if the platform stores the Database Credentials in a local config file, and if so,
// implement the function below to add support for importing it.
func TryCrateDBConfigFile() sdk.Importer {
return importer.TryFile("~/path/to/config/file.yml", func(ctx context.Context, contents importer.FileContents, in sdk.ImportInput, out *sdk.ImportAttempt) {
// var config Config
// if err := contents.ToYAML(&config); err != nil {
// out.AddError(err)
// return
// }

// if config. == "" {
// return
// }

// out.AddCandidate(sdk.ImportCandidate{
// Fields: map[sdk.FieldName]string{
// fieldname.: config.,
// },
// })
})
}

// TODO: Implement the config file schema
// type Config struct {
// string
// }

0 comments on commit 95e2502

Please sign in to comment.