dyncodec

package
v3.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec struct {
	Registry *Registry
	// contains filtered or unexported fields
}

func NewCodec

func NewCodec(registry *Registry) *Codec

func (*Codec) GRPCCodec

func (c *Codec) GRPCCodec() encoding.Codec

func (*Codec) MarshalProto

func (c *Codec) MarshalProto(m proto.Message) ([]byte, error)

func (*Codec) MarshalProtoJSON

func (c *Codec) MarshalProtoJSON(m proto.Message) ([]byte, error)

func (*Codec) NewAny

func (c *Codec) NewAny(m proto.Message) (*anypb.Any, error)

func (*Codec) ProtoOptions

func (c *Codec) ProtoOptions() ProtoOptions

func (*Codec) UnmarshalProto

func (c *Codec) UnmarshalProto(b []byte, m proto.Message) error

func (*Codec) UnmarshalProtoJSON

func (c *Codec) UnmarshalProtoJSON(b []byte, m proto.Message) error

type GRPCReflectionProtoFileRegistry

type GRPCReflectionProtoFileRegistry struct {
	// contains filtered or unexported fields
}

GRPCReflectionProtoFileRegistry is a ProtoFileRegistry which uses grpc reflection to resolve files.

func NewGRPCReflectionProtoFileRegistryFromConn

func NewGRPCReflectionProtoFileRegistryFromConn(conn *grpc.ClientConn) *GRPCReflectionProtoFileRegistry

func (*GRPCReflectionProtoFileRegistry) Close

func (*GRPCReflectionProtoFileRegistry) ProtoFileByPath

func (*GRPCReflectionProtoFileRegistry) ProtoFileContainingSymbol

func (g *GRPCReflectionProtoFileRegistry) ProtoFileContainingSymbol(name protoreflect.FullName) (_ *descriptorpb.FileDescriptorProto, err error)

type ProtoFileRegistry

type ProtoFileRegistry interface {
	ProtoFileByPath(path string) (*descriptorpb.FileDescriptorProto, error)
	ProtoFileContainingSymbol(name protoreflect.FullName) (*descriptorpb.FileDescriptorProto, error)
	Close() error
}

type ProtoOptions

type ProtoOptions struct {
	Marshal       proto.MarshalOptions
	Unmarshal     proto.UnmarshalOptions
	JSONMarshal   protojson.MarshalOptions
	JSONUnmarshal protojson.UnmarshalOptions
}

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(remote ProtoFileRegistry) *Registry

func (*Registry) FindDescriptorByName

func (r *Registry) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error)

func (*Registry) FindExtensionByName

func (r *Registry) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)

func (*Registry) FindExtensionByNumber

func (r *Registry) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)

func (*Registry) FindFileByPath

func (r *Registry) FindFileByPath(s string) (protoreflect.FileDescriptor, error)

func (*Registry) FindMessageByName

func (r *Registry) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error)

func (*Registry) FindMessageByURL

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

func (*Registry) Remote

func (r *Registry) Remote() ProtoFileRegistry

func (*Registry) Save

type RelayerRemote

type RelayerRemote struct {
	// contains filtered or unexported fields
}

func NewRelayerRemote

func NewRelayerRemote(relay grpcproxy.ProxyCallBack) *RelayerRemote

func (RelayerRemote) Close

func (r RelayerRemote) Close() error

func (RelayerRemote) ProtoFileByPath

func (r RelayerRemote) ProtoFileByPath(path string) (*descriptorpb.FileDescriptorProto, error)

func (RelayerRemote) ProtoFileContainingSymbol

func (r RelayerRemote) ProtoFileContainingSymbol(name protoreflect.FullName) (*descriptorpb.FileDescriptorProto, error)

Jump to

Keyboard shortcuts

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