Skip to main content

ApiRunStore

Struct ApiRunStore 

Source
pub struct ApiRunStore { /* private fields */ }
Expand description

RunStore implementation that communicates with the API server via HTTP.

Implementations§

Source§

impl ApiRunStore

Source

pub fn new(base_url: &str, token: &str) -> Self

Trait Implementations§

Source§

impl ApiKeyStore for ApiRunStore

Source§

fn create_api_key( &self, _req: NewApiKey, ) -> Pin<Box<dyn Future<Output = Result<ApiKey, StoreError>> + Send + '_>>

Create a new API key.
Source§

fn find_api_key_by_prefix( &self, _prefix: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<ApiKey>, StoreError>> + Send + '_>>

Find an API key by its prefix (first 8 chars). Read more
Source§

fn find_api_key_by_id( &self, _id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<ApiKey>, StoreError>> + Send + '_>>

Find an API key by ID.
Source§

fn list_api_keys_by_user( &self, _user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiKey>, StoreError>> + Send + '_>>

List all API keys for a user.
Source§

fn update_api_key( &self, _id: Uuid, _update: ApiKeyUpdate, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Update an API key.
Source§

fn touch_api_key( &self, _id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Record that an API key was used (updates last_used_at).
Source§

fn delete_api_key( &self, _id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Delete an API key.
Source§

impl ApprovalDelegationStore for ApiRunStore

Source§

fn create_delegation( &self, _req: NewApprovalDelegation, ) -> Pin<Box<dyn Future<Output = Result<ApprovalDelegation, StoreError>> + Send + '_>>

Create a new delegation. Read more
Source§

fn find_delegation_by_id( &self, _id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<ApprovalDelegation>, StoreError>> + Send + '_>>

Find a delegation by ID. Returns None if not found. Read more
Source§

fn list_active_delegations( &self, _filter: DelegationFilter, _page: u32, _per_page: u32, ) -> Pin<Box<dyn Future<Output = Result<Page<ApprovalDelegation>, StoreError>> + Send + '_>>

List one page of the delegations matching filter, newest first. Read more
Source§

fn find_active_delegation( &self, _from_user_id: Uuid, _to_user_id: Uuid, _workflow_name: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<ApprovalDelegation>, StoreError>> + Send + '_>>

Find an active delegation from from_user_id to to_user_id whose workflow filter matches workflow_name. Returns None if there is none. Read more
Source§

fn delete_delegation( &self, _id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Revoke a delegation by ID. Read more
Source§

impl ArtifactStore for ApiRunStore

Source§

fn create_artifact( &self, artifact: NewArtifact, ) -> Pin<Box<dyn Future<Output = Result<Artifact, StoreError>> + Send + '_>>

Record a new artifact. Read more
Source§

fn get_artifact( &self, _step_id: Uuid, _name: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<Artifact>, StoreError>> + Send + '_>>

Look up one artifact of a step by name. Read more
Source§

fn list_artifacts_for_run( &self, run_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<Artifact>, StoreError>> + Send + '_>>

List every artifact of a run, across all steps and attempts. Read more
Source§

fn find_artifact_for_input( &self, lookup: ArtifactLookup, ) -> Pin<Box<dyn Future<Output = Result<Option<Artifact>, StoreError>> + Send + '_>>

Resolve the artifact a step declared as an input. Read more
Source§

fn find_artifact_by_sha256( &self, _sha256: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<Artifact>, StoreError>> + Send + '_>>

Find any artifact with the given SHA-256 hash. Read more
Source§

fn count_artifacts_by_storage_key( &self, _storage_key: &str, ) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + '_>>

Count artifacts that share the same storage key. Read more
Source§

fn list_all_storage_keys( &self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + '_>>

List every distinct storage key referenced by at least one artifact. Read more
Source§

impl AuditLogStore for ApiRunStore

Source§

fn append_audit_log( &self, _entry: NewAuditLogEntry, ) -> Pin<Box<dyn Future<Output = Result<AuditLogEntry, StoreError>> + Send + '_>>

Persist a new audit log entry. Read more
Source§

fn list_audit_logs( &self, _filter: AuditLogFilter, _page: u32, _per_page: u32, ) -> Pin<Box<dyn Future<Output = Result<Page<AuditLogEntry>, StoreError>> + Send + '_>>

List audit log entries matching the given filter, with pagination. Read more
Source§

impl Clone for ApiRunStore

Source§

fn clone(&self) -> Self

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 ApiRunStore

Source§

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

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

impl LogStore for ApiRunStore

Source§

fn append_logs( &self, _entries: NewLogEntries, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Persist a batch of log lines. Read more
Source§

fn get_logs( &self, _run_id: Uuid, _filter: LogFilter, _cursor: Option<Uuid>, _limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<LogEntry>, StoreError>> + Send + '_>>

Retrieve log entries for a run with cursor-based pagination. Read more
Source§

impl RunStore for ApiRunStore

Source§

fn create_run( &self, req: NewRun, ) -> Pin<Box<dyn Future<Output = Result<RunCreation, StoreError>> + Send + '_>>

Create a new run in Pending status. Read more
Source§

fn find_run_by_idempotency_key( &self, _key: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<Run>, StoreError>> + Send + '_>>

Look up the run bound to an idempotency key. Read more
Source§

fn get_run( &self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<Run>, StoreError>> + Send + '_>>

Get a run by ID. Returns None if not found.
Source§

fn list_runs( &self, _filter: RunFilter, _page: u32, _per_page: u32, ) -> Pin<Box<dyn Future<Output = Result<Page<Run>, StoreError>> + Send + '_>>

List runs matching the given filter, with pagination. Read more
Source§

fn update_run_status( &self, id: Uuid, new_status: RunStatus, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Update a run’s status with FSM validation. Read more
Source§

fn update_run( &self, id: Uuid, update: RunUpdate, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Apply a partial update to a run. Read more
Source§

fn pick_next_pending( &self, lease: Option<LeaseRequest>, ) -> Pin<Box<dyn Future<Output = Result<Option<Run>, StoreError>> + Send + '_>>

Atomically pick the oldest pending run and transition it to Running. Read more
Source§

fn renew_lease( &self, id: Uuid, lease: LeaseRequest, ) -> Pin<Box<dyn Future<Output = Result<DateTime<Utc>, StoreError>> + Send + '_>>

Extend the worker lease on a run and return the new expiry. Read more
Source§

fn reap_expired_leases( &self, _limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReapedRun>, StoreError>> + Send + '_>>

Recover runs whose worker lease expired, at most limit per call. Read more
Source§

fn claim_due_approval_deadlines( &self, _limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<Step>, StoreError>> + Send + '_>>

Atomically claim approval steps whose SLA deadline has passed. Read more
Source§

fn list_purgeable_runs( &self, _policy: &PurgePolicy, _batch_size: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<PurgeableRun>, StoreError>> + Send + '_>>

List runs eligible for purging according to the given policy. Read more
Source§

fn delete_run( &self, _id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + '_>>

Delete a run and all its associated data (steps, step dependencies). Read more
Source§

fn create_step( &self, req: NewStep, ) -> Pin<Box<dyn Future<Output = Result<Step, StoreError>> + Send + '_>>

Create a new step for a run. Read more
Source§

fn update_step( &self, id: Uuid, update: StepUpdate, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Apply a partial update to a step after execution. Read more
Source§

fn get_step( &self, _id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<Step>, StoreError>> + Send + '_>>

Get a single step by ID. Returns None if not found.
Source§

fn record_step_approval( &self, _step_id: Uuid, _approval: StepApproval, ) -> Pin<Box<dyn Future<Output = Result<Step, StoreError>> + Send + '_>>

Record a vote on an approval gate and return the updated step. Read more
Source§

fn list_steps( &self, run_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<Step>, StoreError>> + Send + '_>>

List all steps for a run, ordered by position ascending.
Source§

fn get_stats( &self, _filter: RunFilter, ) -> Pin<Box<dyn Future<Output = Result<RunStats, StoreError>> + Send + '_>>

Get aggregated statistics across runs matching the filter. Read more
Source§

fn get_stats_history( &self, _filter: StatsHistoryFilter, ) -> Pin<Box<dyn Future<Output = Result<Vec<StatsHistoryBucket>, StoreError>> + Send + '_>>

Get time-bucketed historical statistics for trend charts. Read more
Source§

fn create_step_dependencies( &self, deps: Vec<NewStepDependency>, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Create step dependency edges in batch. Read more
Source§

fn list_step_dependencies( &self, _run_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<StepDependency>, StoreError>> + Send + '_>>

List all step dependencies for a given run. Read more
Source§

fn update_run_returning( &self, id: Uuid, update: RunUpdate, ) -> Pin<Box<dyn Future<Output = Result<Run, StoreError>> + Send + '_>>

Apply a partial update to a run and return the updated run. Read more
Source§

impl ScheduleStore for ApiRunStore

Source§

fn create_schedule( &self, _req: NewSchedule, ) -> Pin<Box<dyn Future<Output = Result<Schedule, StoreError>> + Send + '_>>

Create a new schedule. Read more
Source§

fn find_schedule_by_id( &self, _id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<Schedule>, StoreError>> + Send + '_>>

Find a schedule by ID. Returns None if not found.
Source§

fn list_schedules( &self, _page: u32, _per_page: u32, ) -> Pin<Box<dyn Future<Output = Result<Page<Schedule>, StoreError>> + Send + '_>>

List schedules with pagination, ordered by created_at descending.
Source§

fn update_schedule( &self, _id: Uuid, _update: ScheduleUpdate, ) -> Pin<Box<dyn Future<Output = Result<Schedule, StoreError>> + Send + '_>>

Update a schedule by ID. Read more
Source§

fn delete_schedule( &self, _id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Delete a schedule by ID. Read more
Source§

fn claim_due_schedules( &self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Schedule>, StoreError>> + Send + '_>>

Atomically claim enabled schedules whose next_trigger_at is in the past, setting last_triggered_at = now and next_trigger_at = None. Read more
Source§

impl SecretStore for ApiRunStore

Source§

fn get_secret( &self, key: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<Secret>, StoreError>> + Send + '_>>

Retrieve a secret by key. Read more
Source§

fn set_secret( &self, _key: &str, _value: &str, ) -> Pin<Box<dyn Future<Output = Result<Secret, StoreError>> + Send + '_>>

Create or update a secret. Read more
Source§

fn delete_secret( &self, _key: &str, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + '_>>

Delete a secret by key. Read more
Source§

fn list_secret_keys( &self, _prefix: &str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + '_>>

List all secret keys matching a prefix. Read more
Source§

fn list_secrets( &self, _prefix: &str, _page: u32, _per_page: u32, ) -> Pin<Box<dyn Future<Output = Result<Page<SecretMetadata>, StoreError>> + Send + '_>>

List secret metadata matching a prefix, with pagination. Read more
Source§

fn secret_key_status( &self, ) -> Pin<Box<dyn Future<Output = Result<KeyVersionStatus, StoreError>> + Send + '_>>

Report how the configured key ring lines up with the stored secrets. Read more
Source§

fn rotate_secrets( &self, _request: RotationRequest, ) -> Pin<Box<dyn Future<Output = Result<RotationBatch, StoreError>> + Send + '_>>

Re-encrypt one batch of secrets towards the target key version. Read more
Source§

impl UserStore for ApiRunStore

Source§

fn create_user( &self, _req: NewUser, ) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + '_>>

Create a new user. Read more
Source§

fn find_user_by_email( &self, _email: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + '_>>

Find a user by email. Returns None if not found.
Source§

fn find_user_by_username( &self, _username: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + '_>>

Find a user by username. Returns None if not found.
Source§

fn find_user_by_id( &self, _id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + '_>>

Find a user by ID. Returns None if not found.
Source§

fn count_users( &self, ) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + '_>>

Count all users in the store.
Source§

fn list_users( &self, _page: u32, _per_page: u32, ) -> Pin<Box<dyn Future<Output = Result<Page<User>, StoreError>> + Send + '_>>

List users with pagination, ordered by created_at descending.
Source§

fn delete_user( &self, _id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Delete a user by ID. Read more
Source§

fn update_user_role( &self, _id: Uuid, _is_admin: bool, ) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + '_>>

Update a user’s admin role. Read more
Source§

fn update_user_password( &self, _id: Uuid, _password_hash: String, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + '_>>

Update a user’s password hash. Read more
Source§

fn list_user_groups( &self, _user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + '_>>

List the groups a user belongs to, sorted by name. Read more
Source§

fn set_user_groups( &self, _user_id: Uuid, _groups: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + '_>>

Replace the groups a user belongs to. 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> RunCreator for T
where T: RunStore + ?Sized,

Source§

fn create_run( &self, req: NewRun, ) -> Pin<Box<dyn Future<Output = Result<RunCreation, EngineError>> + Send + '_>>

Create a new workflow run. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Store for T

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 = !

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

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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