databaseInfra

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: EPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MysqlCmd

func MysqlCmd(cmd string) (string, error)

func PostgresqlCmd

func PostgresqlCmd(cmd string, dbName *string) (string, error)

Types

type DatabaseCmdRepo

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

func NewDatabaseCmdRepo

func NewDatabaseCmdRepo(
	dbType valueObject.DatabaseType,
) *DatabaseCmdRepo

func (DatabaseCmdRepo) Create

func (repo DatabaseCmdRepo) Create(dbName valueObject.DatabaseName) error

func (DatabaseCmdRepo) CreateUser

func (repo DatabaseCmdRepo) CreateUser(createDatabaseUser dto.CreateDatabaseUser) error

func (DatabaseCmdRepo) Delete

func (repo DatabaseCmdRepo) Delete(dbName valueObject.DatabaseName) error

func (DatabaseCmdRepo) DeleteUser

func (repo DatabaseCmdRepo) DeleteUser(
	dbName valueObject.DatabaseName,
	dbUser valueObject.DatabaseUsername,
) error

type DatabaseQueryRepo

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

func NewDatabaseQueryRepo

func NewDatabaseQueryRepo(
	dbType valueObject.DatabaseType,
) *DatabaseQueryRepo

func (DatabaseQueryRepo) Read

func (repo DatabaseQueryRepo) Read() ([]entity.Database, error)

func (DatabaseQueryRepo) ReadByName

func (repo DatabaseQueryRepo) ReadByName(
	name valueObject.DatabaseName,
) (entity.Database, error)

type MysqlDatabaseCmdRepo

type MysqlDatabaseCmdRepo struct {
}

func (MysqlDatabaseCmdRepo) Create

func (repo MysqlDatabaseCmdRepo) Create(dbName valueObject.DatabaseName) error

func (MysqlDatabaseCmdRepo) CreateUser

func (repo MysqlDatabaseCmdRepo) CreateUser(createDatabaseUser dto.CreateDatabaseUser) error

func (MysqlDatabaseCmdRepo) Delete

func (repo MysqlDatabaseCmdRepo) Delete(dbName valueObject.DatabaseName) error

func (MysqlDatabaseCmdRepo) DeleteUser

type MysqlDatabaseQueryRepo

type MysqlDatabaseQueryRepo struct {
}

func (MysqlDatabaseQueryRepo) Read

func (repo MysqlDatabaseQueryRepo) Read() ([]entity.Database, error)

type PostgresDatabaseCmdRepo

type PostgresDatabaseCmdRepo struct {
}

func (PostgresDatabaseCmdRepo) Create

func (PostgresDatabaseCmdRepo) CreateUser

func (repo PostgresDatabaseCmdRepo) CreateUser(createDatabaseUser dto.CreateDatabaseUser) error

func (PostgresDatabaseCmdRepo) Delete

func (PostgresDatabaseCmdRepo) DeleteUser

type PostgresDatabaseQueryRepo

type PostgresDatabaseQueryRepo struct {
}

func (PostgresDatabaseQueryRepo) Read

func (PostgresDatabaseQueryRepo) ReadDatabaseNamesByUser

func (repo PostgresDatabaseQueryRepo) ReadDatabaseNamesByUser(
	dbUser valueObject.DatabaseUsername,
) ([]valueObject.DatabaseName, error)

func (PostgresDatabaseQueryRepo) UserExists

func (repo PostgresDatabaseQueryRepo) UserExists(
	dbUser valueObject.DatabaseUsername,
) bool

Jump to

Keyboard shortcuts

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