2021-05-05 08:32:35 +02:00
|
|
|
syntax = "proto3";
|
2021-05-05 11:14:17 +02:00
|
|
|
package schnutibox.v1;
|
2021-05-05 08:32:35 +02:00
|
|
|
option go_package = "go.xsfx.dev/schnutibox/pkg/api/v1";
|
2021-05-05 11:14:17 +02:00
|
|
|
import "google/api/annotations.proto";
|
2021-08-05 09:43:35 +02:00
|
|
|
import "google/protobuf/duration.proto";
|
2021-05-05 08:32:35 +02:00
|
|
|
|
2021-05-05 11:14:17 +02:00
|
|
|
service IdentifierService {
|
|
|
|
rpc Identify (IdentifyRequest) returns (IdentifyResponse) {
|
|
|
|
option (google.api.http) = {
|
2021-08-13 14:43:03 +02:00
|
|
|
post: "/api/v1/identify"
|
2021-05-05 11:14:17 +02:00
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
2021-05-05 08:32:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message IdentifyRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
2021-05-05 11:14:17 +02:00
|
|
|
message IdentifyResponse {
|
2021-05-05 08:32:35 +02:00
|
|
|
string name = 1;
|
2021-05-05 11:14:17 +02:00
|
|
|
repeated string uris = 2;
|
2021-05-05 08:32:35 +02:00
|
|
|
}
|
2021-08-05 09:43:35 +02:00
|
|
|
|
|
|
|
service TimerService {
|
|
|
|
rpc Create(Timer) returns (Timer) {
|
|
|
|
option (google.api.http) = {
|
2021-08-13 14:43:03 +02:00
|
|
|
post: "/api/v1/timer"
|
2021-08-05 09:43:35 +02:00
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc Get(TimerEmpty) returns (Timer) {
|
|
|
|
option (google.api.http) = {
|
2021-08-13 14:43:03 +02:00
|
|
|
get: "/api/v1/timer"
|
2021-08-05 09:43:35 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message Timer {
|
|
|
|
google.protobuf.Duration duration = 1;
|
|
|
|
google.protobuf.Duration current = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TimerEmpty {}
|