Skip to main content

IndexEntry

Struct IndexEntry 

Source
pub struct IndexEntry {
Show 13 fields pub description: Option<String>, pub retrieval_url: Option<String>, pub format_regex: Option<String>, pub default_gate: Option<Gate>, pub expires_at: Option<String>, pub last_rotated_at: Option<String>, pub rotate_every_days: Option<u32>, pub rotation_method: Option<RotationMethod>, pub required_scopes: Vec<String>, pub pattern_id: Option<String>, pub env_var: Option<String>, pub cache_ttl_seconds_max: Option<u64>, pub approve_on_use: Option<ApproveOnUse>,
}
Expand description

Metadata for a single secret stored in the global index.

Every field is optional: missing fields fall back to defaults from the linked pattern_id (when set; that inheritance is wired up in epic phase P2.4) or to the framework’s own defaults.

Fields§

§description: Option<String>

Free-text description shown in secrets describe, the UI’s inventory view, and the agent’s secrets.describe reply.

§retrieval_url: Option<String>

URL the user opens to obtain a fresh value (browser link). Used by the rotation flow’s [Open URL] button.

§format_regex: Option<String>

Regular expression the value must match. Validation is lazy — the regex is only compiled when secrets validate --format or the format-validation hook runs (epic phase P9.1).

§default_gate: Option<Gate>

Confirmation gate applied at value-read time.

§expires_at: Option<String>

ISO 8601 (YYYY-MM-DD) expiry date. Populated by the liveness validator (P9.2) when the upstream API exposes a valid_until field; can also be set by hand.

Stored as String rather than a typed date so the round-trip through TOML is lossless without pulling in a date crate. The validation framework parses on demand.

§last_rotated_at: Option<String>

ISO 8601 date of the last successful rotation. Drives advisory warnings via rotate_every_days.

§rotate_every_days: Option<u32>

Recommended rotation cadence in days. doctor warns when now > last_rotated_at + rotate_every_days - 7d.

§rotation_method: Option<RotationMethod>

How the secret is rotated. Defaults to RotationMethod::Manual at consumption time when absent.

§required_scopes: Vec<String>

Advisory list of API scopes required for this token to function.

§pattern_id: Option<String>

Reference into the devboy-secret-patterns catalogue. When set, the catalogue supplies sensible defaults for format_regex, retrieval_url, rotation_method, and default_expiry_days — see ADR-020 §3 and epic phase P2.4 for the wiring.

§env_var: Option<String>

CI/headless override for the env-store source: when present, the env-store reads <env_var> verbatim instead of the convention-based name. See ADR-021 §8.

§cache_ttl_seconds_max: Option<u64>

Per-secret upper bound on the source router’s adaptive cache TTL. Cannot raise it above the source default — see ADR-021 §7.

§approve_on_use: Option<ApproveOnUse>

Approve-on-use policy (P25). Defaults to Never at the consumer side when absent — see ApproveOnUse.

Trait Implementations§

Source§

impl Clone for IndexEntry

Source§

fn clone(&self) -> IndexEntry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for IndexEntry

Source§

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

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

impl Default for IndexEntry

Source§

fn default() -> IndexEntry

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for IndexEntry

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 Eq for IndexEntry

Source§

impl PartialEq for IndexEntry

Source§

fn eq(&self, other: &IndexEntry) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for IndexEntry

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
Source§

impl StructuralPartialEq for IndexEntry

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more