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 ¶ added in v1.11.0
type Enum struct {
// contains filtered or unexported fields
}
Enum is the Golang wrapper for the Protobuf Enum object.
func (*Enum) FullyQualifiedName ¶ added in v1.11.0
FullyQualifiedName returns the fully-qualified name.
func (*Enum) ProtoMessage ¶ added in v1.11.0
ProtoMessage returns the underlying Protobuf message.
func (*Enum) ValueNameToValue ¶ added in v1.11.0
ValueNameToValue returns the values of the given Enum.
func (*Enum) ValueNumberToValue ¶ added in v1.11.0
ValueNumberToValue returns the values of the given Enum.
type EnumValue ¶ added in v1.11.0
type EnumValue struct {
// contains filtered or unexported fields
}
EnumValue is the Golang wrapper for the Protobuf EnumValue object.
func (*EnumValue) ProtoMessage ¶ added in v1.11.0
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 ¶ added in v1.11.0
func (m *Message) FieldNameToField() map[string]*MessageField
FieldNameToField returns the fields of the given Message.
func (*Message) FieldNumberToField ¶ added in v1.11.0
func (m *Message) FieldNumberToField() map[int32]*MessageField
FieldNumberToField returns the fields of the given Message.
func (*Message) FullyQualifiedName ¶ added in v1.11.0
FullyQualifiedName returns the fully-qualified name.
func (*Message) NestedEnumNameToEnum ¶ added in v1.11.0
NestedEnumNameToEnum returns the nested enums of the given Message.
func (*Message) NestedMessageNameToMessage ¶ added in v1.11.0
NestedMessageNameToMessage returns the nested messages of the given Message.
func (*Message) OneofNameToOneof ¶ added in v1.11.0
func (m *Message) OneofNameToOneof() map[string]*MessageOneof
OneofNameToOneof returns the oneofs of the given Message.
func (*Message) ProtoMessage ¶ added in v1.11.0
ProtoMessage returns the underlying Protobuf message.
type MessageField ¶ added in v1.11.0
type MessageField struct {
// contains filtered or unexported fields
}
MessageField is the Golang wrapper for the Protobuf MessageField object.
func (*MessageField) Message ¶ added in v1.11.0
func (m *MessageField) Message() *Message
Message returns the parent Message.
func (*MessageField) MessageOneof ¶ added in v1.11.0
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 ¶ added in v1.11.0
func (m *MessageField) ProtoMessage() *reflectv1.MessageField
ProtoMessage returns the underlying Protobuf message.
type MessageOneof ¶ added in v1.11.0
type MessageOneof struct {
// contains filtered or unexported fields
}
MessageOneof is the Golang wrapper for the Protobuf MessageOneof object.
func (*MessageOneof) FieldNameToField ¶ added in v1.11.0
func (m *MessageOneof) FieldNameToField() map[string]*MessageField
FieldNameToField returns the fields of the given MessageOneof.
func (*MessageOneof) FieldNumberToField ¶ added in v1.11.0
func (m *MessageOneof) FieldNumberToField() map[int32]*MessageField
FieldNumberToField returns the fields of the given MessageOneof.
func (*MessageOneof) Message ¶ added in v1.11.0
func (m *MessageOneof) Message() *Message
Message returns the parent Message.
func (*MessageOneof) ProtoMessage ¶ added in v1.11.0
func (m *MessageOneof) ProtoMessage() *reflectv1.MessageOneof
ProtoMessage returns the underlying Protobuf message.
type Package ¶ added in v1.11.0
type Package struct {
// contains filtered or unexported fields
}
Package is the Golang wrapper for the Protobuf Package object.
func (*Package) DependencyNameToDependency ¶ added in v1.11.0
DependencyNameToDependency returns the direct dependencies of the given Package.
func (*Package) EnumNameToEnum ¶ added in v1.11.0
EnumNameToEnum returns the nested enums of the given Package.
func (*Package) FullyQualifiedName ¶ added in v1.11.0
FullyQualifiedName returns the fully-qualified name.
func (*Package) ImporterNameToImporter ¶ added in v1.11.0
ImporterNameToImporter returns the direct importers of the given Package.
func (*Package) MessageNameToMessage ¶ added in v1.11.0
MessageNameToMessage returns the nested messages of the given Package.
func (*Package) PackageSet ¶ added in v1.11.0
func (p *Package) PackageSet() *PackageSet
PackageSet returns the parent PackageSet.
func (*Package) ProtoMessage ¶ added in v1.11.0
ProtoMessage returns the underlying Protobuf message.
func (*Package) ServiceNameToService ¶ added in v1.11.0
ServiceNameToService returns the nested services of the given Package.
type PackageSet ¶ added in v1.11.0
type PackageSet struct {
// contains filtered or unexported fields
}
PackageSet is the Golang wrapper for the Protobuf PackageSet object.
func NewPackageSet ¶ added in v1.11.0
func NewPackageSet(protoMessage *reflectv1.PackageSet) (*PackageSet, error)
NewPackageSet returns a new PackageSet for the given reflect PackageSet.
func (*PackageSet) PackageNameToPackage ¶ added in v1.11.0
func (p *PackageSet) PackageNameToPackage() map[string]*Package
PackageNameToPackage returns a map from package name to Package.
func (*PackageSet) ProtoMessage ¶ added in v1.11.0
func (p *PackageSet) ProtoMessage() *reflectv1.PackageSet
ProtoMessage returns the underlying Protobuf message.
func (*PackageSet) WithoutBeta ¶ added in v1.11.0
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 ¶ added in v1.11.0
FullyQualifiedName returns the fully-qualified name.
func (*Service) MethodNameToMethod ¶ added in v1.11.0
func (s *Service) MethodNameToMethod() map[string]*ServiceMethod
MethodNameToMethod returns the methods of the given Service.
func (*Service) ProtoMessage ¶ added in v1.11.0
ProtoMessage returns the underlying Protobuf message.
type ServiceMethod ¶ added in v1.11.0
type ServiceMethod struct {
// contains filtered or unexported fields
}
ServiceMethod is the Golang wrapper for the Protobuf ServiceMethod object.
func (*ServiceMethod) ProtoMessage ¶ added in v1.11.0
func (m *ServiceMethod) ProtoMessage() *reflectv1.ServiceMethod
ProtoMessage returns the underlying Protobuf service.
func (*ServiceMethod) Service ¶ added in v1.11.0
func (m *ServiceMethod) Service() *Service
Service returns the parent Service.