exporter

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(format string, creator ArticleExporterCreator)

Register an article Exporter to the registry

Types

type ArticleExporter

type ArticleExporter interface {
	// Export an article to a specific format
	Export(ctx context.Context, article *model.Article) (*downloader.WebAsset, error)
}

ArticleExporter is service used to export an article to a specific format.

func NewArticleExporter

func NewArticleExporter(format string, dl downloader.Downloader) (ArticleExporter, error)

NewArticleExporter create new article Exporter

type ArticleExporterCreator

type ArticleExporterCreator func(dl downloader.Downloader) (ArticleExporter, error)

ArticleExporterCreator function for create an article exporter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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