exporter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 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