databaseInfra

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: EPL-2.0 Imports: 10 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 *valueObject.DatabaseName) (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(
	requestDto dto.ReadDatabasesRequest,
) (responseDto dto.ReadDatabasesResponse, err error)

func (DatabaseQueryRepo) ReadFirst added in v0.2.4

func (repo DatabaseQueryRepo) ReadFirst(
	requestDto dto.ReadDatabasesRequest,
) (database entity.Database, err 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 {
}

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) ReadDatabaseNamesByUser

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

func (PostgresDatabaseQueryRepo) UserExists

func (repo PostgresDatabaseQueryRepo) UserExists(dbUsername valueObject.DatabaseUsername) bool

Jump to

Keyboard shortcuts

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