pdf

package
v2.2.0-preview.5.4+inc... Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: CC0-1.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const DocumentTypeCertification = "CER"

DocumentTypeCertification is the document type for the certification/signature-form

View Source
const DocumentTypeCreditRelease = "FCR"

DocumentTypeCreditRelease is the document type for the credit release

View Source
const DocumentTypeInformationRelease = "REL"

DocumentTypeInformationRelease is the document type for the infomation release

View Source
const DocumentTypeMedicalRelease = "MEL"

DocumentTypeMedicalRelease is the document type for the medical release

Variables

View Source
var (
	// ReleasePDFs lists the supported archival PDFs.
	ReleasePDFs = []api.ArchivalPdf{
		{"signature-form", "AdditionalComments", DocumentTypeCertification},
		{"release-credit", "Credit", DocumentTypeCreditRelease},
		{"release-medical", "Medical", DocumentTypeMedicalRelease},
		{"release-information", "General", DocumentTypeInformationRelease},
	}
)

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements operations to create and query archival PDFs

func NewPDFService

func NewPDFService(templatePath string) Service

NewPDFService returns a new PDF service

func (Service) CreatePdf

func (service Service) CreatePdf(application map[string]interface{}, pdfType api.ArchivalPdf, hash string, formType string) ([]byte, error)

CreatePdf creates an in-memory PDF from a template, populated with values from the application, using basic text subsitution. Field names (e.g., SSN) are replaced with application values, space padded to a fixed length to ensure that PDF object/xref byte offsets do not need to be updated. Assumes field values are ASCII. The type of PDF controls the template used. The SHA256 hash of the application, in hexadecimal, may also be populated in the resulting PDF.

func (Service) GenerateReleases

func (service Service) GenerateReleases(account api.Account, app api.Application) ([]api.Attachment, error)

GenerateReleases generates the four signed pdfs for a given Application

func (Service) SignatureAvailable

func (service Service) SignatureAvailable(application map[string]interface{}, pdfType api.ArchivalPdf) (*time.Time, bool)

SignatureAvailable returns the date the eApp section corresponding to the PDF type was signed. If the section was not signed (e.g., no responses requiring medical release), returns nil and false.

Jump to

Keyboard shortcuts

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