Skip to content

snarky-puppy/protoc-gen-go-grpc-fixture

Repository files navigation

protoc-gen-go-grpc-fixture

protoc-gen-go-grpc-fixture generates gRPC client stubs which read from a fixture file instead of making a real gRPC call.

Installation

go install github.com/snarky-puppy/protoc-gen-go-grpc-fixture@latest

Also required:

Usage

with protoc

protoc --go_out=. --go-grpc_out=. --go-grpc-fixture_out=. petstore.proto 

with buf

version: v1

plugins:
  - name: go
    out: .
    opt: paths=source_relative

  - name: go-grpc
    out: .
    opt: paths=source_relative

  - name: go-grpc-fixture
    out: .
    opt: paths=source_relative

About

Generate gRPC client implementation which return a fixture

Resources

License

Stars

Watchers

Forks

Packages

No packages published