2026-10-05 18:10:18 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Databases;
|
|
|
|
|
|
|
|
|
|
use Pterodactyl\Models\DatabaseHost;
|
|
|
|
|
use Throwable;
|
|
|
|
|
|
|
|
|
|
interface CreatesDatabaseHosts
|
|
|
|
|
{
|
2026-10-11 07:27:47 -04:00
|
|
|
/**
|
2026-10-11 23:50:53 -04:00
|
|
|
* The host is saved once the Panel has connected to it with the given credentials. The input
|
|
|
|
|
* is validated here and the password is stored encrypted; a host given no node_id is global.
|
|
|
|
|
* Extension field values go under `extensions` as ValidatedExtensionValues.
|
2026-10-11 07:27:47 -04:00
|
|
|
*
|
2026-10-11 19:54:55 -04:00
|
|
|
* @param array<string, mixed> $input name, host, port and username, and optionally password and node_id
|
2026-10-11 07:27:47 -04:00
|
|
|
*
|
2026-10-05 18:10:18 -04:00
|
|
|
* @throws Throwable
|
|
|
|
|
*/
|
2026-10-11 07:27:47 -04:00
|
|
|
public function create(array $input): DatabaseHost;
|
2026-10-05 18:10:18 -04:00
|
|
|
}
|