Code Monkey home page Code Monkey logo

letmegrpc's Introduction

We are looking for a maintainer to take over this repository, file an issue if you are interested.

letmegrpc

letmegrpc generates a web form gui from a grpc definition.

Build Status

Installation

cd $GOPATH
mkdir -p ./src/github.com/gogo/letmegrpc
git clone https://github.com/gogo/letmegrpc ./src/github.com/gogo/letmegrpc
git clone https://github.com/gogo/protobuf ./src/github.com/gogo/protobuf
go get github.com/gogo/pbparser
go get google.golang.org/grpc
go get golang.org/x/net/context
(cd ./src/github.com/gogo/letmegrpc && make install)

Usage

Assuming you have a grpc server implementation running on your localhost on port 12345

letmegrpc --addr=localhost:12345 --port=8080 grpc.proto

Now open your webbrowser and goto

http://localhost:8080/ServiceName/MethodName

Here you will find a generated html web form. Clicking Submit will send your newly populated message to your grpc server implementation and display the results.

Example

(cd $GOPATH/src/github.com/gogo/letmegrpc && make install)
letmetestserver --port=12345 &
(cd $GOPATH/src/github.com/gogo/letmegrpc/testcmd && letmegrpc --addr=localhost:12345 --port=8080 serve.proto

Open your webbrowser at

http://localhost:8080/Label/Produce

image

More Features

  • Comments that are attached to fields become tooltips.
  • proto2 defaults are filled into the the clean form.

Customization

letmegrpc is just another protocol buffer code generation plugin. Simply run:

protoc --gogo_out=. grpc.proto
protoc --letmegrpc_out=. grpc.proto

Now you can have the html generated code next to your generated message code. It contains a:

  • The Serve function that is used to start the server.
  • SetHtmlStringer function that lets you customize your html output for each returned message, this is json by default. This might be useful to return more links and create an explorable web site.

letmegrpc's People

Contributors

awalterschulze avatar d-alex avatar gpaul avatar ivucica avatar jmarais avatar scbizu avatar tgulacsi avatar yinxulai avatar

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.