func Marshal(v protoreflect.Value, ev protoreflect.EnumValueDescriptor, k protoreflect.Kind, f Format) (string, error)
Marshal serializes v as the default string according to the given kind k. When specifying the Descriptor format for an enum kind, the associated enum value descriptor must be provided.
func Unmarshal(s string, k protoreflect.Kind, evs protoreflect.EnumValueDescriptors, f Format) (protoreflect.Value, protoreflect.EnumValueDescriptor, error)
Unmarshal deserializes the default string s according to the given kind k. When k is an enum, a list of enum value descriptors must be provided.
Format is the serialization format used to represent the default value.
type Format int
const ( // Descriptor uses the serialization format that protoc uses with the // google.protobuf.FieldDescriptorProto.default_value field. Descriptor Format // GoTag uses the historical serialization format in Go struct field tags. GoTag )