Skip to main content

protoc

micro v1.0 protoc --go_out=plugins=micro:./ --proto_path=. ./aicloud/srv/payroll/proto/payment/payment.proto

protoc --go_out=plugins=grpc:. ./proto/login.proto

protoc --proto_path=. --go_out=plugins=grpc:. --micro_out=. ./proto/login/test.proto

syntax = "proto3";

package login;

// define a service
service LoginService {
// define the interface and data type
rpc DoLogin (DoLoginRequest) returns (DoLoginResponse) {}
}

// define the data type of request
message DoLoginRequest {
string uname = 1;
string passwd = 2;
}

// define the data type of response
message DoLoginResponse {
string message = 1;
int64 code = 2;
}