Skip to content

Instantly share code, notes, and snippets.

@victorbrndls
Created June 1, 2021 00:12
Show Gist options
  • Save victorbrndls/08b4a58813085f5857240ce9c90e9154 to your computer and use it in GitHub Desktop.
Save victorbrndls/08b4a58813085f5857240ce9c90e9154 to your computer and use it in GitHub Desktop.
syntax = "proto3";
package com.victorbrandalise;
service Bookstore {
rpc CreateBook(CreateBookRequest) returns (Book) {}
rpc ListBooks(ListBooksRequest) returns (ListBooksResponse) {}
}
message Book {
int32 id = 1;
string title = 2;
}
message CreateBookRequest {
Book book = 1;
}
message ListBooksRequest {}
message ListBooksResponse {
repeated Book books = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment