icingaweb2-module-director/library/Director/Integration/BackendInterface.php

56 lines
1.3 KiB
PHP
Raw Permalink Normal View History

<?php
2023-11-17 06:56:07 -05:00
namespace Icinga\Module\Director\Integration;
use Icinga\Web\Url;
2023-11-17 06:56:07 -05:00
interface BackendInterface
{
2023-11-17 07:30:02 -05:00
/**
* Whether the backend has the given host
*
* @param ?string $hostName
2023-11-17 07:30:02 -05:00
*
* @return bool
*/
public function hasHost(?string $hostName): bool;
2023-11-17 07:30:02 -05:00
/**
* Whether the backend has the given service of the specified host
*
* @param ?string $hostName
* @param ?string $serviceName
2023-11-17 07:30:02 -05:00
*
* @return bool
*/
public function hasService(?string $hostName, ?string $serviceName): bool;
2023-11-17 07:30:02 -05:00
/**
* Whether an authenticated user has the permission (is not restricted) to modify given host
*
* @param ?string $hostName
2023-11-17 07:30:02 -05:00
*
* @return bool
*/
public function canModifyHost(?string $hostName): bool;
2023-11-17 07:30:02 -05:00
/**
* Whether an authenticated user has the permission (is not restricted) to modify given service of specified host
*
* @param ?string $hostName
* @param ?string $serviceName
2023-11-17 07:30:02 -05:00
*
* @return bool
*/
public function canModifyService(?string $hostName, ?string $serviceName): bool;
2023-11-17 07:30:02 -05:00
/**
* Get the url of given host
*
* @param ?string $hostName
2023-11-17 07:30:02 -05:00
*
* @return Url
*/
public function getHostUrl(?string $hostName): ?Url;
}