Skip to main content

route

Function route 

Source
pub fn route(kind: &str, identity: &str) -> String
Expand description

The Cockpit route of one entity, from its kind and identity.

use majordomus_cli::entity::route;
assert_eq!(route("adr", "adr-0004"), "/cockpit/objects/adr/adr-0004");
assert_eq!(route("rule", "project.x@1"), "/cockpit/objects/rule/project-x-1");