{"id":20682701,"url":"https://github.com/govcraft/acton-ern","last_synced_at":"2026-01-24T00:51:21.144Z","repository":{"id":233713643,"uuid":"787680754","full_name":"Govcraft/acton-ern","owner":"Govcraft","description":"A Rust library for handling Akton Resource Names (ARNs), providing tools for generating, parsing, and managing ARNs within Akton-based cloud-native solutions.","archived":false,"fork":false,"pushed_at":"2024-10-03T23:17:10.000Z","size":356,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-29T14:05:00.730Z","etag":null,"topics":["api","cloud-native","cloud-native-applications","cloud-native-architectures","cloud-native-microservices","government-technology","hierarchical-data","hierarchical-data-association","network-programming","qrn","resource-management","rust","rust-crate","rust-lang","rust-library","security"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Govcraft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-17T01:25:33.000Z","updated_at":"2024-10-03T23:17:14.000Z","dependencies_parsed_at":"2024-05-28T00:08:38.700Z","dependency_job_id":"d831a3ed-c950-4a3d-8717-b2cdb540976a","html_url":"https://github.com/Govcraft/acton-ern","commit_stats":null,"previous_names":["govcraft/quasar-qrn","govcraft/acton-ern","govcraft/akton-arn"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Govcraft%2Facton-ern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Govcraft%2Facton-ern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Govcraft%2Facton-ern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Govcraft%2Facton-ern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Govcraft","download_url":"https://codeload.github.com/Govcraft/acton-ern/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250237851,"owners_count":21397403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cloud-native","cloud-native-applications","cloud-native-architectures","cloud-native-microservices","government-technology","hierarchical-data","hierarchical-data-association","network-programming","qrn","resource-management","rust","rust-crate","rust-lang","rust-library","security"],"created_at":"2024-11-16T22:14:21.495Z","updated_at":"2026-01-24T00:51:21.138Z","avatar_url":"https://github.com/Govcraft.png","language":"Rust","funding_links":["https://github.com/sponsors/Govcraft"],"categories":[],"sub_categories":[],"readme":"# Acton ERN (Entity Resource Name)\n\n[![Crates.io](https://img.shields.io/crates/v/acton-ern.svg)](https://crates.io/crates/acton-ern)\n[![Documentation](https://docs.rs/acton-ern/badge.svg)](https://docs.rs/acton-ern)\n[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](README.md#license)\n[![Rust](https://img.shields.io/badge/rust-1.70%2B-orange.svg)](https://www.rust-lang.org/)\n\n## Standardized Resource Management in Distributed Systems\n\nActon ERN provides a standardized approach for uniquely identifying and managing resources across services, partitions, and hierarchies in distributed systems.\n\n**Implement a consistent, type-safe resource naming scheme that scales with your system.**\n\n## Why Acton ERN?\n\n### 🔍 Problem: Resource Identification Inconsistency\n\nIn distributed systems, resources are scattered across multiple services, databases, and storage systems. Without a consistent naming scheme:\n\n- Resources lack consistent location and reference methods\n- Relationships between resources require additional tracking mechanisms\n- Sorting and querying resources efficiently requires custom solutions\n- Type safety is compromised, leading to runtime errors\n\n### ✅ Solution: Structured, Type-Safe Resource Names\n\nActon ERN addresses these issues by providing:\n\n- **Consistent Structure**: Every resource follows the same naming pattern, making them predictable and systematic\n- **Hierarchical Organization**: Resources can be organized in parent-child relationships, reflecting their logical structure\n- **Time-Ordered Sorting**: When using time-based ID types, resources can be efficiently sorted and queried by creation time\n- **Content-Based Addressing**: When using hash-based ID types, resources with identical content can be deterministically identified\n- **Type Safety**: The builder pattern ensures ERNs are constructed correctly at compile time\n\n## Real-World Benefits\n\n### For Microservice Architectures\n\n- **Service Discovery**: Locate resources across different services using a consistent addressing scheme\n- **Cross-Service References**: Maintain references between resources in different services without ambiguity\n- **Versioning Support**: Track resource versions and changes over time with time-ordered IDs\n\n### For Data-Intensive Applications\n\n- **Efficient Querying**: K-sortable IDs enable range queries and time-based filtering\n- **Data Lineage**: Track relationships between derived data and source data\n- **Deduplication**: Content-addressable IDs help identify duplicate resources\n\n### For Cloud-Native Applications\n\n- **Multi-Tenant Support**: The account component clearly separates resources by tenant\n- **Resource Categorization**: Organize resources by domain and category for structured management\n- **Hierarchical Structure**: Model complex resource relationships with defined patterns\n\n## Quick Start\n\nAdd Acton ERN to your project:\n\n```toml\n[dependencies]\nacton-ern = \"1.0.0\"\n```\n\n### Creating an ERN\n\n```rust\nuse acton_ern::prelude::*;\n\n// Create a time-ordered, sortable ERN\nlet ern = ErnBuilder::new()\n    .with::\u003cDomain\u003e(\"my-app\")?\n    .with::\u003cCategory\u003e(\"users\")?\n    .with::\u003cAccount\u003e(\"tenant123\")?\n    .with::\u003cEntityRoot\u003e(\"profile\")?\n    .with::\u003cPart\u003e(\"settings\")?\n    .build()?;\n\n// The resulting ERN will look like:\n// ern:my-app:users:tenant123:profile_01h9xz7n2e5p6q8r3t1u2v3w4x/settings\n```\n\n### Parsing an ERN\n\n```rust\nuse acton_ern::prelude::*;\n\n// Parse an ERN from a string\nlet ern_str = \"ern:my-app:users:tenant123:profile_01h9xz7n2e5p6q8r3t1u2v3w4x/settings\";\nlet parsed_ern = ErnParser::new(ern_str.to_string()).parse()?;\n\n// Access components\nprintln!(\"Domain: {}\", parsed_ern.domain);\nprintln!(\"Category: {}\", parsed_ern.category);\nprintln!(\"Account: {}\", parsed_ern.account);\nprintln!(\"Root: {}\", parsed_ern.root);\nprintln!(\"Parts: {}\", parsed_ern.parts);\n```\n\n## Choose the Right ID Type for Your Needs\n\nActon ERN supports different ID types for different use cases:\n\n- **UnixTime (Default)**: Time-ordered IDs with millisecond precision for chronological sorting\n- **Timestamp**: Time-ordered IDs with microsecond precision for higher resolution timing needs\n- **SHA1Name**: Content-addressable IDs that are deterministic based on input, suitable for content-based resources\n\n```rust\n// Time-ordered ID (sortable by creation time)\nlet time_ern: Ern = ErnBuilder::new()\n    .with::\u003cDomain\u003e(\"my-app\")?\n    .with::\u003cCategory\u003e(\"events\")?\n    .with::\u003cAccount\u003e(\"tenant123\")?\n    .with::\u003cEntityRoot\u003e(\"log\")?\n    .build()?;\n\n// Content-addressable ID (same content = same ID)\nlet content_ern: Ern = ErnBuilder::new()\n    .with::\u003cDomain\u003e(\"my-app\")?\n    .with::\u003cCategory\u003e(\"documents\")?\n    .with::\u003cAccount\u003e(\"tenant123\")?\n    .with::\u003cSHA1Name\u003e(\"report-2023-q4\")?\n    .build()?;\n```\n\n## Optional Features\n\nActon ERN includes optional features:\n\n```toml\n[dependencies]\nacton-ern = { version = \"1.0.0\", features = [\"serde\", \"async\"] }\n```\n\n- **serde**: Add serialization/deserialization support for JSON, YAML, and more\n- **std**: Enabled by default, can be disabled for no_std environments\n\n## Working with ERNs\n\n### Hierarchical Relationships\n\n```rust\n// Check if one ERN is a child of another\nif child_ern.is_child_of(\u0026parent_ern) {\n    println!(\"Child resource found.\");\n}\n\n// Get the parent of an ERN\nif let Some(parent) = child_ern.parent() {\n    println!(\"Parent: {}\", parent);\n}\n```\n\n### Combining ERNs\n\n```rust\n// Combine two ERNs (appends the parts)\nlet combined_ern = base_ern + extension_ern;\n```\n\n## Development Status\n\n**Acton ERN 1.0.0 Release**\n\nThe 1.0.0 release includes all core functionality, comprehensive testing, and production-ready features. See the [CHANGELOG.md](CHANGELOG.md) for details on what's included in this release.\n\n## License\n\nThis project is licensed under either of:\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Acknowledgments\n\n- The Acton Framework team for their contributions\n- All contributors who have provided input to this project\n## Sponsor\n\nGovcraft is a one-person shop—no corporate backing, no investors, just me building useful tools. If this project helps you, [sponsoring](https://github.com/sponsors/Govcraft) keeps the work going.\n\n[![Sponsor on GitHub](https://img.shields.io/badge/Sponsor-%E2%9D%A4-%23db61a2?logo=GitHub)](https://github.com/sponsors/Govcraft)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovcraft%2Facton-ern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgovcraft%2Facton-ern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovcraft%2Facton-ern/lists"}