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.
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 ¶
func MapMsgInfo(desc protoreflect.MessageDescriptor) MessagesInfo
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 ¶
func (mi MessagesInfo) MessageInfo(md protoreflect.MessageDescriptor) *MessageInfo
MessageInfo returns the message info for the given message descriptor.
Click to show internal directories.
Click to hide internal directories.