use std::path::PathBuf;
pub type Result<T> = std::result::Result<T, MigrationError>;
#[derive(Debug, thiserror::Error)]
pub enum MigrationError {
#[error("migration source '{kind}' is unavailable at {path}")]
MissingSource {
kind: &'static str,
path: PathBuf,
},
#[error("unsupported migration source: {0}")]
UnsupportedSource(String),
#[error("unsupported resource for v1 migration: {0}")]
UnsupportedResource(String),
#[error("migration is blocked: {0}")]
Blocked(String),
#[error("invalid migration plan: {0}")]
InvalidPlan(String),
#[error("docker API error: {0}")]
Docker(String),
#[error(transparent)]
Io(#[from] std::io::Error),
#[error(transparent)]
SerdeJson(#[from] serde_json::Error),
}