HW13 WIP
parent
16a9c8f9bc
commit
83495e1e79
|
@ -2,6 +2,46 @@ syntax = "proto3";
|
|||
|
||||
package event;
|
||||
|
||||
message Event {
|
||||
// TODO
|
||||
option go_package = "event";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
service CalendarRPC {
|
||||
rpc Create(event) returns (eventID);
|
||||
rpc Update(eventWithID) returns (google.protobuf.Empty);
|
||||
rpc Delete(eventID) returns (google.protobuf.Empty);
|
||||
rpc List(google.protobuf.Empty) returns (eventList);
|
||||
rpc GetByID(eventID) returns (eventList);
|
||||
rpc GetByDay(date) returns (eventList);
|
||||
rpc GetByWeek(date) returns (eventList);
|
||||
rpc GetByMonth(date) returns (eventList);
|
||||
}
|
||||
|
||||
message event {
|
||||
string ID = 1;
|
||||
string title = 2;
|
||||
google.protobuf.Timestamp date = 3;
|
||||
google.protobuf.Duration latency = 4;
|
||||
string note = 5;
|
||||
string UserID = 6;
|
||||
google.protobuf.Duration notyfyTime = 7;
|
||||
}
|
||||
|
||||
message eventList {
|
||||
repeated event events = 1;
|
||||
}
|
||||
|
||||
message eventID {
|
||||
string ID = 1;
|
||||
}
|
||||
|
||||
message eventWithID {
|
||||
string ID = 1;
|
||||
event event = 2;
|
||||
}
|
||||
|
||||
message date {
|
||||
google.protobuf.Timestamp date = 1;
|
||||
}
|
||||
|
|
|
@ -6,8 +6,10 @@ require (
|
|||
github.com/BurntSushi/toml v0.3.1
|
||||
github.com/amitrai48/logger v0.0.0-20190214092904-448001c055ec
|
||||
github.com/go-sql-driver/mysql v1.5.0
|
||||
github.com/golang/protobuf v1.4.2 // indirect
|
||||
github.com/mattn/go-shellwords v1.0.10 // indirect
|
||||
github.com/stretchr/testify v1.4.0
|
||||
go.uber.org/zap v1.15.0 // indirect
|
||||
google.golang.org/protobuf v1.25.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.3.0 // indirect
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue