Skip to content

Instantly share code, notes, and snippets.

@acacio
Last active September 10, 2017 16:39
Show Gist options
  • Save acacio/1897281a42b15a106f8d964129203053 to your computer and use it in GitHub Desktop.
Save acacio/1897281a42b15a106f8d964129203053 to your computer and use it in GitHub Desktop.
Wiki proto definition
#!/bin/sh
#protoc --go_out=plugins=grpc,import_path=.:. *.proto
protoc --go_out=. -owiki.desc *.proto
protoc --js_out=. *.proto
syntax = "proto3";
import "google/protobuf/timestamp.proto";
package wikis;
message Wiki {
string id = 1;
string canonical_slug = 2; // Equivalent to absolute path: "/wiki/myid"
string author = 3;
bytes page = 4;
google.protobuf.Timestamp creation_date = 5;
}
message WikiList {
repeated Wiki wikis = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment