Versions in this module Expand all Collapse all v0 v0.2.1 Mar 5, 2025 Changes in this version + const Version + func ContextWithDescriptor(ctx context.Context, d *Descriptor) context.Context + func ContextWithEnumDescriptor(ctx context.Context, d *EnumDescriptor) context.Context + func ContextWithFileDescriptor(ctx context.Context, fd *FileDescriptor) context.Context + func ContextWithServiceDescriptor(ctx context.Context, service *ServiceDescriptor) context.Context + func RunPlugin(p Plugin) error + func RunPluginWithIO(p Plugin, r io.Reader, w io.Writer) error + type Comment struct + Detached []string + Leading string + Trailing string + func (c *Comment) GetDetached() []string + func (c *Comment) GetLeading() string + func (c *Comment) GetTrailing() string + func (c *Comment) String() string + type Comments map[string]*Comment + func ParseComments(fd *descriptor.FileDescriptorProto) Comments + func (c Comments) Get(path string) *Comment + type Descriptor struct + Comments *Comment + Enums []*EnumDescriptor + Extensions []*ExtensionDescriptor + Fields []*FieldDescriptor + Messages []*Descriptor + Parent *Descriptor + func DescriptorFromContext(ctx context.Context) (*Descriptor, bool) + func (c *Descriptor) GetFile() *FileDescriptor + func (c *Descriptor) GetFullName() string + func (c *Descriptor) GetLongName() string + func (c *Descriptor) GetPackage() string + func (c *Descriptor) IsProto3() bool + func (m *Descriptor) GetComments() *Comment + func (m *Descriptor) GetEnum(name string) *EnumDescriptor + func (m *Descriptor) GetEnums() []*EnumDescriptor + func (m *Descriptor) GetExtensions() []*ExtensionDescriptor + func (m *Descriptor) GetMessage(name string) *Descriptor + func (m *Descriptor) GetMessageField(name string) *FieldDescriptor + func (m *Descriptor) GetMessageFields() []*FieldDescriptor + func (m *Descriptor) GetMessages() []*Descriptor + func (m *Descriptor) GetParent() *Descriptor + type EnumDescriptor struct + Comments *Comment + Parent *Descriptor + Values []*EnumValueDescriptor + func EnumDescriptorFromContext(ctx context.Context) (*EnumDescriptor, bool) + func (c *EnumDescriptor) GetFile() *FileDescriptor + func (c *EnumDescriptor) GetFullName() string + func (c *EnumDescriptor) GetLongName() string + func (c *EnumDescriptor) GetPackage() string + func (c *EnumDescriptor) IsProto3() bool + func (e *EnumDescriptor) GetComments() *Comment + func (e *EnumDescriptor) GetNamedValue(name string) *EnumValueDescriptor + func (e *EnumDescriptor) GetParent() *Descriptor + func (e *EnumDescriptor) GetValues() []*EnumValueDescriptor + type EnumValueDescriptor struct + Comments *Comment + Enum *EnumDescriptor + func (c *EnumValueDescriptor) GetFile() *FileDescriptor + func (c *EnumValueDescriptor) GetFullName() string + func (c *EnumValueDescriptor) GetLongName() string + func (c *EnumValueDescriptor) GetPackage() string + func (c *EnumValueDescriptor) IsProto3() bool + func (v *EnumValueDescriptor) GetComments() *Comment + func (v *EnumValueDescriptor) GetEnum() *EnumDescriptor + type ExtensionDescriptor struct + Comments *Comment + Parent *Descriptor + func (c *ExtensionDescriptor) GetFile() *FileDescriptor + func (c *ExtensionDescriptor) GetFullName() string + func (c *ExtensionDescriptor) GetLongName() string + func (c *ExtensionDescriptor) GetPackage() string + func (c *ExtensionDescriptor) IsProto3() bool + func (e *ExtensionDescriptor) GetComments() *Comment + func (e *ExtensionDescriptor) GetParent() *Descriptor + type FieldDescriptor struct + Comments *Comment + Message *Descriptor + func (c *FieldDescriptor) GetFile() *FileDescriptor + func (c *FieldDescriptor) GetFullName() string + func (c *FieldDescriptor) GetLongName() string + func (c *FieldDescriptor) GetPackage() string + func (c *FieldDescriptor) IsProto3() bool + func (mf *FieldDescriptor) GetComments() *Comment + func (mf *FieldDescriptor) GetMessage() *Descriptor + type FileDescriptor struct + Comments *Comment + Enums []*EnumDescriptor + Extensions []*ExtensionDescriptor + Imports []*ImportedDescriptor + Messages []*Descriptor + OptionExtensions map[string]interface{} + PackageComments *Comment + Services []*ServiceDescriptor + SyntaxComments *Comment + func FileDescriptorFromContext(ctx context.Context) (*FileDescriptor, bool) + func ParseCodeGenRequest(req *plugin_go.CodeGeneratorRequest) []*FileDescriptor + func (f *FileDescriptor) GetComments() *Comment + func (f *FileDescriptor) GetEnum(name string) *EnumDescriptor + func (f *FileDescriptor) GetEnums() []*EnumDescriptor + func (f *FileDescriptor) GetExtensions() []*ExtensionDescriptor + func (f *FileDescriptor) GetImports() []*ImportedDescriptor + func (f *FileDescriptor) GetMessage(name string) *Descriptor + func (f *FileDescriptor) GetMessages() []*Descriptor + func (f *FileDescriptor) GetPackageComments() *Comment + func (f *FileDescriptor) GetService(name string) *ServiceDescriptor + func (f *FileDescriptor) GetServices() []*ServiceDescriptor + func (f *FileDescriptor) GetSyntaxComments() *Comment + func (f *FileDescriptor) IsProto3() bool + type ImportedDescriptor struct + func (c *ImportedDescriptor) GetFile() *FileDescriptor + func (c *ImportedDescriptor) GetFullName() string + func (c *ImportedDescriptor) GetLongName() string + func (c *ImportedDescriptor) GetPackage() string + func (c *ImportedDescriptor) IsProto3() bool + type MethodDescriptor struct + Comments *Comment + Service *ServiceDescriptor + func (c *MethodDescriptor) GetFile() *FileDescriptor + func (c *MethodDescriptor) GetFullName() string + func (c *MethodDescriptor) GetLongName() string + func (c *MethodDescriptor) GetPackage() string + func (c *MethodDescriptor) IsProto3() bool + func (m *MethodDescriptor) GetComments() *Comment + func (m *MethodDescriptor) GetService() *ServiceDescriptor + type Plugin interface + Generate func(req *plugin_go.CodeGeneratorRequest) (*plugin_go.CodeGeneratorResponse, error) + type ServiceDescriptor struct + Comments *Comment + Methods []*MethodDescriptor + func ServiceDescriptorFromContext(ctx context.Context) (*ServiceDescriptor, bool) + func (c *ServiceDescriptor) GetFile() *FileDescriptor + func (c *ServiceDescriptor) GetFullName() string + func (c *ServiceDescriptor) GetLongName() string + func (c *ServiceDescriptor) GetPackage() string + func (c *ServiceDescriptor) IsProto3() bool + func (s *ServiceDescriptor) GetComments() *Comment + func (s *ServiceDescriptor) GetMethods() []*MethodDescriptor + func (s *ServiceDescriptor) GetNamedMethod(name string) *MethodDescriptor