Giter VIP home page Giter VIP logo

Comments (6)

neopaf avatar neopaf commented on May 21, 2024 1

If this helps, using .proto file it works:

rualpe-ws:Downloads paf$ evans --host localhost --port 6666  goheroe.proto 

  ______
 |  ____|
 | |__    __   __   __ _   _ __    ___
 |  __|   \ \ / /  / _. | | '_ \  / __|
 | |____   \ V /  | (_| | | | | | \__ \
 |______|   \_/    \__,_| |_| |_| |___/

 more expressive universal gRPC client

localhost:6666> package superpower

superpower@localhost:6666> show message
+-------------+
|   MESSAGE   |
+-------------+
| SuperPower  |
| SuperPowers |
| Filter      |
+-------------+

superpower@localhost:6666> desc Filter
+----------+-----------+
|  FIELD   |   TYPE    |
+----------+-----------+
| category | TYPE_ENUM |
+----------+-----------+

superpower@localhost:6666> 

Noticed different package name...

Noticed that even this way one does not know possible enum values (this is not vital, I'm not planning to use ENUMs much).

from evans.

neopaf avatar neopaf commented on May 21, 2024

actual call works, though (which is COOL!):

default.GoHeroe@localhost:6666> call List
? Filter All
{
  "superPow": [
    {
      "name": "Flash power",
      "cat": "SciencePowers"
    },
    {
      "name": "Superman power",
      "cat": "CosmicBasedPowers"
    },
    {
      "name": "Spiderman power",
      "cat": "SupernaturalPowers"
    }
  ]
}

from evans.

neopaf avatar neopaf commented on May 21, 2024

Yet to know how invoke this from command line one does not know which json to send.
Message type is "Filter" but what fields are there are not clear.

This works:

rualpe-ws:grpc-master paf$ echo '{"category": "SupernaturalPowers"}' | evans --host localhost --port 6666 -r --service GoHeroe --call List --cli
{
  "superPow": [
    {
      "name": "Spiderman power",
      "cat": "SupernaturalPowers"
    }
  ]
}
rualpe-ws:grpc-master paf$ 

But to known this "category" I had to dive into .proto file.
Dream: to have it all in dear Evans.

from evans.

neopaf avatar neopaf commented on May 21, 2024

(enums can be played with in REPL mode, all possible values are auto-suggested)

from evans.

ktr0731 avatar ktr0731 commented on May 21, 2024

Thank you for pointed out an issue!
I fixed it at #89. Can you update Evans to 0.6.1?

from evans.

neopaf avatar neopaf commented on May 21, 2024

bliss! thanks, Ktr ;)

==> Upgrading 1 outdated package, with result:
ktr0731/evans/evans 0.6.0 -> 0.6.1
==> Upgrading ktr0731/evans/evans 
==> Downloading https://github.com/ktr0731/evans/releases/download/0.6.1/evans_darwin_amd64.tar.gz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/97361468/f5761c00-ab28-11e8-8c84-0c359c18cb32?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F201808
######################################################################## 100.0%
🍺  /usr/local/Cellar/evans/0.6.1: 3 files, 20.2MB, built in 13 seconds
rualpe-ws:Downloads paf$ evans --host localhost --port 6666 -r

  ______
 |  ____|
 | |__    __   __   __ _   _ __    ___
 |  __|   \ \ / /  / _. | | '_ \  / __|
 | |____   \ V /  | (_| | | | | | \__ \
 |______|   \_/    \__,_| |_| |_| |___/

 more expressive universal gRPC client

default@localhost:6666> show message
+-------------+
|   MESSAGE   |
+-------------+
| Filter      |
| SuperPowers |
| SuperPower  |
+-------------+

default@localhost:6666> desc Filter
+----------+-----------+
|  FIELD   |   TYPE    |
+----------+-----------+
| category | TYPE_ENUM |
+----------+-----------+

from evans.

Related Issues (20)

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.