mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
Add statistic tracking
This commit is contained in:
18
app/Contracts/StatisticsCollector.php
Normal file
18
app/Contracts/StatisticsCollector.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Contracts;
|
||||
|
||||
interface StatisticsCollector
|
||||
{
|
||||
public function siteShared($authToken = null);
|
||||
|
||||
public function portShared($authToken = null);
|
||||
|
||||
public function incomingRequest();
|
||||
|
||||
public function flush();
|
||||
|
||||
public function save();
|
||||
|
||||
public function shouldCollectStatistics(): bool;
|
||||
}
|
||||
10
app/Contracts/StatisticsRepository.php
Normal file
10
app/Contracts/StatisticsRepository.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Contracts;
|
||||
|
||||
use React\Promise\PromiseInterface;
|
||||
|
||||
interface StatisticsRepository
|
||||
{
|
||||
public function getStatistics($from, $until): PromiseInterface;
|
||||
}
|
||||
@@ -19,4 +19,6 @@ interface UserRepository
|
||||
public function deleteUser($id): PromiseInterface;
|
||||
|
||||
public function getUsersByTokens(array $authTokens): PromiseInterface;
|
||||
|
||||
public function updateLastSharedAt($id): PromiseInterface;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user