Skip to content

Instantly share code, notes, and snippets.

@dipeshdulal
Created July 12, 2020 02:48
Show Gist options
  • Save dipeshdulal/9c0f384f39acd4b9d2fc4ba543a0410b to your computer and use it in GitHub Desktop.
Save dipeshdulal/9c0f384f39acd4b9d2fc4ba543a0410b to your computer and use it in GitHub Desktop.
Chat Protocol Buffer
syntax = "proto3";
option go_package = "./chatpb";
package chatpb;
service ChatService {
rpc JoinChannel(Channel) returns (stream Message) {}
rpc SendMessage(stream Message) returns (MessageAck) {}
}
message Channel {
string name = 1;
string senders_name = 2;
}
message Message {
string sender = 1;
Channel channel = 2;
string message = 3;
}
message MessageAck {
string status = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment