Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (56 sloc) 1.18 KB
syntax = "proto3";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "pb/time/time.proto";
package pedge.timetrack;
option go_package = "timetrack";
message Task {
string id = 1;
}
message Tasks {
repeated Task task = 1;
}
message Range {
string task_id = 1;
uint64 id = 2;
pb.time.TimestampRange timestamp_range = 3;
}
message Ranges {
repeated Range Range = 1;
}
message RangeReference {
string task_id = 1;
uint64 id = 2;
}
service API {
rpc Create(Task) returns (google.protobuf.Empty) {
option (google.api.http) = {
get: "/create/{id}"
};
}
rpc Start(Task) returns (Range) {
option (google.api.http) = {
get: "/start/{id}"
};
}
rpc Stop(Task) returns (Range) {
option (google.api.http) = {
get: "/stop/{id}"
};
}
rpc List(Task) returns (Ranges) {
option (google.api.http) = {
get: "/list/{id}"
};
}
rpc Delete(Task) returns (google.protobuf.Empty) {
option (google.api.http) = {
get: "/delete/{id}"
};
}
rpc DeleteRange(RangeReference) returns (google.protobuf.Empty) {
option (google.api.http) = {
get: "/deleteRange/{task_id}/{id}"
};
}
}