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