YETI
GithubDemo
1.0.0
1.0.0
  • YETI
  • Features
  • Getting Started
    • Why
    • Installation
    • Project Layout
    • NX commands
    • Playbook
    • NestJS Playbook
    • Scaffolding
  • Concepts
    • Introduction
    • Monorepo
    • DDD
    • Clean Architecture
  • Advanced
    • Content Management
    • Protobuf Tools
    • Protoc
    • Envoy
    • Style Guild
    • Angular Universal
    • Firebase
  • Modules
    • Apps
      • WebApp
      • Api
    • Libs
      • Admin
      • Blog
      • Core
      • Dashboard
      • Gen
      • Home
      • Not Found
      • Shared
  • GitOps
    • Build
    • Code Quality
    • API Docs
    • Release
    • CICD
  • DevOps
    • Database
    • Kubernetes
    • Deploy
  • Recipes
    • Authentication
    • Caching
    • Component Events from NGXS
    • Debouncing Actions
    • Dynamic Plugins
    • Immutability Helpers
    • Style Guide
    • Unit Testing
  • Community
    • Resources
    • Contributors
    • Contributing
  • FAQ
    • Yeti
    • Angular
    • GitBook
    • Awesome Links
  • Change Log
Powered by GitBook
On this page
  • Prerequisites
  • Developer Workflow
  • Info
  • Build
  • Lint
  • Format
  • Generate
  • Tools
  • grpcurl
  • ghz
  • Reference

Was this helpful?

  1. Advanced

Protobuf Tools

PreviousContent ManagementNextProtoc

Last updated 4 years ago

Was this helpful?

is a tool for Protobuf files:

  • that enforces good API design choices and structure.

  • that enforces compatibility at the source code or wire level

  • Configurable file that produces our extension of

Prerequisites

# buf: proto tool https://buf.build/docs/tour-1
brew tap bufbuild/buf
brew install buf
# or use `go get` to install Buf
GO111MODULE=on go get github.com/bufbuild/buf/cmd/buf

Developer Workflow

Info

# To list all files Buf is configured to use:
buf ls-files
# To see your currently configured lint or breaking checkers:
buf check ls-lint-checkers
buf check ls-breaking-checkers
# To see all available lint checkers independent of configuration/defaults:
 buf check ls-lint-checkers --all

Build

# check
buf image build -o /dev/null
buf image build -o image.bin

Lint

buf check lint
# We can also output errors in a format you can then copy into your buf.yaml file
buf check lint --error-format=config-ignore-yaml
# Run breaking change detection
# for dev local
buf check breaking --against-input image.bin
buf check breaking --against-input '.git#branch=master'
# for CI
export HTTPS_GIT=https://github.com/xmlking/yeti.git
buf check breaking --against-input "$(HTTPS_GIT)#branch=master"

Format

make proto_format

Generate

make proto

Tools

grpcurl

# To use Buf-produced FileDescriptorSets with grpcurl on the fly:
grpcurl -protoset <(buf image build -o -) ...

ghz

# To use Buf-produced FileDescriptorSets with ghz on the fly:
ghz --protoset <(buf image build -o -) ...

Reference

Read

Buf
Linter
Breaking change detector
builder
Images
FileDescriptorSets
gRPC on Node.js with Buf and TypeScript
Style Guide
Buf docs
Buf Example
Buf Schema Registry