Documentation ¶
Overview ¶
Package scope provides a set of code-generator-friendly types describing the heirarchy of definitions within a generation request.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enum ¶ added in v0.1.4
type Enum struct { File *File Descriptor *descriptorpb.EnumDescriptorProto GoTypeName string GoConstantPrefix string // contains filtered or unexported fields }
Enum encapsulates information about a single enum type.
func (*Enum) Members ¶ added in v0.1.4
func (e *Enum) Members() []*EnumMember
Members returns members of the enum.
type EnumMember ¶ added in v0.1.4
type EnumMember struct { Enum *Enum AliasFor *EnumMember Descriptor *descriptorpb.EnumValueDescriptorProto GoConstantName string }
EnumMember encapsulates information about a single member of an enum.
type Field ¶
type Field struct { Message *Message Descriptor *descriptorpb.FieldDescriptorProto GoFieldName string OneOfOption *OneOfOption }
Field encapsulates information about a single field within a message.
type File ¶
type File struct { Request *Request Descriptor *descriptorpb.FileDescriptorProto GoPackagePath string GoPackageName string // contains filtered or unexported fields }
File encapsulates information about a single .proto file.
type Message ¶
type Message struct { File *File Descriptor *descriptorpb.DescriptorProto GoTypeName string // contains filtered or unexported fields }
Message encapsulates information about a single message type.
func (*Message) OneOfGroups ¶
func (m *Message) OneOfGroups() []*OneOfGroup
OneOfGroups returns the set of one-of groups within the message.
type Method ¶ added in v0.2.3
type Method struct { Service *Service Descriptor *descriptorpb.MethodDescriptorProto Name string ClientStreaming bool ServerStreaming bool StreamingClientGoTypeName string }
Method encapsulates information about an RPC method within in a Service.
func (*Method) InputGoType ¶ added in v0.2.3
InputGoType returns the code snippet that refers to the type of the method's input message.
func (*Method) OutputGoType ¶ added in v0.2.3
OutputGoType returns the code snippet that refers to the type of the method's output message.
type OneOfGroup ¶
type OneOfGroup struct { Message *Message Descriptor *descriptorpb.OneofDescriptorProto GoFieldName string Options []*OneOfOption }
OneOfGroup describes a one-of group.
type OneOfOption ¶
type OneOfOption struct { Group *OneOfGroup Field *Field DiscriminatorTypeName string DiscriminatorFieldName string }
OneOfOption describes a field that is part of a one-of.
type Parameters ¶
type Parameters struct {
Module string
}
Parameters encapsulates the options passed to the generator via the --primo_opt flag.
The are referred to as "options" on the protoc command line, but "parameters" within the Protocol Buffers plugin system.
type Request ¶
type Request struct { GeneratorVersion string PluginRequest *pluginpb.CodeGeneratorRequest PluginParameters Parameters // contains filtered or unexported fields }
Request describes a request to generate code from one or more .proto files.
type Service ¶ added in v0.2.3
type Service struct { File *File Descriptor *descriptorpb.ServiceDescriptorProto Name string Methods []*Method }
Service encapsulates information about a service defined in a .proto file.