The PHP app runs on Cafe24 shared web hosting -- calling it 'cloud' was misleading. Renames the directory, the edge client module, and every doc/script/identifier that used the term. - cloud/ -> server/ (incl. server/deploy/build_cafe24_package.sh paths) - edge/cloudclient.py -> edge/serverclient.py, CloudClient -> ServerClient - cloud/docs/cloud-deploy.md -> server/docs/server-deploy.md - CLOUD_* env/config keys -> SERVER_* - tests renamed to match Tests: PHP 109 pass (4 skipped), pytest 167 pass. dist/ regenerated.
23 lines
1.1 KiB
PHP
23 lines
1.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
namespace App\Repository;
|
|
|
|
interface EventRepository
|
|
{
|
|
public function insert(array $event): int;
|
|
/** The event_id of a previously-ingested event with this uuid, or null. Backs ingest
|
|
* idempotency (a re-sent event dedups instead of duplicating). */
|
|
public function idByUuid(string $uuid): ?int;
|
|
public function recent(int $limit, ?string $severity): array;
|
|
/**
|
|
* Keyset (cursor) page over the (occurred_at DESC, event_id DESC) sort key.
|
|
* Pass null/null for the first page; then the (occurred_at, event_id) of the last
|
|
* returned row to fetch strictly older events. Stable under concurrent inserts —
|
|
* new events land at the head and never shift a page window.
|
|
* $site (when non-null) restricts the page to events whose denormalized site matches —
|
|
* the SQL half of the site-scope access control (see App\Security\SiteScope).
|
|
*/
|
|
public function page(int $limit, ?string $severity, ?string $beforeTs, ?int $beforeId, ?string $site = null): array;
|
|
public function find(int $id): ?array;
|
|
public function acknowledge(int $id, string $user): bool;
|
|
}
|