Documentation
¶
Index ¶
- type Pipeline
- func (p *Pipeline) Enqueue(ctx context.Context, asset *store.Asset)
- func (p *Pipeline) GeneratePreviewPDF(ctx context.Context, asset *store.Asset) (io.ReadCloser, error)
- func (p *Pipeline) GenerateThumbnail(ctx context.Context, asset *store.Asset, w, h int, format string) (io.ReadCloser, string, error)
- func (p *Pipeline) ObserveProcessing(fn func(time.Duration))
- func (p *Pipeline) Process(ctx context.Context, asset *store.Asset) error
- func (p *Pipeline) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
func (*Pipeline) GeneratePreviewPDF ¶ added in v0.2.0
func (p *Pipeline) GeneratePreviewPDF(ctx context.Context, asset *store.Asset) (io.ReadCloser, error)
GeneratePreviewPDF returns a PDF rendering of an office document, converting it with LibreOffice headless on first use and caching the result under the preview key. It returns store.ErrNotFound when the document type is not previewable or when soffice is not installed, so the API layer answers 404 and clients fall back to downloading the original file.
func (*Pipeline) GenerateThumbnail ¶
func (*Pipeline) ObserveProcessing ¶
Click to show internal directories.
Click to hide internal directories.