Files
go-zero/tools/goctl/rpc/test/proto/06_wellknown/events.proto

38 lines
812 B
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
syntax = "proto3";
// 场景06import google/protobuf/timestamp.proto (well-known type)
// 预期goctl 正常运行well-known type 的 pb.go 不会被重复生成(跳过)
package eventsvc;
option go_package = "example.com/demo/eventsvc";
import "google/protobuf/timestamp.proto";
message Event {
string id = 1;
string name = 2;
google.protobuf.Timestamp created_at = 3;
}
message CreateEventReq {
string name = 1;
}
message CreateEventReply {
Event event = 1;
}
message ListEventsReq {
int32 page = 1;
int32 size = 2;
}
message ListEventsReply {
repeated Event events = 1;
}
service EventService {
rpc CreateEvent(CreateEventReq) returns (CreateEventReply);
rpc ListEvents(ListEventsReq) returns (ListEventsReply);
}