mysql

package
v0.0.0-...-be11aad Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

func NewMySQLManager(rootUser, rootPassword, host, port string) (*Manager, error)

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

func (m *Manager) CreateDatabase(databaseName string) error

CreateDatabase ensures that a database exists in the database server

func (*Manager) CreateUser

func (m *Manager) CreateUser(username, password, networkRestriction string) error

CreateUser ensures the user exists in the database server

Jump to

Keyboard shortcuts

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