https://github.com/k1low/grpcurlreq
grpcurlreq is parser for gRPCurl command.
https://github.com/k1low/grpcurlreq
grpcurl parser
Last synced: about 1 month ago
JSON representation
grpcurlreq is parser for gRPCurl command.
- Host: GitHub
- URL: https://github.com/k1low/grpcurlreq
- Owner: k1LoW
- License: mit
- Created: 2022-10-19T10:20:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-13T04:16:08.000Z (2 months ago)
- Last Synced: 2025-03-28T01:53:49.454Z (about 2 months ago)
- Topics: grpcurl, parser
- Language: Go
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# grpcurlreq
`grpcurlreq` is parser for [gRPCurl](https://github.com/fullstorydev/grpcurl) command.
## Usage
``` go
package mainimport (
"encoding/json"
"fmt"
"log""github.com/k1LoW/grpcurlreq"
)func main() {
cmd := `grpcurl -d '{"id": 1234, "tags": ["foo","bar"]}' grpc.server.com:443 my.custom.server.Service/Method`
p, err := grpcurlreq.Parse(cmd)
if err != nil {
log.Fatal(err)
}
b, err := json.Marshal(p)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(b))// Output:
// {"addr":"grpc.server.com:443","method":"my.custom.server.Service/Method","messages":[{"id":1234,"tags":["foo","bar"]}]}
}
```