burncloud-database-core
Core database abstractions and traits for the BurnCloud AI management system.
Overview
burncloud-database-core
provides the foundational traits, types, and data models for building database-agnostic AI model management systems. It defines the core abstractions that allow different database backends to be used interchangeably.
Features
- Database-agnostic traits: Core traits for database connections, query execution, and transactions
- AI Model data models: Complete data structures for AI model management, deployments, monitoring, and security
- Error handling: Comprehensive error types for database operations
- Serialization support: Full serde support for all data types
- Async/await support: Built for modern async Rust applications
Core Traits
DatabaseConnection
: Manages database connections and basic operationsQueryExecutor
: Executes queries and handles parametersTransactionManager
: Manages database transactionsRepository
: Generic repository pattern for data accessMigrationManager
: Handles database schema migrations
Data Models
AI Model Management
AiModel
: Represents AI models with metadata, requirements, and statusModelDeployment
: Manages model deployments with configuration and resource settingsModelType
: Enum for different types of AI models (ChatCompletion, TextGeneration, etc.)
Monitoring & Metrics
SystemMetrics
: System-level performance metricsModelMetrics
: Model-specific performance metricsRequestLog
: API request loggingSystemLog
: System event logging
User & Security
UserSettings
: User preferences and configurationSecurityConfig
: Security policies and access controlsApiKey
: API key management with permissionsFirewallRule
: Network access control rules
Example Usage
use *;
// Define a custom repository
Installation
Add this to your Cargo.toml
:
[]
= "0.1"
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributing
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.