summaryrefslogtreecommitdiff
path: root/vendor/educe/src/supported_traits.rs
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-15 16:37:08 -0600
committermo khan <mo@mokhan.ca>2025-07-17 16:30:22 -0600
commit45df4d0d9b577fecee798d672695fe24ff57fb1b (patch)
tree1b99bf645035b58e0d6db08c7a83521f41f7a75b /vendor/educe/src/supported_traits.rs
parentf94f79608393d4ab127db63cc41668445ef6b243 (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/educe/src/supported_traits.rs')
-rw-r--r--vendor/educe/src/supported_traits.rs88
1 files changed, 0 insertions, 88 deletions
diff --git a/vendor/educe/src/supported_traits.rs b/vendor/educe/src/supported_traits.rs
deleted file mode 100644
index 50f7f302..00000000
--- a/vendor/educe/src/supported_traits.rs
+++ /dev/null
@@ -1,88 +0,0 @@
-#[cfg(not(any(
- feature = "Debug",
- feature = "Clone",
- feature = "Copy",
- feature = "PartialEq",
- feature = "Eq",
- feature = "PartialOrd",
- feature = "Ord",
- feature = "Hash",
- feature = "Default",
- feature = "Deref",
- feature = "DerefMut",
- feature = "Into",
-)))]
-compile_error!("at least one of the trait features must be enabled");
-
-use enum_ordinalize::Ordinalize;
-use syn::Path;
-
-#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Ordinalize)]
-#[ordinalize(impl_trait = false)]
-#[ordinalize(variants(pub(crate) const VARIANTS))]
-pub(crate) enum Trait {
- #[cfg(feature = "Debug")]
- Debug,
- #[cfg(feature = "Clone")]
- Clone,
- #[cfg(feature = "Copy")]
- Copy,
- #[cfg(feature = "PartialEq")]
- PartialEq,
- #[cfg(feature = "Eq")]
- Eq,
- #[cfg(feature = "PartialOrd")]
- PartialOrd,
- #[cfg(feature = "Ord")]
- Ord,
- #[cfg(feature = "Hash")]
- Hash,
- #[cfg(feature = "Default")]
- Default,
- #[cfg(feature = "Deref")]
- Deref,
- #[cfg(feature = "DerefMut")]
- DerefMut,
- #[cfg(feature = "Into")]
- Into,
-
- _Nothing,
-}
-
-impl Trait {
- #[inline]
- pub(crate) fn from_path(path: &Path) -> Option<Self> {
- let ident_string = match path.get_ident() {
- Some(ident) => ident.to_string(),
- None => return None,
- };
-
- match ident_string.as_str() {
- #[cfg(feature = "Debug")]
- "Debug" => Some(Self::Debug),
- #[cfg(feature = "Clone")]
- "Clone" => Some(Self::Clone),
- #[cfg(feature = "Copy")]
- "Copy" => Some(Self::Copy),
- #[cfg(feature = "PartialEq")]
- "PartialEq" => Some(Self::PartialEq),
- #[cfg(feature = "Eq")]
- "Eq" => Some(Self::Eq),
- #[cfg(feature = "PartialOrd")]
- "PartialOrd" => Some(Self::PartialOrd),
- #[cfg(feature = "Ord")]
- "Ord" => Some(Self::Ord),
- #[cfg(feature = "Hash")]
- "Hash" => Some(Self::Hash),
- #[cfg(feature = "Default")]
- "Default" => Some(Self::Default),
- #[cfg(feature = "Deref")]
- "Deref" => Some(Self::Deref),
- #[cfg(feature = "DerefMut")]
- "DerefMut" => Some(Self::DerefMut),
- #[cfg(feature = "Into")]
- "Into" => Some(Self::Into),
- _ => None,
- }
- }
-}