| Crates.io | myc-core |
| lib.rs | myc-core |
| version | 8.3.1-beta.2 |
| created_at | 2022-12-27 10:25:57.276862+00 |
| updated_at | 2026-01-17 20:37:31.084687+00 |
| description | Provide base features of the Mycelium project as s and Use-cases. |
| homepage | |
| repository | https://github.com/sgelias/mycelium |
| max_upload_size | |
| id | 746137 |
| size | 895,929 |
Here you can find business logic and domain types that are shared across the workspace.
See the Global README for more information.
This crate is organized into the following main directories:
domain/Contains the core domain models, data transfer objects (DTOs), entities, and utilities that represent the business domain of Mycelium.
actors/: Defines system actors and roles used for authorization and access control (e.g., SystemActor enum with roles like Beginner, SubscriptionsManager, AccountManager, etc.)
dtos/: Data Transfer Objects (DTOs) used for API communication and data serialization. Includes the following DTOs:
account/: Account-related DTOs including Account, AccountMetaKey, VerboseStatus, and FlagResponseaccount_type.rs: Account type definitionsemail.rs: Email DTO for email validation and handlingerror_code.rs: Error code DTOsguest_role.rs: Guest role DTOs with permissionsguest_user.rs: Guest user DTOshealth_check_info.rs: Health check information DTOshttp.rs: HTTP method and related DTOshttp_secret.rs: HTTP secret DTOs for secure communicationmessage.rs: Message DTOsnative_error_codes.rs: Native error code definitionsprofile/: Profile-related DTOs including:
Profile: Main profile DTO with owners, accounts, and permissionsLicensedResource and LicensedResources: Licensed resource DTOsOwner: Owner DTOTenantOwnership and TenantsOwnership: Tenant ownership DTOsrelated_accounts.rs: Related accounts DTOsroute.rs: Route configuration DTOssecurity_group.rs: Security group DTOsservice.rs: Service DTOstag.rs: Tag DTOs for categorizationtenant/: Tenant-related DTOs including Tenant, TenantMetaKey, and TenantStatustoken/: Token-related DTOs organized in sub-modules:
connection_string/: Connection string DTOs including ConnectionStringBeans, PublicConnectionStringInfo, and UserAccountConnectionStringmeta/: Token metadata DTOs including AccountRelatedMeta and UserRelatedMetatoken/: Token DTOs including EmailConfirmationToken and PasswordChangeTokenToken and MultiTypeMeta: Main token DTOsuser.rs: User DTOswebhook/: Webhook-related DTOs including WebHook, WebHookTrigger, and webhook response DTOswritten_by.rs: Audit trail DTO for tracking who created/updated resourcesentities/: Domain entities representing the core business objects. Each entity module contains operations for:
Entities include: account, user, tenant, token, guest_role, guest_user, webhook, service, message, profile, and more.
utils/: Utility functions and helpers used across the domain layer (e.g., UUID derivation, type conversions)
use_cases/Contains the application use cases organized by functionality and role. These implement the business logic and orchestrate domain operations.
gateway/: Use cases for gateway functionalities, including route configuration loading, validation, and request routing/matching
role_scoped/: Federation use cases organized by user roles:
beginner/: Operations for users without assigned roles (account management, user registration, token management, tenant info)account_manager/: Operations for managing a single subscription accountsubscriptions_manager/: Operations for managing subscription accounts, guest users, roles, and tagstenant_manager/: Operations for managing tenant-level resources (accounts, guests, tags, tenant details)tenant_owner/: Operations for tenant owners to manage tenant metadata, tags, and ownershipusers_manager/: Operations for managing user accountsguest_manager/: Operations for managing guest roles and permissionsgateway_manager/: Operations for managing gateway endpoints and configurationssystem_manager/: Operations for managing system-wide resources (error messages, webhooks, etc.)service/: Service-related use cases for automated account creation, guest-to-default account conversion, and service discovery
super_users/: Use cases for system administrators:
managers/: Operations for managing tenants, system accounts, and system rolesstaff/: Operations for staff account management and privilege upgrades/downgradessupport/: Support use cases for notifications, webhook dispatching, and event registration
models/Configuration models and data structures used across the application:
config.rs: Core configuration modelsaccount_life_cycle_config.rs: Configuration for account lifecycle managementwebhook_config.rs: Configuration for webhook dispatchingsettings.rsSystem-wide settings, constants, and template configuration: