Documentation ¶
Index ¶
- type Manager
- func (m *Manager) AssignReadUserToDatabase(databaseName, username, password, networkRestriction string) error
- func (m *Manager) AssignWriteUserToDatabase(databaseName, username, password, networkRestriction string) error
- func (m *Manager) CreateDatabase(databaseName string) error
- func (m *Manager) CreateUser(username, password, networkRestriction string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager implements the manager interface for MySQL databases
func NewMySQLManager ¶
NewMySQLManager returns a new instance of the mysql manager
func (*Manager) AssignReadUserToDatabase ¶
func (m *Manager) AssignReadUserToDatabase(databaseName, username, password, networkRestriction string) error
AssignReadUserToDatabase adds a read-only user to a database
This function assumes that CreateUser has been called prior to this function, and that the user already exists if the database engine requires the user to exist
func (*Manager) AssignWriteUserToDatabase ¶
func (m *Manager) AssignWriteUserToDatabase(databaseName, username, password, networkRestriction string) error
AssignWriteUserToDatabase adds a write user to a database
This function assumes that CreateUser has been called prior to this function, and that the user already exists if the database engine requires the user to exist
func (*Manager) CreateDatabase ¶
CreateDatabase ensures that a database exists in the database server
func (*Manager) CreateUser ¶
CreateUser ensures the user exists in the database server