Documentation ¶
Index ¶
- type CacheProtoFileRegistry
- type Codec
- func (c *Codec) GRPCCodec() encoding.Codec
- func (c *Codec) MarshalProto(m proto.Message) ([]byte, error)
- func (c *Codec) MarshalProtoJSON(m proto.Message) ([]byte, error)
- func (c *Codec) NewAny(m proto.Message) (*anypb.Any, error)
- func (c *Codec) ProtoOptions() ProtoOptions
- func (c *Codec) UnmarshalProto(b []byte, m proto.Message) error
- func (c *Codec) UnmarshalProtoJSON(b []byte, m proto.Message) error
- type GRPCReflectionProtoFileRegistry
- func (g *GRPCReflectionProtoFileRegistry) Close() error
- func (g *GRPCReflectionProtoFileRegistry) ProtoFileByPath(path string) (*descriptorpb.FileDescriptorProto, error)
- func (g *GRPCReflectionProtoFileRegistry) ProtoFileContainingSymbol(name protoreflect.FullName) (*descriptorpb.FileDescriptorProto, error)
- type MultiProtoFileRegistry
- type ProtoFileRegistry
- type ProtoOptions
- type Registry
- func (r Registry) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error)
- func (r *Registry) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)
- func (r *Registry) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)
- func (r Registry) FindFileByPath(s string) (protoreflect.FileDescriptor, error)
- func (r *Registry) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error)
- func (r *Registry) FindMessageByURL(url string) (protoreflect.MessageType, error)
- func (r *Registry) Remote() ProtoFileRegistry
- func (r *Registry) Save() (*descriptorpb.FileDescriptorSet, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheProtoFileRegistry ¶
type CacheProtoFileRegistry struct {
// contains filtered or unexported fields
}
func NewCacheProtoFileRegistry ¶
func NewCacheProtoFileRegistry(set *descriptorpb.FileDescriptorSet) *CacheProtoFileRegistry
func (CacheProtoFileRegistry) Close ¶
func (c CacheProtoFileRegistry) Close() error
func (CacheProtoFileRegistry) ProtoFileByPath ¶
func (c CacheProtoFileRegistry) ProtoFileByPath(path string) (*descriptorpb.FileDescriptorProto, error)
func (CacheProtoFileRegistry) ProtoFileContainingSymbol ¶
func (c CacheProtoFileRegistry) ProtoFileContainingSymbol(name protoreflect.FullName) (*descriptorpb.FileDescriptorProto, error)
type Codec ¶
type Codec struct { Registry *Registry // contains filtered or unexported fields }
func NewCodec ¶
func NewCodec(remote ProtoFileRegistry) *Codec
func (*Codec) ProtoOptions ¶
func (c *Codec) ProtoOptions() ProtoOptions
type GRPCReflectionProtoFileRegistry ¶
type GRPCReflectionProtoFileRegistry struct {
// contains filtered or unexported fields
}
GRPCReflectionProtoFileRegistry is a ProtoFileRegistry which uses grpc reflection to resolve files.
func NewGRPCReflectionProtoFileRegistry ¶
func NewGRPCReflectionProtoFileRegistry(grpcEndpoint string) (*GRPCReflectionProtoFileRegistry, error)
func (*GRPCReflectionProtoFileRegistry) Close ¶
func (g *GRPCReflectionProtoFileRegistry) Close() error
func (*GRPCReflectionProtoFileRegistry) ProtoFileByPath ¶
func (g *GRPCReflectionProtoFileRegistry) ProtoFileByPath(path string) (*descriptorpb.FileDescriptorProto, error)
func (*GRPCReflectionProtoFileRegistry) ProtoFileContainingSymbol ¶
func (g *GRPCReflectionProtoFileRegistry) ProtoFileContainingSymbol(name protoreflect.FullName) (*descriptorpb.FileDescriptorProto, error)
type MultiProtoFileRegistry ¶
type MultiProtoFileRegistry struct {
// contains filtered or unexported fields
}
func NewMultiProtoFileRegistry ¶
func NewMultiProtoFileRegistry(remotes ...ProtoFileRegistry) *MultiProtoFileRegistry
func (MultiProtoFileRegistry) Close ¶
func (m MultiProtoFileRegistry) Close() error
func (MultiProtoFileRegistry) ProtoFileByPath ¶
func (m MultiProtoFileRegistry) ProtoFileByPath(path string) (*descriptorpb.FileDescriptorProto, error)
func (MultiProtoFileRegistry) ProtoFileContainingSymbol ¶
func (m MultiProtoFileRegistry) ProtoFileContainingSymbol(name protoreflect.FullName) (*descriptorpb.FileDescriptorProto, 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 ¶
func (r *Registry) Save() (*descriptorpb.FileDescriptorSet, error)
Click to show internal directories.
Click to hide internal directories.