Documentation ¶
Index ¶
- func AllFields[T proto.Message]() *fieldmaskpb.FieldMask
- func AsTree(mask *fieldmaskpb.FieldMask) art.Tree
- func ByAbsence[T protoreflect.Message](msg T) *fieldmaskpb.FieldMask
- func ByPresence[T protoreflect.Message](msg T) *fieldmaskpb.FieldMask
- func ExclusiveDiscard(msg proto.Message, mask *fieldmaskpb.FieldMask)
- func ExclusiveKeep(msg proto.Message, mask *fieldmaskpb.FieldMask)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByAbsence ¶
func ByAbsence[T protoreflect.Message](msg T) *fieldmaskpb.FieldMask
func ByPresence ¶
func ByPresence[T protoreflect.Message](msg T) *fieldmaskpb.FieldMask
func ExclusiveDiscard ¶
func ExclusiveDiscard(msg proto.Message, mask *fieldmaskpb.FieldMask)
Recursively clears all fields except those NOT listed in the mask, such that: 1. ExclusiveDiscard(msg, ByPresence(msg)) == &T{} 2. ExclusiveDiscard(msg, ByAbsence(msg)) == msg
A nil mask is a no-op, and is not the same as a non-nil, empty mask.
func ExclusiveKeep ¶
func ExclusiveKeep(msg proto.Message, mask *fieldmaskpb.FieldMask)
Recursively clears all fields except those listed in the mask, such that: 1. ExclusiveKeep(msg, ByPresence(msg)) == msg 2. ExclusiveKeep(msg, ByAbsence(msg)) == &T{}
A nil mask is a no-op, and is not the same as a non-nil, empty mask.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.