FileExtractor is the interface that protocol-specific extractors must implement
| 62 | |
| 63 | // FileExtractor is the interface that protocol-specific extractors must implement |
| 64 | type FileExtractor interface { |
| 65 | // GetFileHandle generates a unique identifier for a file in the conversation |
| 66 | GetFileHandle(conv *core.ConversationInfo, isOrigin bool, depth int) string |
| 67 | |
| 68 | // DescribeFile returns a human-readable description of the file |
| 69 | DescribeFile(handle *FileHandle) string |
| 70 | |
| 71 | // ExtractFile performs the actual file extraction |
| 72 | ExtractFile(conv *core.ConversationInfo, data []byte, metadata FileMetadata) error |
| 73 | |
| 74 | // ProtocolName returns the name of the protocol this extractor handles |
| 75 | ProtocolName() string |
| 76 | } |
| 77 | |
| 78 | // extractorRegistry holds all registered file extractors |
| 79 | type extractorRegistry struct { |
no outgoing calls
no test coverage detected