2017-07-08 19:07:51 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
|
|
|
|
2018-01-14 19:30:55 +00:00
|
|
|
use Pterodactyl\Models\User;
|
|
|
|
use Illuminate\Support\Collection;
|
2017-11-19 21:23:37 +00:00
|
|
|
|
2017-07-08 19:07:51 +00:00
|
|
|
interface ApiKeyRepositoryInterface extends RepositoryInterface
|
|
|
|
{
|
2017-11-19 21:23:37 +00:00
|
|
|
/**
|
2018-01-14 19:30:55 +00:00
|
|
|
* Get all of the account API keys that exist for a specific user.
|
2017-11-19 21:23:37 +00:00
|
|
|
*/
|
2018-01-14 19:30:55 +00:00
|
|
|
public function getAccountKeys(User $user): Collection;
|
|
|
|
|
2018-01-19 03:36:15 +00:00
|
|
|
/**
|
|
|
|
* Get all of the application API keys that exist for a specific user.
|
|
|
|
*/
|
|
|
|
public function getApplicationKeys(User $user): Collection;
|
|
|
|
|
2018-01-14 19:30:55 +00:00
|
|
|
/**
|
|
|
|
* Delete an account API key from the panel for a specific user.
|
|
|
|
*/
|
|
|
|
public function deleteAccountKey(User $user, string $identifier): int;
|
2018-01-19 03:36:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete an application API key from the panel for a specific user.
|
|
|
|
*/
|
|
|
|
public function deleteApplicationKey(User $user, string $identifier): int;
|
2017-07-08 19:07:51 +00:00
|
|
|
}
|