codegen

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Protobuf

func Protobuf(
	w io.Writer,
	protoPackage string, source string, options map[string]string,
) error

Protobuf generates protobuf declarations from Go structs.

func RPCConversion

func RPCConversion(
	w io.Writer,
	protoPackage string, source string, formatter string,
) error

RPCConversion creates functions for converting between core newsdoc strucs and their protobuf Message equivalents.

Types

type Field

type Field struct {
	Name        string
	GoName      string
	ProtoName   string
	Type        string
	GoType      string
	FieldNumber int
	Comment     []string
}

type Message

type Message struct {
	Name    string
	Comment []string
	Fields  []Field
}

func InterpretAST

func InterpretAST(set *token.FileSet, file *ast.File) ([]Message, error)

Jump to

Keyboard shortcuts

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