WIT cleanups

This commit is contained in:
dr-frmr 2024-12-19 15:42:46 -05:00
parent b536548831
commit ca8c9e3ba0
No known key found for this signature in database
2 changed files with 15 additions and 12 deletions

View File

@ -1,7 +1,6 @@
interface chess { interface chess {
/// Our "chess protocol" request/response format. We'll always serialize these /// Our "chess protocol" request/response format. We'll always serialize these
/// to a byte vector and send them over IPC. /// to a byte vector and send them over IPC.
variant request { variant request {
/// lazy-load-blob: none. /// lazy-load-blob: none.
new-game(new-game-request), new-game(new-game-request),

View File

@ -7,24 +7,29 @@ interface contacts {
} }
variant request { variant request {
/// requires ReadNameOnly capability
/// lazy-load-blob: none. /// lazy-load-blob: none.
get-names, // requires read-names-only get-names,
/// requires Read capability
/// lazy-load-blob: none. /// lazy-load-blob: none.
get-all-contacts, // requires read get-all-contacts,
/// requires Read capability
/// lazy-load-blob: none. /// lazy-load-blob: none.
get-contact(string), // requires read get-contact(string),
/// requires Add capability
/// lazy-load-blob: none.
add-contact(string),
/// requires Add capability
/// lazy-load-blob: none. /// lazy-load-blob: none.
add-contact(string), // requires add
/// tuple<node, field, value> /// tuple<node, field, value>
/// add-field(tuple<string, string, string>),
/// requires Remove capability
/// lazy-load-blob: none. /// lazy-load-blob: none.
add-field(tuple<string, string, string>), // requires add remove-contact(string),
/// requires Remove capability
/// lazy-load-blob: none. /// lazy-load-blob: none.
remove-contact(string), // requires remove
/// tuple<node, field> /// tuple<node, field>
/// remove-field(tuple<string, string>),
/// lazy-load-blob: none.
remove-field(tuple<string, string>), // requires remove
} }
variant response { variant response {
@ -43,7 +48,6 @@ interface contacts {
/// lazy-load-blob: none. /// lazy-load-blob: none.
remove-field, remove-field,
/// any failed request will receive this response /// any failed request will receive this response
///
/// lazy-load-blob: none. /// lazy-load-blob: none.
err(string), err(string),
} }