protoc-gen-hcplugin

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

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 12 Imported by: 0

README

Protoc Hashicorp Plugin System Generator

Build

Dependencies

We use mage as our main build tool and packr to embed static files (the templates).

install mage by running :

go get -u -d -v github.com/magefile/mage
cd $GOPATH/src/github.com/magefile/mage
go run bootstrap.go

install packr by running :

go get -u -v github.com/gobuffalo/packr/v2/...
go get -u -v github.com/gobuffalo/packr/v2/packr2
Commands
  • mage build : rebuild the plugin and install the binary
  • mage example : rebuild the plugin and generate examples in /example
  • mage clean : remove generated go files in example folder and clean up the files packer generates

Usage

you can use example/example.proto and makefile in example/ as a reference point for your own proto definitions.

Google WellKnown Types

Most often we found ourselves using Google Well-Known Types as defined in https://developers.google.com/protocol-buffers/docs/reference/google.protobuf. the following table is the filename (proto import) to package (go import) for github.com/gogo/protobuf

File Name Package
google/protobuf/any.proto github.com/gogo/protobuf/types
google/protobuf/api.proto google.golang.org/genproto/protobuf/api
google/protobuf/compiler/plugin.proto github.com/gogo/protobuf/protoc-gen-gogo/plugin
google/protobuf/descriptor.proto github.com/gogo/protobuf/protoc-gen-gogo/descriptor
google/protobuf/duration.proto github.com/gogo/protobuf/types
google/protobuf/empty.proto github.com/gogo/protobuf/types
google/protobuf/field_mask.proto github.com/gogo/protobuf/types
google/protobuf/source_context.proto google.golang.org/genproto/protobuf/source_context
google/protobuf/struct.proto github.com/gogo/protobuf/types
google/protobuf/timestamp.proto github.com/gogo/protobuf/types
google/protobuf/type.proto google.golang.org/genproto/protobuf/ptype
google/protobuf/wrappers.proto github.com/gogo/protobuf/types

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
example
proto/kv/cmd
Code generated by protoc-gen-hcplugin.
Code generated by protoc-gen-hcplugin.
proto/kv/grpc
Code generated by protoc-gen-hcplugin.
Code generated by protoc-gen-hcplugin.
proto/kv/handler/cmd
Code generated by protoc-gen-hcplugin.
Code generated by protoc-gen-hcplugin.
proto/kv/handler/engine
Code generated by protoc-gen-hcplugin.
Code generated by protoc-gen-hcplugin.
proto/kv/net-rpc
Code generated by protoc-gen-hcplugin.
Code generated by protoc-gen-hcplugin.
proto/kv/shared
Code generated by protoc-gen-hcplugin.
Code generated by protoc-gen-hcplugin.
internal
modules

Jump to

Keyboard shortcuts

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