Commit b6420a06 authored by hasan.slami's avatar hasan.slami

add proto and compile

parent a5f31b35
File added
This source diff could not be displayed because it is too large. You can view the blob instead.
// book.proto
syntax = "proto3";
package book;
enum Genre {
UNKNOWN = 0;
SCIENCE_FICTION = 1;
MYSTERY = 2;
BIOGRAPHY = 3;
HISTORY = 4;
}
message Author {
string first_name = 1;
string last_name = 2;
}
message Book {
string title = 1;
Author author = 2;
string isbn = 3;
uint32 publication_year = 4;
Genre genre = 5;
repeated string tags = 6;
}
service BookService {
rpc GetBook(BookRequest) returns (Book);
rpc AddBook(Book) returns (BookResponse);
}
message BookRequest {
string isbn = 1;
}
message BookResponse {
bool success = 1;
string message = 2;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment