converter

package
v0.15.14 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

Convert is the primary entrypoint for the protoc plugin. It takes a *pluginpb.CodeGeneratorRequest and returns a *pluginpb.CodeGeneratorResponse.

func ConvertFrom

func ConvertFrom(rd io.Reader) (*pluginpb.CodeGeneratorResponse, error)

func ConvertWithOptions added in v0.10.0

Types

type State

type State struct {
	Opts        options.Options
	CurrentFile protoreflect.FileDescriptor
	Messages    map[protoreflect.MessageDescriptor]struct{}
	Enums       map[protoreflect.EnumDescriptor]struct{}
}

func NewState

func NewState(opts options.Options) *State

func (*State) CollectEnum

func (st *State) CollectEnum(tt protoreflect.EnumDescriptor)

func (*State) CollectField

func (st *State) CollectField(tt protoreflect.FieldDescriptor)

func (*State) CollectFile

func (st *State) CollectFile(tt protoreflect.FileDescriptor)

func (*State) CollectMessage

func (st *State) CollectMessage(tt protoreflect.MessageDescriptor)

func (*State) SortedEnums

func (st *State) SortedEnums() []protoreflect.EnumDescriptor

func (*State) SortedMessages

func (st *State) SortedMessages() []protoreflect.MessageDescriptor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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