info

package
v0.0.0-...-c824f4b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldInfo

type FieldInfo struct {
	// Desc is the field descriptor.
	Desc protoreflect.FieldDescriptor

	// Complexity is the complexity of the field.
	Complexity int64

	// FilteringForbidden is true if the field filtering is forbidden.
	FilteringForbidden bool

	// OrderingForbidden is true if the field ordering is forbidden.
	OrderingForbidden bool

	// NonTraversal is true if the field is non-traversal.
	NonTraversal bool

	// NoTextSearch is true if the field is no text search.
	NoTextSearch bool

	// Nullable is true if the field is nullable.
	Nullable bool

	// InputOnly is true if the field is input only.
	InputOnly bool

	// OutputOnly is true if the field is output only.
	OutputOnly bool

	// IsOneOf is true if the field is a oneof field.
	IsOneOf bool

	// Required is true if the field is required.
	Required bool

	// Immutable is true if the field is immutable.
	Immutable bool

	// NonEmptyDefault is true if the field has a non-empty default value.
	NonEmptyDefault bool

	// IsTimestamp is true if the field is a timestamp.
	IsTimestamp bool

	// IsDuration is true if the field is a duration.
	IsDuration bool

	// IsStructpb is true if the field is a structpb.
	IsStructpb bool
}

FieldInfo is a struct that contains information about a field.

func (FieldInfo) Undefined

func (fi FieldInfo) Undefined() bool

Undefined returns true if the descriptor is nil.

type MessageInfo

type MessageInfo struct {
	Desc   protoreflect.MessageDescriptor
	Fields []FieldInfo
}

MessageInfo is a struct that contains information about a message.

func (*MessageInfo) FieldByName

func (mi *MessageInfo) FieldByName(name protoreflect.Name) (FieldInfo, bool)

FieldByName returns the field info for the given field name.

type MessagesInfo

type MessagesInfo []*MessageInfo

MessagesInfo is a slice of MessageInfo.

func MapMsgInfo

MapMsgInfo maps a message descriptor to a MessageInfo struct.

func (MessagesInfo) GetFieldInfo

func (mi MessagesInfo) GetFieldInfo(fd protoreflect.FieldDescriptor) FieldInfo

GetFieldInfo returns the field info for the given field descriptor.

func (MessagesInfo) MessageInfo

MessageInfo returns the message info for the given message descriptor.

Jump to

Keyboard shortcuts

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