init small ssh-cli to accept commands over SSH and operate local locks
All checks were successful
Build Container / Build Container (push) Successful in 1m42s

This commit is contained in:
lilly 2026-07-18 21:10:32 +02:00
commit 504d64ea57
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
5 changed files with 2062 additions and 0 deletions

63
ssh-cli/src/api_models.rs Normal file
View file

@ -0,0 +1,63 @@
use serde::{Deserialize, Serialize};
#[allow(unused)]
#[derive(Debug, Eq, PartialEq, Hash, Deserialize)]
pub struct ApiLock {
pub id: String,
pub name: String,
pub status: ApiLockStatus,
}
#[allow(unused)]
#[derive(Debug, Eq, PartialEq, Hash, Deserialize)]
pub struct ApiLockStatus {
pub is_unreachable: bool,
#[serde(default)]
pub is_low_batteray: bool,
pub is_error_jammed: bool,
pub lock_target_level: String,
pub lock_state: String,
pub activity_state: String,
}
#[allow(unused)]
#[derive(Debug, Eq, PartialEq, Hash, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum LockTargetLevel {
LOCKED,
UNLOCKED,
OPEN,
}
#[allow(unused)]
#[derive(Debug, Eq, PartialEq, Hash, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum LockState {
UNKNOWN,
LOCKED,
UNLOCKED,
}
#[allow(unused)]
#[derive(Debug, Eq, PartialEq, Hash, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum LockActivityState {
UNKNOWN,
LOCKING,
UNLOCKING,
STABLE,
}
#[allow(unused)]
#[derive(Debug, Eq, PartialEq, Hash, Serialize)]
pub struct LockOperationRequest {
pub desired_state: DesiredLockState,
}
#[allow(unused)]
#[derive(Debug, Eq, PartialEq, Hash, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum DesiredLockState {
OPEN,
CLOSED,
}