Skip to content

Small working example of generating a go server from proto using query and then querying with a ruby client generated using twirp.

Notifications You must be signed in to change notification settings

JnBrymn/minimaltwirp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build

go mod init minimaltwirp
script/bootstrap
script/generate-twirp

run

go run cmd/main.go

query from CURL

curl -XPOST http://localhost:1234/twirp/github.minimaltwirp.rpc.Search/Search -H "Content-Type: application/json"    --data '{"user_query":"some query string", "repository_id": 4, "unrequired_param": "what is this?"}'

query from Ruby

$ gem install twirp
$ irb

load 'ruby/rpc/search/service_twirp.rb'
client = Github::Minimaltwirp::Rpc::SearchClient.new 'http://localhost:1234/twirp'
resp = client.search(user_query:"thing", repository_id: 123)

About

Small working example of generating a go server from proto using query and then querying with a ruby client generated using twirp.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published