Types Registry SDK
SDK crate for the Types Registry module, providing the public API contracts for GTS (Global Type System) entity management.
Overview
This crate defines the transport-agnostic interface for the Types Registry module:
TypesRegistryClient- Async trait for inter-module communicationGtsEntity- Model representing registered GTS entities (types and instances)ListQuery- Query builder for filtering entity listingsTypesRegistryError- Error types for all operations
Usage
Getting the Client
Consumers obtain the client from ClientHub:
use ;
// Get the client from ClientHub
let client = hub.?;
Registering Entities
use json;
// Register a type schema
let schemas = vec!;
let entities = client.register.await?;
Listing Entities
use ListQuery;
// List all entities
let all = client.list.await?;
// List only types from vendor "acme"
let query = new
.with_is_type
.with_vendor;
let acme_types = client.list.await?;
// List entities matching a pattern
let query = new
.with_pattern;
let matched = client.list.await?;
Getting a Single Entity
let entity = client.get.await?;
println!;
println!;
println!;
Models
GtsEntity
Represents a registered GTS entity:
GtsIdSegment
Re-exported from gts-rust. Represents a parsed segment of a GTS identifier:
GtsEntityKind
ListQuery
Builder for filtering entity listings:
let query = new
.with_pattern
.with_is_type
.with_vendor
.with_package
.with_namespace;
Error Handling
All API methods return Result<T, TypesRegistryError>:
match client.get.await
License
Apache-2.0