mirror of
https://github.com/shlinkio/shlink.git
synced 2026-02-28 12:13:13 +08:00
29 lines
655 B
PHP
29 lines
655 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Rest\Service;
|
|
|
|
use Shlinkio\Shlink\Common\Exception\InvalidArgumentException;
|
|
use Shlinkio\Shlink\Rest\ApiKey\Model\ApiKeyMeta;
|
|
use Shlinkio\Shlink\Rest\Entity\ApiKey;
|
|
|
|
interface ApiKeyServiceInterface
|
|
{
|
|
public function create(ApiKeyMeta $apiKeyMeta): ApiKey;
|
|
|
|
public function createInitial(string $key): ?ApiKey;
|
|
|
|
public function check(string $key): ApiKeyCheckResult;
|
|
|
|
/**
|
|
* @throws InvalidArgumentException
|
|
*/
|
|
public function disable(string $key): ApiKey;
|
|
|
|
/**
|
|
* @return ApiKey[]
|
|
*/
|
|
public function listKeys(bool $enabledOnly = false): array;
|
|
}
|