paperwork

package
v0.0.0-...-c407d37 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GotenbergProtocol is the environment variable that contains the protocol to use when communicating with
	// Gotenberg.
	GotenbergProtocol string = "GOTENBERG_PROTOCOL"
	// GotenbergHost is the environment variable that contains the host to use when communicating with Gotenberg.
	GotenbergHost string = "GOTENBERG_HOST"
	// GotenbergPort is the environment variable that contains the port to use when communicating with Gotenberg.
	GotenbergPort string = "GOTENBERG_PORT"
)

These are helper constants to make it easier to refer to the expected environment variables.

Variables

This section is empty.

Functions

func MakeFormTemplate

func MakeFormTemplate(data interface{}, fileName string, formLayout paperworkforms.FormLayout, formType services.FormType) (services.FormTemplate, error)

MakeFormTemplate creates form template with all needed parameters from handler

func NewFormCreator

func NewFormCreator(fileStorer FileStorer, formFiller FormFiller) services.FormCreator

NewFormCreator creates a new struct with service dependencies

func NewMoveUserUploadToPDFDownloader

func NewMoveUserUploadToPDFDownloader(pdfGenerator *paperwork.Generator) (services.PrimeDownloadMoveUploadPDFGenerator, error)

NewMoveUserUploadToPDFDownloader creates a new userUploadToPDFDownloader struct with the service dependencies

func NewPDFMerger

func NewPDFMerger() services.PDFMerger

NewPDFMerger creates a new pdfMerger struct

func NewUserUploadToPDFConverter

func NewUserUploadToPDFConverter(userUploader *uploader.UserUploader) services.UserUploadToPDFConverter

NewUserUploadToPDFConverter creates a new userUploadToPDFConverter struct with the service dependencies

Types

type FileStorer

type FileStorer interface {
	Create(string) (afero.File, error)
}

FileStorer is an interface for fileStorer implementation

type FormFiller

type FormFiller interface {
	AppendPage(io.ReadSeeker, map[string]paperworkforms.FieldPos, interface{}) error
	Output(io.Writer) error
}

FormFiller is an interface for formFiller implementation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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