Documentation ¶
Overview ¶
Package registry provides registries for Protocol Buffers descriptors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enum ¶
type Enum interface { Protobuf() *protobuf.Enum GetFieldByName(name string) (*EnumField, bool) GetFieldByLine(line int) (*EnumField, bool) }
Enum is a registry for protobuf enum.
type EnumField ¶
EnumField is a registry for protobuf enum field.
func NewEnumField ¶
NewEnumField returns EnumField initialized by provided *protobuf.EnumField.
type MapField ¶
MapField is a registry for protobuf enum field.
func NewMapField ¶
NewMapField returns MapField initialized by provided *protobuf.MapField.
type Message ¶
type Message interface { Protobuf() *protobuf.Message NestedMessages() []Message NestedEnums() []Enum Fields() []*MessageField Oneofs() []Oneof MapFields() []*MapField GetNestedMessageByName(name string) (Message, bool) GetNestedEnumByName(name string) (Enum, bool) GetFieldByName(name string) (*MessageField, bool) GetOneofFieldByName(name string) (Oneof, bool) GetMapFieldByName(name string) (*MapField, bool) GetFieldByLine(line int) (*MessageField, bool) GetOneofFieldByLine(line int) (Oneof, bool) GetMapFieldByLine(line int) (*MapField, bool) }
Message is a registry for protobuf message.
func NewMessage ¶
NewMessage returns Message initialized by provided *protobuf.Message.
type MessageField ¶
type MessageField struct {
ProtoField *protobuf.NormalField
}
MessageField is a registry for protobuf message field.
func NewMessageField ¶
func NewMessageField(protoMessage *protobuf.NormalField) *MessageField
NewMessageField returns MessageField initialized by provided *protobuf.MessageField.
type Oneof ¶
type Oneof interface { Protobuf() *protobuf.Oneof GetFieldByName(name string) (*OneofField, bool) GetFieldByLine(line int) (*OneofField, bool) }
Oneof is a registry for protobuf oneof.
type OneofField ¶
type OneofField struct {
ProtoOneOfField *protobuf.OneOfField
}
OneofField is a registry for protobuf oneof field.
func NewOneofField ¶
func NewOneofField(protoOneOfField *protobuf.OneOfField) *OneofField
NewOneofField returns OneofField initialized by provided *protobuf.OneofField.
type Package ¶
Package is a registry for protobuf package.
func NewPackage ¶
NewPackage returns Package initialized by provided *protobuf.Package.
type Proto ¶
type Proto interface { Protobuf() *protobuf.Proto Packages() []*Package Messages() []Message Enums() []Enum Services() []Service GetPackageByName(name string) (*Package, bool) GetMessageByName(name string) (Message, bool) GetEnumByName(name string) (Enum, bool) GetServiceByName(name string) (Service, bool) GetPackageByLine(line int) (*Package, bool) GetMessageByLine(line int) (Message, bool) GetEnumByLine(line int) (Enum, bool) GetServiceByLine(line int) (Service, bool) GetMessageFieldByLine(line int) (*MessageField, bool) GetEnumFieldByLine(line int) (*EnumField, bool) }
Proto is a registry for protobuf proto.
type ProtoSet ¶
type ProtoSet interface { Protos() []Proto Append(proto *protobuf.Proto) GetProtoByFilename(filename string) (Proto, bool) }
ProtoSet is a registry for Proto.
func NewProtoSet ¶
NewProtoSet returns protoSet initialized by provided []*protobuf.Proto.