2017-07-20 03:49:41 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
|
|
|
|
2018-01-05 05:49:50 +01:00
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
2017-07-20 03:49:41 +02:00
|
|
|
interface AllocationRepositoryInterface extends RepositoryInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Set an array of allocation IDs to be assigned to a specific server.
|
|
|
|
*
|
2017-08-22 05:10:48 +02:00
|
|
|
* @param int|null $server
|
|
|
|
* @param array $ids
|
2017-07-20 03:49:41 +02:00
|
|
|
* @return int
|
|
|
|
*/
|
2018-01-05 05:49:50 +01:00
|
|
|
public function assignAllocationsToServer(int $server = null, array $ids): int;
|
2017-07-22 04:17:42 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return all of the allocations for a specific node.
|
|
|
|
*
|
2017-08-22 05:10:48 +02:00
|
|
|
* @param int $node
|
2018-01-05 05:49:50 +01:00
|
|
|
* @return \Illuminate\Support\Collection
|
2017-07-22 04:17:42 +02:00
|
|
|
*/
|
2018-01-05 05:49:50 +01:00
|
|
|
public function getAllocationsForNode(int $node): Collection;
|
2018-01-09 05:12:19 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return all of the unique IPs that exist for a given node.
|
|
|
|
*
|
|
|
|
* @param int $node
|
|
|
|
* @return \Illuminate\Support\Collection
|
|
|
|
*/
|
|
|
|
public function getUniqueAllocationIpsForNode(int $node): Collection;
|
2017-07-20 03:49:41 +02:00
|
|
|
}
|