pub struct MigrationManager { /* private fields */ }Expand description
Main migration manager
Implementations§
Source§impl MigrationManager
impl MigrationManager
Sourcepub fn new(config: MigrationConfig) -> Result<Self, MigrationError>
pub fn new(config: MigrationConfig) -> Result<Self, MigrationError>
Create new migration manager
Sourcepub async fn analyze_legacy_system<P: AsRef<Path>>(
&self,
config_path: P,
) -> Result<LegacySystemAnalysis, MigrationError>
pub async fn analyze_legacy_system<P: AsRef<Path>>( &self, config_path: P, ) -> Result<LegacySystemAnalysis, MigrationError>
Analyze legacy authorization system
Sourcepub async fn generate_migration_plan(
&self,
analysis: &LegacySystemAnalysis,
strategy: Option<MigrationStrategy>,
) -> Result<MigrationPlan, MigrationError>
pub async fn generate_migration_plan( &self, analysis: &LegacySystemAnalysis, strategy: Option<MigrationStrategy>, ) -> Result<MigrationPlan, MigrationError>
Generate migration plan
Sourcepub async fn validate_migration_plan(
&self,
plan: &MigrationPlan,
) -> Result<Vec<String>, MigrationError>
pub async fn validate_migration_plan( &self, plan: &MigrationPlan, ) -> Result<Vec<String>, MigrationError>
Validate migration plan
Sourcepub async fn execute_migration(
&self,
plan: &MigrationPlan,
) -> Result<MigrationResult, MigrationError>
pub async fn execute_migration( &self, plan: &MigrationPlan, ) -> Result<MigrationResult, MigrationError>
Execute migration plan
Sourcepub async fn get_migration_status(
&self,
plan_id: &str,
) -> Result<Option<MigrationResult>, MigrationError>
pub async fn get_migration_status( &self, plan_id: &str, ) -> Result<Option<MigrationResult>, MigrationError>
Get migration status
Sourcepub async fn rollback_migration(
&self,
plan: &MigrationPlan,
) -> Result<MigrationResult, MigrationError>
pub async fn rollback_migration( &self, plan: &MigrationPlan, ) -> Result<MigrationResult, MigrationError>
Rollback migration
Sourcepub async fn list_migration_plans(&self) -> Result<Vec<String>, MigrationError>
pub async fn list_migration_plans(&self) -> Result<Vec<String>, MigrationError>
List available migration plans
Sourcepub async fn save_migration_plan(
&self,
plan: &MigrationPlan,
) -> Result<PathBuf, MigrationError>
pub async fn save_migration_plan( &self, plan: &MigrationPlan, ) -> Result<PathBuf, MigrationError>
Save migration plan to disk
Sourcepub async fn load_migration_plan(
&self,
plan_id: &str,
) -> Result<MigrationPlan, MigrationError>
pub async fn load_migration_plan( &self, plan_id: &str, ) -> Result<MigrationPlan, MigrationError>
Load migration plan from disk
Sourcepub async fn generate_migration_report(
&self,
result: &MigrationResult,
) -> Result<String, MigrationError>
pub async fn generate_migration_report( &self, result: &MigrationResult, ) -> Result<String, MigrationError>
Generate migration report
Auto Trait Implementations§
impl Freeze for MigrationManager
impl RefUnwindSafe for MigrationManager
impl Send for MigrationManager
impl Sync for MigrationManager
impl Unpin for MigrationManager
impl UnwindSafe for MigrationManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more