diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2025-04-25 01:13:03 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2025-04-25 01:13:03 +0100 |
| commit | c86f2b723e6956a6544bf98dc5011bd303280c6e (patch) | |
| tree | f889fc105517e8a83863de621aa18a48e1231565 /serviceDefinitions.php | |
| parent | 45a18c0ecb364c42307641b4057ff5a814e69b2e (diff) | |
Restructure repository
Diffstat (limited to 'serviceDefinitions.php')
| -rw-r--r-- | serviceDefinitions.php | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/serviceDefinitions.php b/serviceDefinitions.php deleted file mode 100644 index 84f2216..0000000 --- a/serviceDefinitions.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -namespace ServiceDefinitions; - -class ServiceDefinition -{ - public $name; - public $prettyName; - public $containerName; - public $luks; - - public function __construct($name, $prettyName, $containerName, $luks) - { - $this->name = $name; - $this->prettyName = $prettyName; - $this->containerName = $containerName; - $this->luks = $luks; - } -} - -class LuksDataDisk -{ - public $deviceName; - public $uuid; - public $mountPoint; - - public function __construct($deviceName, $uuid, $mountPoint) - { - $this->deviceName = $deviceName; - $this->uuid = $uuid; - $this->mountPoint = $mountPoint; - } -} - -$services = [ - new ServiceDefinition('vaultwarden', 'Vaultwarden', 'vaultwarden', null), - new ServiceDefinition('nextcloud', 'Nextcloud', ['nextcloud', 'nextcloud_db'], new LuksDataDisk('mmcblk0p3', '19537ab9-d855-416c-99c3-ebc85e02bfbf', 'cloud')), - new ServiceDefinition('jellyfin', 'Jellyfin', 'jellyfin', new LuksDataDisk('sda', '12158df0-2738-4c32-a7b9-36c11dde427f', 'media')), - new ServiceDefinition('minecraft', 'Minecraft server', 'minecraft', null), -]; - -function getServiceDefinition($name) { - global $services; - - $matching = array_filter($services, function ($service) use ($name) { return $service->name === $name; }); - if (count($matching) === 0) { - return null; - } - return reset($matching); -} - -?> - |
