syntax = "proto3"; package api; import "google/api/annotations.proto"; option go_package = "fm-upload/api"; // The greeting service definition. service Greeter { // Sends a greeting rpc Ping (PingRequest) returns (PingReply) { option (google.api.http) = { get: "/ping" }; } rpc Upload (UploadRequest) returns (UploadReply) { option (google.api.http) = { post: "/upload" body: "*" }; } } // The request message containing the user's name. message PingRequest { string name = 1; } // The response message containing the greetings message PingReply { string message = 1; } message UploadRequest { string name = 1; string type = 2; string hash = 3; bytes file = 4; } // The response message containing the greetings message UploadReply { string message = 1; }