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,
|
cassandraConfig,
|
||||||
},
|
},
|
||||||
expectedCounts: map[string]int{
|
expectedCounts: map[string]int{
|
||||||
pluginconsts.DbPostgresqlPlugin: 1,
|
pluginconsts.DbPostgresqlPluginType: 1,
|
||||||
pluginconsts.DbCassandraPlugin: 1,
|
pluginconsts.DbCassandraPluginType: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1675,7 +1675,7 @@ func TestBackend_GetConnectionMetrics(t *testing.T) {
|
|||||||
postgresConfig,
|
postgresConfig,
|
||||||
},
|
},
|
||||||
expectedCounts: map[string]int{
|
expectedCounts: map[string]int{
|
||||||
pluginconsts.DbPostgresqlPlugin: 1,
|
pluginconsts.DbPostgresqlPluginType: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1692,8 +1692,8 @@ func TestBackend_GetConnectionMetrics(t *testing.T) {
|
|||||||
cassandraConfigV2,
|
cassandraConfigV2,
|
||||||
},
|
},
|
||||||
expectedCounts: map[string]int{
|
expectedCounts: map[string]int{
|
||||||
pluginconsts.DbPostgresqlPlugin: 2,
|
pluginconsts.DbPostgresqlPluginType: 2,
|
||||||
pluginconsts.DbCassandraPlugin: 2,
|
pluginconsts.DbCassandraPluginType: 2,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -26,14 +26,6 @@ const (
|
|||||||
AuthTypeSAML = "saml"
|
AuthTypeSAML = "saml"
|
||||||
AuthTypeApprole = "approle"
|
AuthTypeApprole = "approle"
|
||||||
AuthTypeJWT = "jwt"
|
AuthTypeJWT = "jwt"
|
||||||
DbCassandraPlugin = "cassandra"
|
|
||||||
DbHanaPlugin = "hdb"
|
|
||||||
DbInfluxDBPlugin = "influxdb"
|
|
||||||
DbMongoDBPlugin = "mongodb"
|
|
||||||
DbMsSQLPlugin = "mssql"
|
|
||||||
DbMySQLPlugin = "mysql"
|
|
||||||
DbRedshiftPlugin = "redshift"
|
|
||||||
DbPostgresqlPlugin = "pgx"
|
|
||||||
SecretEngineAD = "ad"
|
SecretEngineAD = "ad"
|
||||||
SecretEngineAlicloud = "alicloud"
|
SecretEngineAlicloud = "alicloud"
|
||||||
SecretEngineAWS = "aws"
|
SecretEngineAWS = "aws"
|
||||||
@ -71,3 +63,21 @@ const (
|
|||||||
// database type for every database.
|
// database type for every database.
|
||||||
SecretEngineDatabase = "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"
|
mountTypeNSCubbyhole = "ns_cubbyhole"
|
||||||
mountTypeToken = "token"
|
mountTypeToken = "token"
|
||||||
mountTypeNSToken = "ns_token"
|
mountTypeNSToken = "ns_token"
|
||||||
|
mountTypeDatabase = "database"
|
||||||
|
|
||||||
MountTableUpdateStorage = true
|
MountTableUpdateStorage = true
|
||||||
MountTableNoUpdateStorage = false
|
MountTableNoUpdateStorage = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user