Documentation ¶
Overview ¶
Package pbsupport protobuf support used in db package.
Package pbsupport protobuf support used in db package.
Index ¶
- func DirtyFilter(desc protoreflect.MessageDescriptor, fields []FieldName) map[string]struct{}
- func FindFds(msgDesc protoreflect.MessageDescriptor, keyNames []string) []protoreflect.FieldDescriptor
- func IsFdMarshalToBlob(fd protoreflect.FieldDescriptor) bool
- func MarshalToMap(msg proto.Message, fields []FieldName) (map[string]any, error)
- func UnmarshalFromMap(msg proto.Message, bytesMap map[string]string) (err error)
- type FieldName
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirtyFilter ¶
func DirtyFilter(desc protoreflect.MessageDescriptor, fields []FieldName) map[string]struct{}
DirtyFilter Create dirty filter and ignore deep level fields.
func FindFds ¶
func FindFds(msgDesc protoreflect.MessageDescriptor, keyNames []string) []protoreflect.FieldDescriptor
FindFds find field descriptor, keep order of param KeyNames.
func IsFdMarshalToBlob ¶
func IsFdMarshalToBlob(fd protoreflect.FieldDescriptor) bool
IsFdMarshalToBlob if a field will marshal to blob.
func MarshalToMap ¶
MarshalToMap recode split and marshal data to map, scalar will be marshal to string.
Types ¶
type FieldName ¶
type FieldName protoreflect.Name
Click to show internal directories.
Click to hide internal directories.