Documentation ¶
Overview ¶
Package textpb marshals and unmarshals protocol buffer messages as the textproto format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MarshalOptions ¶
type MarshalOptions struct { pragma.NoUnkeyedLiterals // AllowPartial allows messages that have missing required fields to marshal // without returning an error. If AllowPartial is false (the default), // Marshal will return error if there are any missing required fields. AllowPartial bool // If Indent is a non-empty string, it causes entries for a Message to be // preceded by the indent and trailed by a newline. Indent can only be // composed of space or tab characters. Indent string // Resolver is the registry used for type lookups when marshaling out // google.protobuf.Any messages in expanded form. If Resolver is not set, // marshaling will default to using protoregistry.GlobalTypes. If a type is // not found, an Any message will be marshaled as a regular message. Resolver *protoregistry.Types }
MarshalOptions is a configurable text format marshaler.
type UnmarshalOptions ¶
type UnmarshalOptions struct { pragma.NoUnkeyedLiterals // AllowPartial accepts input for messages that will result in missing // required fields. If AllowPartial is false (the default), Unmarshal will // return error if there are any missing required fields. AllowPartial bool // Resolver is the registry used for type lookups when unmarshaling extensions // and processing Any. If Resolver is not set, unmarshaling will default to // using protoregistry.GlobalTypes. Resolver *protoregistry.Types }
UnmarshalOptions is a configurable textproto format unmarshaler.
Click to show internal directories.
Click to hide internal directories.