Documentation ¶
Index ¶
- type Descriptor
- func (d *Descriptor) Descriptor() *descriptorpb.EnumDescriptorProto
- func (d *Descriptor) GetComment() *protodesc.Comment
- func (d *Descriptor) GetName() string
- func (d *Descriptor) GetOptions() *descriptorpb.EnumOptions
- func (d *Descriptor) GetReservedName() []string
- func (d *Descriptor) GetReservedRange() []*descriptorpb.EnumDescriptorProto_EnumReservedRange
- func (d *Descriptor) GetValue() ValueDescriptors
- func (d *Descriptor) SetDetachedComment(detached []string)
- func (d *Descriptor) SetLeadingComment(fn, leading string)
- func (d *Descriptor) SetTrailingComment(trailing string)
- type ValueDescriptor
- type ValueDescriptors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶
type Descriptor struct { Values ValueDescriptors // contains filtered or unexported fields }
Descriptor describes an enum type.
func NewDescriptor ¶
func NewDescriptor(name string) *Descriptor
NewDescriptor returns the new named *Descriptor.
func (*Descriptor) Descriptor ¶
func (d *Descriptor) Descriptor() *descriptorpb.EnumDescriptorProto
Descriptor returns the enum descriptor.
func (*Descriptor) GetComment ¶
func (d *Descriptor) GetComment() *protodesc.Comment
GetComment gets the enum comment.
func (*Descriptor) GetOptions ¶
func (d *Descriptor) GetOptions() *descriptorpb.EnumOptions
GetOptions gets the enum options.
func (*Descriptor) GetReservedName ¶
func (d *Descriptor) GetReservedName() []string
GetReservedName gets the enum reserved names.
func (*Descriptor) GetReservedRange ¶
func (d *Descriptor) GetReservedRange() []*descriptorpb.EnumDescriptorProto_EnumReservedRange
GetReservedRange gets the enum reserved range.
func (*Descriptor) GetValue ¶
func (d *Descriptor) GetValue() ValueDescriptors
GetValue gets the enum values.
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) SetTrailingComment ¶
func (d *Descriptor) SetTrailingComment(trailing string)
SetTrailingComment sets the enum trailing comment.
type ValueDescriptor ¶
type ValueDescriptor struct {
// contains filtered or unexported fields
}
ValueDescriptor describes a value within an enum.
func NewValueDescriptor ¶
func NewValueDescriptor(name string, number int32) *ValueDescriptor
NewValueDescriptor returns the new named *ValueDescriptor with number.
func (*ValueDescriptor) Descriptor ¶
func (d *ValueDescriptor) Descriptor() *descriptorpb.EnumValueDescriptorProto
Descriptor returns the enum value descriptor.
func (*ValueDescriptor) GetName ¶
func (d *ValueDescriptor) GetName() string
GetName gets the enum name.
func (*ValueDescriptor) SetDeprecated ¶
func (d *ValueDescriptor) SetDeprecated()
SetDeprecated sets the deprecated itself.
type ValueDescriptors ¶
type ValueDescriptors []*ValueDescriptor
ValueDescriptors describes a slice of value within an enum.
func (ValueDescriptors) Descriptor ¶
func (s ValueDescriptors) Descriptor() []*descriptorpb.EnumValueDescriptorProto
Descriptor returns the enum value descriptors.