grpc-tads6/tasks.proto

27 lines
513 B
Protocol Buffer
Raw Permalink Normal View History

2024-06-06 00:46:09 +00:00
syntax = "proto3";
2024-06-08 00:16:57 +00:00
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
2024-06-06 00:46:09 +00:00
// Serviços (Service)
// Métodos que serão invocados remotamente
service TaskService {
2024-06-08 00:16:57 +00:00
rpc FindAll(google.protobuf.Empty) returns ( TaskList );
2024-06-06 02:09:10 +00:00
rpc InsertOne( Task ) returns ( Task );
2024-06-06 00:46:09 +00:00
}
// Mensagem (Message)
// Entidades
message Empty {}
message Task {
int32 id = 1;
string title = 2;
2024-06-08 00:16:57 +00:00
google.protobuf.Timestamp created_at = 3;
string type = 4;
2024-06-06 00:46:09 +00:00
}
message TaskList {
repeated Task tasks = 1;
}