Documentation ¶
Index ¶
- func Convert(req *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)
- func ConvertFrom(rd io.Reader) (*pluginpb.CodeGeneratorResponse, error)
- func ConvertWithOptions(req *pluginpb.CodeGeneratorRequest, opts options.Options) (*pluginpb.CodeGeneratorResponse, error)
- type State
- func (st *State) CollectEnum(tt protoreflect.EnumDescriptor)
- func (st *State) CollectField(tt protoreflect.FieldDescriptor)
- func (st *State) CollectFile(tt protoreflect.FileDescriptor)
- func (st *State) CollectMessage(tt protoreflect.MessageDescriptor)
- func (st *State) SortedEnums() []protoreflect.EnumDescriptor
- func (st *State) SortedMessages() []protoreflect.MessageDescriptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
func Convert(req *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)
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
func ConvertWithOptions(req *pluginpb.CodeGeneratorRequest, opts options.Options) (*pluginpb.CodeGeneratorResponse, error)
Types ¶
type State ¶
type State struct { Opts options.Options CurrentFile protoreflect.FileDescriptor Messages map[protoreflect.MessageDescriptor]struct{} Enums map[protoreflect.EnumDescriptor]struct{} }
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.