message

package
v0.0.0-...-d4cb099 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) GetName

func (d *Descriptor) GetName() string

GetName gets the message name.

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

Descriptor returns the oneof descriptor.

func (*OneofDescriptor) GetName

func (d *OneofDescriptor) GetName() string

GetName gets the oneof name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL