2021-06-22 01:34:06 +03:00
# `protoc-gen-go-micro`
2021-02-23 14:50:01 +03:00
protobuf plugin to generate helper code for micro framework
A generic **code** /script/data generator based on [Protobuf ](https://developers.google.com/protocol-buffers/ ).
---
This project is a generator plugin for the Google Protocol Buffers compiler (`protoc`).
## Usage
```console
2021-10-24 00:52:39 +03:00
$> protoc --go_micro_out=debug=true,components="micro|http":. input.proto
2021-02-23 14:50:01 +03:00
```
| Option | Default Value | Accepted Values | Description
|-----------------------|---------------|---------------------------|-----------------------
2021-05-08 12:53:14 +03:00
| `tag_path` | `.` | `any local path` | path contains generated protobuf code that needs to be tagged
2021-02-23 14:50:01 +03:00
| `debug` | *false* | `true` or `false` | if *true* , `protoc` will generate a more verbose output
2021-05-08 12:46:02 +03:00
| `components` | `micro` | `micro rpc http chi gorilla client server` | some values can't coexists like gorilla/chi or rpc/http, values must be concatinated with pipe symbol
2021-02-23 14:50:01 +03:00
## Install
* Install the **go** compiler and tools from https://golang.org/doc/install
2021-10-24 00:52:39 +03:00
* Install **protoc-gen-go** : `go install google.golang.org/protobuf/cmd/protoc-gen-go`
* Install **protoc-gen-go-micro** : `go install go.unistack.org/protoc-gen-go-micro/v3`