Files
template/api/main.proto
T
2026-06-20 16:17:52 +07:00

33 lines
496 B
Protocol Buffer

syntax = "proto3";
package crabs.${REPO_NAME_SNAKE};
import "google/api/annotations.proto";
option go_package = "pkg/proto";
service ${REPO_NAME_PASCAL} {
rpc Ping(PingReq) returns (PingRsp) {
option (google.api.http) = {
get: "/api/ping"
};
}
rpc Echo(EchoReq) returns (EchoRsp) {
option (google.api.http) = {
post: "/api/echo"
};
}
}
message PingReq {}
message PingRsp {}
message EchoReq {
string text = 1;
}
message EchoRsp {
string text = 1;
}