mysql

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host         string
	Port         int
	User         string
	Password     string
	DatabaseName string
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(host string, port int, user, pass, dbname, usersHostname string) *Config

func (*Config) ConnString

func (c *Config) ConnString() (string, error)

func (*Config) UsersHostname

func (c *Config) UsersHostname() string

type Mysql

type Mysql struct {
	// contains filtered or unexported fields
}

func NewMysql

func NewMysql(conn connection.Connection, config *Config, logger logr.Logger) *Mysql

func (*Mysql) ApplyPrivileges

func (m *Mysql) ApplyPrivileges(ctx context.Context, username string, privileges []v1alpha1.PrivilegeSpec) error

func (*Mysql) Close

func (m *Mysql) Close(ctx context.Context) error

func (*Mysql) Connect

func (m *Mysql) Connect(ctx context.Context) error

func (*Mysql) CreateUser

func (m *Mysql) CreateUser(ctx context.Context, username, password string) (map[string]string, error)

func (*Mysql) DeleteUser

func (m *Mysql) DeleteUser(ctx context.Context, username string) error

func (*Mysql) RevokePrivileges

func (m *Mysql) RevokePrivileges(ctx context.Context, username string, privileges []v1alpha1.PrivilegeSpec) error

Jump to

Keyboard shortcuts

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