Questions tagged [twirp]

Twirp is a golang RPC framework with protobuf service definitions.

Twirp is a golang RPC framework with protobuf service definitions.

The source is available on Github, with official documentation available here.

10 questions
4
votes
3 answers

What is the difference between grpc-gateway vs Twirp RPC

We already have the Twrip-RPC which provides rpc and rest endpoints . then why we need the grpc-Gateway . What advantages it's providing compared to twirp. Is it like we can provide custom endpoints with grpc gateway is that the only difference.…
user1844634
  • 1,221
  • 2
  • 17
  • 35
2
votes
2 answers

How to use Go's type alias to make own models work with protobufs?

I've got some REST API with my models defined as Go structs. type User struct { FirstName string LastName string } Then I've got my database methods for getting data. GetUserByID(id int) (*User, error) Now I'd like to replace my REST API with…
zemirco
  • 16,171
  • 8
  • 62
  • 96
1
vote
1 answer

How to make Go modules with version v2+ avoid the import path prefix requirement?

This is specific for: https://github.com/twitchtv/twirp This library is currently on version v7, and we would like to migrate it into go modules. The library is currently imported from other libraries like this: // go.mod require…
tothemario
  • 5,851
  • 3
  • 44
  • 39
1
vote
1 answer

Test RPC service developed in using TWIRP

I'd like to test a sample Twirp RPC service. The sample service is from Twirp official website. Protobuf definition is as follows: syntax = "proto3"; package helloservice; option go_package = "helloservice"; service HelloWorld { rpc…
1
vote
0 answers

How to wire one/two or more microservice in the TwirpQL Server?

I'm using the GraphQL server which is most-often a gateway that bundles all my different microservices created using gqlgen. I want to make a switch to the TwirpQL server as I was following the official documentation of TwirpQL. I believe it wants…
1
vote
1 answer

How do I correctly include golang protobuf/ptypes for protoc when using dep?

I'm having trouble including the google/protobuf/timestamp.proto well known type, when using dep. I get an error: google/protobuf/timestamp.proto: File not found service.proto: syntax = "proto3"; import "google/protobuf/timestamp.proto"; package…
rynop
  • 50,086
  • 26
  • 101
  • 112
1
vote
1 answer

Is it possible to use GraphQL with Twirp RPC framework by Twitch

I have a Golang program working with Twirp and I want to create GraphQl server, but as far as I know, twirp build on top of the Rest API
GGG
  • 1,307
  • 3
  • 7
  • 11
0
votes
0 answers

Class 'Error' defines instance member property 'cause', but extended class 'TwirpError' defines it as instance member function

I am importing our gRPC service into my package and when I run yarn to install everything I get the following error message node_modules/twirp-ts/build/twirp/errors.d.ts:28:5 - error TS2425: Class 'Error' defines instance member property 'cause',…
Orbita1frame
  • 203
  • 4
  • 13
0
votes
1 answer

Convert protoc to Prototool.yaml

How do i convert protoc command to prototool.yaml file ? protoc --proto_path=api/proto/v1 --proto_path=third_party --go_out=plugins=grpc:pkg/api/v1 todo-service.proto protoc --proto_path=api/proto/v1 --proto_path=third_party…
user1844634
  • 1,221
  • 2
  • 17
  • 35
0
votes
1 answer

Twirp not working with proto

I seem to be unable to install twirp correctly to work with protobuf. protoc --proto_path=$GOPATH/bin:. --twirp_out=. --go_out=. ./rpc/person/service.proto is the command I'm trying to do when compiling and creating my twirp file, however I get the…