convert

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotSupported = errors.New("not supported")
)

Functions

This section is empty.

Types

type Converter

type Converter interface {
	SupportedExtensions() []string
	Convert(ctx context.Context, filename string, r io.Reader) (io.ReadCloser, error)
}

Converter converts a given file to its markdown equivalent.

type RateLimited

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

func NewRateLimited

func NewRateLimited(fileConverter Converter, interval time.Duration, maxBurst int) *RateLimited

func (*RateLimited) Convert

func (c *RateLimited) Convert(ctx context.Context, filename string, r io.Reader) (io.ReadCloser, error)

Convert implements Converter.

func (*RateLimited) SupportedExtensions

func (c *RateLimited) SupportedExtensions() []string

SupportedExtensions implements Converter.

type Retry

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

func NewRetry

func NewRetry(fileConverter Converter, baseDelay time.Duration, maxRetries int) *Retry

func (*Retry) Convert

func (c *Retry) Convert(ctx context.Context, filename string, r io.Reader) (io.ReadCloser, error)

Convert implements Converter.

func (*Retry) SupportedExtensions

func (c *Retry) SupportedExtensions() []string

SupportedExtensions implements Converter.

type Routed

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

func NewRouted

func NewRouted(converters ...Converter) *Routed

func (*Routed) Convert

func (c *Routed) Convert(ctx context.Context, filename string, r io.Reader) (io.ReadCloser, error)

Convert implements Converter.

func (*Routed) SupportedExtensions

func (c *Routed) SupportedExtensions() []string

SupportedExtensions implements Converter.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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