Your ROOT_URL in app.ini is http://git.slaventius.ru/ but you are visiting http://37.143.12.169/test3k/authDB/src/commit/c4bb7fc554c21a29896765b83d2cdf66019b0485/api/proto/auth.proto You should set ROOT_URL correctly, otherwise the web may not work correctly.
 
 
 
 
 

46 lines
1.1 KiB

syntax="proto3";
package auth;
option go_package = "./";
// go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
// go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
// go get google.golang.org/grpc
// protoc -I=api/proto --go_out=pkg/api --go_opt=paths=source_relative --go-grpc_out=pkg/api --go-grpc_opt=paths=source_relative api/proto/auth.proto
// Логин пользователя
message LoginRequest {
string Login = 1;
string Password = 2;
}
message LoginResponse {
int32 ID = 1;
}
// Регистрация пользователя
message RegistrationRequest {
string Login = 1;
string Email = 2;
}
message RegistrationResponse {
string Code = 1;
string Email = 2;
}
// Подтверждение пользователя
message ConfirmationRequest {
string Code = 1;
}
message ConfirmationResponse {
int32 ID = 1;
}
// ...
service AuthDB {
rpc Login(LoginRequest) returns (LoginResponse){}
rpc Registration(RegistrationRequest) returns(RegistrationResponse){}
rpc Confirmation(ConfirmationRequest) returns(ConfirmationResponse){}
}