Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupForNonProvisioning(msg protoreflect.Message)
- func CleanupSensitive(msg protoreflect.Message)
- func LoadDescriptorByName(src *FileDescriptorSetAndDeps, name string) (*protoregistry.Files, protoreflect.Descriptor, error)
- func LoadMessageByName(src *FileDescriptorSetAndDeps, name string) (*protoregistry.Files, protoreflect.MessageDescriptor, error)
- func LookupDescriptorProto(src *FileDescriptorSetAndDeps, typename string) (*dpb.FileDescriptorProto, *dpb.DescriptorProto)
- func LookupEnumDescriptorProto(src *FileDescriptorSetAndDeps, typename string) *dpb.EnumDescriptorProto
- func ReadFile[V proto.Message](path string) (V, error)
- func ReadFileAndBytes[V proto.Message](path string) (V, []byte, error)
- type AnyResolver
- type FileDescriptorSetAndDeps
- func (fds *FileDescriptorSetAndDeps) AsFileDescriptorSet() *dpb.FileDescriptorSet
- func (*FileDescriptorSetAndDeps) Descriptor() ([]byte, []int)deprecated
- func (x *FileDescriptorSetAndDeps) GetDependency() []*descriptorpb.FileDescriptorProto
- func (x *FileDescriptorSetAndDeps) GetFile() []*descriptorpb.FileDescriptorProto
- func (*FileDescriptorSetAndDeps) ProtoMessage()
- func (x *FileDescriptorSetAndDeps) ProtoReflect() protoreflect.Message
- func (x *FileDescriptorSetAndDeps) Reset()
- func (x *FileDescriptorSetAndDeps) String() string
- type Location
- type ParseOpts
- func (opts ParseOpts) LoadMessageAtLocation(fsys fs.FS, loc Location, sources []string, name string) (protoreflect.MessageDescriptor, error)
- func (opts ParseOpts) Parse(fsys fs.FS, files []string) (*FileDescriptorSetAndDeps, error)
- func (opts ParseOpts) ParseAtLocation(fsys fs.FS, loc Location, files []string) (*FileDescriptorSetAndDeps, error)
- type TypeReference
Constants ¶
View Source
const FoundationTypeUrlBaseSlash = "type.foundation.namespacelabs.dev/"
Variables ¶
View Source
var File_internal_codegen_protos_filedescset_proto protoreflect.FileDescriptor
View Source
var WriteFile = protos.WriteFile
Functions ¶
func CleanupForNonProvisioning ¶
func CleanupForNonProvisioning(msg protoreflect.Message)
func CleanupSensitive ¶
func CleanupSensitive(msg protoreflect.Message)
func LoadDescriptorByName ¶
func LoadDescriptorByName(src *FileDescriptorSetAndDeps, name string) (*protoregistry.Files, protoreflect.Descriptor, error)
func LoadMessageByName ¶
func LoadMessageByName(src *FileDescriptorSetAndDeps, name string) (*protoregistry.Files, protoreflect.MessageDescriptor, error)
func LookupDescriptorProto ¶
func LookupDescriptorProto(src *FileDescriptorSetAndDeps, typename string) (*dpb.FileDescriptorProto, *dpb.DescriptorProto)
func LookupEnumDescriptorProto ¶
func LookupEnumDescriptorProto(src *FileDescriptorSetAndDeps, typename string) *dpb.EnumDescriptorProto
Types ¶
type AnyResolver ¶
type AnyResolver interface { protoregistry.ExtensionTypeResolver protoregistry.MessageTypeResolver FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumType, error) }
func AsResolver ¶
func AsResolver(pr *protoregistry.Files) (AnyResolver, error)
type FileDescriptorSetAndDeps ¶
type FileDescriptorSetAndDeps struct { File []*descriptorpb.FileDescriptorProto `protobuf:"bytes,1,rep,name=file,proto3" json:"file,omitempty"` Dependency []*descriptorpb.FileDescriptorProto `protobuf:"bytes,2,rep,name=dependency,proto3" json:"dependency,omitempty"` // contains filtered or unexported fields }
func Merge ¶
func Merge(files ...*FileDescriptorSetAndDeps) (*FileDescriptorSetAndDeps, error)
Merge produces a filename-only merge of all provided files. It is the caller's responsibility to make sure the contents of the protos are consistent and mergeable.
func (*FileDescriptorSetAndDeps) AsFileDescriptorSet ¶
func (fds *FileDescriptorSetAndDeps) AsFileDescriptorSet() *dpb.FileDescriptorSet
func (*FileDescriptorSetAndDeps) Descriptor
deprecated
func (*FileDescriptorSetAndDeps) Descriptor() ([]byte, []int)
Deprecated: Use FileDescriptorSetAndDeps.ProtoReflect.Descriptor instead.
func (*FileDescriptorSetAndDeps) GetDependency ¶
func (x *FileDescriptorSetAndDeps) GetDependency() []*descriptorpb.FileDescriptorProto
func (*FileDescriptorSetAndDeps) GetFile ¶
func (x *FileDescriptorSetAndDeps) GetFile() []*descriptorpb.FileDescriptorProto
func (*FileDescriptorSetAndDeps) ProtoMessage ¶
func (*FileDescriptorSetAndDeps) ProtoMessage()
func (*FileDescriptorSetAndDeps) ProtoReflect ¶
func (x *FileDescriptorSetAndDeps) ProtoReflect() protoreflect.Message
func (*FileDescriptorSetAndDeps) Reset ¶
func (x *FileDescriptorSetAndDeps) Reset()
func (*FileDescriptorSetAndDeps) String ¶
func (x *FileDescriptorSetAndDeps) String() string
type ParseOpts ¶
func (ParseOpts) LoadMessageAtLocation ¶
func (opts ParseOpts) LoadMessageAtLocation(fsys fs.FS, loc Location, sources []string, name string) (protoreflect.MessageDescriptor, error)
func (ParseOpts) ParseAtLocation ¶
type TypeReference ¶
type TypeReference struct { Package schema.PackageName ProtoType string Builtin bool }
func Ref ¶
func Ref(dep *anypb.Any) *TypeReference
Source Files ¶
Click to show internal directories.
Click to hide internal directories.