Skip to main content

Module storage

Module storage 

Source
Expand description

Storage Stored* wire types.

These are the serde-friendly DTOs persisted by the daemon’s SqlxStorage backends and surfaced over the REST API. They live here (not in zlayer-api) so SDK consumers can deserialize them without pulling in axum/sqlx/tokio.

Convenience constructors that allocate fresh UUIDs, plus the database-bound traits and concrete sqlx implementations, remain in zlayer-api::storage — that’s where the uuid dependency lives. This crate only carries the wire shapes (structs, enums, and pure-data Display impls).

Structs§

NodeIdentity
Per-node identity and key material.
OidcIdentity
One OIDC identity link row.
ReplicatedSecret
A secret replicated through Raft. Every node has the same encrypted blob; only nodes whose secrets_pubkey is in the current WrappedDek for this generation can decrypt.
StepResult
Result of executing a single step in a workflow run.
StoredDeployment
A stored deployment with metadata.
StoredEnvironment
A deployment/runtime environment (e.g. “dev”, “staging”, “prod”).
StoredNotifier
A stored notifier — a named notification channel that fires alerts to Slack, Discord, a generic webhook, or SMTP when triggered.
StoredPermission
A stored permission grant binding a subject (user or group) to a resource with a specific access level.
StoredProject
A project bundles a git source, build configuration, registry credential reference, linked deployments, and a default environment.
StoredSync
A stored sync resource (persistent record of a git-backed resource set).
StoredTask
A stored task — a named runnable script that can be executed on demand.
StoredUser
A stored user account.
StoredUserGroup
A stored user group for role-based access control.
StoredVariable
A stored variable — a plaintext key-value pair for template substitution in deployment specs. Variables are NOT encrypted (unlike secrets). They live in their own storage, separate from the encrypted secrets store.
StoredWorkflow
A stored workflow — a named sequence of steps forming a DAG that composes tasks, project builds, deploys, and sync applies.
TaskRun
A recorded execution of a task.
WorkflowRun
A recorded execution of a workflow.
WorkflowStep
A single step in a workflow.
WrappedDek
The cluster data-encryption key (DEK), wrapped per-node so each member can decrypt without ever holding a shared cluster-wide private key.

Enums§

BuildKind
How a project is built.
DeploymentStatus
Deployment lifecycle status.
NodeAffinity
Constrains which nodes are allowed to host a given secret’s decryptable form. Used as the value of ReplicatedSecret.node_affinity. None on a secret = unconstrained (any node may host); Some(...) = only matching nodes receive a wrap of this row’s DEK material, and the API gate filters reads accordingly.
NotifierConfig
Channel-specific configuration for a notifier.
NotifierKind
Notification channel type.
PermissionLevel
Access level for a resource permission, ordered from least to most privilege.
SubjectKind
Whether a permission subject is a user or a group.
TaskKind
Script type for a task.
UserRole
User role. Admins can do everything; regular users are constrained by per-resource permissions (added in a later phase).
WorkflowAction
The action a workflow step performs.
WorkflowRunStatus
Overall status of a workflow run.