factory

package
v0.0.0-...-d43a3fe Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConverterFactory

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

ConverterFactory creates and manages converters

func NewConverterFactory

func NewConverterFactory(tempDir string, toolManager *tools.ToolManager) (*ConverterFactory, error)

NewConverterFactory creates a new ConverterFactory

func (*ConverterFactory) Cleanup

func (f *ConverterFactory) Cleanup() error

Cleanup removes all temporary files created by the factory

func (*ConverterFactory) CreateTempDir

func (f *ConverterFactory) CreateTempDir(prefix string) (string, error)

CreateTempDir creates a temporary directory in the factory's temp directory

func (*ConverterFactory) CreateTempFile

func (f *ConverterFactory) CreateTempFile(prefix, suffix string) (*os.File, error)

CreateTempFile creates a temporary file in the factory's temp directory

func (*ConverterFactory) GetConverter

func (f *ConverterFactory) GetConverter(sourceFormat, targetFormat string) (iface.Converter, error)

GetConverter returns the appropriate converter for the given source and target formats

type ConverterType

type ConverterType string

ConverterType represents the type of converter

const (
	// DocumentConverterType handles document format conversions
	DocumentConverterType ConverterType = "document"
	// ImageConverterType handles image format conversions
	ImageConverterType ConverterType = "image"
	// AudioConverterType handles audio format conversions
	AudioConverterType ConverterType = "audio"
	// VideoConverterType handles video format conversions
	VideoConverterType ConverterType = "video"
	// ArchiveConverterType handles archive format conversions
	ArchiveConverterType ConverterType = "archive"
)

Jump to

Keyboard shortcuts

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