Documentation ¶
Index ¶
- type Field
- func (field Field) CastType() string
- func (field Field) CustomType() string
- func (field Field) File() *File
- func (field Field) Forest() *Forest
- func (field Field) IsBool() bool
- func (field Field) IsBytes() bool
- func (field Field) IsDuration() bool
- func (field Field) IsEnum() bool
- func (field Field) IsInt32() bool
- func (field Field) IsInt64() bool
- func (field Field) IsMap() bool
- func (field Field) IsMessage() bool
- func (field Field) IsNullable() bool
- func (field Field) IsOptional() bool
- func (field Field) IsRepeated() bool
- func (field Field) IsRequired() bool
- func (field Field) IsString() bool
- func (field Field) IsTime() bool
- func (field Field) IsUint32() bool
- func (field Field) IsUint64() bool
- func (field Field) JSONName() string
- func (field Field) LeadingComments() string
- func (field Field) Message() *Message
- func (field Field) Name() string
- func (field Field) Path() string
- func (field Field) TypeMessage() *Message
- func (field Field) TypeName() string
- type File
- type Forest
- type Location
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field is wrapper for descriptor.FieldDescriptorProto.
func (Field) CustomType ¶
func (Field) IsDuration ¶
IsDuration returns true if field stores a duration value (protobuf or cast to a standard library type)
func (Field) IsNullable ¶
func (Field) IsOptional ¶
func (Field) IsRepeated ¶
func (Field) IsRequired ¶
func (Field) LeadingComments ¶
func (Field) TypeMessage ¶
type File ¶
type File struct { Messages []*Message // contains filtered or unexported fields }
File is a wrapper for generator.FileDescriptor which is used to keep track of all seen messages.
type Forest ¶
Forest is a forest of file trees. It's a wrapper for generator.Generator.
func NewForest ¶
NewForest creates a Forest of file trees wrapping the given Generator. The Forest is used to keep track of trees built when processing proto messages.
func (*Forest) AddFile ¶
func (forest *Forest) AddFile(fileDesc *gogodesc.FileDescriptorProto) *File
AddFile adds a proto file to the Forest. The function returns a *File containing the location map (where each message is located in the source), the list of Messages from the file, and Message indices by Descriptor and name for easier lookups.
type Location ¶
type Location struct {
// contains filtered or unexported fields
}
Location is a wrapper for descriptor.SourceCodeInfo_Location.
func (Location) LeadingComments ¶
type Message ¶
type Message struct { Fields []*Field // contains filtered or unexported fields }
Message is a wrapper for generator.Descriptor.