Documentation ¶
Index ¶
- Constants
- func HTML() *cli.Command
- func HTMLMiddleware(funcs ...HTMLTransformerOptionFunc) pipeline.Middleware
- func Markdown() *cli.Command
- func MarkdownMiddleware(funcs ...MarkdownTransformerOptionFunc) pipeline.Middleware
- func PDF() *cli.Command
- func PDFMiddleware(funcs ...PDFTransformerOptionFunc) pipeline.Middleware
- func Root() *cli.Command
- func TemplateMiddleware(funcs ...TemplateTransformerOptionFunc) pipeline.Middleware
- func ToggleableMiddleware(t pipeline.Transformer, enabled bool) pipeline.Middleware
- type HTMLTransformerOptionFunc
- type HTMLTransformerOptions
- type MarkdownTransformerOptionFunc
- type MarkdownTransformerOptions
- type PDFTransformerOptionFunc
- func WithMarginBottom(margin float64) PDFTransformerOptionFunc
- func WithMarginLeft(margin float64) PDFTransformerOptionFunc
- func WithMarginRight(margin float64) PDFTransformerOptionFunc
- func WithMarginTop(margin float64) PDFTransformerOptionFunc
- func WithScale(scale float64) PDFTransformerOptionFunc
- type PDFTransformerOptions
- type TemplateTransformerOptionFunc
- type TemplateTransformerOptions
Constants ¶
View Source
const ( DefaultPDFMargin float64 = 1 DefaultPDFScale float64 = 1 )
Variables ¶
This section is empty.
Functions ¶
func HTMLMiddleware ¶ added in v0.3.0
func HTMLMiddleware(funcs ...HTMLTransformerOptionFunc) pipeline.Middleware
func MarkdownMiddleware ¶ added in v0.3.0
func MarkdownMiddleware(funcs ...MarkdownTransformerOptionFunc) pipeline.Middleware
func PDFMiddleware ¶ added in v0.3.0
func PDFMiddleware(funcs ...PDFTransformerOptionFunc) pipeline.Middleware
func TemplateMiddleware ¶ added in v0.3.0
func TemplateMiddleware(funcs ...TemplateTransformerOptionFunc) pipeline.Middleware
func ToggleableMiddleware ¶ added in v0.3.0
func ToggleableMiddleware(t pipeline.Transformer, enabled bool) pipeline.Middleware
Types ¶
type HTMLTransformerOptionFunc ¶
type HTMLTransformerOptionFunc func(opts *HTMLTransformerOptions)
func WithLayoutURL ¶
func WithLayoutURL(layoutURL string) HTMLTransformerOptionFunc
func WithLayoutVars ¶
func WithLayoutVars(vars map[string]any) HTMLTransformerOptionFunc
func WithMarkdownTransformerOptions ¶
func WithMarkdownTransformerOptions(funcs ...MarkdownTransformerOptionFunc) HTMLTransformerOptionFunc
type HTMLTransformerOptions ¶
type HTMLTransformerOptions struct { *MarkdownTransformerOptions LayoutURL string LayoutVars map[string]any }
func NewHTMLTransformerOptions ¶
func NewHTMLTransformerOptions(funcs ...HTMLTransformerOptionFunc) *HTMLTransformerOptions
type MarkdownTransformerOptionFunc ¶
type MarkdownTransformerOptionFunc func(opts *MarkdownTransformerOptions)
func WithSourceURL ¶ added in v0.2.0
func WithSourceURL(sourceURL *url.URL) MarkdownTransformerOptionFunc
type MarkdownTransformerOptions ¶
func NewMarkdownTransformerOptions ¶
func NewMarkdownTransformerOptions(funcs ...MarkdownTransformerOptionFunc) *MarkdownTransformerOptions
type PDFTransformerOptionFunc ¶
type PDFTransformerOptionFunc func(opts *PDFTransformerOptions)
func WithMarginBottom ¶
func WithMarginBottom(margin float64) PDFTransformerOptionFunc
func WithMarginLeft ¶
func WithMarginLeft(margin float64) PDFTransformerOptionFunc
func WithMarginRight ¶
func WithMarginRight(margin float64) PDFTransformerOptionFunc
func WithMarginTop ¶
func WithMarginTop(margin float64) PDFTransformerOptionFunc
func WithScale ¶
func WithScale(scale float64) PDFTransformerOptionFunc
type PDFTransformerOptions ¶
type PDFTransformerOptions struct { MarginTop float64 MarginLeft float64 MarginRight float64 MarginBottom float64 Scale float64 }
func NewPDFTransformerOptions ¶
func NewPDFTransformerOptions(funcs ...PDFTransformerOptionFunc) *PDFTransformerOptions
type TemplateTransformerOptionFunc ¶
type TemplateTransformerOptionFunc func(opts *TemplateTransformerOptions)
func WithFuncs ¶
func WithFuncs(funcs template.FuncMap) TemplateTransformerOptionFunc
func WithVars ¶
func WithVars(vars map[string]any) TemplateTransformerOptionFunc
type TemplateTransformerOptions ¶
func NewTemplateTransformerOptions ¶
func NewTemplateTransformerOptions(funcs ...TemplateTransformerOptionFunc) *TemplateTransformerOptions
Click to show internal directories.
Click to hide internal directories.