Last active
September 10, 2017 16:39
-
-
Save acacio/1897281a42b15a106f8d964129203053 to your computer and use it in GitHub Desktop.
Wiki proto definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#protoc --go_out=plugins=grpc,import_path=.:. *.proto | |
protoc --go_out=. -owiki.desc *.proto | |
protoc --js_out=. *.proto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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