scuffle-cedar-policy-codegen 0.1.1

Code generator for scuffle-cedar-policy.
1
2
3
4
5
6
7
8
9
10
11
12
use std::collections::BTreeSet;

use crate::types::{ActionEid, CedarRef, CedarType};

/// Represents a Cedar action with its constraints
#[derive(Debug, Default)]
pub(crate) struct CedarAction {
    pub(crate) principals: Vec<CedarRef>,
    pub(crate) resources: Vec<CedarRef>,
    pub(crate) parents: BTreeSet<ActionEid>,
    pub(crate) context: Option<CedarType>,
}