mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-21 19:01:37 +00:00
* Add database and database users sync * get mysl users * add mariadb and postgres * fix phpstan
44 lines
1.1 KiB
PHP
Executable File
44 lines
1.1 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\SSH\Services\Database;
|
|
|
|
use App\Models\BackupFile;
|
|
use App\SSH\Services\ServiceInterface;
|
|
|
|
interface Database extends ServiceInterface
|
|
{
|
|
public function create(string $name, string $charset, string $collation): void;
|
|
|
|
public function delete(string $name): void;
|
|
|
|
public function createUser(string $username, string $password, string $host): void;
|
|
|
|
public function deleteUser(string $username, string $host): void;
|
|
|
|
/**
|
|
* @param array<string> $databases
|
|
*/
|
|
public function link(string $username, string $host, array $databases): void;
|
|
|
|
public function unlink(string $username, string $host): void;
|
|
|
|
public function runBackup(BackupFile $backupFile): void;
|
|
|
|
public function restoreBackup(BackupFile $backupFile, string $database): void;
|
|
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function getCharsets(): array;
|
|
|
|
/**
|
|
* @return array<int, array<string>>
|
|
*/
|
|
public function getDatabases(): array;
|
|
|
|
/**
|
|
* @return array<int, array<string>>
|
|
*/
|
|
public function getUsers(): array;
|
|
}
|