core

package
v0.0.0-...-158c053 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePDFFromHtml

func GeneratePDFFromHtml(reportParams types.ReportAttributesForPdfGenerator, printingOptions types.PrintingOptions) (*bytes.Buffer, safego.Option[error])

GeneratePDFFromHtml generates a PDF from HTML. It takes in HTML as a string and printing options of type types.PrintingOptions It returns a buffer and an error.

func ParseTemplate

func ParseTemplate(template string, params map[string]any, ds *datasource.DataSource) (string, map[string]any, safego.Option[string])

ParseTemplate takes in a template in Handlebars format with custom directives and returns the template string with the directives replaced with the actual values. It also returns a map of the queries and their results. The template can contain parameters and queries. Parameters are evaluated first, then queries. If a parameter is not provided, the function returns an error message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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