-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename list to all, implement data objects
- Loading branch information
1 parent
367c542
commit dcb9032
Showing
12 changed files
with
13,203 additions
and
11 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,22 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Soyhuce\Docker\Data\Container; | ||
|
||
use Spatie\LaravelData\Attributes\MapInputName; | ||
use Spatie\LaravelData\Data; | ||
|
||
class EndpointIpamConfig extends Data | ||
{ | ||
/** | ||
* @param array<int, string> $linkLocalIPs | ||
*/ | ||
public function __construct( | ||
#[MapInputName('IPv4Address')] | ||
public string $iPv4Address, | ||
#[MapInputName('IPv6Address')] | ||
public string $iPv6Address, | ||
#[MapInputName('LinkLocalIPs')] | ||
public array $linkLocalIPs, | ||
) { | ||
} | ||
} |
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,47 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Soyhuce\Docker\Data\Container; | ||
|
||
use Spatie\LaravelData\Attributes\MapInputName; | ||
use Spatie\LaravelData\Data; | ||
|
||
class EndpointSettings extends Data | ||
{ | ||
/** | ||
* @param array<int, string>|null $links | ||
* @param array<int, string> $aliases | ||
* @param array<string, string>|null $driverOpts | ||
* @param array<int, string>|null $dnsNames | ||
*/ | ||
public function __construct( | ||
#[MapInputName('IPAMConfig')] | ||
public ?EndpointIpamConfig $ipamConfig, | ||
#[MapInputName('Links')] | ||
public ?array $links, | ||
#[MapInputName('MacAddress')] | ||
public string $macAddress, | ||
#[MapInputName('Aliases')] | ||
public ?array $aliases, | ||
#[MapInputName('NetworkID')] | ||
public string $networkId, | ||
#[MapInputName('EndpointID')] | ||
public string $endpointId, | ||
#[MapInputName('Gateway')] | ||
public string $gateway, | ||
#[MapInputName('IPAddress')] | ||
public string $ipAddress, | ||
#[MapInputName('IPPrefixLen')] | ||
public int $ipPrefixLen, | ||
#[MapInputName('IPv6Gateway')] | ||
public string $iPv6Gateway, | ||
#[MapInputName('GlobalIPv6Address')] | ||
public string $globalIPv6Address, | ||
#[MapInputName('GlobalIPv6PrefixLen')] | ||
public int $globalIPv6PrefixLen, | ||
#[MapInputName('DNSNames')] | ||
public ?array $dnsNames, | ||
#[MapInputName('DriverOpts')] | ||
public ?array $driverOpts = null, | ||
) { | ||
} | ||
} |
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,20 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Soyhuce\Docker\Data\Container; | ||
|
||
use Spatie\LaravelData\Attributes\MapInputName; | ||
use Spatie\LaravelData\Data; | ||
|
||
class HostConfig extends Data | ||
{ | ||
/** | ||
* @param array<string, string> $annotations | ||
*/ | ||
public function __construct( | ||
#[MapInputName('NetworkMode')] | ||
public string $networkMode, | ||
#[MapInputName('Annotations')] | ||
public ?array $annotations = null, | ||
) { | ||
} | ||
} |
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,18 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Soyhuce\Docker\Data\Container; | ||
|
||
use Spatie\LaravelData\Attributes\MapInputName; | ||
use Spatie\LaravelData\Data; | ||
|
||
class NetworkSettings extends Data | ||
{ | ||
/** | ||
* @param array<string, EndpointSettings> $networks | ||
*/ | ||
public function __construct( | ||
#[MapInputName('Networks')] | ||
public array $networks, | ||
) { | ||
} | ||
} |
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,21 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Soyhuce\Docker\Data\Container; | ||
|
||
use Spatie\LaravelData\Attributes\MapInputName; | ||
use Spatie\LaravelData\Data; | ||
|
||
class Port extends Data | ||
{ | ||
public function __construct( | ||
#[MapInputName('PrivatePort')] | ||
public int $privatePort, | ||
#[MapInputName('Type')] | ||
public string $type, | ||
#[MapInputName('IP')] | ||
public ?string $ip = null, | ||
#[MapInputName('PublicPort')] | ||
public ?int $publicPort = null, | ||
) { | ||
} | ||
} |
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,53 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Soyhuce\Docker\Data; | ||
|
||
use Carbon\Carbon; | ||
use Soyhuce\Docker\Data\Container\HostConfig; | ||
use Soyhuce\Docker\Data\Container\NetworkSettings; | ||
use Soyhuce\Docker\Data\Container\Port; | ||
use Spatie\LaravelData\Attributes\MapInputName; | ||
use Spatie\LaravelData\Attributes\WithCast; | ||
use Spatie\LaravelData\Casts\DateTimeInterfaceCast; | ||
use Spatie\LaravelData\Data; | ||
|
||
class ContainerItem extends Data | ||
{ | ||
/** | ||
* @param array<int, string> $names | ||
* @param array<int, Port> $ports | ||
* @param array<string, string> $labels | ||
*/ | ||
public function __construct( | ||
#[MapInputName('Id')] | ||
public string $id, | ||
#[MapInputName('Names')] | ||
public array $names, | ||
#[MapInputName('Image')] | ||
public string $image, | ||
#[MapInputName('ImageID')] | ||
public string $imageId, | ||
#[MapInputName('Command')] | ||
public string $command, | ||
#[MapInputName('Created')] | ||
#[WithCast(DateTimeInterfaceCast::class, format: 'U')] | ||
public Carbon $created, | ||
#[MapInputName('Ports')] | ||
public array $ports, | ||
#[MapInputName('Labels')] | ||
public array $labels, | ||
#[MapInputName('State')] | ||
public string $state, | ||
#[MapInputName('Status')] | ||
public string $status, | ||
#[MapInputName('HostConfig')] | ||
public HostConfig $hostConfig, | ||
#[MapInputName('NetworkSettings')] | ||
public NetworkSettings $networkSettings, | ||
#[MapInputName('SizeRw')] | ||
public ?int $sizeRw = null, | ||
#[MapInputName('SizeRootFs')] | ||
public ?int $sizeRootFs = null, | ||
) { | ||
} | ||
} |
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,47 @@ | ||
[ | ||
{ | ||
"Id": "02d3890e4d4e81fbc61df0ab93bc051bc75bffd22abd453c892f5ceddbc6e327", | ||
"Names": [ | ||
"\/determined_liskov" | ||
], | ||
"Image": "nginx:latest", | ||
"ImageID": "sha256:66f8bdd3810c96dc5c28aec39583af731b34a2cd99471530f53c8794ed5b423e", | ||
"Command": "\/docker-entrypoint.sh bash", | ||
"Created": 1735820912, | ||
"Ports": [ | ||
{ | ||
"PrivatePort": 80, | ||
"Type": "tcp" | ||
} | ||
], | ||
"Labels": { | ||
"maintainer": "NGINX Docker Maintainers <[email protected]>" | ||
}, | ||
"State": "running", | ||
"Status": "Up 6 minutes", | ||
"HostConfig": { | ||
"NetworkMode": "bridge" | ||
}, | ||
"NetworkSettings": { | ||
"Networks": { | ||
"bridge": { | ||
"IPAMConfig": null, | ||
"Links": null, | ||
"Aliases": null, | ||
"MacAddress": "02:42:ac:11:00:02", | ||
"DriverOpts": null, | ||
"NetworkID": "cfe869b1021192c126f4e70daa8780f9ae96b42d330526825272db81d3518564", | ||
"EndpointID": "65f52c483eb083a277d943222f7a362ea004ca1581c31a329dcada9fd513646a", | ||
"Gateway": "172.17.0.1", | ||
"IPAddress": "172.17.0.2", | ||
"IPPrefixLen": 16, | ||
"IPv6Gateway": "", | ||
"GlobalIPv6Address": "", | ||
"GlobalIPv6PrefixLen": 0, | ||
"DNSNames": null | ||
} | ||
} | ||
}, | ||
"Mounts": [] | ||
} | ||
] |