protoc_gen_go_grpc_fixture

package module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2023 License: MIT Imports: 9 Imported by: 0

README

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ArraySize = 5
View Source
var EnableDebug = false
View Source
var MaxDepth = 5

Functions

func Fixture

func Fixture[T any](fileName string, rv T) (T, error)

func Populate added in v1.0.5

func Populate(v interface{})

Populate recursively populates a struct with random values.

func SetPopulateOptions added in v1.0.5

func SetPopulateOptions(arraySize, maxDepth int, enableDebug bool)

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL