fuzz

package
v1.122.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillWithRandom

func FillWithRandom(t *testing.T, randStream *rand.Rand, msg proto.Message)

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

Jump to

Keyboard shortcuts

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