pdfstore

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyPath = errors.New("FileStoreConfig.Path must be not empty")
View Source
var ErrNilFileNameGenerator = errors.New("FileStoreConfig.FileNameGenerator must be non-nil value")

Functions

func DefaultFileNameGenerator

func DefaultFileNameGenerator() func() string

DefaultFileNameGenerator provides function that generates file names in next format dd-mm-yyyy-hh-mm-{base64 string of 6 chars}.pdf

Types

type FileStore

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

func NewFileStore

func NewFileStore(config *FileStoreConfig) (*FileStore, error)

func (FileStore) Write

func (fs FileStore) Write(buffer []byte) (n int, err error)

type FileStoreConfig

type FileStoreConfig struct {
	Path              string
	Permissions       os.FileMode
	FileNameGenerator func() string
}

type PdfStore

type PdfStore interface {
	io.Writer
}

PdfStore is the interface that handles PDF file saving after printing.

Jump to

Keyboard shortcuts

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