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){} }