-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03faf1a
commit b0fe1eb
Showing
13 changed files
with
182 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
|
||
class Status | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace MarketDataApp\Endpoints\Responses\Utilities; | ||
|
||
use Carbon\Carbon; | ||
|
||
class ServiceStatus | ||
{ | ||
|
||
// The service being monitored. | ||
public string $service; | ||
|
||
// The current status of each service (online or offline). | ||
public string $status; | ||
|
||
// The uptime percentage of each service over the last 30 days. | ||
public float $uptime_percentage_30d; | ||
|
||
// The uptime percentage of each service over the last 90 days. | ||
public float $uptime_percentage_90d; | ||
|
||
// The timestamp of the last update for each service's status. | ||
public Carbon $updated; | ||
|
||
public function __construct( | ||
string $service, | ||
string $status, | ||
float $uptime_percentage_30d, | ||
float $uptime_percentage_90d, | ||
Carbon $updated | ||
) { | ||
$this->service = $service; | ||
$this->status = $status; | ||
$this->uptime_percentage_30d = $uptime_percentage_30d; | ||
$this->uptime_percentage_90d = $uptime_percentage_90d; | ||
$this->updated = $updated; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace MarketDataApp\Tests\Traits; | ||
|
||
use GuzzleHttp\Client as GuzzleClient; | ||
use GuzzleHttp\Handler\MockHandler; | ||
use GuzzleHttp\HandlerStack; | ||
|
||
trait MockResponses | ||
{ | ||
|
||
private function setMockResponses(array $responses): void | ||
{ | ||
$mock = new MockHandler($responses); | ||
$handlerStack = HandlerStack::create($mock); | ||
|
||
$this->client->setGuzzle(new GuzzleClient(['handler' => $handlerStack])); | ||
} | ||
} |
Oops, something went wrong.