mirror of
https://github.com/hashicorp/vault.git
synced 2025-09-20 21:31:09 +02:00
Add DB type consts (#31295)
* add necessary consts * add other db plugins * correct ES * Fix consts in test
This commit is contained in:
parent
6981f475c6
commit
1e7f22aeec
@ -1665,8 +1665,8 @@ func TestBackend_GetConnectionMetrics(t *testing.T) {
|
||||
cassandraConfig,
|
||||
},
|
||||
expectedCounts: map[string]int{
|
||||
pluginconsts.DbPostgresqlPlugin: 1,
|
||||
pluginconsts.DbCassandraPlugin: 1,
|
||||
pluginconsts.DbPostgresqlPluginType: 1,
|
||||
pluginconsts.DbCassandraPluginType: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -1675,7 +1675,7 @@ func TestBackend_GetConnectionMetrics(t *testing.T) {
|
||||
postgresConfig,
|
||||
},
|
||||
expectedCounts: map[string]int{
|
||||
pluginconsts.DbPostgresqlPlugin: 1,
|
||||
pluginconsts.DbPostgresqlPluginType: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -1692,8 +1692,8 @@ func TestBackend_GetConnectionMetrics(t *testing.T) {
|
||||
cassandraConfigV2,
|
||||
},
|
||||
expectedCounts: map[string]int{
|
||||
pluginconsts.DbPostgresqlPlugin: 2,
|
||||
pluginconsts.DbCassandraPlugin: 2,
|
||||
pluginconsts.DbPostgresqlPluginType: 2,
|
||||
pluginconsts.DbCassandraPluginType: 2,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -26,14 +26,6 @@ const (
|
||||
AuthTypeSAML = "saml"
|
||||
AuthTypeApprole = "approle"
|
||||
AuthTypeJWT = "jwt"
|
||||
DbCassandraPlugin = "cassandra"
|
||||
DbHanaPlugin = "hdb"
|
||||
DbInfluxDBPlugin = "influxdb"
|
||||
DbMongoDBPlugin = "mongodb"
|
||||
DbMsSQLPlugin = "mssql"
|
||||
DbMySQLPlugin = "mysql"
|
||||
DbRedshiftPlugin = "redshift"
|
||||
DbPostgresqlPlugin = "pgx"
|
||||
SecretEngineAD = "ad"
|
||||
SecretEngineAlicloud = "alicloud"
|
||||
SecretEngineAWS = "aws"
|
||||
@ -71,3 +63,21 @@ const (
|
||||
// database type for every database.
|
||||
SecretEngineDatabase = "database"
|
||||
)
|
||||
|
||||
// These DB consts match the type returned from database plugin's Type() method.
|
||||
const (
|
||||
DbCassandraPluginType = "cassandra"
|
||||
DbCouchbasePluginType = "couchbase"
|
||||
DbElasticSearchPluginType = "elasticsearch"
|
||||
DbHanaPluginType = "hdb"
|
||||
DbInfluxDBPluginType = "influxdb"
|
||||
DbMongoDBPluginType = "mongodb"
|
||||
DbMongoAtlasPluginType = "mongodbatlas"
|
||||
DbMsSQLPluginType = "mssql"
|
||||
DbMySQLPluginType = "mysql"
|
||||
DbPostgresqlPluginType = "pgx"
|
||||
DbRedshiftPluginType = "redshift"
|
||||
DbRedisPluginType = "redis"
|
||||
DbRedisElasticachePluginType = "redisElastiCache"
|
||||
DbSnowflakePluginType = "snowflake"
|
||||
)
|
||||
|
@ -83,6 +83,7 @@ const (
|
||||
mountTypeNSCubbyhole = "ns_cubbyhole"
|
||||
mountTypeToken = "token"
|
||||
mountTypeNSToken = "ns_token"
|
||||
mountTypeDatabase = "database"
|
||||
|
||||
MountTableUpdateStorage = true
|
||||
MountTableNoUpdateStorage = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user