Documentation
¶
Index ¶
- type Descriptor
- func (d *Descriptor) Descriptor() *descriptorpb.DescriptorProto
- func (d *Descriptor) GetComment() *protodesc.Comment
- func (d *Descriptor) GetEnums() []*enum.Descriptor
- func (d *Descriptor) GetFields() []*field.Descriptor
- func (d *Descriptor) GetName() string
- func (d *Descriptor) GetOptions() *descriptorpb.MessageOptions
- func (d *Descriptor) IsEmptyField() bool
- func (d *Descriptor) SetDeprecated(deprecated bool)
- func (d *Descriptor) SetDetachedComment(detached []string)
- func (d *Descriptor) SetLeadingComment(fn, leading string)
- func (d *Descriptor) SetOneof(decl *oneof.Descriptor)
- func (d *Descriptor) SetTrailingComment(trailing string)
- type OneofDescriptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶
type Descriptor struct { Fields []*field.Descriptor Enums []*enum.Descriptor Oneofs []*oneof.Descriptor // contains filtered or unexported fields }
Descriptor describes a message type.
func NewDescriptor ¶
func NewDescriptor(name string) *Descriptor
NewDescriptor returns the new named *Descriptor.
func (*Descriptor) Descriptor ¶
func (d *Descriptor) Descriptor() *descriptorpb.DescriptorProto
Descriptor returns the message descriptor.
func (*Descriptor) GetComment ¶
func (d *Descriptor) GetComment() *protodesc.Comment
GetComment gets the enum comment.
func (*Descriptor) GetEnums ¶
func (d *Descriptor) GetEnums() []*enum.Descriptor
GetOptions gets the enums within an message.
func (*Descriptor) GetFields ¶
func (d *Descriptor) GetFields() []*field.Descriptor
GetOptions gets the fields within an message.
func (*Descriptor) GetOptions ¶
func (d *Descriptor) GetOptions() *descriptorpb.MessageOptions
GetOptions gets the message options.
func (*Descriptor) IsEmptyField ¶
func (d *Descriptor) IsEmptyField() bool
func (*Descriptor) SetDeprecated ¶
func (d *Descriptor) SetDeprecated(deprecated bool)
SetDeprecated sets the deprecated itself.
func (*Descriptor) SetDetachedComment ¶
func (d *Descriptor) SetDetachedComment(detached []string)
SetDetachedComment sets the enum detached comments.
func (*Descriptor) SetLeadingComment ¶
func (d *Descriptor) SetLeadingComment(fn, leading string)
SetLeadingComment sets the enum leading comment.
func (*Descriptor) SetOneof ¶
func (d *Descriptor) SetOneof(decl *oneof.Descriptor)
SetOneof sets the oneof declaration.
func (*Descriptor) SetTrailingComment ¶
func (d *Descriptor) SetTrailingComment(trailing string)
SetTrailingComment sets the enum trailing comment.
type OneofDescriptor ¶
type OneofDescriptor struct {
// contains filtered or unexported fields
}
OneofDescriptor describes a oneof.
func NewOneofDescriptor ¶
func NewOneofDescriptor(name string) *OneofDescriptor
NewOneofDescriptor returns the new named *OneofDescriptor.
func (*OneofDescriptor) Descriptor ¶
func (d *OneofDescriptor) Descriptor() *descriptorpb.OneofDescriptorProto
Descriptor returns the oneof descriptor.
func (*OneofDescriptor) GetName ¶
func (d *OneofDescriptor) GetName() string
GetName gets the oneof name.