Documentation
¶
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)
GetParentMessage() Message
SetParentMessage(Message)
}
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
Imports() []*Import
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)
GetAllParentMessage(line int) []Message
GetAllParentEnum(line int) []Enum
}
Proto is a registry for protobuf proto.
func NewProto ¶
func NewProto(document_uri defines.DocumentUri, protoProto *protobuf.Proto) Proto
NewProto returns Proto initialized by provided *protobuf.Proto.
func ParseProto ¶
ParseProtos parses protobuf files from filenames and return parser.ProtoSet.