Protocol Buffers

Protocol Buffers is a language-neutral system for defining structured data messages using a schema. In this course, protobuf defines the order service contract and generates Go message types and serialization code from .proto files.

Minimal example

proto
syntax = "proto3";

message Order {
  int64 id = 1;
  int64 user_id = 2;
}

Learn this concept

Lesson 7.12 · Protobuf contracts in Go

Used in exercises

Exercise 7.13 · gRPC order service