Complete base implementation of services for administrative server creation
This commit is contained in:
parent
f842aae3d3
commit
8daec38622
22 changed files with 633 additions and 141 deletions
|
@ -47,9 +47,10 @@ interface ServerRepositoryInterface extends BaseRepositoryInterface
|
|||
/**
|
||||
* Mark a server to be reinstalled on the system.
|
||||
*
|
||||
* @param array|null $data
|
||||
* @return \Psr\Http\Message\ResponseInterface
|
||||
*/
|
||||
public function reinstall();
|
||||
public function reinstall($data = null);
|
||||
|
||||
/**
|
||||
* Mark a server as needing a container rebuild the next time the server is booted.
|
||||
|
@ -71,4 +72,11 @@ interface ServerRepositoryInterface extends BaseRepositoryInterface
|
|||
* @return \Psr\Http\Message\ResponseInterface
|
||||
*/
|
||||
public function unsuspend();
|
||||
|
||||
/**
|
||||
* Delete a server on the daemon.
|
||||
*
|
||||
* @return \Psr\Http\Message\ResponseInterface
|
||||
*/
|
||||
public function delete();
|
||||
}
|
||||
|
|
|
@ -141,6 +141,19 @@ interface RepositoryInterface
|
|||
*/
|
||||
public function updateWhereIn($column, array $values, array $fields);
|
||||
|
||||
/**
|
||||
* Update a record if it exists in the database, otherwise create it.
|
||||
*
|
||||
* @param array $where
|
||||
* @param array $fields
|
||||
* @param bool $validate
|
||||
* @param bool $force
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
*/
|
||||
public function updateOrCreate(array $where, array $fields, $validate = true, $force = false);
|
||||
|
||||
/**
|
||||
* Update multiple records matching the passed clauses.
|
||||
*
|
||||
|
|
|
@ -77,4 +77,14 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
|
|||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getWithDatabases($id);
|
||||
|
||||
/**
|
||||
* Return data about the daemon service in a consumable format.
|
||||
*
|
||||
* @param int $id
|
||||
* @return array
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getDaemonServiceData($id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue