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
|
|
|
* @param \Pterodactyl\Models\User $user
|
|
|
|
* @return \Illuminate\Support\Collection
|
2017-11-19 21:23:37 +00:00
|
|
|
*/
|
2018-01-14 19:30:55 +00:00
|
|
|
public function getAccountKeys(User $user): Collection;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete an account API key from the panel for a specific user.
|
|
|
|
*
|
|
|
|
* @param \Pterodactyl\Models\User $user
|
|
|
|
* @param string $identifier
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function deleteAccountKey(User $user, string $identifier): int;
|
2017-07-08 19:07:51 +00:00
|
|
|
}
|