Data · 1 file
Sample Protocol Buffers File
A proto3 schema for Protocol Buffers and gRPC, compiled with protoc into code for any language.
Protocol Buffers · 1 KB
Protocol Buffers schema (.proto)
A proto3 schema with enums, nested messages, optional, repeated and map fields, an import and a gRPC service with a streaming method.
CC0 · free for any use · Verified by an independent tool · Report a problem
// Sample Protocol Buffers schema — samplefiles.com
syntax = "proto3";
package samplefiles.v1;
import "google/protobuf/timestamp.proto";
option go_package = "example.com/samplefiles/v1;samplefilesv1";
enum OrderStatus {
ORDER_STATUS_UNSPECIFIED = 0;
ORDER_STATUS_PENDING = 1;
ORDER_STATUS_PAID = 2;
ORDER_STATUS_SHIPPED = 3;
}
message Customer {
int64 id = 1;
string first_name = 2;
string last_name = 3;
string email = 4;
optional string phone = 5;
double balance = 6;
bool active = 7;
repeated string tags = 8;File details
Download from the command line
curl -L -o customer.proto https://files.samplefiles.com/data/proto/customer.protowget https://files.samplefiles.com/data/proto/customer.protohttps://files.samplefiles.com/data/proto/customer.protoprintf '%s %s\n' 96bbe65b78c7c9e0eea1a14602f228988a41013bc1b8dd0616e108fe44cead42 customer.proto | shasum -a 256 -cOr check the download in your browser with the checksum calculator.