protoc-gen-sdk

command module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 8 Imported by: 0

README

protoc-gen-sdk

Protobuf compiler plugin that generates Trinsic SDK Wrappers

Installation
  • To install locally:
go get github.com/trinsic-id/protoc-gen-sdk
  • For use as a github action:
      - uses: trinsic-id/protoc-gen-sdk@v0.1
        id: buildsdkwrappers
Usage

See the build_test.ps1 script for an example of how to build and run the plugin, assuming that Trinsic SDK is checked out into a parallel directory (../sdk).

  • You must provide relative (or absolute) paths to the various directories to update
  • Because protoc-gen-star, the major library that this plugin uses, differentiates the final proto output path with :, you must escape the absolute windows path with a ?, eg (C?\work\sdk for C:\work\sdk)
  • Rename pairs are there to map service/file names to the expected output. The language type with handle proper casing.
  • To add another language:
    • Add file lang_types/[LANG NAME]_types.go
    • Update the corresponding template const [LANG NAME]ServiceTpl = ...
    • Create a trinsicModule factory function in main.go trinsic[LANG NAME]() *trinsicModule
    • Register the factory function in main.go func main

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
services

Jump to

Keyboard shortcuts

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