Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enum ¶
type Enum struct {
EnumName string
EnumBody *EnumBody
// Comments are the optional ones placed at the beginning.
Comments []*parser.Comment
// InlineComment is the optional one placed at the ending.
InlineComment *parser.Comment
// InlineCommentBehindLeftCurly is the optional one placed behind a left curly.
InlineCommentBehindLeftCurly *parser.Comment
// Meta is the meta information.
Meta meta.Meta
}
Enum consists of a name and an enum body.
type EnumBody ¶
type EnumBody struct {
Options []*parser.Option
EnumFields []*parser.EnumField
Reserveds []*parser.Reserved
EmptyStatements []*parser.EmptyStatement
}
EnumBody is unordered in nature, but each slice field preserves the original order.
type Extend ¶
type Extend struct {
MessageType string
ExtendBody *ExtendBody
// Comments are the optional ones placed at the beginning.
Comments []*parser.Comment
// InlineComment is the optional one placed at the ending.
InlineComment *parser.Comment
// InlineCommentBehindLeftCurly is the optional one placed behind a left curly.
InlineCommentBehindLeftCurly *parser.Comment
// Meta is the meta information.
Meta meta.Meta
}
Extend consists of a messageType and a extend body.
type ExtendBody ¶
type ExtendBody struct {
Fields []*parser.Field
EmptyStatements []*parser.EmptyStatement
}
ExtendBody is unordered in nature, but each slice field preserves the original order.
type Message ¶
type Message struct {
MessageName string
MessageBody *MessageBody
// Comments are the optional ones placed at the beginning.
Comments []*parser.Comment
// InlineComment is the optional one placed at the ending.
InlineComment *parser.Comment
// InlineCommentBehindLeftCurly is the optional one placed behind a left curly.
InlineCommentBehindLeftCurly *parser.Comment
// Meta is the meta information.
Meta meta.Meta
}
Message consists of a message name and a message body.
type MessageBody ¶
type MessageBody struct {
Fields []*parser.Field
Enums []*Enum
Messages []*Message
Options []*parser.Option
Oneofs []*parser.Oneof
Maps []*parser.MapField
Groups []*parser.GroupField
Reserves []*parser.Reserved
Extends []*parser.Extend
EmptyStatements []*parser.EmptyStatement
Extensions []*parser.Extensions
}
MessageBody is unordered in nature, but each slice field preserves the original order.
type ProtoBody ¶
type ProtoBody struct {
Imports []*parser.Import
Packages []*parser.Package
Options []*parser.Option
Messages []*Message
Extends []*Extend
Enums []*Enum
Services []*Service
EmptyStatements []*parser.EmptyStatement
}
ProtoBody is unordered in nature, but each slice field preserves the original order.
type Service ¶
type Service struct {
ServiceName string
ServiceBody *ServiceBody
// Comments are the optional ones placed at the beginning.
Comments []*parser.Comment
// InlineComment is the optional one placed at the ending.
InlineComment *parser.Comment
// InlineCommentBehindLeftCurly is the optional one placed behind a left curly.
InlineCommentBehindLeftCurly *parser.Comment
// Meta is the meta information.
Meta meta.Meta
}
Service consists of RPCs.
Click to show internal directories.
Click to hide internal directories.