https://github.com/arturoeanton/elixir-dynamic-api
This is a small dynamic GRPC client.
https://github.com/arturoeanton/elixir-dynamic-api
api dynamic elixir grpc plug proto protobuf
Last synced: 7 months ago
JSON representation
This is a small dynamic GRPC client.
- Host: GitHub
- URL: https://github.com/arturoeanton/elixir-dynamic-api
- Owner: arturoeanton
- License: apache-2.0
- Created: 2021-06-25T19:51:06.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-29T16:19:34.000Z (over 4 years ago)
- Last Synced: 2025-01-23T04:11:13.367Z (9 months ago)
- Topics: api, dynamic, elixir, grpc, plug, proto, protobuf
- Language: Elixir
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elixir-dynamic-api
This is a small dynamic GRPC client. You will be able to send your proto3 and use it by HTTP_POST.
## Example
``` http
POST http://127.0.0.1:8080/api/proto/run HTTP/1.1
Content-Type: application/json{
"package": "Helloworld",
"url_server":"localhost:50051",
"service": "Greeter",
"method": "say_hello",
"params": ["HelloRequest.new(name: 'Elixir!!')"],
"reply":"'message' => reply.message",
"proto":"syntax = \"proto3\";\n\noption java_multiple_files = true;\noption java_package = \"io.grpc.examples.helloworld\";\noption java_outer_classname = \"HelloWorldProto\";\noption objc_class_prefix = \"HLW\";\n\npackage helloworld;\n\nservice Greeter {\n rpc SayHello (HelloRequest) returns (HelloReply) {}\n}\n\nmessage HelloRequest {\n string name = 1;\n string lastname = 2;\n\n}\n\nmessage HelloReply {\n string message = 1;\n string lastname = 2;\n}"
}```
# Run
```
cd server/
mix run --no-halt
```