refactor!: replace CLI with workspace scaffold for WASM provider service
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package whoareyou:provider@0.1.0;
|
||||
|
||||
interface lookup {
|
||||
record provider-info {
|
||||
name: string,
|
||||
version: string,
|
||||
}
|
||||
|
||||
record request {
|
||||
url: string,
|
||||
}
|
||||
|
||||
record response {
|
||||
status: u16,
|
||||
body: string,
|
||||
}
|
||||
|
||||
record comment {
|
||||
timestamp: option<s64>,
|
||||
title: option<string>,
|
||||
message: string,
|
||||
}
|
||||
|
||||
record entry {
|
||||
messages: list<string>,
|
||||
history: list<string>,
|
||||
comments: list<comment>,
|
||||
}
|
||||
|
||||
variant lookup-error {
|
||||
no-data,
|
||||
parse-failed(string),
|
||||
}
|
||||
|
||||
metadata: func() -> provider-info;
|
||||
requests: func(number: string) -> list<request>;
|
||||
parse: func(number: string, responses: list<response>) -> result<entry, lookup-error>;
|
||||
}
|
||||
|
||||
world provider {
|
||||
export lookup;
|
||||
}
|
||||
Reference in New Issue
Block a user