mod ball;
mod conversation;
use crate::boundary::Gesture;
pub(crate) fn gestures() -> Vec<Gesture> {
[
conversation::surface(),
ball::surface(),
super::start::surface(),
super::fan::surface(),
super::fork::surface(),
super::control::surface(),
super::fleet::surface(),
super::retarget::surface(),
super::query::surface(),
login(),
pins(),
enroll(),
crate::boundary::codec::config::tests::surface(),
]
.concat()
}
fn pins() -> Vec<Gesture> {
[true, false]
.into_iter()
.map(|pinned| {
Gesture::Act(crate::boundary::Action::Pin {
workspace: "ws".to_owned(),
pinned,
})
})
.collect()
}
fn login() -> Vec<Gesture> {
vec![Gesture::Act(crate::boundary::Action::Login {
workspace: "ws".to_owned(),
provider: "acme".to_owned(),
})]
}
fn enroll() -> Vec<Gesture> {
let request = |grade, address: Option<&str>| {
Gesture::Act(crate::boundary::Action::Enroll(
crate::registry::enroll::Request {
workspace: "ws".to_owned(),
name: "phone-1".to_owned(),
grade,
address: address.map(str::to_owned),
},
))
};
vec![
request(crate::registry::Grade::Operator, None),
request(crate::registry::Grade::Foot, None),
request(
crate::registry::Grade::Operator,
Some("engine.invalid:7737"),
),
]
}