Giter VIP home page Giter VIP logo

grpcgen's Introduction


| || _ | | || || || || | | | | || | || | _ || || || || || | | | __ | ||| | || || || | __ | | | | | || || __ || || || || || || _ | | || || | | || | | | | || || | | | | | |||| |||| |||||___||| |__|

GRPC Gen

gRPCGen is a simple program for generating test from gRPC code generated by protobufs. gRPCGen will create code for both connecting to a gRPC service, and code for testing its various methods.

Installation

gRPCGen expects goimports. Install both using

go install golang.org/x/tools/cmd/goimports
go install github.com/yummydev/grpcgen

Usage

  1. Create a new package where all test code will reside
  2. Modify the template below with your code.
package sds

import (
	"github.com/pizzahutdigital/protobufs/store"
)

//go:generate grpcgen run --package . --target Client
var Client storedata.StoreDataClient

where the target ("Client" in this case), is the interface type to generate code for. 3. cd to the directory and run go:generate (replace --package . with the import path to run go:generate from anywhere)

CLI Usage

Usage: grpcgen [command]

Available Commands: help Help about any command run Run Test Generation

Flags: -h, --help help for grpcgen --package string path (import path or relative) to the package --target string name of the global variable that should serve as the client for test

Use "grpcgen [command] --help" for more information about a command.

grpcgen's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.