Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andrewhickman/lanquetta

A GUI application for testing GRPC services
https://github.com/andrewhickman/lanquetta

Last synced: 22 days ago
JSON representation

A GUI application for testing GRPC services

Awesome Lists containing this project

README

        

![logo](img/logo.svg)

# Lanquetta

A GUI application for testing gRPC services.

## Getting started

To get started, click "Add file" in the sidebar and select your `.proto` file. The file will be automatically compiled and all the services added to the sidebar.

The include paths used to load proto files can be configured under "File > Import services > Compiler Options". It is also possible to load a file descriptor set generated by running `protoc` with the `--descriptor_set_out` argument.

## Calling your service

The ![add](img/add_icon.svg) button for a service method opens a tab where you can call your gRPC service. The history of previous requests and responses is displayed in the bottom pane.

![Sample](img/method.png)

## Options

The ![options](img/options_icon.svg) button for a service opens a tab which controls default configuration for a service.

![Sample](img/options.png)

### Authorization hook

Instead of setting authorization in metadata manually, Lanquetta can load it from an "authorization hook". This avoids needing to refresh the metadata every time your token expires, and prevents your token from being saved to disk.

An authorization hook is a script called when the application makes a request. On success it should return an exit code of zero and output a JSON object to stdout with the following structure:

```json
{
"metadata": {
"authorization": "Bearer eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
},
"expiry": "2011-03-22T18:43:00Z"
}
```

`metadata` is a map of key value pairs sent as metadata (HTTP headers) to your service. `expiry` is an optional RFC3339 timestamp. If set, the metadata will be cached until the expiry time so that future calls don't need to invoke your authorization hook.