pub enum ControllerPlatform {
UnifiOs,
ClassicController,
Cloud,
}Expand description
The platform type of the UniFi controller.
Determines URL prefixes, login paths, and which API surfaces are available.
Variants§
UnifiOs
UniFi OS device (UDM, UCG, etc.) – port 443, /proxy/network/ prefix.
ClassicController
Standalone Network Application (Java) – port 8443, no prefix.
Cloud
Cloud-hosted via Site Manager / Cloud Connector (api.ui.com).
Implementations§
Source§impl ControllerPlatform
impl ControllerPlatform
Sourcepub fn legacy_prefix(&self) -> Option<&'static str>
pub fn legacy_prefix(&self) -> Option<&'static str>
The path prefix for legacy API endpoints.
Returns None for Cloud because the legacy API
is not available via the cloud connector.
Sourcepub fn integration_prefix(&self) -> &'static str
pub fn integration_prefix(&self) -> &'static str
The path prefix for the Integration API.
On UniFi OS devices: /proxy/network/integration
On standalone / cloud: /integration
Sourcepub fn login_path(&self) -> Option<&'static str>
pub fn login_path(&self) -> Option<&'static str>
The login endpoint path.
Returns None for Cloud because cloud uses
API key auth – no session login needed.
Sourcepub fn logout_path(&self) -> Option<&'static str>
pub fn logout_path(&self) -> Option<&'static str>
The logout endpoint path.
Returns None for Cloud.
Sourcepub fn websocket_path(&self) -> Option<&'static str>
pub fn websocket_path(&self) -> Option<&'static str>
The WebSocket path template. {site} must be replaced by the caller.
Returns None for Cloud because WebSocket
connections are not available via the cloud connector.
Trait Implementations§
Source§impl Clone for ControllerPlatform
impl Clone for ControllerPlatform
Source§fn clone(&self) -> ControllerPlatform
fn clone(&self) -> ControllerPlatform
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more