pub fn get_admin_controllers() -> Controllers
Expand description
Retrieve the current admin controllers for a Satellite.
This function filters the list of controllers to include only those with the Admin
scope.
§Returns
Controllers
: AHashMap
where:- The key is a
ControllerId
(type alias forPrincipal
). - The value is a
Controller
struct that includes:metadata
: Additional metadata about the controller.created_at
: The timestamp when the controller was created.updated_at
: The timestamp when the controller was last updated.expires_at
: An optional timestamp indicating when the controller expires.scope
: AlwaysControllerScope::Admin
for admin controllers.
- The key is a
§Example
let admin_controllers = get_admin_controllers();
for (controller_id, controller) in admin_controllers.iter() {
println!("Admin Controller ID: {}", controller_id);
println!("Created at: {}", controller.created_at);
}
This function is useful for auditing or managing permissions for admin-level access.