Documentation ¶
Index ¶
- func FillWithRandom(t *testing.T, randStream *rand.Rand, msg proto.Message)
- func Visit(msgPath string, msg protoreflect.Message, setter func(v protoreflect.Value), ...)
- type ClearFields
- func (v *ClearFields) VisitList(path string, msg protoreflect.List, setter func(v protoreflect.Value))
- func (v *ClearFields) VisitMap(path string, msg protoreflect.Map, setter func(v protoreflect.Value))
- func (v *ClearFields) VisitMessage(path string, msg protoreflect.Message, setter func(v protoreflect.Value))
- func (v *ClearFields) VisitPrimitive(path string, val protoreflect.Value, setter func(v protoreflect.Value))
- type ProtoVisitor
- type ProtoVisitorBase
- func (v *ProtoVisitorBase) VisitList(path string, msg protoreflect.List, setter func(v protoreflect.Value))
- func (v *ProtoVisitorBase) VisitMap(path string, msg protoreflect.Map, setter func(v protoreflect.Value))
- func (v *ProtoVisitorBase) VisitMessage(path string, msg protoreflect.Message, setter func(v protoreflect.Value))
- func (v *ProtoVisitorBase) VisitPrimitive(path string, val protoreflect.Value, setter func(v protoreflect.Value))
- type ReplaceFields
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Visit ¶
func Visit(msgPath string, msg protoreflect.Message, setter func(v protoreflect.Value), visitor ProtoVisitor)
Types ¶
type ClearFields ¶
type ClearFields struct { ProtoVisitorBase Paths sets.Set[string] }
func (*ClearFields) VisitList ¶
func (v *ClearFields) VisitList(path string, msg protoreflect.List, setter func(v protoreflect.Value))
func (*ClearFields) VisitMap ¶
func (v *ClearFields) VisitMap(path string, msg protoreflect.Map, setter func(v protoreflect.Value))
func (*ClearFields) VisitMessage ¶
func (v *ClearFields) VisitMessage(path string, msg protoreflect.Message, setter func(v protoreflect.Value))
func (*ClearFields) VisitPrimitive ¶
func (v *ClearFields) VisitPrimitive(path string, val protoreflect.Value, setter func(v protoreflect.Value))
type ProtoVisitor ¶
type ProtoVisitor interface { VisitPrimitive(path string, val protoreflect.Value, setter func(v protoreflect.Value)) VisitMessage(path string, msg protoreflect.Message, setter func(v protoreflect.Value)) VisitList(path string, msg protoreflect.List, setter func(v protoreflect.Value)) VisitMap(path string, msg protoreflect.Map, setter func(v protoreflect.Value)) }
type ProtoVisitorBase ¶
type ProtoVisitorBase struct { }
func (*ProtoVisitorBase) VisitList ¶
func (v *ProtoVisitorBase) VisitList(path string, msg protoreflect.List, setter func(v protoreflect.Value))
func (*ProtoVisitorBase) VisitMap ¶
func (v *ProtoVisitorBase) VisitMap(path string, msg protoreflect.Map, setter func(v protoreflect.Value))
func (*ProtoVisitorBase) VisitMessage ¶
func (v *ProtoVisitorBase) VisitMessage(path string, msg protoreflect.Message, setter func(v protoreflect.Value))
func (*ProtoVisitorBase) VisitPrimitive ¶
func (v *ProtoVisitorBase) VisitPrimitive(path string, val protoreflect.Value, setter func(v protoreflect.Value))
type ReplaceFields ¶
type ReplaceFields struct { ProtoVisitorBase Func func(path string, val protoreflect.Value) (protoreflect.Value, bool) }
func (*ReplaceFields) VisitPrimitive ¶
func (v *ReplaceFields) VisitPrimitive(path string, val protoreflect.Value, setter func(v protoreflect.Value))
Click to show internal directories.
Click to hide internal directories.