exporter

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Portrait  = "portrait"
	Landscape = "landscape"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Col

type Col interface {
	Value(value any) Col
}

type Csv

type Csv interface {
	Divider(divider rune) Csv
	Row() Row
	Export() ([]byte, error)

	MustExport() []byte
}

type Excel

type Excel interface {
	CreateSheet(name string) Sheet
	Export() ([]byte, error)

	MustExport() []byte
}

type Exporter

type Exporter interface {
	Csv() Csv
	Excel() Excel
	Pdf(host string) Pdf
}

func New

func New() Exporter

type Pdf

type Pdf interface {
	Orientation() PdfOrientation
	Write() PdfWriter
	Margin(top, right, bottom, left float32) Pdf
	Assets(paths ...string) Pdf

	Export() ([]byte, error)
	MustExport() []byte
}

type PdfOrientation

type PdfOrientation interface {
	Portrait() Pdf
	Landscape() Pdf
}

type PdfWriter

type PdfWriter interface {
	Header(nodes ...gox.Node) PdfWriter
	Body(nodes ...gox.Node) PdfWriter
	Footer(nodes ...gox.Node) PdfWriter
}

type Row

type Row interface {
	Col() Col
}

type Sheet

type Sheet interface {
	Row() Row
}

Jump to

Keyboard shortcuts

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