dynamictype

package
v0.0.0-...-3831139 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProtoJSON

func NewProtoJSON

func NewProtoJSON(resolver Resolver) *ProtoJSON

func (ProtoJSON) Marshal

func (pj ProtoJSON) Marshal(msg proto.Message) ([]byte, error)

func (ProtoJSON) Unmarshal

func (pj ProtoJSON) Unmarshal(b []byte, msg proto.Message) error

type TypeRegistry

type TypeRegistry struct {

	// leave nil, will panic if used.
	protoregistry.ExtensionTypeResolver
	// contains filtered or unexported fields
}

func NewTypeRegistry

func NewTypeRegistry() *TypeRegistry

func (*TypeRegistry) AddFileDescriptor

func (r *TypeRegistry) AddFileDescriptor(fds *descriptorpb.FileDescriptorSet) error

func (*TypeRegistry) AddMessage

func (r *TypeRegistry) AddMessage(msg protoreflect.MessageDescriptor)

func (*TypeRegistry) FindMessageByName

func (r *TypeRegistry) FindMessageByName(field protoreflect.FullName) (protoreflect.MessageType, error)

func (*TypeRegistry) FindMessageByURL

func (r *TypeRegistry) FindMessageByURL(url string) (protoreflect.MessageType, error)

func (*TypeRegistry) LoadExternalProtobufs

func (r *TypeRegistry) LoadExternalProtobufs(src string) error

func (*TypeRegistry) LoadProtoFromFile

func (r *TypeRegistry) LoadProtoFromFile(fileName string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL