mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-09-19 10:28:49 +08:00
- Removed the image storage handling from the `_resolve_images` function, which now only decodes images and returns them as inline bytes. - Updated the function's docstring to clarify that image persistence is managed by the Go App, and the return value for `image_dir_path` is always empty. - Adjusted related gRPC and protobuf files to remove the `ConvertToPDF` method and its associated types, streamlining the API. - Enhanced security measures in the frontend by implementing a placeholder for provider images and ensuring proper hydration of protected file images. These changes improve the clarity and efficiency of image processing and API interactions within the application.
608 lines
19 KiB
Go
608 lines
19 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.6
|
|
// protoc v6.33.4
|
|
// source: docreader.proto
|
|
|
|
package proto
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type ReadConfig struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ParserEngine string `protobuf:"bytes,1,opt,name=parser_engine,json=parserEngine,proto3" json:"parser_engine,omitempty"`
|
|
ParserEngineOverrides map[string]string `protobuf:"bytes,2,rep,name=parser_engine_overrides,json=parserEngineOverrides,proto3" json:"parser_engine_overrides,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ReadConfig) Reset() {
|
|
*x = ReadConfig{}
|
|
mi := &file_docreader_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ReadConfig) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ReadConfig) ProtoMessage() {}
|
|
|
|
func (x *ReadConfig) ProtoReflect() protoreflect.Message {
|
|
mi := &file_docreader_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ReadConfig.ProtoReflect.Descriptor instead.
|
|
func (*ReadConfig) Descriptor() ([]byte, []int) {
|
|
return file_docreader_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *ReadConfig) GetParserEngine() string {
|
|
if x != nil {
|
|
return x.ParserEngine
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReadConfig) GetParserEngineOverrides() map[string]string {
|
|
if x != nil {
|
|
return x.ParserEngineOverrides
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Unified read request: set file_content for file mode, url for URL mode.
|
|
type ReadRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
FileContent []byte `protobuf:"bytes,1,opt,name=file_content,json=fileContent,proto3" json:"file_content,omitempty"`
|
|
FileName string `protobuf:"bytes,2,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
|
|
FileType string `protobuf:"bytes,3,opt,name=file_type,json=fileType,proto3" json:"file_type,omitempty"`
|
|
Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
|
|
Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"`
|
|
Config *ReadConfig `protobuf:"bytes,6,opt,name=config,proto3" json:"config,omitempty"`
|
|
RequestId string `protobuf:"bytes,7,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ReadRequest) Reset() {
|
|
*x = ReadRequest{}
|
|
mi := &file_docreader_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ReadRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ReadRequest) ProtoMessage() {}
|
|
|
|
func (x *ReadRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_docreader_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
|
|
func (*ReadRequest) Descriptor() ([]byte, []int) {
|
|
return file_docreader_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *ReadRequest) GetFileContent() []byte {
|
|
if x != nil {
|
|
return x.FileContent
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ReadRequest) GetFileName() string {
|
|
if x != nil {
|
|
return x.FileName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReadRequest) GetFileType() string {
|
|
if x != nil {
|
|
return x.FileType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReadRequest) GetUrl() string {
|
|
if x != nil {
|
|
return x.Url
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReadRequest) GetTitle() string {
|
|
if x != nil {
|
|
return x.Title
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReadRequest) GetConfig() *ReadConfig {
|
|
if x != nil {
|
|
return x.Config
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ReadRequest) GetRequestId() string {
|
|
if x != nil {
|
|
return x.RequestId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ImageRef struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
|
|
OriginalRef string `protobuf:"bytes,2,opt,name=original_ref,json=originalRef,proto3" json:"original_ref,omitempty"`
|
|
MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
|
|
StorageKey string `protobuf:"bytes,4,opt,name=storage_key,json=storageKey,proto3" json:"storage_key,omitempty"` // download URL from shared storage
|
|
ImageData []byte `protobuf:"bytes,5,opt,name=image_data,json=imageData,proto3" json:"image_data,omitempty"` // inline bytes fallback
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ImageRef) Reset() {
|
|
*x = ImageRef{}
|
|
mi := &file_docreader_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ImageRef) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ImageRef) ProtoMessage() {}
|
|
|
|
func (x *ImageRef) ProtoReflect() protoreflect.Message {
|
|
mi := &file_docreader_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ImageRef.ProtoReflect.Descriptor instead.
|
|
func (*ImageRef) Descriptor() ([]byte, []int) {
|
|
return file_docreader_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *ImageRef) GetFilename() string {
|
|
if x != nil {
|
|
return x.Filename
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ImageRef) GetOriginalRef() string {
|
|
if x != nil {
|
|
return x.OriginalRef
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ImageRef) GetMimeType() string {
|
|
if x != nil {
|
|
return x.MimeType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ImageRef) GetStorageKey() string {
|
|
if x != nil {
|
|
return x.StorageKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ImageRef) GetImageData() []byte {
|
|
if x != nil {
|
|
return x.ImageData
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ReadResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
MarkdownContent string `protobuf:"bytes,1,opt,name=markdown_content,json=markdownContent,proto3" json:"markdown_content,omitempty"`
|
|
ImageRefs []*ImageRef `protobuf:"bytes,2,rep,name=image_refs,json=imageRefs,proto3" json:"image_refs,omitempty"`
|
|
ImageDirPath string `protobuf:"bytes,3,opt,name=image_dir_path,json=imageDirPath,proto3" json:"image_dir_path,omitempty"`
|
|
Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ReadResponse) Reset() {
|
|
*x = ReadResponse{}
|
|
mi := &file_docreader_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ReadResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ReadResponse) ProtoMessage() {}
|
|
|
|
func (x *ReadResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_docreader_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.
|
|
func (*ReadResponse) Descriptor() ([]byte, []int) {
|
|
return file_docreader_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *ReadResponse) GetMarkdownContent() string {
|
|
if x != nil {
|
|
return x.MarkdownContent
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReadResponse) GetImageRefs() []*ImageRef {
|
|
if x != nil {
|
|
return x.ImageRefs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ReadResponse) GetImageDirPath() string {
|
|
if x != nil {
|
|
return x.ImageDirPath
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReadResponse) GetMetadata() map[string]string {
|
|
if x != nil {
|
|
return x.Metadata
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ReadResponse) GetError() string {
|
|
if x != nil {
|
|
return x.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListEnginesRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ConfigOverrides map[string]string `protobuf:"bytes,1,rep,name=config_overrides,json=configOverrides,proto3" json:"config_overrides,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListEnginesRequest) Reset() {
|
|
*x = ListEnginesRequest{}
|
|
mi := &file_docreader_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListEnginesRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListEnginesRequest) ProtoMessage() {}
|
|
|
|
func (x *ListEnginesRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_docreader_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListEnginesRequest.ProtoReflect.Descriptor instead.
|
|
func (*ListEnginesRequest) Descriptor() ([]byte, []int) {
|
|
return file_docreader_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *ListEnginesRequest) GetConfigOverrides() map[string]string {
|
|
if x != nil {
|
|
return x.ConfigOverrides
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ParserEngineInfo struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
|
FileTypes []string `protobuf:"bytes,3,rep,name=file_types,json=fileTypes,proto3" json:"file_types,omitempty"`
|
|
Available bool `protobuf:"varint,4,opt,name=available,proto3" json:"available,omitempty"`
|
|
UnavailableReason string `protobuf:"bytes,5,opt,name=unavailable_reason,json=unavailableReason,proto3" json:"unavailable_reason,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ParserEngineInfo) Reset() {
|
|
*x = ParserEngineInfo{}
|
|
mi := &file_docreader_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ParserEngineInfo) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ParserEngineInfo) ProtoMessage() {}
|
|
|
|
func (x *ParserEngineInfo) ProtoReflect() protoreflect.Message {
|
|
mi := &file_docreader_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ParserEngineInfo.ProtoReflect.Descriptor instead.
|
|
func (*ParserEngineInfo) Descriptor() ([]byte, []int) {
|
|
return file_docreader_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *ParserEngineInfo) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ParserEngineInfo) GetDescription() string {
|
|
if x != nil {
|
|
return x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ParserEngineInfo) GetFileTypes() []string {
|
|
if x != nil {
|
|
return x.FileTypes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ParserEngineInfo) GetAvailable() bool {
|
|
if x != nil {
|
|
return x.Available
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *ParserEngineInfo) GetUnavailableReason() string {
|
|
if x != nil {
|
|
return x.UnavailableReason
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListEnginesResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Engines []*ParserEngineInfo `protobuf:"bytes,1,rep,name=engines,proto3" json:"engines,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListEnginesResponse) Reset() {
|
|
*x = ListEnginesResponse{}
|
|
mi := &file_docreader_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListEnginesResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListEnginesResponse) ProtoMessage() {}
|
|
|
|
func (x *ListEnginesResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_docreader_proto_msgTypes[6]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListEnginesResponse.ProtoReflect.Descriptor instead.
|
|
func (*ListEnginesResponse) Descriptor() ([]byte, []int) {
|
|
return file_docreader_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *ListEnginesResponse) GetEngines() []*ParserEngineInfo {
|
|
if x != nil {
|
|
return x.Engines
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_docreader_proto protoreflect.FileDescriptor
|
|
|
|
const file_docreader_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x0fdocreader.proto\x12\tdocreader\"\xeb\x01\n" +
|
|
"\n" +
|
|
"ReadConfig\x12#\n" +
|
|
"\rparser_engine\x18\x01 \x01(\tR\fparserEngine\x12h\n" +
|
|
"\x17parser_engine_overrides\x18\x02 \x03(\v20.docreader.ReadConfig.ParserEngineOverridesEntryR\x15parserEngineOverrides\x1aH\n" +
|
|
"\x1aParserEngineOverridesEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01J\x04\b\x03\x10\x04\"\xe0\x01\n" +
|
|
"\vReadRequest\x12!\n" +
|
|
"\ffile_content\x18\x01 \x01(\fR\vfileContent\x12\x1b\n" +
|
|
"\tfile_name\x18\x02 \x01(\tR\bfileName\x12\x1b\n" +
|
|
"\tfile_type\x18\x03 \x01(\tR\bfileType\x12\x10\n" +
|
|
"\x03url\x18\x04 \x01(\tR\x03url\x12\x14\n" +
|
|
"\x05title\x18\x05 \x01(\tR\x05title\x12-\n" +
|
|
"\x06config\x18\x06 \x01(\v2\x15.docreader.ReadConfigR\x06config\x12\x1d\n" +
|
|
"\n" +
|
|
"request_id\x18\a \x01(\tR\trequestId\"\xa6\x01\n" +
|
|
"\bImageRef\x12\x1a\n" +
|
|
"\bfilename\x18\x01 \x01(\tR\bfilename\x12!\n" +
|
|
"\foriginal_ref\x18\x02 \x01(\tR\voriginalRef\x12\x1b\n" +
|
|
"\tmime_type\x18\x03 \x01(\tR\bmimeType\x12\x1f\n" +
|
|
"\vstorage_key\x18\x04 \x01(\tR\n" +
|
|
"storageKey\x12\x1d\n" +
|
|
"\n" +
|
|
"image_data\x18\x05 \x01(\fR\timageData\"\xa9\x02\n" +
|
|
"\fReadResponse\x12)\n" +
|
|
"\x10markdown_content\x18\x01 \x01(\tR\x0fmarkdownContent\x122\n" +
|
|
"\n" +
|
|
"image_refs\x18\x02 \x03(\v2\x13.docreader.ImageRefR\timageRefs\x12$\n" +
|
|
"\x0eimage_dir_path\x18\x03 \x01(\tR\fimageDirPath\x12A\n" +
|
|
"\bmetadata\x18\x04 \x03(\v2%.docreader.ReadResponse.MetadataEntryR\bmetadata\x12\x14\n" +
|
|
"\x05error\x18\x05 \x01(\tR\x05error\x1a;\n" +
|
|
"\rMetadataEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xb7\x01\n" +
|
|
"\x12ListEnginesRequest\x12]\n" +
|
|
"\x10config_overrides\x18\x01 \x03(\v22.docreader.ListEnginesRequest.ConfigOverridesEntryR\x0fconfigOverrides\x1aB\n" +
|
|
"\x14ConfigOverridesEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xb4\x01\n" +
|
|
"\x10ParserEngineInfo\x12\x12\n" +
|
|
"\x04name\x18\x01 \x01(\tR\x04name\x12 \n" +
|
|
"\vdescription\x18\x02 \x01(\tR\vdescription\x12\x1d\n" +
|
|
"\n" +
|
|
"file_types\x18\x03 \x03(\tR\tfileTypes\x12\x1c\n" +
|
|
"\tavailable\x18\x04 \x01(\bR\tavailable\x12-\n" +
|
|
"\x12unavailable_reason\x18\x05 \x01(\tR\x11unavailableReason\"L\n" +
|
|
"\x13ListEnginesResponse\x125\n" +
|
|
"\aengines\x18\x01 \x03(\v2\x1b.docreader.ParserEngineInfoR\aengines2\x96\x01\n" +
|
|
"\tDocReader\x129\n" +
|
|
"\x04Read\x12\x16.docreader.ReadRequest\x1a\x17.docreader.ReadResponse\"\x00\x12N\n" +
|
|
"\vListEngines\x12\x1d.docreader.ListEnginesRequest\x1a\x1e.docreader.ListEnginesResponse\"\x00B5Z3github.com/Tencent/WeKnora/internal/docreader/protob\x06proto3"
|
|
|
|
var (
|
|
file_docreader_proto_rawDescOnce sync.Once
|
|
file_docreader_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_docreader_proto_rawDescGZIP() []byte {
|
|
file_docreader_proto_rawDescOnce.Do(func() {
|
|
file_docreader_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_docreader_proto_rawDesc), len(file_docreader_proto_rawDesc)))
|
|
})
|
|
return file_docreader_proto_rawDescData
|
|
}
|
|
|
|
var file_docreader_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
|
var file_docreader_proto_goTypes = []any{
|
|
(*ReadConfig)(nil), // 0: docreader.ReadConfig
|
|
(*ReadRequest)(nil), // 1: docreader.ReadRequest
|
|
(*ImageRef)(nil), // 2: docreader.ImageRef
|
|
(*ReadResponse)(nil), // 3: docreader.ReadResponse
|
|
(*ListEnginesRequest)(nil), // 4: docreader.ListEnginesRequest
|
|
(*ParserEngineInfo)(nil), // 5: docreader.ParserEngineInfo
|
|
(*ListEnginesResponse)(nil), // 6: docreader.ListEnginesResponse
|
|
nil, // 7: docreader.ReadConfig.ParserEngineOverridesEntry
|
|
nil, // 8: docreader.ReadResponse.MetadataEntry
|
|
nil, // 9: docreader.ListEnginesRequest.ConfigOverridesEntry
|
|
}
|
|
var file_docreader_proto_depIdxs = []int32{
|
|
7, // 0: docreader.ReadConfig.parser_engine_overrides:type_name -> docreader.ReadConfig.ParserEngineOverridesEntry
|
|
0, // 1: docreader.ReadRequest.config:type_name -> docreader.ReadConfig
|
|
2, // 2: docreader.ReadResponse.image_refs:type_name -> docreader.ImageRef
|
|
8, // 3: docreader.ReadResponse.metadata:type_name -> docreader.ReadResponse.MetadataEntry
|
|
9, // 4: docreader.ListEnginesRequest.config_overrides:type_name -> docreader.ListEnginesRequest.ConfigOverridesEntry
|
|
5, // 5: docreader.ListEnginesResponse.engines:type_name -> docreader.ParserEngineInfo
|
|
1, // 6: docreader.DocReader.Read:input_type -> docreader.ReadRequest
|
|
4, // 7: docreader.DocReader.ListEngines:input_type -> docreader.ListEnginesRequest
|
|
3, // 8: docreader.DocReader.Read:output_type -> docreader.ReadResponse
|
|
6, // 9: docreader.DocReader.ListEngines:output_type -> docreader.ListEnginesResponse
|
|
8, // [8:10] is the sub-list for method output_type
|
|
6, // [6:8] is the sub-list for method input_type
|
|
6, // [6:6] is the sub-list for extension type_name
|
|
6, // [6:6] is the sub-list for extension extendee
|
|
0, // [0:6] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_docreader_proto_init() }
|
|
func file_docreader_proto_init() {
|
|
if File_docreader_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_docreader_proto_rawDesc), len(file_docreader_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 10,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_docreader_proto_goTypes,
|
|
DependencyIndexes: file_docreader_proto_depIdxs,
|
|
MessageInfos: file_docreader_proto_msgTypes,
|
|
}.Build()
|
|
File_docreader_proto = out.File
|
|
file_docreader_proto_goTypes = nil
|
|
file_docreader_proto_depIdxs = nil
|
|
}
|