extract

package
v1.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package extract is used to extract elements from reflect PackageSets.

Index

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

func (e *Enum) FullyQualifiedName() string

FullyQualifiedName returns the fully-qualified name.

func (*Enum) ProtoMessage

func (e *Enum) ProtoMessage() *reflectv1.Enum

ProtoMessage returns the underlying Protobuf message.

func (*Enum) ValueNameToValue

func (e *Enum) ValueNameToValue() map[string]*EnumValue

ValueNameToValue returns the values of the given Enum.

func (*Enum) ValueNumberToValue

func (e *Enum) ValueNumberToValue() map[int32]*EnumValue

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) Enum

func (m *EnumValue) Enum() *Enum

Enum returns the parent Enum.

func (*EnumValue) ProtoMessage

func (m *EnumValue) ProtoMessage() *reflectv1.EnumValue

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

func (m *Message) FullyQualifiedName() string

FullyQualifiedName returns the fully-qualified name.

func (*Message) NestedEnumNameToEnum

func (m *Message) NestedEnumNameToEnum() map[string]*Enum

NestedEnumNameToEnum returns the nested enums of the given Message.

func (*Message) NestedMessageNameToMessage

func (m *Message) NestedMessageNameToMessage() map[string]*Message

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

func (m *Message) ProtoMessage() *reflectv1.Message

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

func (p *Package) DependencyNameToDependency() map[string]*Package

DependencyNameToDependency returns the direct dependencies of the given Package.

func (*Package) EnumNameToEnum

func (p *Package) EnumNameToEnum() map[string]*Enum

EnumNameToEnum returns the nested enums of the given Package.

func (*Package) FullyQualifiedName

func (p *Package) FullyQualifiedName() string

FullyQualifiedName returns the fully-qualified name.

func (*Package) ImporterNameToImporter

func (p *Package) ImporterNameToImporter() map[string]*Package

ImporterNameToImporter returns the direct importers of the given Package.

func (*Package) MessageNameToMessage

func (p *Package) MessageNameToMessage() map[string]*Message

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

func (p *Package) ProtoMessage() *reflectv1.Package

ProtoMessage returns the underlying Protobuf message.

func (*Package) ServiceNameToService

func (p *Package) ServiceNameToService() map[string]*Service

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

func (s *Service) FullyQualifiedName() string

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

func (s *Service) ProtoMessage() *reflectv1.Service

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL