Expand description
The first five minutes: the invite link, and what this machine is.
An invite is one link, because a link is what survives being pasted
into a chat window. The node mints it in exactly one place and it
looks like https://node.example/join?i=<id>&k=<secret>. Everything
choir join needs is inside it — which node, and the credential that
redeems one account there — so a person holding the link should never
have to take it apart by hand into an API base, an invite file and a
key path. Link::parse is that taking-apart, kept pure so the
whole of it is checkable without a node.
The second half is Role: the one-line answer to “what is this
machine set up as”, which choir doctor prints first and a bare
choir prints instead of the index. It is computed from paths that
are passed in rather than read here, so the caller’s own resolution
is what gets reported and the logic is testable against a temporary
directory.
§Examples
let link = choir_cli::join::Link::parse("https://node.example/join?i=abc&k=s3cret")
.expect("an invite link");
assert_eq!(link.api, "https://node.example");
assert_eq!(link.id, "abc");
assert_eq!(link.secret, "s3cret");Structs§
- Link
- An invite link taken apart into the three things redeeming one needs.
Enums§
- Role
- What one machine is set up as, in the vocabulary the documentation uses.
Functions§
- orientation
- The whole of
choirfor a machine that has nothing set up.