message PublishContestRequest{
require int32 contest_id = 1;
// if set, user can only join after this timestamp(admin can bypass restriction
optional google.protobuf.Timestamp begin = 4;
}
service Contest {
rpc List(ListContestRequest) returns (ListContestResponse);
rpc FullInfo(Id) returns (ContestFullInfo);
rpc Create(CreateContestRequest) returns (Id);
rpc Update(UpdateContestRequest) returns (google.protobuf.Empty);
rpc Remove(RemoveRequest) returns (google.protobuf.Empty);
rpc Publish(PublishContestRequest) returns (google.protobuf.Empty);
rpc Unpublish(PublishRequest) returns (google.protobuf.Empty);
rpc Join(JoinContestRequest) returns (google.protobuf.Empty);
}
message UpdateContestRequest {
message Info {
optional string title = 1;
optional string content = 4;
optional string tags = 6;
// if there is password: enter original password to disable password, null
// to keep password. if there isn't: enter new password to set password,
// null to keep it password disable
optional string password = 5;
optional google.protobuf.Timestamp end_of_submission = 7;
}
required Info info = 1;
required int32 id = 2;
// can prevent duplicate request.
// It will return cache result if server the request with the same
// `request_id` has be processed.
optional string request_id = 3;
}
As the title said.
And this will also be part of
basis backend
.proto draft: