gecko/vms/rpcchainvm/ghttp/ghttpproto/ghttp.proto

74 lines
1.6 KiB
Protocol Buffer

syntax = "proto3";
package ghttpproto;
message Userinfo {
string username = 1;
string password = 2;
bool passwordSet = 3;
}
message URL {
string scheme = 1;
string opaque = 2;
Userinfo user = 3;
string host = 4;
string path = 5;
string rawPath = 6;
bool forceQuery = 7;
string rawQuery = 8;
string fragment = 9;
}
message Element {
string key = 1;
repeated string values = 2;
}
message Certificates {
repeated bytes cert = 1;
}
message ConnectionState {
uint32 version = 1;
bool handshakeComplete = 2;
bool didResume = 3;
uint32 cipherSuite = 4;
string negotiatedProtocol = 5;
bool negotiatedProtocolIsMutual = 6;
string serverName = 7;
Certificates peerCertificates = 8;
repeated Certificates verifiedChains = 9;
repeated bytes signedCertificateTimestamps = 10;
bytes ocspResponse = 11;
bytes tlsUnique = 12;
}
message Request {
string method = 1;
URL url = 2;
string proto = 3;
int32 protoMajor = 4;
int32 protoMinor = 5;
repeated Element header = 6;
uint32 body = 7; // server ID
int64 contentLength = 8;
repeated string transferEncoding = 9;
string host = 10;
repeated Element form = 11;
repeated Element postForm = 12;
repeated string trailerKeys = 13;
string remoteAddr = 14;
string requestURI = 15;
ConnectionState tls = 16;
}
message HTTPRequest {
uint32 responseWriter = 1; // server ID
Request request = 2;
}
message HTTPResponse {}
service HTTP {
rpc Handle(HTTPRequest) returns (HTTPResponse);
}