business

package
v0.0.0-...-e7e2df9 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReportService

func NewReportService(pdf data.ReportExporter, png data.ReportExporter, templateService TemplateService, baseUrl string) *reportService

func NewTemplateService

func NewTemplateService(engine data.TemplateEngine, repo data.TemplateRepository) *templateService

func PrintByteData

func PrintByteData(data []byte, printerName string) error

Types

type ReportService

type ReportService interface {
	ExportReportHtml(reportName string, data interface{}) ([]byte, error)
	ExportReportPdf(reportName string, data interface{}) ([]byte, error)
	ExportReportPng(reportName string, data interface{}) ([]byte, error)
	PrintReport(reportName string, data interface{}, printerName string) error
}

type TemplateService

type TemplateService interface {
	ListTemplates() ([]map[string]interface{}, error)
	GetTemplate(reportId string) ([]byte, error)
	RenderTemplate(reportId string, data interface{}) ([]byte, error)
}

Jump to

Keyboard shortcuts

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