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