Documentation ¶
Overview ¶
Package extract is used to extract elements from reflect PackageSets.
Index ¶
- type Enum
- type EnumValue
- type Message
- func (m *Message) FieldNameToField() map[string]*MessageField
- func (m *Message) FieldNumberToField() map[int32]*MessageField
- func (m *Message) FullyQualifiedName() string
- func (m *Message) NestedEnumNameToEnum() map[string]*Enum
- func (m *Message) NestedMessageNameToMessage() map[string]*Message
- func (m *Message) OneofNameToOneof() map[string]*MessageOneof
- func (m *Message) ProtoMessage() *reflectv1.Message
- type MessageField
- type MessageOneof
- type Package
- func (p *Package) DependencyNameToDependency() map[string]*Package
- func (p *Package) EnumNameToEnum() map[string]*Enum
- func (p *Package) FullyQualifiedName() string
- func (p *Package) ImporterNameToImporter() map[string]*Package
- func (p *Package) MessageNameToMessage() map[string]*Message
- func (p *Package) PackageSet() *PackageSet
- func (p *Package) ProtoMessage() *reflectv1.Package
- func (p *Package) ServiceNameToService() map[string]*Service
- type PackageSet
- type Service
- type ServiceMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enum ¶
type Enum struct {
// contains filtered or unexported fields
}
Enum is the Golang wrapper for the Protobuf Enum object.
func (*Enum) FullyQualifiedName ¶
FullyQualifiedName returns the fully-qualified name.
func (*Enum) ProtoMessage ¶
ProtoMessage returns the underlying Protobuf message.
func (*Enum) ValueNameToValue ¶
ValueNameToValue returns the values of the given Enum.
func (*Enum) ValueNumberToValue ¶
ValueNumberToValue returns the values of the given Enum.
type EnumValue ¶
type EnumValue struct {
// contains filtered or unexported fields
}
EnumValue is the Golang wrapper for the Protobuf EnumValue object.
func (*EnumValue) ProtoMessage ¶
ProtoMessage returns the underlying Protobuf enum.
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message is the Golang wrapper for the Protobuf Message object.
func (*Message) FieldNameToField ¶
func (m *Message) FieldNameToField() map[string]*MessageField
FieldNameToField returns the fields of the given Message.
func (*Message) FieldNumberToField ¶
func (m *Message) FieldNumberToField() map[int32]*MessageField
FieldNumberToField returns the fields of the given Message.
func (*Message) FullyQualifiedName ¶
FullyQualifiedName returns the fully-qualified name.
func (*Message) NestedEnumNameToEnum ¶
NestedEnumNameToEnum returns the nested enums of the given Message.
func (*Message) NestedMessageNameToMessage ¶
NestedMessageNameToMessage returns the nested messages of the given Message.
func (*Message) OneofNameToOneof ¶
func (m *Message) OneofNameToOneof() map[string]*MessageOneof
OneofNameToOneof returns the oneofs of the given Message.
func (*Message) ProtoMessage ¶
ProtoMessage returns the underlying Protobuf message.
type MessageField ¶
type MessageField struct {
// contains filtered or unexported fields
}
MessageField is the Golang wrapper for the Protobuf MessageField object.
func (*MessageField) Message ¶
func (m *MessageField) Message() *Message
Message returns the parent Message.
func (*MessageField) MessageOneof ¶
func (m *MessageField) MessageOneof() *MessageOneof
MessageOneof returns the parent MessageOneof.
This will be nil if this field is not part of a oneof.
func (*MessageField) ProtoMessage ¶
func (m *MessageField) ProtoMessage() *reflectv1.MessageField
ProtoMessage returns the underlying Protobuf message.
type MessageOneof ¶
type MessageOneof struct {
// contains filtered or unexported fields
}
MessageOneof is the Golang wrapper for the Protobuf MessageOneof object.
func (*MessageOneof) FieldNameToField ¶
func (m *MessageOneof) FieldNameToField() map[string]*MessageField
FieldNameToField returns the fields of the given MessageOneof.
func (*MessageOneof) FieldNumberToField ¶
func (m *MessageOneof) FieldNumberToField() map[int32]*MessageField
FieldNumberToField returns the fields of the given MessageOneof.
func (*MessageOneof) Message ¶
func (m *MessageOneof) Message() *Message
Message returns the parent Message.
func (*MessageOneof) ProtoMessage ¶
func (m *MessageOneof) ProtoMessage() *reflectv1.MessageOneof
ProtoMessage returns the underlying Protobuf message.
type Package ¶
type Package struct {
// contains filtered or unexported fields
}
Package is the Golang wrapper for the Protobuf Package object.
func (*Package) DependencyNameToDependency ¶
DependencyNameToDependency returns the direct dependencies of the given Package.
func (*Package) EnumNameToEnum ¶
EnumNameToEnum returns the nested enums of the given Package.
func (*Package) FullyQualifiedName ¶
FullyQualifiedName returns the fully-qualified name.
func (*Package) ImporterNameToImporter ¶
ImporterNameToImporter returns the direct importers of the given Package.
func (*Package) MessageNameToMessage ¶
MessageNameToMessage returns the nested messages of the given Package.
func (*Package) PackageSet ¶
func (p *Package) PackageSet() *PackageSet
PackageSet returns the parent PackageSet.
func (*Package) ProtoMessage ¶
ProtoMessage returns the underlying Protobuf message.
func (*Package) ServiceNameToService ¶
ServiceNameToService returns the nested services of the given Package.
type PackageSet ¶
type PackageSet struct {
// contains filtered or unexported fields
}
PackageSet is the Golang wrapper for the Protobuf PackageSet object.
func NewPackageSet ¶
func NewPackageSet(protoMessage *reflectv1.PackageSet) (*PackageSet, error)
NewPackageSet returns a new PackageSet for the given reflect PackageSet.
func (*PackageSet) PackageNameToPackage ¶
func (p *PackageSet) PackageNameToPackage() map[string]*Package
PackageNameToPackage returns a map from package name to Package.
func (*PackageSet) ProtoMessage ¶
func (p *PackageSet) ProtoMessage() *reflectv1.PackageSet
ProtoMessage returns the underlying Protobuf message.
func (*PackageSet) WithoutBeta ¶
func (p *PackageSet) WithoutBeta() (*PackageSet, error)
WithoutBeta makes a copy of the PackageSet without any beta packages.
Note that field type names may still refer to beta packages.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the Golang wrapper for the Protobuf Service object.
func (*Service) FullyQualifiedName ¶
FullyQualifiedName returns the fully-qualified name.
func (*Service) MethodNameToMethod ¶
func (s *Service) MethodNameToMethod() map[string]*ServiceMethod
MethodNameToMethod returns the methods of the given Service.
func (*Service) ProtoMessage ¶
ProtoMessage returns the underlying Protobuf message.
type ServiceMethod ¶
type ServiceMethod struct {
// contains filtered or unexported fields
}
ServiceMethod is the Golang wrapper for the Protobuf ServiceMethod object.
func (*ServiceMethod) ProtoMessage ¶
func (m *ServiceMethod) ProtoMessage() *reflectv1.ServiceMethod
ProtoMessage returns the underlying Protobuf service.
func (*ServiceMethod) Service ¶
func (m *ServiceMethod) Service() *Service
Service returns the parent Service.