Skip to main content

AuthorityGraph

Struct AuthorityGraph 

Source
pub struct AuthorityGraph {
    pub source: PipelineSource,
    pub nodes: Vec<Node>,
    pub edges: Vec<Edge>,
    pub completeness: AuthorityCompleteness,
    pub completeness_gaps: Vec<String>,
    pub metadata: HashMap<String, String>,
    pub parameters: HashMap<String, ParamSpec>,
}
Expand description

Directed authority graph. Nodes are pipeline elements (steps, secrets, artifacts, identities, images). Edges model authority/data flow.

Fields§

§source: PipelineSource§nodes: Vec<Node>§edges: Vec<Edge>§completeness: AuthorityCompleteness

How complete is this graph? Set by the parser based on what it could resolve.

§completeness_gaps: Vec<String>

Human-readable reasons why the graph is Partial (if applicable).

§metadata: HashMap<String, String>

Graph-level metadata set by parsers (e.g. trigger type, platform-specific flags). Serialized in sorted-key order — see Node.metadata rationale.

§parameters: HashMap<String, ParamSpec>

Top-level pipeline parameters: declarations, keyed by parameter name. Populated by parsers that surface parameter metadata (currently ADO). Empty for platforms / pipelines that don’t declare parameters. Serialized in sorted-key order — see Node.metadata rationale.

Implementations§

Source§

impl AuthorityGraph

Source

pub fn new(source: PipelineSource) -> Self

Source

pub fn mark_partial(&mut self, reason: impl Into<String>)

Mark the graph as partially complete with a reason.

Source

pub fn add_node( &mut self, kind: NodeKind, name: impl Into<String>, trust_zone: TrustZone, ) -> NodeId

Add a node, returns its ID.

Source

pub fn add_node_with_metadata( &mut self, kind: NodeKind, name: impl Into<String>, trust_zone: TrustZone, metadata: HashMap<String, String>, ) -> NodeId

Add a node with metadata, returns its ID.

Source

pub fn add_edge(&mut self, from: NodeId, to: NodeId, kind: EdgeKind) -> EdgeId

Add a directed edge, returns its ID.

Source

pub fn edges_from(&self, id: NodeId) -> impl Iterator<Item = &Edge>

Outgoing edges from a node.

Source

pub fn edges_to(&self, id: NodeId) -> impl Iterator<Item = &Edge>

Incoming edges to a node.

Source

pub fn authority_sources(&self) -> impl Iterator<Item = &Node>

All authority-bearing source nodes (Secret + Identity). These are the BFS start set for propagation analysis.

Source

pub fn nodes_of_kind(&self, kind: NodeKind) -> impl Iterator<Item = &Node>

All nodes of a given kind.

Source

pub fn nodes_in_zone(&self, zone: TrustZone) -> impl Iterator<Item = &Node>

All nodes in a given trust zone.

Source

pub fn node(&self, id: NodeId) -> Option<&Node>

Get a node by ID.

Source

pub fn edge(&self, id: EdgeId) -> Option<&Edge>

Get an edge by ID.

Trait Implementations§

Source§

impl Clone for AuthorityGraph

Source§

fn clone(&self) -> AuthorityGraph

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AuthorityGraph

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AuthorityGraph

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AuthorityGraph

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,