template

package
v0.0.0-...-341b388 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(t iTemplate)

Types

type AppointmentDetails

type AppointmentDetails struct {
	Heading string
	Value   string
}

type LetterAddress

type LetterAddress struct {
	Name     string `fake:"{name}"`
	Line1    string `fake:"{street}"`
	Line2    string
	City     string `fake:"{city}"`
	Postcode string `fake:"{zip}"`
}

type PaymentDetails

type PaymentDetails struct {
	ServiceName string
	Fee         string
	Discount    string
	VATNumber   string
	Currency    string
}

type ReceiptTemplate

type ReceiptTemplate struct {
	Template
	LogoPath        string
	LetterAddress   LetterAddress
	AppointmentDate time.Time
	ServiceName     string
	Location        string
	PaymentDetails  PaymentDetails
	Email           string
	LegalFootNote   string
}

func NewReceiptTemplate

func NewReceiptTemplate() *ReceiptTemplate

func (*ReceiptTemplate) BuildFooter

func (b *ReceiptTemplate) BuildFooter()

func (*ReceiptTemplate) BuildHeading

func (b *ReceiptTemplate) BuildHeading()

func (*ReceiptTemplate) BuildMainSection

func (b *ReceiptTemplate) BuildMainSection()

func (*ReceiptTemplate) SetPageMargins

func (b *ReceiptTemplate) SetPageMargins()

type Template

type Template struct {
	Pdf pdf.Maroto
}

func (*Template) BuildFooter

func (t *Template) BuildFooter()

func (*Template) BuildHeading

func (t *Template) BuildHeading()

func (*Template) BuildMainSection

func (t *Template) BuildMainSection()

func (*Template) Generate

func (t *Template) Generate()

* Every template will have a header, main and footer The implementation for this is handled by the specific template but if the implementation is not handled in the derived class then the base method is used instead

func (*Template) Save

func (t *Template) Save()

func (*Template) SetPageMargins

func (t *Template) SetPageMargins()

Jump to

Keyboard shortcuts

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