diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-15 16:37:08 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-17 16:30:22 -0600 |
| commit | 45df4d0d9b577fecee798d672695fe24ff57fb1b (patch) | |
| tree | 1b99bf645035b58e0d6db08c7a83521f41f7a75b /vendor/time/src/error/mod.rs | |
| parent | f94f79608393d4ab127db63cc41668445ef6b243 (diff) | |
feat: migrate from Cedar to SpiceDB authorization system
This is a major architectural change that replaces the Cedar policy-based
authorization system with SpiceDB's relation-based authorization.
Key changes:
- Migrate from Rust to Go implementation
- Replace Cedar policies with SpiceDB schema and relationships
- Switch from envoy `ext_authz` with Cedar to SpiceDB permission checks
- Update build system and dependencies for Go ecosystem
- Maintain Envoy integration for external authorization
This change enables more flexible permission modeling through SpiceDB's
Google Zanzibar inspired relation-based system, supporting complex
hierarchical permissions that were difficult to express in Cedar.
Breaking change: Existing Cedar policies and Rust-based configuration
will no longer work and need to be migrated to SpiceDB schema.
Diffstat (limited to 'vendor/time/src/error/mod.rs')
| -rw-r--r-- | vendor/time/src/error/mod.rs | 131 |
1 files changed, 0 insertions, 131 deletions
diff --git a/vendor/time/src/error/mod.rs b/vendor/time/src/error/mod.rs deleted file mode 100644 index 78b15380..00000000 --- a/vendor/time/src/error/mod.rs +++ /dev/null @@ -1,131 +0,0 @@ -//! Various error types returned by methods in the time crate. - -mod component_range; -mod conversion_range; -mod different_variant; -#[cfg(feature = "formatting")] -mod format; -#[cfg(feature = "local-offset")] -mod indeterminate_offset; -#[cfg(all(any(feature = "formatting", feature = "parsing"), feature = "alloc"))] -mod invalid_format_description; -mod invalid_variant; -#[cfg(feature = "parsing")] -mod parse; -#[cfg(feature = "parsing")] -mod parse_from_description; -#[cfg(feature = "parsing")] -mod try_from_parsed; - -#[cfg(feature = "parsing")] -use core::convert::Infallible; -use core::fmt; - -pub use component_range::ComponentRange; -pub use conversion_range::ConversionRange; -pub use different_variant::DifferentVariant; -#[cfg(feature = "formatting")] -pub use format::Format; -#[cfg(feature = "local-offset")] -pub use indeterminate_offset::IndeterminateOffset; -#[cfg(all(any(feature = "formatting", feature = "parsing"), feature = "alloc"))] -pub use invalid_format_description::InvalidFormatDescription; -pub use invalid_variant::InvalidVariant; -#[cfg(feature = "parsing")] -pub use parse::Parse; -#[cfg(feature = "parsing")] -pub use parse_from_description::ParseFromDescription; -#[cfg(feature = "parsing")] -pub use try_from_parsed::TryFromParsed; - -/// A unified error type for anything returned by a method in the time crate. -/// -/// This can be used when you either don't know or don't care about the exact error returned. -/// `Result<_, time::Error>` (or its alias `time::Result<_>`) will work in these situations. -#[non_exhaustive] -#[derive(Debug)] -pub enum Error { - #[allow(missing_docs)] - ConversionRange(ConversionRange), - #[allow(missing_docs)] - ComponentRange(ComponentRange), - #[cfg(feature = "local-offset")] - #[allow(missing_docs)] - IndeterminateOffset(IndeterminateOffset), - #[cfg(feature = "formatting")] - #[allow(missing_docs)] - Format(Format), - #[cfg(feature = "parsing")] - #[allow(missing_docs)] - ParseFromDescription(ParseFromDescription), - #[cfg(feature = "parsing")] - #[allow(missing_docs)] - #[non_exhaustive] - #[deprecated( - since = "0.3.28", - note = "no longer output. moved to the `ParseFromDescription` variant" - )] - UnexpectedTrailingCharacters { - #[doc(hidden)] - never: Infallible, - }, - #[cfg(feature = "parsing")] - #[allow(missing_docs)] - TryFromParsed(TryFromParsed), - #[cfg(all(any(feature = "formatting", feature = "parsing"), feature = "alloc"))] - #[allow(missing_docs)] - InvalidFormatDescription(InvalidFormatDescription), - #[allow(missing_docs)] - DifferentVariant(DifferentVariant), - #[allow(missing_docs)] - InvalidVariant(InvalidVariant), -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::ConversionRange(e) => e.fmt(f), - Self::ComponentRange(e) => e.fmt(f), - #[cfg(feature = "local-offset")] - Self::IndeterminateOffset(e) => e.fmt(f), - #[cfg(feature = "formatting")] - Self::Format(e) => e.fmt(f), - #[cfg(feature = "parsing")] - Self::ParseFromDescription(e) => e.fmt(f), - #[cfg(feature = "parsing")] - #[allow(deprecated)] - Self::UnexpectedTrailingCharacters { never } => match *never {}, - #[cfg(feature = "parsing")] - Self::TryFromParsed(e) => e.fmt(f), - #[cfg(all(any(feature = "formatting", feature = "parsing"), feature = "alloc"))] - Self::InvalidFormatDescription(e) => e.fmt(f), - Self::DifferentVariant(e) => e.fmt(f), - Self::InvalidVariant(e) => e.fmt(f), - } - } -} - -#[cfg(feature = "std")] -impl std::error::Error for Error { - fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { - match self { - Self::ConversionRange(err) => Some(err), - Self::ComponentRange(err) => Some(err), - #[cfg(feature = "local-offset")] - Self::IndeterminateOffset(err) => Some(err), - #[cfg(feature = "formatting")] - Self::Format(err) => Some(err), - #[cfg(feature = "parsing")] - Self::ParseFromDescription(err) => Some(err), - #[cfg(feature = "parsing")] - #[allow(deprecated)] - Self::UnexpectedTrailingCharacters { never } => match *never {}, - #[cfg(feature = "parsing")] - Self::TryFromParsed(err) => Some(err), - #[cfg(all(any(feature = "formatting", feature = "parsing"), feature = "alloc"))] - Self::InvalidFormatDescription(err) => Some(err), - Self::DifferentVariant(err) => Some(err), - Self::InvalidVariant(err) => Some(err), - } - } -} |
