paperwork

package
v0.0.0-...-0751cc3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

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

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