generator

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: CC0-1.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSV added in v0.6.0

type CSV struct {
	// contains filtered or unexported fields
}

func NewCSV added in v0.6.0

func NewCSV() *CSV

New - to initialize CSV struct object fileName: by default should be "generated-csv.csv"

func (*CSV) AppendDataRow added in v0.6.0

func (c *CSV) AppendDataRow(data []string) CSVs

func (*CSV) Generate added in v0.6.0

func (c *CSV) Generate() error

func (*CSV) SetFileName added in v0.6.0

func (c *CSV) SetFileName(fileName string) CSVs

func (*CSV) SetHeader added in v0.6.0

func (c *CSV) SetHeader(data []string) CSVs

type CSVs added in v0.6.0

type CSVs interface {
	SetFileName(fileName string) CSVs
	AppendDataRow(data []string) CSVs
	SetHeader(data []string) CSVs
	Generate() error
}

type ConverterOptions

type ConverterOptions struct {
	PageSize     string
	MarginBottom uint
	MarginTop    uint
	MarginLeft   uint
	MarginRight  uint
}

type Excel added in v0.6.0

type Excel struct {
	// contains filtered or unexported fields
}

func NewExcel added in v0.6.0

func NewExcel() *Excel

New - to initialize Excel struct object fileName: by default should be "generated.xlsx"

func (*Excel) AppendDataRow added in v0.6.0

func (c *Excel) AppendDataRow(data []string) Excels

func (*Excel) Generate added in v0.6.0

func (c *Excel) Generate() error

func (*Excel) SetFileName added in v0.6.0

func (c *Excel) SetFileName(fileName string) Excels

func (*Excel) SetHeader added in v0.6.0

func (c *Excel) SetHeader(data []string) Excels

func (*Excel) SetSheetName added in v0.6.0

func (c *Excel) SetSheetName(sheetName string) Excels

type Excels added in v0.6.0

type Excels interface {
	SetFileName(fileName string) Excels
	SetSheetName(sheetName string) Excels
	AppendDataRow(data []string) Excels
	SetHeader(data []string) Excels
	Generate() error
}

type PDF

type PDF struct {
	// contains filtered or unexported fields
}

func NewPDF

func NewPDF(options ...*ConverterOptions) (*PDF, error)

func (*PDF) Error

func (c *PDF) Error() error

func (*PDF) Generate

func (c *PDF) Generate() error

func (*PDF) SetFileName

func (c *PDF) SetFileName(fileName *string) PDFs

func (*PDF) SetFooterHTMLTemplate

func (c *PDF) SetFooterHTMLTemplate(footerHTMLPath string) PDFs

func (*PDF) SetTemplate

func (c *PDF) SetTemplate(templatePath string, data interface{}) PDFs

type PDFs

type PDFs interface {
	SetTemplate(templatePath string, data interface{}) PDFs
	SetFooterHTMLTemplate(footerHTMLPath string) PDFs
	SetFileName(fileName *string) PDFs
	Generate() error
	Error() error
}

type QR

type QR struct {
	// contains filtered or unexported fields
}

func (*QR) Generate

func (q *QR) Generate() error

func (*QR) SetFileName

func (q *QR) SetFileName(fileName *string) QRs

func (*QR) SetLogoImg

func (q *QR) SetLogoImg(logoPath string) QRs

type QRs

type QRs interface {
	SetLogoImg(logoPath string) QRs
	SetFileName(fileName *string) QRs
	Generate() error
}

func NewQR

func NewQR(content string) (QRs, error)

Jump to

Keyboard shortcuts

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