const ProtoPackageIsVersion1 … const ProtoPackageIsVersion2 … const ProtoPackageIsVersion3 … const ProtoPackageIsVersion4 … type GeneratedEnum … type GeneratedMessage … type Message … // MessageV1 converts either a v1 or v2 message to a v1 message. // It returns nil if m is nil. func MessageV1(m GeneratedMessage) protoiface.MessageV1 { … } // MessageV2 converts either a v1 or v2 message to a v2 message. // It returns nil if m is nil. func MessageV2(m GeneratedMessage) protoV2.Message { … } // MessageReflect returns a reflective view for a message. // It returns nil if m is nil. func MessageReflect(m Message) protoreflect.Message { … } type Marshaler … type Unmarshaler … type Merger … type RequiredNotSetError … func (e *RequiredNotSetError) Error() string { … } func (e *RequiredNotSetError) RequiredNotSet() bool { … } func checkRequiredNotSet(m protoV2.Message) error { … } // Clone returns a deep copy of src. func Clone(src Message) Message { … } // Merge merges src into dst, which must be messages of the same type. // // Populated scalar fields in src are copied to dst, while populated // singular messages in src are merged into dst by recursively calling Merge. // The elements of every list field in src is appended to the corresponded // list fields in dst. The entries of every map field in src is copied into // the corresponding map field in dst, possibly replacing existing entries. // The unknown fields of src are appended to the unknown fields of dst. func Merge(dst, src Message) { … } // Equal reports whether two messages are equal. // If two messages marshal to the same bytes under deterministic serialization, // then Equal is guaranteed to report true. // // Two messages are equal if they are the same protobuf message type, // have the same set of populated known and extension field values, // and the same set of unknown fields values. // // Scalar values are compared with the equivalent of the == operator in Go, // except bytes values which are compared using bytes.Equal and // floating point values which specially treat NaNs as equal. // Message values are compared by recursively calling Equal. // Lists are equal if each element value is also equal. // Maps are equal if they have the same set of keys, where the pair of values // for each key is also equal. func Equal(x, y Message) bool { … } func isMessageSet(md protoreflect.MessageDescriptor) bool { … }