Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlreadyRegistered = fmt.Errorf("proto schema already registered")
ErrAlreadyRegistered is returned when a descriptor is already registered.
View Source
var ErrNotFound = fmt.Errorf("not found")
ErrNotFound is returned when a descriptor is not found.
Functions ¶
func GetDescriptor ¶
func GetDescriptor(protoFqn string) (protoreflect.MessageDescriptor, error)
GetDescriptor returns a Protocol Buffer Descriptor given a fully qualified name (pacakge.MessageName).
func Register ¶
Register takes a Protobuf Schema or a URL of a Protobuf Schema and registers it in the global registry. It returns the package name of the schema and an error if occurred.
func SchemaToFDs ¶
func SchemaToFDs(schema string) ([]*desc.FileDescriptor, string, error)
SchemaToFDs takes a Protobuf Schema or a URL of a Protobuf Schema and returns a list of FileDescriptors, the package name of the schama, the package name of the schema and an error if occurred.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.