MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / intent_status_to_proto

Function intent_status_to_proto

libatomic/src/daemon/convert.rs:92–102  ·  view source on GitHub ↗

Intent lifecycle strings (vault_intent_*) ↔ the proto entity status.

(status: &str)

Source from the content-addressed store, hash-verified

90
91/// Intent lifecycle strings (vault_intent_*) ↔ the proto entity status.
92pub fn intent_status_to_proto(status: &str) -> Option<pb::VaultEntityStatus> {
93 match status {
94 "backlog" => Some(pb::VaultEntityStatus::Backlog),
95 "in_progress" => Some(pb::VaultEntityStatus::InProgress),
96 "needs-review" => Some(pb::VaultEntityStatus::NeedsReview),
97 "done" | "completed" => Some(pb::VaultEntityStatus::Done),
98 "planned" => Some(pb::VaultEntityStatus::Planned),
99 "icebox" => Some(pb::VaultEntityStatus::Suspended),
100 _ => None,
101 }
102}
103
104pub fn intent_status_from_proto(status: pb::VaultEntityStatus) -> Option<&'static str> {
105 match status {

Callers 3

update_vault_entityMethod · 0.85
list_vault_entriesMethod · 0.85
get_vault_contextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected