P0: config, DTOs, source traits, fakes, error, state and module stubs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ariandClaude Sonnet 5.5 committed 2026-10-15 17:23:17 -04:00
1 parent aa9b0da962
commit 1802f97d94
22 files changed
+1736

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
//! Token CRUD and the `slinuxm token` CLI (WS-D owns this file).
//!
//! STUB: `TokenCmd` and `run` signatures are final. Tokens have the prefix
//! `slinuxm_`, 32 random bytes, only the sha256 hash is stored, and the
//! plaintext is printed once on create.
use anyhow::Result;
use clap::Subcommand;
use crate::config::Config;
#[derive(Debug, Clone, Subcommand)]
pub enum TokenCmd {
/// Create a token and print it once.
Create {
/// Unique token name.
name: String,
},
/// List tokens (never prints secrets).
List,
/// Revoke a token by name.
Revoke { name: String },
}
/// Execute a token subcommand against the DB at `config.auth.db_path`.
pub async fn run(_cmd: TokenCmd, _config: &Config) -> Result<()> {
todo!("WS-D D3/D4")
}