protoc-gen-twirp_csharp

command module
v0.0.0-...-d4b8ed2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2019 License: MIT Imports: 15 Imported by: 0

README

C# twirp client generator

How to use

  1. Get the plugin
go get gitlab.com/RoarkeRandall/protoc-gen-twirp_csharp
  1. Generate with the csharp & twirp csharp plugin's enabled:
  • add the --csharp_out option to specify where the models will be generated
  • add the --twirp_csharp_out option to specify where the client will be generated
  • It's recommended to add option csharp_namespace = "Your.Base.Namespace"; to your proto file's
  1. Add the Client to your IoC Container:
services.AddExperimentsServiceClient();
  1. Register the config:
services.AddOptions<ExperimentsServiceClientConfig>();
  1. Add the required references to your project:
  • Google.Protobuf
  • Newtonsoft.Json
  • Microsoft.Extensions.Http
  • Microsoft.Extensions.Options.ConfigurationExtensions

Credits

Forked from github.com/gaffneyc/protoc-gen-twirp_ruby

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL