Resource Group SDK
SDK crate for the Resource Group module, providing public API contracts for hierarchical resource group management with the GTS type system in CyberFabric.
Overview
This crate defines the transport-agnostic interface for the Resource Group module:
ResourceGroupClient— Async trait for full type/group/membership lifecycleResourceGroupReadHierarchy— Narrow read-only trait for in-process plugin consumers (e.g. AuthZ resolver, tenant-resolver RG plugin) that need ancestor/descendant walks plus flat OData listing- Models:
ResourceGroupType,ResourceGroup,ResourceGroupMembership,ResourceGroupWithDepth,GroupHierarchy, etc. ResourceGroupError— Error type for all operations- OData filter field definitions (behind the
odatafeature)
Usage
Getting the Client
Consumers obtain the client from ClientHub:
use ResourceGroupClient;
let rg = hub.?;
Type Lifecycle
use CreateTypeRequest;
let rg_type = rg.create_type.await?;
let fetched = rg.get_type.await?;
Group Lifecycle
use CreateGroupRequest;
let group = rg.create_group.await?;
let same = rg.get_group.await?;
Hierarchy Traversal
use ODataQuery;
let descendants = rg.get_group_descendants.await?;
let ancestors = rg.get_group_ancestors.await?;
Memberships
rg.add_membership.await?;
rg.remove_membership.await?;
Read-Only Hierarchy Trait
Plugin consumers that need only read access can depend on the narrower
ResourceGroupReadHierarchy trait. It exposes ancestor/descendant walks and
OData-filtered listing — enough to support batch lookups like
id in (id1, id2, …) without pulling in the full client surface.
use ResourceGroupReadHierarchy;
let read = hub.?;
let page = read.list_groups.await?;
Error Handling
use ResourceGroupError;
match rg.get_group.await
Features
odata(default) — enables OData filter field definitions and typed query helpers (depends onmodkit-odata-macrosandmodkit-sdk).
License
Apache-2.0