Merge remote-tracking branch 'refs/remotes/origin/develop' into develop

This commit is contained in:
dragonmuffin 2024-08-16 16:27:01 +05:00
commit 9f48553f67
5 changed files with 9 additions and 65 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "proto"]
path = proto
url = https://git.sch9.ru/new_gate/contracts

View file

@ -1,7 +1,9 @@
gen:
@buf generate proto/tester
dev:
@buf generate proto
@make gen
@go run main.go
build:
@buf generate proto
@make gen
# TODO: build dockerfile

View file

@ -2,7 +2,7 @@ version: v1
managed:
enabled: true
go_package_prefix:
default: ms-auth/pkg/go/gen
default: ./pkg/go/gen
plugins:
- name: go
out: pkg/go/gen

1
proto Submodule

@ -0,0 +1 @@
Subproject commit 2a46d71423d3850a27b225f3780cd30497b591da

View file

@ -1,62 +0,0 @@
syntax = "proto3";
package proto.tester.v1;
import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";
service TesterService {
rpc CreateProblem (CreateProblemRequest) returns (CreateProblemResponse);
rpc ReadProblem (ReadProblemRequest) returns (ReadProblemResponse);
rpc UpdateProblem (UpdateProblemRequest) returns (google.protobuf.Empty);
rpc DeleteProblem (DeleteProblemRequest) returns (google.protobuf.Empty);
}
message CreateProblemRequest {
message Problem {
string name = 1;
string description = 2;
int32 time_limit = 3;
int32 memory_limit = 4;
}
string token = 1;
Problem problem = 2;
}
message CreateProblemResponse {
int32 id = 1;
}
message ReadProblemRequest {
string token = 1;
int32 id = 2;
}
message ReadProblemResponse {
message Problem {
int32 id = 1;
string name = 2;
string description = 3;
int32 time_limit = 4;
int32 memory_limit = 5;
google.protobuf.Timestamp created_at = 6;
google.protobuf.Timestamp updated_at = 7;
}
string token = 1;
Problem problem = 2;
}
message UpdateProblemRequest {
message Problem {
int32 id = 1;
optional string name = 2;
optional string description = 3;
optional int32 time_limit = 4;
optional int32 memory_limit = 5;
}
string token = 1;
Problem problem = 2;
}
message DeleteProblemRequest {
string token = 1;
int32 id = 2;
}