go2proto

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 13 Imported by: 0

README

go2proto

Generate Protobuf messages from given go structs. No RPC, not gogo syntax, just pure Protobuf messages.

Usage
package main

import "github.com/vc-assist/go2proto"

func main() {
   err := go2proto.Generate(go2proto.GenerateOptions{
      Filter: []string{"StructName", "StructName2"},
      Packages: []string{"./path/to/package"},
      Output: someIoWriter,
   })
   // ...
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(options GenerateOptions) error

Types

type GenerateOptions

type GenerateOptions struct {
	// struct names to filter by
	Filter []string
	// paths to golang packages
	Packages []string
	// protobuf output file path
	Output io.Writer
}

Directories

Path Synopsis
example
in

Jump to

Keyboard shortcuts

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