correct protoc syntax
This commit is contained in:
parent
43281eea6f
commit
a3007ba1b5
8
Makefile
8
Makefile
|
@ -29,3 +29,11 @@ forgeConfig.pb.go: forgeConfig.proto
|
||||||
|
|
||||||
patchset.pb.go: patchset.proto
|
patchset.pb.go: patchset.proto
|
||||||
autogenpb --proto patchset.proto
|
autogenpb --proto patchset.proto
|
||||||
|
|
||||||
|
protoc-test:
|
||||||
|
cd ~/go/src && protoc \
|
||||||
|
--proto_path=. \
|
||||||
|
--go_out=. \
|
||||||
|
--go_opt=Mgo.wit.com/lib/protobuf/forgepb/patchset.proto=go.wit.com/lib/protobuf/forgepb \
|
||||||
|
--go_opt=Mgo.wit.com/lib/protobuf/httppb/httpRequest.proto=go.wit.com/lib/protobuf/httppb \
|
||||||
|
go.wit.com/lib/protobuf/forgepb/patchset.proto
|
||||||
|
|
|
@ -4,6 +4,7 @@ syntax = "proto3";
|
||||||
|
|
||||||
package forgepb;
|
package forgepb;
|
||||||
|
|
||||||
|
import "go.wit.com/lib/protobuf/httppb/httpRequest.proto";
|
||||||
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
|
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
|
||||||
|
|
||||||
// Forge doesn't need this kind of specificity
|
// Forge doesn't need this kind of specificity
|
||||||
|
@ -60,22 +61,10 @@ message Patch {
|
||||||
|
|
||||||
// this is a "PATCH: [1/x]" series
|
// this is a "PATCH: [1/x]" series
|
||||||
message Patches { // `autogenpb:marshal` `autogenpb:gui:Patch`
|
message Patches { // `autogenpb:marshal` `autogenpb:gui:Patch`
|
||||||
message HttpRequest { // HttpRequest represents the essential fields of an incoming HTTP request.
|
|
||||||
string method = 1; // The request method, e.g., "GET", "POST".
|
|
||||||
string url = 2; // The full URL of the request, including scheme, host, path, and query string.
|
|
||||||
string route = 3; // just the route: "/add/" or "/find/"
|
|
||||||
string proto = 4; // The protocol version, e.g., "HTTP/1.1", "HTTP/2.0".
|
|
||||||
map<string, string> headers = 5; // The map of request headers. Header names are case-insensitive,
|
|
||||||
string remoteAddr = 6; // The remote IP address of the client, after resolving proxies.
|
|
||||||
string host = 7; // The host on which the URL is sought (www.wit.com)
|
|
||||||
string hostname = 8; // The hostname of the client if passed from the client (mylaptop.fun.me)
|
|
||||||
bytes body = 9; // The request body as raw bytes.
|
|
||||||
string namespace = 10; // When the body is a pb (always!). This is the pb namespace ("go.wit.com/lib/protobuf/virtpb")
|
|
||||||
}
|
|
||||||
string uuid = 1; // `autogenpb:uuid:2679065e-c81d-4a00-aca4-03c158a834fb`
|
string uuid = 1; // `autogenpb:uuid:2679065e-c81d-4a00-aca4-03c158a834fb`
|
||||||
string version = 2; // `autogenpb:version:v2.0.0`
|
string version = 2; // `autogenpb:version:v2.0.0`
|
||||||
repeated Patch Patches = 3;
|
repeated Patch Patches = 3;
|
||||||
HttpRequest httpRequest = 4; // who connected // rename httpRequest? This might make sense in our case
|
httppb.HttpRequest httpRequest = 4; // who connected // rename httpRequest? This might make sense in our case
|
||||||
string Error = 5; // when passing these around, if there is an error, store it here
|
string Error = 5; // when passing these around, if there is an error, store it here
|
||||||
}
|
}
|
||||||
message Patchset { // `autogenpb:marshal`
|
message Patchset { // `autogenpb:marshal`
|
||||||
|
|
Loading…
Reference in New Issue