role

package
v0.0.0-...-5c79d48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

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

func RequireDatabaseNameMatcher(protocol string) bool

RequireDatabaseNameMatcher returns true if databases with provided protocol require database names.

func RequireDatabaseUserMatcher

func RequireDatabaseUserMatcher(protocol string) bool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL