Files
Netbox-Store/store/src/Sync/Adapter/SourceAdapter.php
T
MrBlake f36d6be511
CI / php-store (push) Waiting to run
CI / python-components (push) Waiting to run
feat: add NetBox plugin store
2026-08-24 20:51:25 +02:00

30 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace NetBoxStore\Sync\Adapter;
interface SourceAdapter
{
/** @return list<array<string,mixed>> */
public function listRepositories(): array;
/** @param array<string,mixed> $repository */
public function getCommitSha(array $repository, ?string $ref = null): string;
/** @param array<string,mixed> $repository */
public function fetchText(array $repository, string $path, string $commitSha): ?string;
/** @param array<string,mixed> $repository @return list<string> */
public function listTree(array $repository, string $commitSha): array;
/** @param array<string,mixed> $repository */
public function rawFileUrl(array $repository, string $path, string $commitSha): string;
/** @param array<string,mixed> $repository @return list<array<string,mixed>> */
public function listReleases(array $repository): array;
/** @return array{sha256:string,artifactSize:int} */
public function hashArtifact(string $url, string $expectedSha256 = ''): array;
}