syntax = "proto3"; // TODO: couldn't solve out how to set "main" package. Needs to fix by hand after export // export: // protoc --proto_path=./ --go_out=./ --go-grpc_out=./ --go_opt=paths=source_relative tree.proto option go_package = "."; package main; service TreeManager { rpc GetSummery(TreeRequest) returns (Tree) {} rpc GetFile(FileRequest) returns (FileContent) {} } message FileRequest { string id = 1; } message TreeRequest { message Filter { string key = 1; string value = 2; } optional string path = 1; repeated Filter filter = 2; } message TreeFile { string name = 1; repeated string category = 2; string description = 3; string id = 4; string lang = 5; string copyright = 6; repeated string tags = 7; string created = 8; } message Tree { repeated TreeFile files = 1; map tags = 2; map categories = 3; } message FileContent { TreeFile file = 1; string content = 2; }