Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDatabaseRoleMatchers ¶
func GetDatabaseRoleMatchers(conf RoleMatchersConfig) (matchers services.RoleMatchers)
GetDatabaseRoleMatchers returns database role matchers for the provided config.
func RequireDatabaseNameMatcher ¶
RequireDatabaseNameMatcher returns true if databases with provided protocol require database names.
func RequireDatabaseUserMatcher ¶
RequireDatabaseUserMatcher returns true if databases with provided protocol require database users.
Types ¶
type RoleMatchersConfig ¶
type RoleMatchersConfig struct { // Database is the database that's being connected to. Database types.Database // DatabaseUser is the database username. DatabaseUser string // DatabaseName is the database name. DatabaseName string // AutoCreateUser is whether database user will be auto-created. AutoCreateUser bool // DisableDatabaseNameMatcher skips DatabaseNameMatcher even if the protocol requires it. DisableDatabaseNameMatcher bool }
RoleMatchersConfig contains parameters for database role matchers.
Click to show internal directories.
Click to hide internal directories.