diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-02-10 13:52:05 -0500 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-02-10 13:52:05 -0500 |
| commit | 4c5c287968863af8442f95931ef88de2f9f60e7a (patch) | |
| tree | 120e011e646adb68394c1a50e30f0ce5a7742e50 /cmd/mimi/proto | |
| parent | aabf9894594232754f0a0a8ce364a07c9aad5f2a (diff) | |
| download | x-4c5c287968863af8442f95931ef88de2f9f60e7a.tar.xz x-4c5c287968863af8442f95931ef88de2f9f60e7a.zip | |
cmd/mimi: introduce grpc
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/mimi/proto')
| -rw-r--r-- | cmd/mimi/proto/generate.go | 5 | ||||
| -rw-r--r-- | cmd/mimi/proto/scheduling.proto | 28 |
2 files changed, 33 insertions, 0 deletions
diff --git a/cmd/mimi/proto/generate.go b/cmd/mimi/proto/generate.go new file mode 100644 index 0000000..287cae7 --- /dev/null +++ b/cmd/mimi/proto/generate.go @@ -0,0 +1,5 @@ +package scheduling + +func init() {} + +//go:generate protoc --proto_path=. --go_out=../modules/scheduling --go_opt=paths=source_relative --go-grpc_out=../modules/scheduling --go-grpc_opt=paths=source_relative --twirp_out=../modules/scheduling --twirp_opt=paths=source_relative scheduling.proto diff --git a/cmd/mimi/proto/scheduling.proto b/cmd/mimi/proto/scheduling.proto new file mode 100644 index 0000000..ed63a11 --- /dev/null +++ b/cmd/mimi/proto/scheduling.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package within.website.x.mimi.scheduling; +option go_package = "within.website/x/cmd/mimi/modules/scheduling"; + +service Scheduling { + rpc ParseEmail(ParseReq) returns (ParseResp); +} + +message ConversationMember { + string role = 1; + string name = 2; + string email = 3; +} + +message ParseReq { + string month = 1; + repeated ConversationMember conversation_members = 2; + string message = 3; + string date = 4; +} + +message ParseResp { + string start_time = 1; + string duration = 2; + string summary = 3; + repeated ConversationMember attendees = 4; + string location = 5; +} |
