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.
Click to show internal directories.
Click to hide internal directories.