config

package
v2.0.0-alpha.14 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 6 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	WithPageSize(size pagesize.Type) Builder
	WithDimensions(dimensions *Dimensions) Builder
	WithMargins(margins *Margins) Builder
	WithProvider(providerType provider.Type) Builder
	WithWorkerPoolSize(poolSize int) Builder
	WithDebug(on bool) Builder
	WithMaxGridSize(maxGridSize int) Builder
	WithFont(font *props.Font) Builder
	AddUTF8Font(family string, style fontstyle.Type, file string) Builder
	WithPageNumber(pattern string, place props.Place) Builder
	Build() *Config
}

func NewBuilder

func NewBuilder() Builder

type Config

type Config struct {
	ProviderType      provider.Type
	Dimensions        *Dimensions
	Margins           *Margins
	DefaultFont       *props.Font
	CustomFonts       []*CustomFont
	Workers           int
	Debug             bool
	MaxGridSize       int
	PageNumberPattern string
	PageNumberPlace   props.Place
}

type CustomFont

type CustomFont struct {
	Family string
	Style  fontstyle.Type
	File   string
}

type Dimensions

type Dimensions struct {
	Width  float64
	Height float64
}

type Margins

type Margins struct {
	Left  float64
	Right float64
	Top   float64
}

Jump to

Keyboard shortcuts

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