use thiserror::Error;
pub type Result<T> = std::result::Result<T, LicenseError>;
#[derive(Error, Debug)]
pub enum LicenseError {
#[error("Invalid license format")]
InvalidFormat,
#[error("Invalid license signature")]
InvalidSignature,
#[error("License has expired")]
Expired,
#[error("Invalid license data: {0}")]
InvalidData(String),
#[error("Base64 decoding error: {0}")]
Base64Error(#[from] base64::DecodeError),
#[error("Time parsing error: {0}")]
ChronoError(#[from] chrono::ParseError),
}