letmegrpc

[maintainer wanted] generates a web form gui from a grpc specification

  • 所有者: gogo/letmegrpc
  • 平台:
  • 許可證: BSD 3-Clause "New" or "Revised" License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

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.

主要指標

概覽
名稱與所有者gogo/letmegrpc
主編程語言Go
編程語言Go (語言數: 3)
平台
許可證BSD 3-Clause "New" or "Revised" License
所有者活动
創建於2015-04-07 11:06:21
推送於2019-06-04 11:05:41
最后一次提交2019-06-04 19:05:40
發布數2
最新版本名稱v1.1.0 (發布於 )
第一版名稱v1.0.0 (發布於 )
用户参与
星數425
關注者數11
派生數48
提交數108
已啟用問題?
問題數36
打開的問題數16
拉請求數15
打開的拉請求數5
關閉的拉請求數1
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?