Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
github.com/cassioroos/grpc_currency
This is a simple test of GRPC, the idea is to enrich this server later.
You will have to install protoc to generate the code and grpcurl to test the code.
sudo apt install protobuf-compiler
brew install protoc
Then run the build command:
protoc -I protos/ protos/currency.proto --go_out=plugins=grpc:protos/currency
or
make protos
As this is a POC, all ports and configurations are hardcoded the app will run on port :9098
go run main.go
With grpcurl installed we can test our server
grpcurl --plaintext localhost:9092 list
Currency
grpc.reflection.v1alpha.ServerReflection
grpcurl --plaintext localhost:9098 list Currency
Currency.GetRate
grpcurl --plaintext localhost:9098 describe Currency.GetRate
Currency.GetRate is a method:
rpc GetRate ( .RateRequest ) returns ( .RateResponse );
grpcurl --plaintext localhost:9098 describe .RateRequest
RateRequest is a message:
message RateRequest {
string Base = 1;
string Destination = 2;
}
grpcurl --plaintext -d '{"Base": "BR", "Destination": "USD"}' localhost:9098 Currency/GetRate
{
"rate": 5.37
}
{ "Base" : "BRL", "Destination" : "USD" }
{ "Base" : "BRL", "Destination" : "EUR" }
grpcurl --plaintext -d @ localhost:9098 Currency/SubscribeRates
grpcurl --plaintext localhost:9098 HealthCheck/Check
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.